Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on load:
- send "§6---------------[§r §e§lScores §6]---------------" to console
- send "§8> §6Version von §eleVaneq§7!" to console
- send "§8> §6Version§8: §e1.5" to console
- send "§6---------------[§r §e§lScores §6]---------------" to console
- stop
- function format(n: number) :: text:
- set {_data} to "QT,18|Q,15|T,12|B,9|M,6|k,3"
- loop split {_data} at "|":
- set {_s::*} to split loop-value at ","
- {_n} >= 10 ^ {_s::2} parsed as number
- return "%{_n} / 10 ^ {_s::2} parsed as number%%{_s::1}%"
- return "%{_n}%"
- function intFormat(integer: Integer) :: String:
- set {_int} to {_string} parsed as integer
- return regex replace "(?<=\d)(?=(\d\d\d)+(?!\d))" with "'" in {_int}
- function numFormat(number: Number) :: String:
- set {_num} to "%{_number}%"
- return regex replace "(?<=\d)(?=(\d\d\d)+(?!\d))" with "'" in {_num}
- function Scoreboard(p: player):
- setup skoreboard for {_p}
- if {_p} has a skoreboard:
- set title of skoreboard {_p} to "&8» &6&lLightPvP"
- set slot 1 of skoreboard {_p} to "&1"
- set slot 2 of skoreboard {_p} to "&3Name "
- set slot 3 of skoreboard {_p} to "&f%{_p}% "
- set slot 4 of skoreboard {_p} to "&2"
- set slot 5 of skoreboard {_p} to "&eGuthaben "
- set slot 6 of skoreboard {_p} to "&f%format({coins::%{_p}%})%$ "
- set slot 7 of skoreboard {_p} to "&4"
- set slot 8 of skoreboard {_p} to "&fLiga "
- set slot 9 of skoreboard {_p} to "&r%{pvp.rang.%{_p}%}% "
- set slot 10 of skoreboard {_p} to "&5"
- set slot 11 of skoreboard {_p} to "&aKills "
- set slot 12 of skoreboard {_p} to "&f%{Kills.%{_p}%}% "
- set slot 13 of skoreboard {_p} to "&9"
- set slot 14 of skoreboard {_p} to "&cTode"
- set slot 15 of skoreboard {_p} to "&f%{Tode.%{_p}%}%"
- on join:
- while player is online:
- if {combat::%player%} is smaller than 1:
- Scoreboard(player)
- else:
- if {combat::%player%} is smaller than 15:
- combat(player, player)
- on load:
- loop all players:
- Scoreboard(loop-player)
- function combat(a: player, v: player):
- set skoreboard for {_a}
- set title of skoreboard {_a} to "&4⚒ &cKampf-Infos &4⚒"
- set slot 1 of skoreboard {_a} to "&4 "
- set slot 2 of skoreboard {_a} to "&cGegner"
- set slot 3 of skoreboard {_a} to "&7%{_v}% &7- &c%health of {_v}% Leben"
- set slot 4 of skoreboard {_a} to " "
- set slot 5 of skoreboard {_a} to "&a%{_v}%'s Rüstung"
- set slot 6 of skoreboard {_a} to "&8» &cHelm: &f%durability of helmet of {_v}%"
- set slot 7 of skoreboard {_a} to "&8» &cBrustplatte: &f%durability of chestplate of {_v}%"
- set slot 8 of skoreboard {_a} to "&8» &cHose: &f%{_v}'s legging's durability%"
- set slot 9 of skoreboard {_a} to "&8» &cSchuhe: &f%durability of boots of {_v}%"
- stop
- on damage:
- if attacker is a player:
- if victim is a player:
- loop all players:
- wait 1 tick
- if {combat::%loop-player%} is smaller than 15:
- reset slots numbers between 1 and 9 of skoreboard loop-player
- on damage:
- if attacker is a player:
- Set {combat::%victim%} to 15
- wait 1 tick
- combat(attacker, victim)
- Every second:
- Loop all players:
- If {combat::%loop-player%} is smaller than 1:
- Delete {combat::%loop-player%}
- Else:
- Remove 1 from {combat::%loop-player%}
- on command:
- if command is "warp" or "tpa" or "spawn" or "tpa" or "tpahere" or "gm" or "fly" or "home":
- If {combat.%player%} is set:
- Cancel event
- send " You are in combat! No commands!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement