Guest User

iPVPStats

a guest
Feb 17th, 2014
687
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.50 KB | None | 0 0
  1. on load:
  2. set {lista::1} to 1
  3. set {lista::2} to 2
  4. set {lista::3} to 3
  5. set {lista::4} to 4
  6. set {lista::5} to 5
  7. set {lista::6} to 6
  8. set {lista::7} to 7
  9. set {lista::8} to 8
  10. set {lista::9} to 9
  11. set {lista::10} to 10
  12. set {lista::11} to 1.3
  13. set {lista::12} to 5.7
  14. set {lista::12} to 9.4
  15. set {lista::13} to 3.1
  16. options:
  17. # Chat
  18. chat: true #True - Wlacz lvl przed nickiem False - Wylacz lvl przed nickiem
  19. chat-format: {LVL} {NICK}: {MESSAGE}
  20. tag: &7[&biPVPStats&7]
  21.  
  22. # ilosc dawanego elo
  23.  
  24. klvl: 1
  25. delo: 5
  26. kelo: 6
  27.  
  28. # Nagrody
  29. item: diamond
  30. item2: gold ingot
  31. item3: iron ingot
  32. item4: stick
  33. item5: iron sword
  34. iloscitemu: 1
  35. kasa: 10
  36. exp: 8
  37.  
  38.  
  39. on death:
  40. if attacker is player:
  41. add {@klvl} to {lvl.pvp::%attacker%}
  42. set {_rando} to random number of {lista::*}
  43. add {_rando} to {elo.pvp::%attacker%}
  44. add 1 to {k.pvp::%attacker%}
  45. remove {_rando} from {elo.pvp::%victim%}
  46. add 1 to {d.pvp::%victim%}
  47. send "&7[&bx&7]&7&M--------------&7[ &biPVP-STATS &7]&7&M--------------&7[&bx&7]" to attacker
  48. send "&7[&bx&7]&7&M--------------&7[ &biPVP-STATS &7]&7&M--------------&7[&bx&7]" to victim
  49. send "{@tag} &7Zabiles gracza &b%victim%!" to attacker
  50. send "{@tag} &7Twoje statystyki wzrosly!" to attacker
  51. send "{@tag} &7Twoje statystyki spadly!" to victim
  52. send "{@tag} &7Dostales %{_rando}% ELO!" to attacker
  53. send "{@tag} &7Straciles %{_rando}% ELO!" to victim
  54. send "&7[&bx&7]&7&M--------------&7[ &biPVP-STATS &7]&7&M--------------&7[&bx&7]" to victim
  55. execute command "/playsound mob.wither.death %victim%"
  56. execute command "/playsound mob.irongolem.death %attacker%"
  57. execute console command "/eco give %attacker% {@kasa}"
  58. set death message to "&b%attacker% &7zabil &b%victim% &7z &b%type of tool of the attacker%"
  59. add {@exp} xp to the attacker
  60. if chance of 6%:
  61. add {@iloscitemu} {@item} to attacker
  62. send "{@tag} &7W nagrode rowniez otrzymujesz &b{@iloscitemu} {@item}!" to attacker
  63. send "&7[&bx&7]&7&M--------------&7[ &biPVP-STATS &7]&7&M--------------&7[&bx&7]" to attacker
  64. if chance of 25%:
  65. add {@iloscitemu} {@item2} to attacker
  66. send "{@tag} &7W nagrode rowniez otrzymujesz &b{@iloscitemu} {@item2}!" to attacker
  67. send "&7[&bx&7]&7&M--------------&7[ &biPVP-STATS &7]&7&M--------------&7[&bx&7]" to attacker
  68. if chance of 23%:
  69. add {@iloscitemu} {@item3} to attacker
  70. send "{@tag} &7W nagrode rowniez otrzymujesz &b{@iloscitemu} {@item3}!" to attacker
  71. send "&7[&bx&7]&7&M--------------&7[ &biPVP-STATS &7]&7&M--------------&7[&bx&7]" to attacker
  72. if chance of 9%:
  73. add {@iloscitemu} {@item4} to attacker
  74. send "{@tag} &7W nagrode rowniez otrzymujesz &b{@iloscitemu} {@item4}!" to attacker
  75. send "&7[&bx&7]&7&M--------------&7[ &biPVP-STATS &7]&7&M--------------&7[&bx&7]" to attacker
  76. if chance of 2%:
  77. add {@iloscitemu} {@item4} to attacker
  78. send "{@tag} &7W nagrode rowniez otrzymujesz &b{@iloscitemu} {@item5}!" to attacker
  79. send "&7[&bx&7]&7&M--------------&7[ &biPVP-STATS &7]&7&M--------------&7[&bx&7]" to attacker
  80. else:
  81. victim is player
  82. broadcast "&7Gracz &b%victim% &7umarl w niewyjasnionych okolicznosciach!"
  83. add 1 to {d.pvp::%victim%}
  84. remove {_rando} from {elo.pvp::%victim%}
  85.  
  86. command /staty [<text>] [<text>]:
  87. trigger:
  88. if arg 1 is not set:
  89. send "&7[&bx&7]&7&M--------------&7[ &biPVP-STATS &7]&7&M--------------&7[&bx&7]"
  90. send "&b* &7Zabojstwa: &b%{k.pvp::%player%}%"
  91. send "&b* &7Zgony: &b%{d.pvp::%player%}%"
  92. send "&b* &7Lvl: &b%{lvl.pvp::%player%}%"
  93. send "&b* &7Elo: &b%{elo.pvp::%player%}%"
  94. send "&7[&bx&7]&7&M--------------&7[ &biPVP-STATS &7]&7&M--------------&7[&bx&7]"
  95. if arg 1 is not empty:
  96. send "&7[&bx&7]&7&M--------------&7[ &biPVP-STATS &7]&7&M--------------&7[&bx&7]"
  97. send "&7Staty: &e%arg 1%"
  98. send "&b* &7Zabojstwa: &b%{k.pvp::%arg 1%}%"
  99. send "&b* &7Zgony: &b%{d.pvp::%arg 1%}%"
  100. send "&b* &7Lvl: &b%{lvl.pvp::%arg 1%}%"
  101. send "&b* &7Elo: &b%{elo.pvp::%arg 1%}%"
  102. send "&7[&bx&7]&7&M--------------&7[ &biPVP-STATS &7]&7&M--------------&7[&bx&7]"
  103. stop
  104. command /staty-reset [<text>]:
  105. trigger:
  106. if arg 1 is not set:
  107. if player doesn't have permission "iPVPStats.admin":
  108. send "&cBrak Uprawnien"
  109. stop
  110. delete {d.pvp::*}
  111. delete {k.pvp::*}
  112. delete {lvl.pvp::*}
  113. delete {elo.pvp::*}
  114. send "{@tag} &cReset Statystyk"
  115. broadcast "&aStatystyki zostaly &c&nzresetowane. &aProsimy o wyjscie z serwera, aby statystyki zostaly zaktualizowane"
  116. if arg 1 is "reload":
  117. execute player command "sk reload %script%"
  118. broadcast "&biPvPStats &7wymaga wersji Skript &b2.0.2/2.1 ..."
  119. wait 1 seconds
  120. broadcast "&f------------------------------------------------"
  121. broadcast "&f Enable &9iPvPStats"
  122. broadcast "&f------------------------------------------------"
  123. broadcast "&fAutor: &bFejminTV"
  124.  
  125.  
  126.  
  127. on chat:
  128. if {@chat} is equal to true:
  129. set {_chat} to "{@chat-format}"
  130. replace all "{LVL}" with "&f[Lvl&b%{lvl.pvp::%player%}%&f]" in {_chat}
  131. replace all "{NICK}" with "%display name of player%" in {_chat}
  132. replace all "{MESSAGE}" with "%message%" in {_chat}
  133. send "%{_chat}%" to all players
  134. cancel event
  135.  
  136. on join:
  137. {k.pvp::%name of player%} is not set:
  138. set {k.pvp::%name of player%} to 0
  139. {d.pvp::%name of player%} is not set:
  140. set {d.pvp::%name of player%} to 0
  141. {lvl.pvp::%name of player%} is not set:
  142. set {lvl.pvp::%name of player%} to 0
  143. {elo.pvp::%name of player%} is not set:
  144. set {elo.pvp::%name of player%} to 1000
  145.  
  146.  
  147. command /top [<text>]:
  148. trigger:
  149. if arg 1 is not set:
  150. send "&7[&bx&7]&7&M--------------&7[ &bTOP &7]&7&M--------------&7[&bx&7]"
  151. send "&b* &7/top elo"
  152. send "&b* &7/top level"
  153. send "&b* &7/top kills"
  154. send "&b* &7/top death"
  155. send "&7[&bx&7]&7&M--------------&7[ &bTOP &7]&7&M--------------&7[&bx&7]"
  156. if arg 1 is "elo":
  157. if player doesn't have permission "top.elo":
  158. send "&cBrak Uprawnien"
  159. stop
  160. send "&7[&bx&7]&7&M--------------&7[ &bTOP-ELO &7]&7&M--------------&7[&bx&7]"
  161. delete {top.elo::*}
  162. set {_num} to size of {elo.pvp::*}
  163. loop {elo.pvp::*}:
  164. set {top.elo::%loop-index%} to loop-value
  165. loop {_num} times:
  166. loop {top.elo::*}:
  167. {_v.%loop-number%} is not set:
  168. set {_v.%loop-number%} to loop-value
  169. set {_n.%loop-number%} to loop-index
  170. if loop-value is bigger than {_v.%loop-number%}:
  171. set {_v.%loop-number%} to loop-value
  172. set {_n.%loop-number%} to loop-index
  173. remove {_v.%loop-number%} from {top.elo::*}
  174. loop {_num} times:
  175. loop-number is less than or equal to 5:
  176. if loop-number is 1:
  177. set {topelo} to "%{_n.%loop-number%}% "
  178. set {topelopunkty} to {_v.%loop-number%}
  179. send "&b%loop-number%. &7%{_n.%loop-number%}% &b%{_v.%loop-number%}%"
  180. {_num} is less than 10:
  181. set {_r} to {_num}
  182. loop 10 - {_num} times:
  183. add 1 to {_r}
  184. send "&b%{_r}%. &7brak"
  185. send "&7[&bx&7]&7&M--------------------------------------&7[&bx&7]"
  186.  
  187. if arg 1 is "level" or "lvl":
  188. if player doesn't have permission "top.level":
  189. send "&cBrak Uprawnien"
  190. stop
  191. send "&7[&bx&7]&7&M--------------&7[ &bTOP-LVL &7]&7&M--------------&7[&bx&7]"
  192. delete {top.level::*}
  193. set {_num} to size of {lvl.pvp::*}
  194. loop {lvl.pvp::*}:
  195. set {top.level::%loop-index%} to loop-value
  196. loop {_num} times:
  197. loop {top.level::*}:
  198. {_v.%loop-number%} is not set:
  199. set {_v.%loop-number%} to loop-value
  200. set {_n.%loop-number%} to loop-index
  201. if loop-value is bigger than {_v.%loop-number%}:
  202. set {_v.%loop-number%} to loop-value
  203. set {_n.%loop-number%} to loop-index
  204. remove {_v.%loop-number%} from {top.level::*}
  205. loop {_num} times:
  206. loop-number is less than or equal to 5:
  207. send "&b%loop-number%. &7%{_n.%loop-number%}% &b%{_v.%loop-number%}%"
  208. {_num} is less than 10:
  209. set {_r} to {_num}
  210. loop 10 - {_num} times:
  211. add 1 to {_r}
  212. send "&b%{_r}%. &7brak"
  213. send "&7[&bx&7]&7&M--------------------------------------&7[&bx&7]"
  214.  
  215. if arg 1 is "kills" or "killer":
  216. if player doesn't have permission "top.kill":
  217. send "&cBrak Uprawnien"
  218. stop
  219. send "&7[&bx&7]&7&M--------------&7[ &bTOP-KILLS &7]&7&M--------------&7[&bx&7]"
  220. delete {top.kill::*}
  221. set {_num} to size of {k.pvp::*}
  222. loop {k.pvp::*}:
  223. set {top.kill::%loop-index%} to loop-value
  224. loop {_num} times:
  225. loop {top.kill::*}:
  226. {_v.%loop-number%} is not set:
  227. set {_v.%loop-number%} to loop-value
  228. set {_n.%loop-number%} to loop-index
  229. if loop-value is bigger than {_v.%loop-number%}:
  230. set {_v.%loop-number%} to loop-value
  231. set {_n.%loop-number%} to loop-index
  232. remove {_v.%loop-number%} from {top.kill::*}
  233. loop {_num} times:
  234. loop-number is less than or equal to 5:
  235. send "&b%loop-number%. &7%{_n.%loop-number%}% &b%{_v.%loop-number%}%"
  236. {_num} is less than 10:
  237. set {_r} to {_num}
  238. loop 10 - {_num} times:
  239. add 1 to {_r}
  240. send "&b%{_r}%. &7brak"
  241. send "&7[&bx&7]&7&M----------------------------------------&7[&bx&7]"
  242.  
  243. if arg 1 is "death" or "deaths":
  244. if player doesn't have permission "top.death":
  245. send "&cBrak Uprawnien"
  246. stop
  247. send "&7[&bx&7]&7&M--------------&7[ &bTOP-DEATH &7]&7&M--------------&7[&bx&7]"
  248. delete {top.death::*}
  249. set {_num} to size of {d.pvp::*}
  250. loop {d.pvp::*}:
  251. set {top.death::%loop-index%} to loop-value
  252. loop {_num} times:
  253. loop {top.death::*}:
  254. {_v.%loop-number%} is not set:
  255. set {_v.%loop-number%} to loop-value
  256. set {_n.%loop-number%} to loop-index
  257. if loop-value is bigger than {_v.%loop-number%}:
  258. set {_v.%loop-number%} to loop-value
  259. set {_n.%loop-number%} to loop-index
  260. remove {_v.%loop-number%} from {top.death::*}
  261. loop {_num} times:
  262. loop-number is less than or equal to 5:
  263. send "&b%loop-number%. &7%{_n.%loop-number%}% &b%{_v.%loop-number%}%"
  264. {_num} is less than 10:
  265. set {_r} to {_num}
  266. loop 10 - {_num} times:
  267. add 1 to {_r}
  268. send "&b%{_r}%. &7brak"
  269. send "&7[&bx&7]&7&M----------------------------------------&7[&bx&7]"
  270. stop
  271.  
  272. on skript start:
  273. send "&8iPvPStats wymaga wersji Skript 2.0.2/2.1 ..." to the console
  274. wait 1 seconds
  275. send "" to the console
  276. send "&8--------------------------------------------------------------" to the console
  277. send "&8| Enable &9iPvPStats &8|" to the console
  278. send "&8--------------------------------------------------------------" to the console
  279. send "" to the console
  280. send "&8Autor: &eFejminTV" to the console
  281. send "" to the console
Advertisement
Add Comment
Please, Sign In to add comment