Anti Combat Logger

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

I will try this soon. :emoji_stuck_out_tongue:
[doublepost=1492737703,1492651929][/doublepost]
Try this
Code:
options:
    time: 15

function CombatTag(a: player, v: player):
    {_a} is not {_v}
    if {combatLog::%{_v}%} is not set:
        set {combatLog::%{_v}%} to {@time}
        set {combatLog::%{_a}%} to {@time}
        send "&2You are in combat" to {_v}
    else:
        if {combatLog::%{_a}%} is not set:
            set {combatLog::%{_a}%} to {@time}
            send "&2You are in combat" to {_a}
    set {combatLog::%{_v}%} to {@time}
    if {combatLog::%{_v}%} is greater than 1:
        loop {@time}:
            remove 1 from {combatLog::%{_a}%}
            remove 1 from {combatLog::%{_v}%}
            wait 1 second
            set actionbar of {_a} to "&2You have %{@time}% seconds left in combat"
            set actionbar of {_v} to "&2You have %{@time}% seconds left in combat"
    else:
        set actionbar of {_a} to ""
        set actionbar of {_v} to ""
        send "&2You are no longer on combat" to {_v}
        send "&2You are no longer on combat" to {_a}


not tested.
How do I use this function?
 
I am getting this massive error:
code_language.skript:
21.04 14:49:03 [Server] ERROR #!#! Skellett v1.8.8aVixio v1.1.2skRayFall v1.9.5SharpSK v1.6.1.5MundoSK v1.7.5-BETA.7.125WildSkript v1.8skUtilities v0.9.0Reqn v1.2.0Umbaska v2.0 Beta 5.5.1 for Minecraft 1.10SkQuery v3.5.6-LimeTuSKe v1.7.4RandomSK v2.0WolvSK v1.5.4
21.04 14:49:03 [Server] ERROR #!#! List of addons:
21.04 14:49:03 [Server] ERROR #!#!
21.04 14:49:03 [Server] ERROR #!#! List of plugins:
21.04 14:49:03 [Server] ERROR #!#!
21.04 14:49:03 [Server] ERROR #!#! End of Error.
21.04 14:49:03 [Server] ERROR #!#!
21.04 14:49:03 [Server] ERROR #!#! Thread: Server thread
21.04 14:49:03 [Server] ERROR #!#!
21.04 14:49:03 [Server] ERROR #!#! Current item: null
21.04 14:49:03 [Server] ERROR #!#! Current node: set actionbar of {_a} to "" (anticombatlog.sk, line 23)
21.04 14:49:03 [Server] ERROR #!#!
21.04 14:49:03 [Server] ERROR #!#! Running CraftBukkit: false
21.04 14:49:03 [Server] ERROR #!#!
21.04 14:49:03 [Server] ERROR #!#!   OS: Linux amd64 2.6.32-573.7.1.el6.x86_64
21.04 14:49:03 [Server] ERROR #!#!   Java: 1.8.0_77 (Java HotSpot(TM) 64-Bit Server VM 25.77-b03)
21.04 14:49:03 [Server] ERROR #!#!   Minecraft: 1.8.8
21.04 14:49:03 [Server] ERROR #!#!   Bukkit: 1.8.8-R0.1-SNAPSHOT
21.04 14:49:03 [Server] ERROR #!#!   Skript: 2.2-dev23
21.04 14:49:03 [Server] ERROR #!#! Version Information:
21.04 14:49:03 [Server] ERROR #!#!
21.04 14:49:03 [Server] ERROR #!#!     at java.lang.Thread.run(Unknown Source)
21.04 14:49:03 [Server] ERROR #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557)
21.04 14:49:03 [Server] ERROR #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654)
21.04 14:49:03 [Server] ERROR #!#!     at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374)
21.04 14:49:03 [Server] ERROR #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715)
21.04 14:49:03 [Server] ERROR #!#!     at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44)
21.04 14:49:03 [Server] ERROR #!#!     at java.util.concurrent.FutureTask.run(Unknown Source)
21.04 14:49:03 [Server] ERROR #!#!     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
21.04 14:49:03 [Server] ERROR #!#!     at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13)
21.04 14:49:03 [Server] ERROR #!#!     at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1)
21.04 14:49:03 [Server] ERROR #!#!     at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45)
21.04 14:49:03 [Server] ERROR #!#!     at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997)
21.04 14:49:03 [Server] ERROR #!#!     at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1162)
21.04 14:49:03 [Server] ERROR #!#!     at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641)
21.04 14:49:03 [Server] ERROR #!#!     at me.incomprehendable.dev.pwp.FakeSimpleCommandMap.dispatch(FakeSimpleCommandMap.java:98)
21.04 14:49:03 [Server] ERROR #!#!     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.SkriptCommand.onCommand(SkriptCommand.java:141)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.Skript.reload(Skript.java:686)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:201)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:247)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.ScriptLoader.loadScript(ScriptLoader.java:485)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.lang.function.Functions.loadFunction(Functions.java:129)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.lang.function.ScriptFunction.<init>(ScriptFunction.java:53)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:813)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.lang.Conditional.loadElseClause(Conditional.java:74)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.lang.Conditional$1.<init>(Conditional.java:74)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.lang.TriggerSection.<init>(TriggerSection.java:56)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:754)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.lang.Statement.parse(Statement.java:61)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:176)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:221)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1111)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.lang.SkriptParser.getExprInfo(SkriptParser.java:1390)
21.04 14:49:03 [Server] ERROR #!#!     at ch.njol.skript.registrations.Classes.getClassInfo(Classes.java:264)
21.04 14:49:03 [Server] ERROR #!#! ch.njol.skript.SkriptAPIException: No class info found for player'
21.04 14:49:03 [Server] ERROR #!#! Stack trace:
21.04 14:49:03 [Server] ERROR #!#!
21.04 14:49:03 [Server] ERROR #!#! By following this guide fixing the error should be easy and done fast.
21.04 14:49:03 [Server] ERROR #!#! If you think that it's a trigger that's causing the error please post the trigger as well.
21.04 14:49:03 [Server] ERROR #!#! and describe what you did before it happened and/or what you think caused the error.
21.04 14:49:03 [Server] ERROR #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it (or use paste service),
21.04 14:49:03 [Server] ERROR #!#! and check whether this error has already been reported.
21.04 14:49:03 [Server] ERROR #!#! If you're a server admin however please go to https://github.com/bensku/Skript/issues/
21.04 14:49:03 [Server] ERROR #!#! If you're developing an add-on for Skript this likely means that you have done something wrong.
21.04 14:49:03 [Server] ERROR #!#!
21.04 14:49:03 [Server] ERROR #!#! Could not load anticombatlog.sk
21.04 14:49:03 [Server] ERROR #!#! [Skript] Severe Error: