options: # Nazwa serwera wykorzystywana w wiadomosciach oraz przedmiotach tag: &a&lServer &7»&f logo: &a&lServer # Ilosc dostawanego doswiadczenia za przejscie areny easy: 5 medium: 10 hard: 20 easyvip: 10 mediumvip: 15 hardvip: 25 # Liczba potrzebnych przyciskow do ponownego klikniecia w ten sam guzik newbutton: 20 on join: if {FTB::%player%::Exp} is not set: set {FTB::%player%::Exp} to 0 if {FTB::%player%::Money} is not set: set {FTB::%player%::Money} to 0 if {FTB::%player%::Level} is not set: set {FTB::%player%::Level} to 1 if {FTB::%player%::Next} is not set: set {FTB::%player%::Next} to 100 if {FTB::%player%::Buttons::*} is not set: set {FTB::%player%::Buttons::*} to "brak" command /refreshScore []: executable by: console trigger: wipe player-arg's sidebar set name of sidebar of player-arg to "&7» &aFindTheButton &7«" set score "&r" in sidebar of player-arg to 9 set score "Twoja nazwa:" in sidebar of player-arg to 8 set score "&7» &a%player-arg%" in sidebar of player-arg to 7 set score "Poziom:" in sidebar of player-arg to 6 set score "&7» &a%{FTB::%player-arg%::Level}%" in sidebar of player-arg to 5 set score "Doswiadczenie:" in sidebar of player-arg to 4 set score "&7» &a%{FTB::%player-arg%::Exp}% / %{FTB::%player-arg%::Next}%" in sidebar of player-arg to 3 set score "Monety:" in sidebar of player-arg to 2 set score "&7» &a%{FTB::%player-arg%::Money}%" in sidebar of player-arg to 1 on region enter: wait 2 tick if "%region at player%" contains "Easy_" or "Medium_" or "Hard_" or "Easyvip_" or "Mediumvip_" or "Hardvip_": set {_n} to "%region at player%" replace all "in world world" with "" in {_n} replace all "in" with "" in {_n} replace all "world" with "" in {_n} replace all " " with "" in {_n} send player title "{@logo}" with subtitle "&a%{_n}%" for 1 second command /ftb [] [] []: permission: * trigger: if arg 1 is "create": # /ftb create easy easy_1 send "{@tag} Stworzono arene &a%arg 3%&f dla aren &a%arg 2%" to player set {areny::%arg 2%::%arg 3%} to location of player if arg 1 is "clear": # /ftb clear easy clear {areny::%arg 2%::*} loop {areny::%arg 2%::*}: send "%loop-value% %loop-index%" if arg 1 is "list": # /ftb list easy loop {areny::%arg 2%::*}: add 1 to {_n} send "&f%{_n}%. &a%loop-index%" command /getArena [] [] [] []: executable by: console trigger: open chest with 6 rows named "&rMenu" to player-arg wait 2 tick set {_slot} to 0 loop {areny::%arg 2%::*}: format slot {_slot} of player-arg with 1 of arg 4 named "&a%loop-index%" with lore "&fNagroda: &a%arg 3% doswiadczenia" to close then run "tpTo %player-arg% %arg 2% %loop-index%" add 1 to {_slot} command /tpTo [] [] []: executable by: console trigger: teleport player-arg to {areny::%arg 2%::%arg 3%} function menuOpen(gracz: player): open chest with 5 rows named "&rMenu" to {_gracz} wait 2 tick format slot 11 of {_gracz} with 1 of light green wool block named "&7» &aEasy" with lore "&7»&f Kliknij aby wybrac areny easy" to run "getArena %{_gracz}% easy {@easy} light green wool block" format slot 13 of {_gracz} with 1 of orange wool block named "&7» &6Medium" with lore "&7»&f Kliknij aby wybrac areny medium" to run "getArena %{_gracz}% medium {@medium} orange wool block" format slot 15 of {_gracz} with 1 of red wool block named "&7» &cHard" with lore "&7»&f Kliknij aby wybrac areny hard" to run "getArena %{_gracz}% hard {@hard} red wool block" if {_gracz} has permission "arenyvip": format slot 29 of {_gracz} with 1 of light green clay named "&7» &aEasy VIP" with lore "&7»&f Kliknij aby wybrac areny easy" to run "getArena %{_gracz}% easyvip {@easyvip} light green clay" format slot 31 of {_gracz} with 1 of orange clay named "&7» &6Medium VIP" with lore "&7»&f Kliknij aby wybrac areny medium" to run "getArena %{_gracz}% mediumvip {@mediumvip} orange clay" format slot 33 of {_gracz} with 1 of red clay named "&7» &cHard VIP" with lore "&7»&f Kliknij aby wybrac areny hard" to run "getArena %{_gracz}% hardvip {@hardvip} red clay" else: format slot 29 of {_gracz} with 1 of light green clay named "&7» &aEasy VIP" to close format slot 31 of {_gracz} with 1 of orange clay named "&7» &6Medium VIP" to close format slot 33 of {_gracz} with 1 of red clay named "&7» &cHard VIP" to close function lvlUp(gracz: player): if {FTB::%{_gracz}%::Next} is smaller or equal to {FTB::%{_gracz}%::Exp}: add 1 to {FTB::%{_gracz}%::Level} set {FTB::%{_gracz}%::Next} to {FTB::%{_gracz}%::Next}*3 send {_gracz} title "&a&lNOWY POZIOM - %{FTB::%{_gracz}%::Level}%" with subtitle "&f%{FTB::%{_gracz}%::Exp}% / %{FTB::%{_gracz}%::Next}%" execute console command "refreshScore %{_gracz}%" function useButton(gracz: player, arena: text, exp: number, location: text): set {_n} to "%region at {_gracz}%" replace all "in world world" with "" in {_n} replace all "in" with "" in {_n} replace all "world" with "" in {_n} replace all " " with "" in {_n} if "%{FTB::%{_gracz}%::Buttons::*}%" contains "%{_location}%": teleport {_gracz} to {areny::%{_arena}%::%{_n}%} stop else: set action bar of {_gracz} to "&7»&f &a+%{_exp}%&f doswiadczenia" teleport {_gracz} to {areny::%{_arena}%::%{_n}%} add {_exp} to {FTB::%{_gracz}%::Exp} lvlUp({_gracz}) chance of 20%: set {_money} to random integer between 1 and 3 add {_money} to {FTB::%{_gracz}%::Money} execute console command "refreshScore %{_gracz}%" add "%{_location}%" to {FTB::%{_gracz}%::Buttons::*} loop {FTB::%{_gracz}%::Buttons::*}: add 1 to {_nr} if {_nr} is bigger or equal to {@newbutton}: clear {FTB::%{_gracz}%::Buttons::*} on right click: if event-item is book named "{@logo}": menuOpen(player) if event-block is button: if "%region at player%" contains "Easy_" or "Medium_" or "Hard_" or "Easyvip_" or "Mediumvip_" or "Hardvip_": if "%region at event-block%" contains "Easy_": useButton(player, "easy", {@easy}, "%location at event-block%") if "%region at event-block%" contains "Medium_": useButton(player, "medium", {@medium}, "%location at event-block%") if "%region at event-block%" contains "Hard_": useButton(player, "hard", {@hard}, "%location at event-block%") if "%region at event-block%" contains "Easyvip_": useButton(player, "easyvip", {@easyvip}, "%location at event-block%") if "%region at event-block%" contains "Mediumvip": useButton(player, "mediumvip", {@mediumvip}, "%location at event-block%") if "%region at event-block%" contains "Hardvip": useButton(player, "hardvip", {@hardvip}, "%location at event-block%") else: send "{@tag} Musisz byc na terenie areny aby moc kliknac ten przycisk" cancel event stop on drop: if event-item is book named "{@logo}": cancel event on join: clear player's inventory give 1 book named "{@logo}" to player execute console command "refreshScore %player%"