options: #Praca jakąs musi mieć gracz aby otrzymać wiadomość o wezwaniu policji p: "Policja" #Czas jaki gracz musi odeczekac przed nastepnym wezwaniem policji czas: 10 seconds #Koszt wysłania sms koszt: 1 on right click: if name of player's held item is "&5Telefon": open chest with 3 rows named "&5Telefon" to player set slot (integers between 0 and 27) of player's current inventory to black stained glass pane named "&8*" set slot 13 of player's current inventory to blue wool named "&3Kontakty" on inventory click: if name of event-inventory is "&5Telefon": cancel event if clicked slot is 13: open chest with 3 rows named "&3Kontakty" to player set slot (integers between 0 and 27) of player's current inventory to black stained glass pane named "&8*" set slot 12 of player's current inventory to anvil named "&3Dodaj kontakt" set slot 14 of player's current inventory to warped sign named "&3Lista kontaktów" set slot 13 of player's current inventory to paper named "&cInformacje" with lore "&3Aby dodać numer wpisz (numer,nick)" and "&3Przykład: &e123,Maciek" and "&3Aby usunąc numer wciśnij na niego ppm" and "&3Aby do kogoś zadzwonić wciśnij lpm" set slot 22 of player's current inventory to chain named "&bPolicja" with lore "&3Wcisnij aby wezwać policje" if name of event-inventory is "&3Kontakty": cancel event if clicked slot is 12: close player's inventory set {_gui} to a new anvil gui named "&3Dodawanie kontaktow" with text "&3Dodawanie kontaktow" set left item of {_gui} to paper with lore "&3Wcisnij aby zatwierdzic kontakt" open anvil gui {_gui} to player if clicked slot is 14: close player's inventory open chest with 6 rows named "&3Lista kontaktów" to player set slot (integers between 0 and 55) of player's current inventory to black stained glass pane named "&8*" set {_num} to -1 loop {numery1::%player%::*}: add 1 to {_num} set slot {_num} of player's current inventory to warped sign named "%loop-value%" if clicked slot is 22: if difference between {wezwanie::%player%} and now is smaller than {@czas}: set {_t} to {@czas} remove difference between now and {wezwanie::%player%} from {_t} set {_t} to "%{_t}%" replace all "seconds" with "s" in {_t} send "&6Przed kolejnym wezwaniem poczekaj &c&l%{_t}%!" to player else: set {wezwanie::%player%} to now loop all players where [{praca::%input%} is {@p}]: send "&6%player% wezwał policje! Znajduje się na %location of player%" to loop-player if name of event-inventory is "&3Lista kontaktów": cancel event if click type is right mouse button: set {_n} to name of clicked slot remove {_n} from {numery1::%player%::*} close player's inventory else: if click type is left mouse button: if player's balance >= {@koszt}: set {n::%player%} to name of clicked slot set {_gui} to a new anvil gui named "&3Wyslanie wiadomosci" with text "&3Wyslanie wiadomosci" set left item of {_gui} to paper with lore "&3Koszt 1$" open anvil gui {_gui} to player else: send "&cNie stac cie na wyslanie sms" on anvil gui click: if title of event-anvil gui is "&3Dodawanie kontaktow": add event-text to {numery1::%player%::*} send "&cDodałeś numer do listy kontaktów" close player's inventory if title of event-anvil gui is "&3Wyslanie wiadomosci": set {_k::*} to {n::%player%} split at "," delete {n::%player%} loop all players: if {_k::*} contains loop-player: send "&6[SMS] &f%player's name%&a >> &3%event-text%" to loop-player close player's inventory remove 1 from player's balance on anvil gui close: {n::%player%} is set delete {n::%player%} command /mojnumer: trigger: send "&6Twój numer to %{numer1::%player%}%" to player command /stworznumer: permission: telefon.* permission message: &cGdzie z łapami trigger: set {_n} to random integer between 100 and 999 while {lista::numery1::*} contains {_n}: set {_n} to random integer between 100 and 999 send "&2Tworzenie numeru" wait 1 seconds add {_n} to {lista::numery1::*} send "&3Twój numer to &c%{_n}%" set {numer1::%player%} to "%{_n}%,%player's name%" command /listanum: permission: telefon.* permission message: &cGdzie z łapami trigger: send {lista::numery1::*} command /resed: permission: telefon.* permission message: &cGdzie z łapami trigger: loop all offline players: clear {lista::numery1::*} clear {numer1::%loop-offlineplayer%} clear {numery1::%loop-offlineplayer%::*} clear {dowyslania1::%loop-offlineplayer%} on quit: delete {n::%player%}