knugi

Untitled

Sep 14th, 2017
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. variables:
  2. {logout::%player%} = -1
  3.  
  4. command /antylogout [<text>]:
  5. aliases: /logout, /walka, /czas
  6. trigger:
  7. if arg-1 is not set:
  8. if {logout::%player%} = -1 or 0:
  9. set {chatQuitOnLogout} to single value "AntyLogout.message.chatQuitOnLogout" get of "plugins/AntyLogout/config.yml"
  10. set {_zmienna::*} to yaml list "AntyLogout.message.commandLogoutFalse" from file "plugins/AntyLogout/config.yml"
  11. set {_commandLogoutFalse} to join {_zmienna::*} with "%nl%"
  12. replace "{0}" with "%{logout::%player%}%" in {_commandLogoutFalse}
  13. send "%colored {commandLogoutFalse}%"
  14. else:
  15. set {_zmienna::*} to yaml list "AntyLogout.message.commandLogoutTrue" from file "plugins/AntyLogout/config.yml"
  16. set {_commandLogoutTrue} to join {_zmienna::*} with "%nl%"
  17. replace "{0}" with "%{logout::%player%}%" in {_commandLogoutTrue}
  18. send "%colored {_commandLogoutTrue}%"
  19.  
  20. every second:
  21. loop all players:
  22. if {logout::%loop-player%} = 0:
  23. remove 1 from {logout::%loop-player%}
  24. if {opcja} = "1":
  25. set action bar of loop-player to "&a&lANTYLOGOUT"
  26. if {opcja} = "2":
  27. send "%colored {chatAntyLogoutFalse}%" to loop-player
  28. if {opcja} = "3":
  29. wipe loop-player's sidebar
  30. stop
  31. if {logout::%loop-player%} > 0:
  32. if {opcja} = "1":
  33. set action bar of loop-player to "&4&lANTYLOGOUT &7(&c%{logout::%loop-player%}%.&k00&csek&7)"
  34. remove 1 from {logout::%loop-player%}
  35. if {opcja} = "2":
  36. remove 1 from {logout::%loop-player%}
  37. stop
  38. if {opcja} = "3":
  39. remove 1 from {logout::%loop-player%}
  40. set name of sidebar of loop-player to "&4&lANTYLOGOUT!"
  41. set score "&7Czas:" in sidebar of loop-player to {logout::%loop-player%}
  42. stop
  43. on damage:
  44. if "%attacker%" parsed as offlineplayer is not online:
  45. stop
  46. if damage cause is fall or fire:
  47. stop
  48. if {opcja} = "2":
  49. if {logout::%victim%} < 0:
  50. send "%colored {chatAntyLogoutTrue}%" to victim
  51. set {logout::%victim%} to 20
  52.  
  53. on quit:
  54. if {logout::%player%} > 0:
  55. kill player
  56. replace "{0}" with "%player%" in {chatQuitOnLogout}
  57. broadcast "%colored {chatQuitOnLogout}%"
  58. set {logout::%player%} to -1
  59. teleport player to {spawn}
  60. else:
  61. stop
  62.  
  63. on death:
  64. delete {logout::%player%}
  65.  
  66. on join:
  67. delete {logout::%player%}
  68.  
  69. on load:
  70. set {opcja} to single value "AntyLogout.options" get of "plugins/AntyLogout/config.yml"
  71. set {chatAntyLogoutFalse} to single value "AntyLogout.message.chatAntyLogoutFalse" get of "plugins/AntyLogout/config.yml"
  72. set {chatAntyLogoutTrue} to single value "AntyLogout.message.chatAntyLogoutTrue" get of "plugins/AntyLogout/config.yml"
  73. set {chatQuitOnLogout} to single value "AntyLogout.message.chatQuitOnLogout" get of "plugins/AntyLogout/config.yml"
Advertisement
Add Comment
Please, Sign In to add comment