Entities

Stats

Sep 4th, 2017
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. options:
  2. tag: &5[&bTAG&5]
  3.  
  4. command /pvpstats [<text>]:
  5. usage: /pvpstats <player> or /pvpstats
  6. trigger:
  7. if arg 1 is not set:
  8. if player have permission "pro.stats.me":
  9. send "&5===== &4&lYOUR STATS &5=====" to player
  10. send "&4Total Kills: &6%{totalkills.%player%}%" to player
  11. send "&4Total Deaths: &6%{totaldeaths.%player%}%" to player
  12. send "&4Session Kills: &6%{sessionkills.%player%}%" to player
  13. send "&4Session Deaths: &6%{sessiondeaths.%player%}%" to player
  14. send "&4Current Killstreak: &6%{currentks.%player%}%" to player
  15. send "&4Best Killstreak: &6%{bestks.%player%}%" to player
  16. send "&6--- {@tag} &6---" to player
  17. stop
  18. else:
  19. send "{@tag} &6You don't have the permission to check your stats" to player
  20. if arg 1 is set:
  21. if player have permission "pro.stats.other":
  22. send "&5===== &4&l%arg 1%'s stats &5=====" to player
  23. send "&4Total Kills: &6%{totalkills.%arg 1%}%" to player
  24. send "&4Total Deaths: &6%{totaldeaths.%arg 1%}%" to player
  25. send "&4Session Kills: &6%{sessionkills.%arg 1%}%" to player
  26. send "&4Session Deaths: &6%{sessiondeaths.%arg 1%}%" to player
  27. send "&4Current Killstreak: &6%{currentks.%arg 1%}%" to player
  28. send "&4Best Killstreak: &6%{bestks.%arg 1%}%" to player
  29. send "&6--- {@tag} &6---" to player
  30. stop
  31. else:
  32. send "{@tag} &6You don't have the permission to check other people stats" to player
  33. on death:
  34. victim is a player
  35. attacker is a player
  36. add 1 to {totalkills.%attacker%}
  37. add 1 to {totaldeaths.%victim%}
  38. add 1 to {sessionkills.%attacker%}
  39. add 1 to {sessiondeaths.%victim%}
  40. add 1 to {currentks.%attacker%}
  41. send "&5[&bNoHitDelay&5] &6You now have a killsteak of &4%{currentks.%attacker%}%" to attacker
  42. set {currentks.%victim%} to 0
  43. if {currentks.%attacker%} is greater than {bestks.%attacker%}:
  44. set {bestks.%attacker%} to {currentks.%attacker%}
  45. send "&5[&bNoHitDelay&5] &6Your new best ks is &4%{bestks.%attacker%}% &6!" to attacker
  46. if {currentks.%attacker%} is greater than 10:
  47. if {ksalert} is true:
  48. broadcast "&5[&bNoHitDelay&5] &6%attacker% is on a %{currentks.%attacker%}% killstreak ! stop him !"
  49. else:
  50. stop
  51. on quit:
  52. clear {sessiondeaths.%player%}
  53. clear {sessionkills.%player%}
  54. clear {currentks.%player%}
  55. command /ksalert <text>:
  56. usage: /ksalert true/false
  57. trigger:
  58. if player have permission "pro.ksalert":
  59. if arg 1 is "true":
  60. set {ksalert} to true
  61. send "{@tag} &6ks alert >> true" to player
  62. stop
  63. if arg 1 is "false":
  64. set {ksalert} to false
  65. send "{@tag} &6ks alert >> false" to player
  66. stop
  67. else:
  68. send "{@tag} &6Incorrect option, use /ksalert true/false"
  69. else:
  70. send "{@tag} &6You don't have the permission to chance ks alert" to player
  71. on first join:
  72. set {totalkills.%player%} to 0
  73. set {totaldeaths.%player%} to 0
  74. set {sessionkills.%player%} to 0
  75. set {sessiondeaths.%player%} to 0
  76. set {currentks.%player%} to 0
  77. set {bestks.%player%} to 0
  78. command /pvpstatsreset [<player>]:
  79. trigger:
  80. if player have permission "pro.stats.reset":
  81. if arg 1 is not set:
  82. set {totalkills.%player%} to 0
  83. set {totaldeaths.%player%} to 0
  84. set {sessionkills.%player%} to 0
  85. set {sessiondeaths.%player%} to 0
  86. set {currentks.%player%} to 0
  87. set {bestks.%player%} to 0
  88. send "{@tag} &6Your stats have been reset" to player
  89. stop
  90. else:
  91. set {totalkills.%arg 1%} to 0
  92. set {totaldeaths.%arg 1%} to 0
  93. set {sessionkills.%arg 1%} to 0
  94. set {sessiondeaths.%arg 1%} to 0
  95. set {currentks.%arg 1%} to 0
  96. set {bestks.%arg 1%} to 0
  97. send "{@tag} &6%arg 1% stats have been reset" to player
  98. stop
  99. else:
  100. send "{@tag} &6You don't have the permission to reset stats" to player
Add Comment
Please, Sign In to add comment