Jump to content

Updated Combat Log Skript


Mrbizarre

Recommended Posts

So basically everyone knows of the combat log skript where its really good but ya gotta type your server name like 15 times every time you want it to change the prefix so all i did was made it easier to do

 

 

 

options:
    prefix: &8[&9&lVast&d&lSea&8]&7&l

on damage of a player:
  attacker is a player
  {actplus.immune.%victim's uuid%} is not 1:
    {actplus.time.%victim's uuid%} is not set:
      send "{@prefix} You are now in combat. Do not log out." to victim
    set {actplus.time.%victim's uuid%} to 12
    set {actplus.combatant.%victim's uuid%} to "%attacker%"
  {actplus.immune.%attacker's uuid%} is not 1:
    {actplus.time.%attacker's uuid%} is not set:
      send "{@prefix} You are now in combat. Do not log out." to attacker
    set {actplus.time.%attacker's uuid%} to 12
    set {actplus.combatant.%attacker's uuid%} to "%victim%"
every 2 ticks:
  loop all players where [{actplus.time.%player input's uuid%} exists]:
    {actplus.time.%loop-player's uuid%} is less than 0.1:
      send action bar "&aYou are no longer in combat." to loop-player
      send "{@prefix} You are no longer in combat." to loop-player
      delete {actplus.time.%loop-player's uuid%}
      delete {actplus.combatant.%loop-player's uuid%}
    {actplus.time.%loop-player's uuid%} is greater than 0:
      loop-player is not sprinting:
        send action bar "&cYou are in combat for %{actplus.time.%loop-player's uuid%}% seconds (%{actplus.combatant.%loop-player's uuid%}%)" to loop-player
        subtract 0.1 from {actplus.time.%loop-player's uuid%}
      loop-player is sprinting:
        send action bar "&cCombat time frozen while sprinting (%{actplus.combatant.%loop-player's uuid%}%)" to loop-player
on command:
  {actplus.time.%player's uuid%} is set
  player does not have the permission "staff.sk":
    send "{@prefix} You cannot execute commands in combat." to player
  command is not "actimmune":
    send "{@prefix} You cannot usually execute commands in combat." to player
    send "{@prefix} You have the ability to escape combat with /combatimmune." to player
    cancel event
    stop
on quit:
  {actplus.time.%player's uuid%} exists
  kill player
  broadcast "{@prefix} %player%&3 logged out while fighting &l%{actplus.combatant.%player's uuid%}%"
on death of a player:
  wait 1 tick
  {actplus.time.%victim's uuid%} exists
  set {actplus.time.%victim's uuid%} to 0
on join:
  {actplus.immune.%player's uuid%} exists:
    send "{@prefix} You're currently immune to combat tag. Disable with /combatimmune" to player
command /combatimmune:
  permission: staff.sk
  permission message: {@prefix} Permission required: actplus.immune
  trigger:
    {actplus.immune.%player's uuid%} exists:
      delete {actplus.immune.%player's uuid%}
      send "{@prefix} You are no longer immune to combat tag." to player
      stop
    {actplus.immune.%player's uuid%} is not set:
      set {actplus.immune.%player's uuid%} to 1
      send "{@prefix} You are now immune to combat tag." to player
      delete {actplus.time.%player's uuid%}
      delete {actplus.combatant.%player's uuid%}

 

 

just add your prefix to options, and done!!

REMEMBER: THIS SKRIPT IS NOT OWNED BY ME 😄

Link to comment
Share on other sites

  • 8 months later...
options:
    prefix: &8[&9&lVast&d&lSea&8]&7&l

on damage of a player:
    if attacker is a player:
        if {actplus.immune.%victim's uuid%} is not 1:
            if {actplus.time.%victim's uuid%} is not set:
                send "{@prefix} You are now in combat. Do not log out." to victim
                set {actplus.time.%victim's uuid%} to 12
                set {actplus.combatant.%victim's uuid%} to "%attacker%"
        else if {actplus.immune.%attacker's uuid%} is not 1:
            if {actplus.time.%attacker's uuid%} is not set:
                send "{@prefix} You are now in combat. Do not log out." to attacker
                set {actplus.time.%attacker's uuid%} to 12
                set {actplus.combatant.%attacker's uuid%} to "%victim%"

every 2 ticks:
    loop all players where [{actplus.time.%player input's uuid%} exists]:
        if {actplus.time.%loop-player's uuid%} is less than 0.1:
            send action bar "&aYou are no longer in combat." to loop-player
            send "{@prefix} You are no longer in combat." to loop-player
            delete {actplus.time.%loop-player's uuid%}
            delete {actplus.combatant.%loop-player's uuid%}
            if {actplus.time.%loop-player's uuid%} is greater than 0:
                if loop-player is not sprinting:
                    send action bar "&cYou are in combat for %{actplus.time.%loop-player's uuid%}% seconds (%{actplus.combatant.%loop-player's uuid%}%)" to loop-player
                    subtract 0.1 from {actplus.time.%loop-player's uuid%}
                else if loop-player is sprinting:
                    send action bar "&cCombat time frozen while sprinting (%{actplus.combatant.%loop-player's uuid%}%)" to loop-player

on command:
    if {actplus.time.%player's uuid%} is set:
        if player doesn't have the permission "staff.sk":
            send "{@prefix} You cannot execute commands in combat."
        else if command is not "actimmune":
            send "{@prefix} You cannot usually execute commands in combat."
            send "{@prefix} You have the ability to escape combat with /combatimmune."
            cancel event

on quit:
    if {actplus.time.%player's uuid%} exists:
        kill player
        broadcast "{@prefix} %player%&3 logged out while fighting &l%{actplus.combatant.%player's uuid%}%"

on death of a player:
    wait 1 tick
    if {actplus.time.%victim's uuid%} exists:
        set {actplus.time.%victim's uuid%} to 0

on join:
    if {actplus.immune.%player's uuid%} exists:
        send "{@prefix} You're currently immune to combat tag. Disable with /combatimmune"

command /combatimmune:
    trigger:
        if player has permission "staff.sk":
            if {actplus.immune.%player's uuid%} exists:
                delete {actplus.immune.%player's uuid%}
                send "{@prefix} You are no longer immune to combat tag."
                stop
            set {actplus.immune.%player's uuid%} to 1
            send "{@prefix} You are now immune to combat tag."
            delete {actplus.time.%player's uuid%}
            delete {actplus.combatant.%player's uuid%}
        else:
            send "{@prefix} Permission required: actplus.immune"

 

Discord: Dead#6905

Love anime!


Anime Gifs

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...