Advertisement
knugi

Untitled

Mar 18th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. command /pvp [<text>] [<text>]:
  2. trigger:
  3. if arg 1 is not set:
  4. if player has permission "admin":
  5. send "Komendy pvp:"
  6. send "/pvp off <gracz> &7Wylacza pvp dla gracza."
  7. send "/pvp on <gracz> &7Wlacza pvp dla gracza."
  8. send "pvp list &7Lista graczy z wylaczonym pvp"
  9. stop
  10. if {pvpoff::%player%} is not set:
  11. set {pvpoff::%player%} to true
  12. send "Wlaczyles sobie pvp."
  13. stop
  14. clear {pvpoff::%player%}
  15. send "Wylaczyles sobie pvp."
  16. stop
  17. if player has permission "admin":
  18. if arg 1 is "list":
  19. if size of {pvpoff::*} is smaller than 1:
  20. send "Nikt nie ma wlaczonego pvp."
  21. stop
  22. send "Lista graczy z wlaczonym pvp:"
  23. set {_p} to ""
  24. loop {pvpoff::*}:
  25. set {_p} to "%{_p}%, %loop-index%"
  26. set {_p} to (length of {_p} - 2) last characters of {_p}
  27. send "%{_p}%"
  28. stop
  29. if arg 2 is not set:
  30. send "Podaj nick gracza."
  31. stop
  32. if arg 1 is "on":
  33. set {_arg} to "%arg 2%" parsed as offlineplayer
  34. if {_arg} is online:
  35. if {pvpoff::%arg 2%} is not set:
  36. set {pvpoff::%arg 2%} to true
  37. send "Wlaczyles pvp dla gracza %arg 2%"
  38. stop
  39. send "Ten gracz juz ma wlaczone PVP"
  40. stop
  41. send "Tego gracza nie ma na serwerze."
  42. stop
  43. if arg 1 is "off":
  44. if {pvpoff::%arg 2%} is set:
  45. clear {pvpoff::%arg 2%}
  46. send "Wylaczyles pvp dla gracza: %arg 2%"
  47. stop
  48. send "Ten gracz ma wylaczone pvp."
  49. stop
  50. on damage:
  51. loop all players:
  52. if {_v} and {_a} is set:
  53. exit loop
  54. if "%victim%" is "%loop-player%":
  55. set {_v} to loop-player
  56. if "%attacker%" is "%loop-player%":
  57. set {_a} to loop-player
  58. if {_v} is set:
  59. if {pvpoff::%{_v}%} is not set:
  60. cancel event
  61. if {_a} is set:
  62. if {pvpoff::%{_a}%} is not set:
  63. if {_v} is set:
  64. cancel event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement