Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.41 KB | None | 0 0
  1. on load:
  2. send "§6---------------[§r §e§lScores §6]---------------" to console
  3. send "§8> §6Version von §eleVaneq§7!" to console
  4. send "§8> §6Version§8: §e1.5" to console
  5. send "§6---------------[§r §e§lScores §6]---------------" to console
  6. stop
  7.  
  8. function format(n: number) :: text:
  9. set {_data} to "QT,18|Q,15|T,12|B,9|M,6|k,3"
  10. loop split {_data} at "|":
  11. set {_s::*} to split loop-value at ","
  12. {_n} >= 10 ^ {_s::2} parsed as number
  13. return "%{_n} / 10 ^ {_s::2} parsed as number%%{_s::1}%"
  14. return "%{_n}%"
  15.  
  16.  
  17.  
  18. function intFormat(integer: Integer) :: String:
  19. set {_int} to {_string} parsed as integer
  20. return regex replace "(?<=\d)(?=(\d\d\d)+(?!\d))" with "'" in {_int}
  21.  
  22. function numFormat(number: Number) :: String:
  23. set {_num} to "%{_number}%"
  24. return regex replace "(?<=\d)(?=(\d\d\d)+(?!\d))" with "'" in {_num}
  25. function Scoreboard(p: player):
  26. setup skoreboard for {_p}
  27. if {_p} has a skoreboard:
  28. set title of skoreboard {_p} to "&8» &6&lLightPvP"
  29. set slot 1 of skoreboard {_p} to "&1"
  30. set slot 2 of skoreboard {_p} to "&3Name "
  31. set slot 3 of skoreboard {_p} to "&f%{_p}% "
  32. set slot 4 of skoreboard {_p} to "&2"
  33. set slot 5 of skoreboard {_p} to "&eGuthaben "
  34. set slot 6 of skoreboard {_p} to "&f%format({coins::%{_p}%})%$ "
  35. set slot 7 of skoreboard {_p} to "&4"
  36. set slot 8 of skoreboard {_p} to "&fLiga "
  37. set slot 9 of skoreboard {_p} to "&r%{pvp.rang.%{_p}%}% "
  38. set slot 10 of skoreboard {_p} to "&5"
  39. set slot 11 of skoreboard {_p} to "&aKills "
  40. set slot 12 of skoreboard {_p} to "&f%{Kills.%{_p}%}% "
  41. set slot 13 of skoreboard {_p} to "&9"
  42. set slot 14 of skoreboard {_p} to "&cTode"
  43. set slot 15 of skoreboard {_p} to "&f%{Tode.%{_p}%}%"
  44.  
  45.  
  46.  
  47. on join:
  48. while player is online:
  49. if {combat::%player%} is smaller than 1:
  50. Scoreboard(player)
  51. else:
  52. if {combat::%player%} is smaller than 15:
  53. combat(player, player)
  54.  
  55.  
  56.  
  57.  
  58. on load:
  59. loop all players:
  60. Scoreboard(loop-player)
  61.  
  62.  
  63.  
  64.  
  65. function combat(a: player, v: player):
  66. set skoreboard for {_a}
  67. set title of skoreboard {_a} to "&4⚒ &cKampf-Infos &4⚒"
  68. set slot 1 of skoreboard {_a} to "&4 "
  69. set slot 2 of skoreboard {_a} to "&cGegner"
  70. set slot 3 of skoreboard {_a} to "&7%{_v}% &7- &c%health of {_v}% Leben"
  71. set slot 4 of skoreboard {_a} to " "
  72. set slot 5 of skoreboard {_a} to "&a%{_v}%'s Rüstung"
  73. set slot 6 of skoreboard {_a} to "&8» &cHelm: &f%durability of helmet of {_v}%"
  74. set slot 7 of skoreboard {_a} to "&8» &cBrustplatte: &f%durability of chestplate of {_v}%"
  75. set slot 8 of skoreboard {_a} to "&8» &cHose: &f%{_v}'s legging's durability%"
  76. set slot 9 of skoreboard {_a} to "&8» &cSchuhe: &f%durability of boots of {_v}%"
  77. stop
  78. on damage:
  79. if attacker is a player:
  80. if victim is a player:
  81. loop all players:
  82. wait 1 tick
  83. if {combat::%loop-player%} is smaller than 15:
  84. reset slots numbers between 1 and 9 of skoreboard loop-player
  85.  
  86.  
  87. on damage:
  88. if attacker is a player:
  89. Set {combat::%victim%} to 15
  90. wait 1 tick
  91. combat(attacker, victim)
  92. Every second:
  93. Loop all players:
  94. If {combat::%loop-player%} is smaller than 1:
  95. Delete {combat::%loop-player%}
  96. Else:
  97. Remove 1 from {combat::%loop-player%}
  98.  
  99. on command:
  100. if command is "warp" or "tpa" or "spawn" or "tpa" or "tpahere" or "gm" or "fly" or "home":
  101. If {combat.%player%} is set:
  102. Cancel event
  103. send " You are in combat! No commands!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement