#WYMAGANE: SkQuery, Skript #Skrypt by NNorbertPL milego uzywania. options: host: localhost #ip do bazy mysql user: root #login baza: skript #nazwa bazy passwd: maslo123 #haslo max-ilosc-gwarpow: 3 #maxymalna ilosc gwarpow tp-time: 5 #czas po jakim tepnie do gwarpa #Musza byc podane te same wartosci co w FunnyGuilds. #Moze nie dzialac z niektorymi bazami danych (wina lezy po stronie SkQuery). on command: command is "g" or "gildia": wait a tick send "&a/gsetwarp &8- &7Tworzy warp" send "&a/gwarp &8- &7Teleportuje do warpu" send "&a/gdelwarp &8- &7Usuwa warp" script options: $ init com.mysql.jdbc.Driver $ db url jdbc:mysql://{@host}:3306/{@baza} $ db username {@user} $ db password {@passwd} command /gsetwarp [] []: trigger: set {_guild::*} to objects in column "guild" from result of query "SELECT guild from users where name='%player%';" {_guild::*} is not set: send "&cNie masz gildii!" stop set {_owner::*} to objects in column "owner" from result of query "SELECT owner from guilds where name='%{_guild::*}%';" set {_deputy::*} to objects in column "deputy" from result of query "SELECT deputy from guilds where name='%{_guild::*}%';" set {_guild} to "%{_guild::*}%" set {_deputy} to "%{_deputy::*}%" {_owner::*} is player: set {_perms} to true {_deputy} contains "%player%": set {_perms} to true {_perms} is not set: send "&cNie jestes zalozycielem ani zastepca gildii!" stop arg 1 is not set: send "&6Poprawne uzycie: &c/gsetwarp " stop set {_x} to size of {gwarp::%{_guild}%::*} {_x} is greater than {@max-ilosc-gwarpow}: send "&6Maksymalna liczba GuildWarpow to &c{@max-ilosc-gwarpow}&6. GuildWarp mozna usunac komenda &c/gdelwarp &6." stop {gwarp::%{_guild}%::%arg 1%} is set: send "&6Taki GuildWarp juz istnieje!" send "&cjesli chcesz go usunac wpisz /gdelwarp " stop set {gwarp::%{_guild}%::%arg 1%} to player's location send "&6Stworzono GuildWarp o nazwie: &c%arg 1%" stop command /gwarp [] []: trigger: set {_guild::*} to objects in column "guild" from result of query "SELECT guild from users where name='%player%';" set {_members::*} to objects in column "members" from result of query "SELECT members from guilds where name='%{_guild::*}%';" set {_guild} to "%{_guild::*}%" {_guild::*} is not set: send "&cNie masz gildii!" stop set {_members} to "%{_members::*}%" {_members} contains "%player%": set {_perms} to true {_perms} is not set: send "&cNie masz gildii!" stop {_members} contains "%player%": arg 1 is not set: send "&6Poprawne uzycie: &c/gwarp " loop {gwarp::%{_guild}%::*}: {_warps} is not set: set {_warps} to "%loop-index%" else: set {_warps} to "%{_warps}%, %loop-index%" size of {gwarp::%{_guild}%::*} is 0: set {_warps} to "BRAK" send "&cWarpy: &b%{_warps}%" stop arg 1 is set: {gwarp::%{_guild}%::%arg 1%} is set: send "&6Teleportowanie nastapi za: &c{@tp-time} sekund&6." loop {@tp-time} times: set {_x} to rounded x-coordinate of player set {_z} to rounded x-coordinate of player set {_y} to rounded y-coordinate of player wait 1 seconds set {_x1} to rounded x-coordinate of player set {_z1} to rounded x-coordinate of player set {_y1} to rounded y-coordinate of player {_x} is not {_x1}: send "&cWykryto ruch! Teleportacja anulowana!" stop {_y} is not {_y1}: send "&cWykryto ruch! Teleportacja anulowana!" stop {_z} is not {_z1}: send "&cWykryto ruch! Teleportacja anulowana!" stop teleport player to {gwarp::%{_guild}%::%arg 1%} send "&6Teleportowano do GuildWarpu o nazwie: &c%arg 1%&6." else: send "&cTaki GuildWarp nie istnieje!" loop {gwarp::%{_guild}%::*}: {_warps} is not set: set {_warps} to "%loop-index%" else: set {_warps} to "%{_warps}%, %loop-index%" size of {gwarp::%{_guild}%::*} is 0: set {_warps} to "BRAK" send "&cWarpy: &b%{_warps}%" command /gdelwarp [] []: trigger: set {_guild::*} to objects in column "guild" from result of query "SELECT guild from users where name='%player%';" {_guild::*} is not set: send "&cNie masz gildii!" stop set {_owner::*} to objects in column "owner" from result of query "SELECT owner from guilds where name='%{_guild::*}%';" set {_deputy::*} to objects in column "deputy" from result of query "SELECT deputy from guilds where name='%{_guild::*}%';" set {_guild} to "%{_guild::*}%" set {_deputy} to "%{_deputy::*}%" {_owner::*} is player: set {_perms} to true {_deputy} contains "%player%": set {_perms} to true {_perms} is not set: send "&cNie jestes zalozycielem ani zastepca gildii!" stop arg 1 is not set: send "&6Poprawne uzycie: &c/gdelwarp " stop set {_x} to size of {gwarp::%{_guild}%::*} {gwarp::%{_guild}%::%arg 1%} is set: clear {gwarp::%{_guild}%::%arg 1%} send "&6Usunieto GuildWarp o nazwie: &c%arg 1%" else: send "&cTaki GuildWarp nie istnieje!" loop {gwarp::%{_guild}%::*}: {_warps} is not set: set {_warps} to "%loop-index%" else: set {_warps} to "%{_warps}%, %loop-index%" size of {gwarp::%{_guild}%::*} is 0: set {_warps} to "BRAK" send "&cWarpy: &b%{_warps}%" loop 5 times: give 1 dragon egg of knockback 1 named "{@nazwa}" with lore "{@lore}" to all players if arg 1 is "give": if arg 3 is not set: if player-arg is set: give 1 dragon egg of knockback 1 named "{@nazwa}" with lore "{@lore}" to player-arg send "&cDales pierozka graczowi &6%player-arg%" else: send "&cPodaj nick gracza" if arg 1 is "give": if arg 3 is "5": if player-arg is set: loop 5 times: give 1 dragon egg of knockback 1 named "{@nazwa}" with lore "{@lore}" to player-arg send "&cDales pierozka graczowi &6%player-arg%" else: send "&cPodaj nick gracza" if arg 1 is "on": set {pandora} to true broadcast "&6 " broadcast "&6 " broadcast "&6 " broadcast "&6 " broadcast "&6 " broadcast "&6 " broadcast "&6 " broadcast "&6 " wait 1 seconds broadcast "&cPandory zostaly wlaczone !" broadcast "&cZachecamy do ich kupna na stronie" broadcast "&6www.leksylia.pl" if arg 1 is "off": set {pandora} to false broadcast "&6 " broadcast "&6 " broadcast "&6 " broadcast "&6 " broadcast "&6 " broadcast "&6 " broadcast "&6 " broadcast "&6 " wait 1 seconds broadcast "&cPandory zostaly wylaczone !" lace of {@pierog}: if {pandora} is true: wait 1 tick set block to air loop 2 times: create a fake explosion set {los} to a random integer between 2 and 15 {los} is 2: drop 5 bookshelf broadcast "&6Gracz &c%player% &6Wylosowal:&c&l 5 Biblioteczek" {los} is 3: spawn 1 zombie at the player equip the last spawned entity with all diamond armour of protection 4 set the last spawned entity's max health to 1000 set name of spawned entity to "&dPedalek" broadcast "&6Gracz &c%player% &6Wylosowal:&c&l Pedalka" {los} is 4: drop 8 golden apple broadcast "&6Gracz &c%player% &6Wylosowal:&c&l 8 Reflili" {los} is 5: drop 1 enchanted golden apple broadcast "&6Gracz &c%player% &6Wylosowal:&c&l Koxa" {los} is 6: drop 3 dragon egg of knockback 1 named "{@nazwa}" with lore "{@lore}" broadcast "&6Gracz &c%player% &6Wylosowal:&c&l 3 Kolejne pandory" {los} is 7: spawn 1 creeper at the player set the last spawned entity's max health to 100 set name of spawned entity to "&2Ogoreeek" broadcast "&6Gracz &c%player% &6Wylosowal:&c&l Ogorkaa" {los} is 8: drop 1 paper named "&6Voucher VIP" with lore " &c» &1Kliknij PPM|| &c» &1Aby uzyskac VIPa!|| &c» &1Na okres 1 dnia!" broadcast "&6Gracz &c%player% &6Wylosowal:&c&l Voucher na VIPa" {los} is 9: drop 1 diamond sword of sharpness 5, fire aspect 2 broadcast "&6Gracz &c%player% &6Wylosowal:&c&l Miecz 5/2" {los} is 10: drop 1 diamond chestplate of protection 4, unbreaking 3 broadcast "&6Gracz &c%player% &6Wylosowal:&c&l Klate 4/3" {los} is 11: drop 1 diamond boots of protection 4, unbreaking 3 broadcast "&6Gracz &c%player% &6Wylosowal:&c&l Buty 4/3" {los} is 12: drop 1 diamond helmet of protection 4, unbreaking 3 broadcast "&6Gracz &c%player% &6Wylosowal:&c&l Helm 4/3" {los} is 13: drop 1 paper named "&2Kolorowy Nick" with lore " &c» &1Kliknij PPM|| &c» &1Aby uzyskac Kolorowy nick!|| &c» &1Na okres I Edycji!" broadcast "&6Gracz &c%player% &6Wylosowal:&c&l Kolorowy Nick" {los} is 14: drop 1 diamond leggings of protection 4, unbreaking 3 broadcast "&6Gracz &c%player% &6Wylosowal:&c&l Spodnie 4/3" {los} is 15: drop 1 paper named "&cTurboDrop" with lore " &c» &1Kliknij PPM|| &c» &1Aby uzyskac TurboDrop!|| &c» &1Na okres 10 minut!" broadcast "&6Gracz &c%player% &6Wylosowal:&c&l TurboDrop" else: cancel event send "&cPandory sa tymczasowo &4OFF &c!"