Advertisement
xNawi

Teleport

May 25th, 2015
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. command /tpa [<offlineplayer>]:
  2. trigger:
  3. if arg-offlineplayer is set:
  4. if arg-offlineplayer is online:
  5. set {tpa::victim::%player%} to arg-offlineplayer
  6. set {tpa::attacker::%arg-offlineplayer%} to player
  7. send "&aWyslales prosbe o teleportacje."
  8. send "&e%player% &awyslal tobie prosbe o teleportacje!"
  9. send "&aWpisz &e/tpaccept &aby akceptowac." to arg-offlineplayer
  10. send "&aWpisz &e/tpdeny &aby anulowac." to arg-offlineplayer
  11. wait 120 seconds
  12. if {tpa::victim::%player%} is arg-offlineplayer
  13. clear {tpa::victim::%player%}
  14. if {tpa::attacker::%arg-offlineplayer%} is player:
  15. clear {tpa::attacker::%arg-offlineplayer%}
  16. else:
  17. send "&cTego gracza nie ma na serwerze!"
  18. else:
  19. send "&a/tpa <gracz>"
  20. command /tpaccept:
  21. trigger:
  22. if {tpa::attacker::%player%} is set:
  23. if {tpa::victim::%{tpa::attacker::%player%}%} is player:
  24. send "&aGracz &ezaakacpetowal twoja prosbe. Teleportacja nastapi za 5 sekund." to {tpa::attacker::%player%}
  25. set {_x} to y-coordinate of {tpa::attacker::%player%}
  26. set {tpa::tepaSie::%{tpa::attacker::%player%}%} to true
  27. loop 5 times:
  28. wait 1 seconds
  29. if {_x} is not y-coordinate of {tpa::attacker::%player%}:
  30. set {tpa::tepaSie::%{tpa::attacker::%player%}%} to false
  31. send "&aPoruszyles sie, teleportacja anulowana." to {tpa::tepaSie::%{tpa::attacker::%player%}%}
  32. if {tpa::tepaSie::%{tpa::attacker::%player%}%} is true:
  33. teleport {tpa::tepaSie::%{tpa::attacker::%player%}%} to player
  34. else:
  35. send "&cProsba o teleportacje wygasla."
  36. else:
  37. send "&cNie otrzymales prosby o teleportacje."
  38. command /tpdeny:
  39. trigger:
  40. if {tpa::attacker::%player%} is set:
  41. if {tpa::victim::%{tpa::attacker::%player%}%} is player:
  42. clear {tpa::victim::%{tpa::attacker::%player%}%}
  43. clear {tpa::attacker::%player%}
  44. send "&aGracz &e%player% &aanulowal twoja prosbe o teleportacje." to {tpa::victim::%{tpa::attacker::%player%}%}
  45. send "&aAnulowano teleportacje."
  46. else:
  47. send "&cProsba o teleportacje wygasla."
  48. else:
  49. send "&cNie otrzymales prosby o teleportacje."
  50. on quit:
  51. if {tpa::victim::%player%} is set:
  52. clear {tpa::victim::%{tpa::attacker::%{tpa::victim::%player%}%}%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement