ArtzifyHD

Stats skript

Jul 20th, 2017
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.23 KB | None | 0 0
  1. #Stats Skript by > InGame: ImReaperPvP | Spigot: mrcreeper6666
  2. #Required:
  3. # SkQuery
  4. # Skript
  5. #Version: 1.3
  6. #Changelog:
  7. #======================================================================#
  8. # Version | Typ | Features #
  9. #======================================================================#
  10. # v1.3 | Update | Added Stats GUI #
  11. # v1.2 | Update | Added /Setstats & Points #
  12. # v1.1 | Update | Added Online Check & Joins #
  13. # v1.0 | Release | - Kills/Deaths & /ResetStats & Death Message #
  14. #======================================================================#
  15.  
  16. #Config:
  17.  
  18. options:
  19. nopermission: "&8» &7You require the rank &4[ADMINISTRATOR]&7 to execute that command!." #NoPermission message can be Edited (The message supports Colorcodes: &<colorcode>)
  20. pointsadd: 5 #How much Points would be added after a Kill.[Default: 5]
  21. pointsremove: 2 #How much Points would be removed after a Death.[Default: 2]
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30. on join:
  31. set {status.%player%} to "&aOnline"
  32. add 1 to {joins.%player%}
  33. on connect:
  34. set {status.%player%} to "&3Joinend"
  35. on first join:
  36. set {status.%player%} to "&aOnline"
  37. set {kills.%player%} to 0
  38. set {deaths.%player%} to 0
  39. set {joins.%player%} to 0
  40. set {points.%player%} to 0
  41. add 1 to {joins.%player%}
  42.  
  43. on quit:
  44. set {status.%player%} to "&cOffline"
  45.  
  46. on death of player:
  47. add 1 to {kills.%attacker%}
  48. add 1 to {deaths.%player%}
  49. add {@pointsadd} to {points.%attacker%}
  50. remove {@pointsremove} from {points.%player%}
  51. send " " to player
  52. send " " to player
  53. send " " to player
  54. send " " to player
  55. send " " to player
  56. send " " to player
  57. send " " to player
  58. send " " to player
  59. send " " to player
  60. send " " to player
  61. send " " to player
  62. send " " to player
  63. send " " to player
  64. send " " to player
  65. send " " to player
  66. send " " to player
  67. send " " to player
  68. send " " to player
  69. send " " to player
  70. send "&8» &7You have been killed by &e%attacker's nickname%&7." to player
  71. send "&8» &6Health&8: &c%attacker's health% &c❤" to player
  72. send "&8» &7You have killed &e%player's nickname%&7." to attacker
  73.  
  74.  
  75. command /stats [<offlineplayer>]:
  76. permission: stats.stats
  77. permission message: {@nopermission}
  78. trigger:
  79. if arg 1 is not set:
  80. send "&8«=====» &6%player's name% &8«=====»"
  81. send "&8» &eKills&8: &7%{kills.%player%}%"
  82. send "&8» &eDeaths&8: &7%{deaths.%player%}%"
  83. send "&8» &eJoins&8: &7%{joins.%player%}%"
  84. send "&8» &ePoints&8: &7%{points.%player%}%"
  85. send "&8» &eStatus&8: %{status.%player%}%"
  86. send "&8«=====» &6%player's name% &8«=====»"
  87. if arg 1 is set:
  88. send "&8«=====» &6%arg 1% &8«=====»"
  89. send "&8» &eKills&8: &7%{kills.%arg 1%}%"
  90. send "&8» &eDeaths&8: &7%{deaths.%arg 1%}%"
  91. send "&8» &ePoints&8: &7%{points.%arg 1%}%"
  92. send "&8» &eJoins&8: &7%{joins.%arg 1%}%"
  93. send "&8» &eStatus&8: &r%{status.%arg 1%}%"
  94. send "&8«=====» &6%arg 1% &8«=====»"
  95.  
  96. command /resetstats [<offlineplayer>]:
  97. permission: stats.reset
  98. permission message: {@nopermission}
  99. trigger:
  100. if arg 1 is not set:
  101. send "&8» &6Syntax&8: &e/ResetStats <Player>"
  102. if arg 1 is set:
  103. set {kills.%arg 1%} to 0
  104. set {deaths.%arg 1%} to 0
  105. set {joins.%arg 1%} to 1
  106. set {points.%arg 1%} to 0
  107. send "&8» &7You have resetted &e%arg 1's nickname%'s &6Stats&7." to player
  108. send "&8» &7Your &6Stats &7have been resetted by an &4Admin&7." to arg 1
  109.  
  110. command /setstats <text> <number> [<offlineplayer>]:
  111. permission: stats.set
  112. permission message: {@nopermission}
  113. trigger:
  114. if arg 1 is not set:
  115. if arg 2 is not set:
  116. if arg 3 is not set:
  117. send "&8» &6Syntax&8: &e/SetStats <Kills/Deaths/Joins/Points> <Number> <Player>" to player
  118. if arg 1 is set:
  119. if arg 1 is "kills" or "k":
  120. if arg 2 is set:
  121. if arg 3 is set:
  122. set {kills.%arg 3%} to arg-2
  123. send "&8» &e%arg 3%'s &eKills &7has been set to &e%arg 2%&7." to player
  124. else:
  125. send "&8» &7Please set a &ePlayer&7."
  126. else:
  127. send "&8» &7Please set a number of &eKills&7."
  128. if arg 1 is "deaths" or "d":
  129. if arg 2 is set:
  130. if arg 3 is set:
  131. set {deaths.%arg 3%} to arg-2
  132. send "&8» &e%arg 3%'s Deaths &7has been set to &e%arg 2%&7." to player
  133. else:
  134. send "&8» &Please set a &ePlayer&7."
  135. else:
  136. send "&8» &7Please set a number of &eKills&7"
  137. if arg 1 is "joins" or "j":
  138. if arg 2 is set:
  139. if arg 3 is set:
  140. set {joins.%arg 3%} to arg-2
  141. send "&8» &e%arg 3%'s Joins &7has been set to &e%arg 2%&7." to player
  142. else:
  143. send "&8» &7Please set a &ePlayer&7."
  144. else:
  145. send "&8» &7Please set a number of &eJoin&7."
  146. if arg 1 is "points" or "p":
  147. if arg 2 is set:
  148. if arg 3 is set:
  149. set {points.%arg 3%} to arg-2
  150. send "&8» &e%arg 3%'s Points &7has been set to &e%arg 2%&7." to player
  151. else:
  152. send "&8» &&7Please set a &ePlayer&7."
  153. else:
  154. send "&8» &7Please set a number of &ePoints&7"
  155.  
  156. command /gstats [<offlineplayer>]:
  157. permission: stats.gui
  158. permission message: {@nopermission}
  159. trigger:
  160. if arg 1 is not set:
  161. open chest with 1 row named "&8» &eStats &7from &6%player%" to player
  162. format slot 4 of player with 1 iron block named "&8» &ePlayer&8: &7%player%" with lore "&8» &eStatus&8: &7%{status.%player%}%" to be unstealable
  163. format slot 0 of player with 1 iron sword named "&8» &eKills&8: &7%{kills.%player%}%" to be unstealable
  164. format slot 1 of player with 1 black window glass named "&8" to be unstealable
  165. format slot 3 of player with 1 black window glass named "&8" to be unstealable
  166. format slot 5 of player with 1 black window glass named "&8" to be unstealable
  167. format slot 7 of player with 1 black window glass named "&8" to be unstealable
  168. format slot 2 of player with 1 fire charge named "&8» &eDeaths&8: &7%{deaths.%player%}%" to be unstealable
  169. format slot 6 of player with 1 ender pearl named "&8» &ePoints&8: &7%{points.%player%}%" to be unstealable
  170. format slot 8 of player with 1 crafting table named "&8» &eJoins&8: &7%{joins.%player%}%" to be unstealable
  171. if arg 1 is set:
  172. open chest with 1 row named "&8» &eStats &7from &6%arg 1%" to player
  173. format slot 4 of player with 1 iron block named "&8» &ePlayer&8: &7%arg 1%" with lore "&8» &eStatus&8: &7%{status.%arg 1%}%" to be unstealable
  174. format slot 0 of player with 1 iron sword named "&8» &eKills&8: &7%{kills.%arg 1%}%" to be unstealable
  175. format slot 1 of player with 1 black window glass named "&8" to be unstealable
  176. format slot 3 of player with 1 black window glass named "&8" to be unstealable
  177. format slot 5 of player with 1 black window glass named "&8" to be unstealable
  178. format slot 7 of player with 1 black window glass named "&8" to be unstealable
  179. format slot 2 of player with 1 fire charge named "&8» &eDeaths&8: &7%{deaths.%arg 1%}%" to be unstealable
  180. format slot 6 of player with 1 ender pearl named "&8» &ePoints&8: &7%{points.%arg 1%}%" to be unstealable
  181. format slot 8 of player with 1 crafting table named "&8» &eJoins&8: &7%{joins.%arg 1%}%" to be unstealable
Advertisement
Add Comment
Please, Sign In to add comment