Jump to content

Combat Log Help


asqx

Recommended Posts

So i have been trying to skript this combat log skript. Everytime i hit somebody it sends the message "You are now in combat, don't log out!". I have been trying to fix it, i just cannot do it.

 

Skript:

on damage of player:
	attacker is player
	if {combatlog.%attacker%} is not set:
	send "&cYou are now in combat, don't log out!" to attacker and victim
	set {combatlog.%attacker%} to true
	set {combatlog.%victim%} to true
	set {combatlog.%attacker%.lastused} to now
	wait 15 seconds
	if {combatlog.%attacker%.lastused} was more than 14 seconds ago:
		send "&aYou are no longer in combat. You can log out safely now." to attacker and victim
		delete {combatlog.%attacker%}
		delete {combatlog.%victim%}
		delete {combatlog.og.%attacker%.lastused}
 
on quit:
    {combatlog.%player%} is true:
        broadcast "&4%player% Combat Logged"
        kill player
        set {combatlog.logger.%player%} to true
on join:
    {combatlog.logger.%player%} is true
    send "&4You were killed for combat logging"
    delete {combatlog.logger.%player%}
	
on command:
	if command is "spawn" or "kits" or "kit":
		if {combatlog.%player%} is true:
			cancel event
			send "&cYou cannot do that in combat!"

 

Screenshot 2022-02-20 at 7.54.48 PM.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...