Guest User

Untitled

a guest
Aug 6th, 2014
550
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.50 KB | None | 0 0
  1. options:
  2. #Na jaki format ma skrypt zmienic chat
  3. Formatowanie_chatu: &8[&2%{pkt::%player%}%&8] &7%display name of player%: %message%
  4. variables:
  5. {pkt::%player%} = 1000
  6. {zabicia.%player%} = 0
  7. {zginiecia.%player%} = 0
  8. {walka.%player%} = false
  9. on script load:
  10. execute command "scoreboard objectives add &aPunktow dummy"
  11. execute command "scoreboard objectives setdisplay belowName &aPunktow"
  12. on script unload:
  13. execute command "scoreboard objectives remove &aPunktow"
  14. on join:
  15. if {pkt::%player%} is not set:
  16. set {pkt::%player%} to 1000
  17. if {zabicia.%player%} is not set:
  18. set {zabicia.%player%} to 0
  19. if {zginiecia.%player%} is not set:
  20. set {zginiecia.%player%} to 0
  21. if {nick::%player%} is not set:
  22. set {nick::%player%} to uncolored display name of player
  23. execute command "scoreboard players %player% set &aPunktow %{pkt::%player%}%"
  24. loop all players:
  25. set {_packet::*} to "PacketPlayOutPlayerInfo", "&7Top Rank", true and 1
  26. loop-player.sendPacket{{_packet::*}};
  27. set {_num} to size of {pkt::*}
  28. loop {_num} times:
  29. loop {pkt::*}:
  30. {_v.%loop-number%} is not set:
  31. set {_v.%loop-number%} to loop-value
  32. set {_n.%loop-number%} to loop-index
  33. loop-value is greater than {_v.%loop-number%}:
  34. set {_v.%loop-number%} to loop-value
  35. set {_n.%loop-number%} to loop-index
  36. remove {_v.%loop-number%} from {pkt::*}
  37. loop {_num} times:
  38. set {_n} to "%loop-number%. %{n.%loop-number%}% %{v.%loop-number%}%"
  39. set {_packet::*} to "PacketPlayOutPlayerInfo", "%{_n}%", false and 0
  40. loop-player.sendPacket{{_packet::*}};
  41. set {punkty::%{_n.%loop-number%}%} to {_v.%loop-number%}
  42. {_num} is less than 10:
  43. set {_r} to {_num}
  44. loop 10 - {_num} times:
  45. add 1 to {_r}
  46. set {_packet::*} to "PacketPlayOutPlayerInfo", "&7&l%{_r}%.", true and 1
  47. loop-player.sendPacket{{_packet::*}};
  48. command /rs [<offline player=%player%>]:
  49. trigger:
  50. if arg 1 is set:
  51. if player has permission "pixelrank.rs.player":
  52. set {pkt::%arg 1%} to 1000
  53. execute command "scoreboard players set %arg 1% &aPunktow %{pkt::%arg 1%}%"
  54. set {zginiecia.%arg 1%} to 0
  55. set {zabicia.%arg 1%} to 0
  56. send "&2Pomyslnie zresetowales statystyki gracza: &6%arg 1%!"
  57. else:
  58. send "&4Blad: &cNie masz uprawnien !"
  59. stop
  60. else:
  61. set {pkt::%player%} to 1000
  62. execute command "scoreboard players set %player% &aPunktow %{pkt::%player%}%"
  63. set {zginiecia.%player%} to 0
  64. set {zabicia.%player%} to 0
  65. send "&2Pomyslnie zresetowales swoje statystyki !"
  66. on chat:
  67. broadcast "{@Formatowanie_chatu}"
  68. cancel event
  69. on death:
  70. if victim is player:
  71. if attacker is players:
  72. if tool of attacker is air:
  73. if {pkt::%victim%} is smaller than 999:
  74. strike lightning effect at the player
  75. add 1 to {kille.%attacker%}
  76. add 1 to {dedy.%victim%}
  77. add 5 to {pkt::%attacker%}
  78. set death message to "&6%victim% &czostal zabity przez: &6%attacker% &cz &6fapki &7(&a+58:&c-0&7)"
  79. execute command "scoreboard players set %victim% &aPunktow %{pkt::%victim%}%"
  80. execute command "scoreboard players set %attacker% &aPunktow %{pkt::%attacker%}%"
  81. else:
  82. strike lightning effect at the player
  83. add 1 to {kille.%attacker%}
  84. add 1 to {dedy.%victim%}
  85. set {_pktattacker} to {pkt::%victim%}*0.05
  86. add {_pktattacker} to {pkt::%attacker%}
  87. set {_pktvictim} to random integer between 30 and 50
  88. remove {_pktvictim} from {pkt::%victim%}
  89. set death message to "&6%victim% &czostal zabity przez: &6%attacker% &cz przedmiotu: &6%tool of attacker% &7(&a+%{_pktattacker}%&8:&c-%{_pktvictim}%&7)"
  90. execute command "scoreboard players set %victim% &aPunktow %{pkt::%victim%}%"
  91. execute command "scoreboard players set %attacker% &aPunktow %{pkt::%attacker%}%"
  92. if {pkt::%victim%} is 1000:
  93. strike lightning effect at the player
  94. add 1 to {kille.%attacker%}
  95. add 1 to {dedy.%victim%}
  96. set {_pktattacker} to random integer between 39 and 79
  97. add {_pktattacker} to {pkt::%attacker%}
  98. set {_pktvictim} to random integer between 10 and 24
  99. add {_pktvictim} to {pkt::%victim%}
  100. set death message to "&6%victim% &czostal zabity przez: &6%attacker% &cz przedmiotu: &6%tool of attacker% &7(&a+%{_pktattacker}%&8:&c-%{_pktvictim}%&7)"
  101. execute command "scoreboard players set %victim% &aPunktow %{pkt::%victim%}%"
  102. execute command "scoreboard players set %attacker% &aPunktow %{pkt::%attacker%}%"
  103. else:
  104. if {pkt::%victim%} is smaller than 999:
  105. strike lightning effect at the player
  106. add 1 to {kille.%attacker%}
  107. add 1 to {dedy.%victim%}
  108. add 5 to {pkt::%attacker%}
  109. set death message to "&6%victim% &czostal zabity przez: &6%attacker% &cz przedmiotu: &6%tool of attacker% &7(&a+58:&c-0&7)"
  110. execute command "scoreboard players set %victim% &aPunktow %{pkt::%victim%}%"
  111. execute command "scoreboard players set %attacker% &aPunktow %{pkt::%attacker%}%"
  112. else:
  113. strike lightning effect at the player
  114. add 1 to {kille.%attacker%}
  115. add 1 to {dedy.%victim%}
  116. set {_pktattacker} to {pkt::%victim%}*0.05
  117. add {_pktattacker} to {pkt::%attacker%}
  118. set {_pktvictim} to random integer between 30 and 50
  119. remove {_pktvictim} from {pkt::%victim%}
  120. set death message to "&6%victim% &czostal zabity przez: &6%attacker% &cz przedmiotu: &6%tool of attacker% &7(&a+%{_pktattacker}%&8:&c-%{_pktvictim}%&7)"
  121. execute command "scoreboard players set %victim% &aPunktow %{pkt::%victim%}%"
  122. execute command "scoreboard players set %attacker% &aPunktow %{pkt::%attacker%}%"
  123. if {pkt::%victim%} is 1000:
  124. strike lightning effect at the player
  125. add 1 to {kille.%attacker%}
  126. add 1 to {dedy.%victim%}
  127. set {_pktattacker} to random integer between 39 and 79
  128. add {_pktattacker} to {pkt::%attacker%}
  129. set {_pktvictim} to random integer between 10 and 24
  130. add {_pktvictim} to {pkt::%victim%}
  131. set death message to "&6%victim% &czostal zabity przez: &6%attacker% &cz przedmiotu: &6%tool of attacker% &7(&a+%{_pktattacker}%&8:&c-%{_pktvictim}%&7)"
  132. execute command "scoreboard players set %victim% &aPunktow %{pkt::%victim%}%"
  133. execute command "scoreboard players set %attacker% &aPunktow %{pkt::%attacker%}%"
  134. else:
  135. if attacker is creeper or zombie or enderman or spider or ghast or skeleton or slime or witch or cave spider or wolf or zombie pigman or blaze or magma cube or silverfish or wither skeleton:
  136. strike lightning effect at the player
  137. add 1 to {dedy.%victim%}
  138. add -30 to {pkt.%victim%}
  139. set death message to "&6%victim% &czginal od moba :) &7[&c-30&7]"
  140. execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
  141. else:
  142. if attacker is wither or ender dragon:
  143. strike lightning effect at the player
  144. add 1 to {dedy.%victim%}
  145. add -30 to {pkt.%victim%}
  146. set death message to "&6%victim% &czginal od &4BOSSA &7[&c-30&7]"
  147. execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
  148. else:
  149. if damage has been caused by block explosion:
  150. strike lightning effect at the player
  151. add 1 to {dedy.%victim%}
  152. add -30 to {pkt.%victim%}
  153. set death message to "&6%victim% &cwybuchna :) &7[&c-30&7]"
  154. execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
  155. else:
  156. if damage has been caused by fall:
  157. strike lightning effect at the player
  158. add 1 to {dedy.%victim%}
  159. add -30 to {pkt.%victim%}
  160. set death message to "&6%victim% &cpolamal sobie nogi :( &7[&c-30&7]"
  161. execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
  162. else:
  163. if damage has been caused by fire or burn:
  164. strike lightning effect at the player
  165. add 1 to {dedy.%victim%}
  166. add -30 to {pkt.%victim%}
  167. set death message to "&6%victim% &cspalil sie &7[&c-30&7]"
  168. execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
  169. else:
  170. if damage has been caused by lava:
  171. strike lightning effect at the player
  172. add 1 to {dedy.%victim%}
  173. add -30 to {pkt.%victim%}
  174. set death message to "&6%victim% &cwpadl do lavy :D &7[&c-30&7]"
  175. execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
  176. else:
  177. if damage has been caused by drowning:
  178. strike lightning effect at the player
  179. add 1 to {dedy.%victim%}
  180. add -30 to {pkt.%victim%}
  181. set death message to "&6%victim% &czapomnial wyplynac :> &7[&c-30&7]"
  182. execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
  183. else:
  184. if damage has been caused by drowning:
  185. strike lightning effect at the player
  186. add 1 to {dedy.%victim%}
  187. add -30 to {pkt.%victim%}
  188. set death message to "&6%victim% &czapomnial wyplynac :> &7[&c-30&7]"
  189. execute command "scoreboard players set %player% &aPunktow %{pkt::%victim%}%"
  190. command /ranking [<offline player=%player%>]:
  191. trigger:
  192. if arg 1 is set:
  193. send "&7&l--------------------------------------------"
  194. send "&cGracz: &6%arg 1%"
  195. send "&cIlosc rankingu: &6%{pkt::%arg 1%}%"
  196. send "&cIlosc zabójstw: &6%{zabicia.%arg 1%}%"
  197. send "&cIlosc zgonów: &6%{zginiecia.%arg 1%}%"
  198. send "&7&l--------------------------------------------"
  199. else:
  200. send "&7&l--------------------------------------------"
  201. send "&cGracz: &6%player% &7&l "
  202. send "&cIlosc rankingu: &6%{pkt::%player%}% &7&l "
  203. send "&cIlosc zabójstw: &6%{zabicia.%player%}%&7&l "
  204. send "&cIlosc zgonów: &6%{zginiecia.%player%}%&7&l "
  205. send "&7&l--------------------------------------------"
  206. on damage:
  207. if victim is player:
  208. if attacker is player:
  209. if {walka.%victim%} is true:
  210. if {walka.%attacker%} is true:
  211. stop
  212. else:
  213. set {walka.%victim%} to true
  214. set {walka.%attacker%} to true
  215. send "&cNie mozesz sie wylogowac poniewaz jestes podczas walki !" to the victim
  216. send "&cNie mozesz sie wylogowac poniewaz jestes podczas walki !" to the attacker
  217. wait 9 second
  218. set {walka.%victim%} to false
  219. set {walka.%attacker%} to false
  220. send "&aMozesz juz spokojnie sie wylogowac &b:)" to the victim
  221. send "&aMozesz juz spokojnie sie wylogowac &b:)" to the attacker
  222. stop
  223. else:
  224. set {walka.%victim%} to true
  225. set {walka.%attacker%} to true
  226. send "&cNie mozesz sie wylogowac poniewaz jestes podczas walki !" to the victim
  227. send "&cNie mozesz sie wylogowac poniewaz jestes podczas walki !" to the attacker
  228. wait 5 second
  229. set {walka.%victim%} to false
  230. set {walka.%attacker%} to false
  231. send "&aMozesz juz spokojnie sie wylogowac &b:)" to the victim
  232. send "&aMozesz juz spokojnie sie wylogowac &b:)" to the attacker
  233. stop
  234. command /toprank [<integer=1>]:
  235. trigger:
  236. set {_strony} to rounded up (size of {pkt::*} / 5)
  237. arg is between 1 and {_strony}:
  238. send "&8&l====&6Ranking top rank&8&l===="
  239. loop {pkt::*}:
  240. set {_lista::%loop-index%} to loop-value
  241. set {_num} to size of {_lista::*}
  242. set {_max} to arg * 5
  243. set {_min} to {_max} - 4
  244. loop {_max} times:
  245. loop {_lista::*}:
  246. {_wartosc.%loop-number%} is not set:
  247. set {_wartosc.%loop-number%} to loop-value
  248. set {_nazwa.%loop-number%} to loop-index
  249. loop-value is more than {_wartosc.%loop-number%}:
  250. set {_wartosc.%loop-number%} to loop-value
  251. set {_nazwa.%loop-number%} to loop-index
  252. remove {_wartosc.%loop-number%} from {_lista::*}
  253. loop {_max} times:
  254. loop-number is between {_min} and {_max}
  255. loop-number <= {_num}:
  256. send "&8%loop-number%. &7%{nick::%{_nazwa.%loop-number%}%}% &2(%{_wartosc.%loop-number%}%)"
  257. {_max} is more than {_num}:
  258. set {_r} to {_num}
  259. loop {_max} - {_num} times:
  260. add 1 to {_r}
  261. send "&7&l%{_r}%."
  262. send "Strona: %arg% z %{_strony}%"
  263. stop
  264. {_strony} is 1:
  265. send "Wyniki mieszcza sie na 1 stronie."
  266. stop
  267. send "Wyniki mieszcza sie na %{_strony}% stronach."
  268. on quit:
  269. if {walka.%player%} is true:
  270. strike lightning effect at the player
  271. add 1 to {dedy.%player%}
  272. add -30 to {pkt::%player%}
  273. broadcast "&6%player% &clognol podczas walki &7[&c-30&7]"
  274. execute command "scoreboard players set %player% &aPunktow %{pkt::%player%}%"
  275. on command:
  276. if {walka.%player%} is true:
  277. cancel event
  278. else:
  279. stop
  280. every 5 minute:
  281. loop all players:
  282. set {_packet::*} to "PacketPlayOutPlayerInfo", "&7Top Rank", true and 1
  283. loop-player.sendPacket{{_packet::*}};
  284. set {_num} to size of {pkt::*}
  285. loop {_num} times:
  286. loop {pkt::*}:
  287. {_v.%loop-number%} is not set:
  288. set {_v.%loop-number%} to loop-value
  289. set {_n.%loop-number%} to loop-index
  290. loop-value is greater than {_v.%loop-number%}:
  291. set {_v.%loop-number%} to loop-value
  292. set {_n.%loop-number%} to loop-index
  293. remove {_v.%loop-number%} from {pkt::*}
  294. loop {_num} times:
  295. set {_n} to "%loop-number%. %{n.%loop-number%}% %{v.%loop-number%}%"
  296. set {_packet::*} to "PacketPlayOutPlayerInfo", "%{_n}%", false and 0
  297. loop-player.sendPacket{{_packet::*}};
  298. set {punkty::%{_n.%loop-number%}%} to {_v.%loop-number%}
  299. {_num} is less than 10:
  300. set {_r} to {_num}
  301. loop 10 - {_num} times:
  302. add 1 to {_r}
  303. set {_packet::*} to "PacketPlayOutPlayerInfo", "&7&l%{_r}%.", true and 1
  304. loop-player.sendPacket{{_packet::*}};
  305. every 10 ticks:
  306. loop all players:
  307. set {_packet::*} to "PacketPlayOutPlayerInfo", "%loop-player%", false and 0
  308. loop-player.sendPacket{{_packet::*}};
Advertisement
Add Comment
Please, Sign In to add comment