Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on damage:
- if attacker is a player:
- victim is a player
- {incombat.%victim%} is false
- set {incombat.%victim%} to true
- set {incombat.%attacker%} to true
- set {attacking.%attacker%} to "%victim%"
- send "&c%attacker% damaged you, &7do not logout or close session or you will &4die!" to victim
- send "&cYou damaged %victim%, &7do not logout or close session or you will &4die!" to attacker
- wait 20 seconds
- set {incombat.%attacker%} to false
- set {incombat.%victim%} to false
- send "&aYou can log out now as you are no longer in combat!" to victim
- send "&aYou can log out now as you are no longer in combat!" to attacker
- on join:
- set {attacking.%player%} to ""
- set {incombat.%player%} to false
- on quit:
- if {incombat.%player%} is true:
- kill the player
- broadcast "&7[&eAntiCombatLogout&7]&c %player% died because logged out while in combat!"
- set {combatlogout.%player%} to true
- stop
- on join:
- {combatlogout.%player%} is true
- send "&7[&eAntiCombatLogout&7]&cYou died because you logged out while in combat!"
- set {combatlogout.%player%} to false
Advertisement
Add Comment
Please, Sign In to add comment