# OX # Autor: Vayss # Licencja dla: isPVP.eu # Zmienne variables: {OX} = false {dolacz::%player%} = true # Kod # Menu on rightclick on end portal frame: if player is in world "ox": play raw sound "random.pop" at player with pitch 1 volume 7 wait 1 tick open chest with 1 row named " &4&lOX &8[MENU] " to player wait 2 ticks format slot 3 of player with 1 of green clay named " &f* &4&lROZPOCZNIJ OX &f* " with lore " ||&7&m---------------|||| &7&oKliknij aby rozpoczac OX ||||&7&m---------------|| &r" to close then run [execute player command "ox on"] format slot 4 of player with 1 of gray clay named " &f* &4&lZATRZYMAJ OX &f* " with lore " ||&7&m---------------|||| &7&oKliknij aby zamknac OX ||||&7&m---------------|| &r" to close then run [execute player command "ox off"] format slot 5 of player with 1 of red clay named " &f* &4&lKONIEC OX &f* " with lore " ||&7&m---------------|||| &7&oKliknij aby zakonczyc OX ||||&7&m---------------|| &r" to close then run [execute player command "ox koniec"] format slot 6 of player with 1 of paper named " &f* &4&lZADAJ PYTANIE OX &f* " with lore " ||&7&m---------------|||| &7&oKliknij aby zadac pytanie OX ||||&7&m---------------|| &r" to close then run [execute player command "ox zadajpytanie"] on walking on 35:3: if player is in world "ox": teleport player to {OX::spawn} send " &4&lOX &f- &7Odpadles z eventu &cOX&7!" to player # OX command /ox [] []: trigger: if arg 1 is "on": if player has permission "ox.admin": set {OX} to true loop all players: set {dolacz::%loop-player%} to true loop 100 times: broadcast " " broadcast " &4&lOX &f- &7Event &cOX &7zostal rozpoczety!" broadcast " &4&lOX &f- &7Wpisz &c/ox dolacz &7aby dolaczyc!" stop if arg 1 is "admin": if player has permission "ox.admin": teleport player to {OX::admin} stop if arg 1 is "off": if player has permission "ox.admin": set {OX} to false loop 100 times: broadcast " " broadcast " &4&lOX &f- &7Event &cOX &7zostal zamkniety!" broadcast " &4&lOX &f- &7Nie mozesz juz dolaczyc!" stop if arg 1 is "end": if player has permission "ox.admin": loop all players: if loop-player is in world "ox": teleport loop-player to {OX::spawn} set {dolacz::%loop-player%} to true loop 100 times: broadcast " " broadcast " &4&lOX &f- &7Event &cOX &7zostal zakonczony!" broadcast " &4&lOX &f- &7Moze uda Ci sie nastepnym razem!" stop if arg 1 is "dolacz": if {OX} is true: if {dolacz::%player%} is true: set {dolacz::%player%} to false teleport player to {OX::miejsce} send " &4&lOX &f- &7Dolaczyles do eventu &cOX&7!" to player send " &4&lOX &f- &a&lZYCZYMY MILEJ GRY!" to player stop else: send "&cAktualnie nie trwa zaden event ox lub wzioles juz udzial!" to player if {OX} is false: send " &4&lOX &f- &7Event &cOX &7jest zamkniety!" to player stop if arg 1 is "opusc": teleport player to {OX::spawn} send " &4&lOX &f- &7Opusciles event &cOX&7!" stop if arg 1 is "ustaw": if player has permission "ox.admin": if arg 2 is "ox": set {OX::miejsce} to location of player send " &4&lOX &f- &7Ustawiono!" stop if arg 2 is "spawn": set {OX::spawn} to location of player send " &4&lOX &f- &7Ustawiono!" stop if arg 2 is "admin": set {OX::admin} to location of player send " &4&lOX &f- &7Ustawiono!" stop if arg 1 is "zadajpytanie": if player has permission "ox.admin": # Losowanie pytan if {_ox} isn't set: set {_ox} to 0 # Pytanie 0 if {_ox} is 0: set {_ox} to 1 wait 2 ticks broadcast " &4&lOX PYTANIE &f- &6Czy ""przytulanie"" kaktusa zadaje obrazenia?" broadcast " &4&lOX &f- &7Posiadasz &c10 sekund &7na odpowiedz!" wait 6 seconds loop all players: if loop-player is in world "ox": play raw sound "random.pop" at loop-player with pitch 1 volume 5 send loop-player title "&f- &4&l3 &f-" for 2 seconds wait 1 second loop all players: if loop-player is in world "ox": play raw sound "random.pop" at loop-player with pitch 1 volume 6 send loop-player title "&f- &c&l2 &f-" for 2 seconds wait 1 second loop all players: if loop-player is in world "ox": play raw sound "random.pop" at loop-player with pitch 1 volume 7 send loop-player title "&f- &a&l1 &f-" for 2 seconds wait 1 second execute player command "/rg select ox-arena" execute player command "//replace 159:14,159:0 0" broadcast " &4&lOX PYTANIE &f- &7Odpowiedz: &2&lTAK" wait 30 ticks execute player command "//undo" stop