Guest User

Ranking PVP

a guest
Mar 23rd, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.89 KB | None | 0 0
  1. # Author: TheFallingCookie - http://skript.pl/index.php?/user/130-thefallingcookie/
  2. # Name: psRanking
  3. # Version: 1.0
  4.  
  5. on load:
  6. send "[psRanking] Succesfully loaded." to the console
  7. send "[psRanking] Developed by TheFallingCookie." to the console
  8. execute console command "scoreboard objectives add pkt dummy &7pkt"
  9. execute console command "scoreboard objectives setdisplay belowName pkt"
  10. loop all players:
  11. kick loop-player due to "&4[Elbora] &8Wejdz ponownie na serwer!"
  12. on unload:
  13. execute console command "scoreboard objectives remove pkt"
  14. on join:
  15. {punkty::%player%} is not set:
  16. set {punkty::%player%} to 1000
  17. {zabojstwa.%player%} is not set:
  18. set {zabojstwa.%player%} to 0
  19. {smierci.%player%} is not set:
  20. set {smierci.%player%} to 0
  21. execute console command "scoreboard players set %player% pkt %{punkty::%player%}%"
  22. set {_x} to name of player
  23. if {_x} is "TheFallingCookie":
  24. send "&8> &7Na tym serwerze znajduje sie skrypt &6ElboraPVP &7by Zaduszny"
  25. on death of player:
  26. strike lightning effect at the player
  27. {atakujacy.%victim%} is set:
  28. set {_attacker} to {atakujacy.%victim%}
  29. add 1 to {smierci.%victim%}
  30. add 1 to {zabojstwa.%{_attacker}%}
  31. set {_punkty} to rounded down {punkty::%victim%}*0.10
  32. add {_punkty} to {punkty::%{_attacker}%}
  33. remove {_punkty} from {punkty::%victim%}
  34. set death message to "&8> &6%victim% &czostal zabity przez &6%{_attacker}% &8(&6+%{_punkty}%&8)"
  35. execute console command "scoreboard players set %victim% pkt %{punkty::%victim%}%"
  36. execute console command "scoreboard players set %{_attacker}% pkt %{punkty::%{_attacker}%}%"
  37. delete {atakujacy.%victim%}
  38. stop
  39. {atakujacy.%victim%} is not set:
  40. add 1 to {smierci.%victim%}
  41. remove 20 from {punkty::%victim%}
  42. execute console command "scoreboard players set %victim% pkt %{punkty::%victim%}%"
  43. stop
  44. on quit:
  45. if {atakujacy.%player%} is set:
  46. kill player
  47. broadcast "&8> &6%player% wylogowal sie podczas walki!"
  48. execute console command "scoreboard players set %player% pkt %{punkty::%player%}%"
  49. execute console command "scoreboard players set %{_attacker}% pkt %{punkty::%{_attacker}%}%"
  50. on damage of player:
  51. {punkty::%attacker%} is set:
  52. set {atakujacy.%victim%} to name of attacker
  53. wait 15 seconds
  54. delete {atakujacy.%victim%}
  55. command /gracz [<offline player=%player%>]:
  56. description: Pozwala na sprawdzenie rankingu innego gracza
  57. trigger:
  58. if arg is set:
  59. {punkty::%arg%} is set:
  60. send "&8> &7Ranking gracza: &6%arg%"
  61. send "&8> &7Punkty: &6%{punkty::%arg%}%"
  62. send "&8> &7Zabojstwa: &6%{zabojstwa.%arg%}%"
  63. send "&8> &7Smierci: &6%{smierci.%arg%}%"
  64. {punkty::%arg%} is not set:
  65. send "&8> &cGracza o takim nicku nie ma w bazie danych!"
  66. stop
  67. else:
  68. send "&8> &7Ranking gracza: &6%player% &7(Ty)"
  69. send "&8> &7Punkty: &6%{punkty::%player%}%"
  70. send "&8> &7Zabojstwa: &6%{zabojstwa.%player%}%"
  71. send "&8> &7Smierci: &6%{smierci.%player%}%"
  72. command /top10:
  73. description: Top 10 graczy z najwyzsza iloscia punktow
  74. aliases: /top, /topka
  75. trigger:
  76. send "&8> &6Top 10 najlepszych graczy:"
  77. set {_num} to size of {punkty::*}
  78. loop {_num} times:
  79. loop {punkty::*}:
  80. {_v.%loop-number%} is not set:
  81. set {_v.%loop-number%} to loop-value
  82. set {_n.%loop-number%} to loop-index
  83. loop-value is greater than {_v.%loop-number%}:
  84. set {_v.%loop-number%} to loop-value
  85. set {_n.%loop-number%} to loop-index
  86. remove {_v.%loop-number%} from {punkty::*}
  87. loop {_num} times:
  88. loop-number is less than or equal to 10:
  89. send "&8> &7%loop-number%. &6%{_n.%loop-number%}% &8(&6%{_v.%loop-number%}%&8)"
  90. set {punkty::%{_n.%loop-number%}%} to {_v.%loop-number%}
  91. command /ranking [<text>] [<player>] [<integer>]:
  92. description: Pozwala na zarzadzanie rankingiem innego gracza
  93. trigger:
  94. if player has permission "psranking.*":
  95. arg 1 is not set:
  96. send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
  97. arg 1 is not "set" or "add" or "remove":
  98. send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
  99. arg 1 is "set":
  100. if arg 2 is set:
  101. if arg 3 is set:
  102. if {punkty::%arg 2%} is set:
  103. set {punkty::%arg 2%} to arg 3
  104. send "&8> &7Zaaktualizowano ranking gracza: &6%arg 2%&7!"
  105. execute console command "scoreboard players set %arg 2% pkt %{punkty::%arg 2%}%"
  106. else:
  107. send "&8> &cGracza o takim nicku nie ma w bazie danych!"
  108. else:
  109. send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
  110. else:
  111. send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
  112. arg 1 is "add":
  113. if arg 2 is set:
  114. if arg 3 is set:
  115. if {punkty::%arg 2%} is set:
  116. add arg 3 to {punkty::%arg 2%}
  117. send "&8> &7Zaaktualizowano ranking gracza: &6%arg 2%&7!"
  118. execute console command "scoreboard players set %arg 2% pkt %{punkty::%arg 2%}%"
  119. else:
  120. send "&8> &cGracza o takim nicku nie ma w bazie danych!"
  121. else:
  122. send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
  123. else:
  124. send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
  125. arg 1 is "remove":
  126. if arg 2 is set:
  127. if arg 3 is set:
  128. if {punkty::%arg 2%} is set:
  129. remove arg 3 from {punkty::%arg 2%}
  130. send "&8> &7Zaaktualizowano ranking gracza: &6%arg 2%&7!"
  131. execute console command "scoreboard players set %arg 2% pkt %{punkty::%arg 2%}%"
  132. else:
  133. send "&8> &cGracza o takim nicku nie ma w bazie danych!"
  134. else:
  135. send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
  136. else:
  137. send "&8> &cPrawidlowe uzycie: &6/ranking &7<&6set|add|remove&7> <&6gracz&7> <&6ilosc>&7"
  138. stop
  139. else:
  140. send "&8> &cNie masz uprawnien do uzywania tej komendy! &7(&6psranking.*&7)"
Advertisement
Add Comment
Please, Sign In to add comment