Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function contains(list: objects, check: object) :: boolean:
- loop {_list::*}:
- if loop-value is {_check}:
- return true
- return false
- on damage:
- if attacker and victim is not a player:
- stop
- set {_name} to victim's name
- set {_nameAttacker} to attacker's name
- delete {fly.%victim%}
- set victim's flight mode to false
- delete {fly.%attacker%}
- set attacker's flight mode to false
- if contains({combattag.players::*}, {_name}):
- set {combattag.delay.%victim's name%} to 10
- stop
- if contains({combattag.players::*}, {_nameAttacker}):
- set {combattag.delay.%attacker's name%} to 10
- stop
- send "&cYou're now in combat log for &e10&c seconds, &c&lDON'T QUIT!" to victim and attacker
- add victim's name to {combattag.players::*}
- add attacker's name to {combattag.players::*}
- set {combattag.delay.%victim's name%} to 10
- set {combattag.delay.%attacker's name%} to 10
- every 1 seconds:
- loop all players:
- set {_name} to loop-player's name
- if contains({combattag.players::*}, {_name}):
- remove 1 from {combattag.delay.%loop-player's name%}
- if {combattag.delay.%loop-player's name%} < 1:
- remove {_name} from {combattag.players::*}
- on command:
- if command is not "msg" or "m" or "r" or "w" or "write" or "t" or "tell" or "reply" or "craft":
- set {_name} to player's name
- if (contains({combattag.players::*}, {_name})):
- send "&cYou can't execute command in combat log. &7(%{combattag.delay.%player's name%}%&7 seconds)"
- cancel event
- on quit:
- set {_name} to player's name
- if (contains({combattag.players::*}, {_name})):
- add {_name} to {combattag.die::*}
- on join:
- set {_name} to player's name
- if (contains({combattag.die::*}, {_name})):
- remove {_name} from {combattag.die::*}
- kill player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement