Advertisement
Neonowsky

[SK] ScoreboardRank

Aug 28th, 2015
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. variables:
  2. {r.%player%} = 1000
  3. {z.%player%} = 0
  4. {s.%player%} = 0
  5. on rightclick on player:
  6. player is sneaking:
  7. send ""
  8. send "&cRanking: &f%{r.%clicked player%}%"
  9. send "&cZabojstwa: &f%{z.%clicked player%}%"
  10. send "&cSmierci: &f%{s.%clicked player%}%"
  11. on death of player:
  12. attacker is player
  13. set {_x} to {r.%victim%}*0.05
  14. set {r.%attacker%} to {r.%attacker%}+{_x}
  15. set {r.%victim%} to {r.%victim%}-{_x}
  16. add 1 to {z.%attacker%}
  17. add 1 to {s.%victim%}
  18. display scoreboard named "&6Statystyki" to attacker
  19. make score of "&aRanking" in scoreboard of attacker to {r.%attacker%}
  20. make score of "&aZabojstwa" in scoreboard of attacker to {z.%attacker%}
  21. make score of "&aSmierci" in scoreboard of attacker to {s.%attacker%}
  22. move display of attacker to sidebar
  23. display scoreboard named "&6Statystyki" to victim
  24. make score of "&aRanking" in scoreboard of victim to {r.%victim%}
  25. make score of "&aZabojstwa" in scoreboard of victim to {z.%victim%}
  26. make score of "&aSmierci" in scoreboard of victim to {s.%victim%}
  27. move display of victim to sidebar
  28. broadcast "&cGracz &6%victim% &czostal zabity przez &6%attacker%&c. &6(%{_x}%)"
  29. on join:
  30. display scoreboard named "&6Statystyki" to player
  31. make score of "&aRanking" in scoreboard of player to {r.%player%}
  32. make score of "&aZabojstwa" in scoreboard of player to {z.%player%}
  33. make score of "&aSmierci" in scoreboard of player to {s.%player%}
  34. move display of player to sidebar
  35. command /admin [<text>] [<player>] [<number>]:
  36. trigger:
  37. arg 1 is not set:
  38. send "&c/admin ranking <nick> <ilosc> - ustaw ranking"
  39. send "&c/admin zabojstwa <nick> <liczba> - ustaw liczbe zabojstw"
  40. send "&c/admin smierci <nick> <liczba> - ustaw liczbe smierci"
  41. stop
  42. player has permission "sk.ranking":
  43. arg 1 is "ranking" or "zabojstwa" or "smierci":
  44. arg 1 is "ranking":
  45. arg 2 is set:
  46. arg 3 is set:
  47. set {r.%arg 2%} to arg 3
  48. execute arg 2 command "ss"
  49. else:
  50. send "Podaj ilosc"
  51. else:
  52. send "Podaj nick"
  53. arg 1 is "zabojstwa":
  54. arg 2 is set:
  55. arg 3 is set:
  56. set {z.%arg 2%} to arg 3
  57. execute arg 2 command "ss"
  58. else:
  59. send "Podaj ilosc"
  60. else:
  61. send "Podaj nick"
  62. arg 1 is "smierci":
  63. arg 2 is set:
  64. arg 3 is set:
  65. set {s.%arg 2%} to arg 3
  66. execute arg 2 command "ss"
  67. else:
  68. send "Podaj ilosc"
  69. else:
  70. send "Podaj nick"
  71. else:
  72. send "&cranking/zabojstwa/smierci"
  73.  
  74. else:
  75. send "&cNie masz uprawnien do tej komendy."
  76. on command:
  77. command is "ss":
  78. cancel event
  79. wait 2 ticks
  80. display scoreboard named "&6Statystyki" to player
  81. make score of "&aRanking" in scoreboard of player to {r.%player%}
  82. make score of "&aZabojstwa" in scoreboard of player to {z.%player%}
  83. make score of "&aSmierci" in scoreboard of player to {s.%player%}
  84. move display of player to sidebar
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement