command /handel [] []: trigger: if arg 1 is not set: send "&c/handel " send "&c/handel akceptuj" stop if arg 1 is "akceptuj": #Akceptowanie... if {handel::%player%.item} is not set: if {handel::%player%.with} is set: if player's balance is larger than {handel::%{handel::%player%.with}%.item.price}: remove {handel::%{handel::%player%.with}%.item.price} from player's balance give {handel::%{handel::%player%.with}%.item.price} to {handel::%player%.with}'s balance give {handel::%{handel::%player%.with}%.item} to player send "&aHandel przebiegl pomyslnie!" to player send "&aHandel przebiegl pomyslnie!" to {handel::%player%.with} clear {handel::%{handel::%player%.with}%.item} clear {handel::%{handel::%player%.with}%.item.price} clear {handel::%{handel::%player%.with}%.expire} clear {handel::%player%.expire} clear {handel::%{handel::%player%.with}%.with} clear {handel::%player%.with} stop send "&7Nikt nie oferowal Tobie wymiany." stop send "&7Nie mozesz uzyc tej komendy gdy oferujesz wymiane." stop set {_player} to "%arg 1%" parsed as offlineplayer if {_player} is online: if {_player} is player: send "&6Nie mozesz uzyc tej komendy na sobie." stop if player's tool is air: send "&6Musisz cos trzymac w rece." stop if {handel::%player%.expire} is set: send "&7Aktualnie masz aktywny handel. Poczekaj &6%{handel::%player%.expire}% &7sekund." stop if {handel::%{_player}%.expire} is set: send "&7Aktualnie &c%{_player}% &7ma aktywny handel. Poczekaj &6%{handel::%{_player}%.expire}% &7sekund." stop if arg 2 is set: if arg 2 is larger than 0: if {_player}'s balance is larger than or equal to arg 2: send "&7Gracz &c%player% &7chce Tobie oddac przedmiot: &6%player's tool%%nl%&7Cena: &3%arg 2%$" to {_player} set {handel::%player%.with} to {_player} set {handel::%{_player}%.with} to player set {handel::%player%.item} to player's tool set {handel::%player%.item.price} to arg 2 remove player's tool from player set {handel::%player%.expire} to 15 set {handel::%{_player}%.expire} to 15 stop send "&7Ten gracz nie ma tyle pieniedzy." stop send "&7Cena nie moze byc mniejsza od 1$." stop send "&7Nie podales ceny przedmiotu" stop send "&7Ten gracz nie jest aktywny" stop on quit: if {handel::%player%.expire} is set: clear {handel::%{handel::%player%.with}%.expire} clear {handel::%{handel::%player%.with}%.with} clear {handel::%player%.expire} clear {handel::%player%.with} on join: if {handel::%player%.item} is set: give {handel::%player%.item} to player send "&c* &7Otrzymales przedmiot z handlu." stop every 1 second: loop all players: if {handel::%loop-player%.expire} is larger than 0: remove 1 from {handel::%loop-player%.expire} if {handel::%loop-player%.expire} is 0: send "&cHandel nie zostal wykonany!" to loop-player clear {handel::%loop-player%.expire} clear {handel::%loop-player%.with} if {handel::%loop-player%.item} is set: give {handel::%loop-player%.item} to loop-player clear {handel::%loop-player%.item} clear {handel::%loop-player%.item.price}