command /tpa []: trigger: if player has permission "skript.tpa": if arg 1 is set: if arg 1 is online: set {tpa.%player%.%arg 1%} to true: send "Wyslales prosbe o teleportacje do gracza %arg 1%" send "Gracz %player% prosi o teleportacje, wpisz /tpaccept %player% aby zaakcepotwac" to player-arg loop 10 times: wait 1 second if {tpaccept.%arg 1%.%player%} is true: loop exit #albo exit loop send "Nie ruszaj sie przez 5 sekund" wait 3 second set {tpa::%player%-loc} to location of player set {tpa::%player%-next} to true if {tpa::%player%-next} is true: set {tpa::%player%-not} to false loop 5 times: wait 1 second set {tpa::%player%-loc-n} to location of player if {tpa::%player%-loc} is not {tpa::%player%-loc-n}: set {tpa::%player%-not} to true send "Teleportacja anulowana" set {tpa.%player%.%arg 1%} to false set {tpaccept.%arg 1%.%player%} to false if {tpa::%player%-not} is false: teleport player to location of player-arg set {tpa.%player%.%arg 1%} to false set {tpaccept.%arg 1%.%player%} to false else: send "Podany gracz nie jest online!" else: send "Poprawne uzycie: /tpa [NICK]" command /tpaccept []: trigger: if player has permission "skript.tpa": if {tpa.%arg 1%.%player%} is true: send "Gracz %player% zaakceptowaƂ twoja prosbe" to player-arg set {tpaccept.%player%.%arg 1%} to true: stop else: send "Gracz %arg 1% nie prosil cie o teleportacje" stop