Skript Help

  • 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!

FrostPVP™️

Active Member
Feb 12, 2021
63
3
8
24
USA
Can someone make a combatlog skript?
I need it so they can't teleport anywhere and if they log out they die
I also need a bypass and you can make the permission whatever you want
I want there to be a 10 second wait time for when people get tagged
 
Last edited:
Small correction:

Change
Code:
on command "spawn":
    if {combat.log.%player%} is true:
        cancel event
        send "&cTeleporting is disabled while in combat."

on command "warp":
    if {combat.log.%player%} is true:
        cancel event
        send "&cTeleporting is disabled while in combat."

on command "tpa":
    if {combat.log.%player%} is true:
        cancel event
        send "&cTeleporting is disabled while in combat."

on command "home":
    if {combat.log.%player%} is true:
        cancel event
        send "&cTeleporting is disabled while in combat."
to
Code:
on command:
    if command is "spawn" or "warp" or "tpa" or "home":
        cancel event
        send "&cTeleporting is disabled while in combat."

and use list variables :emoji_slight_smile:
 
Another issue you could easily simplify is using 1 On Command event.
enjoy this and if there are any errors don't hesitate to DM me on discord!
Code:
on command:
  if {combat.log.%player%} is true:
    if command is "tpa", "home", "spawn", "tp", "warp":
      cancel event
      send "&cYou cannot teleport in combat!"
on damage:
  if {DoCL} is false:
  else:
    if victim is a player:
      set {combat.log.%player%} to true
      send "&cYou are in combat! Do not log out or you will be killed!"
      wait 10 seconds
      set {combat.log.%player%} to false
on join:
  if {combat.log.%player%} is true:
    wait 1 tick
    kill player
    send "&cYou combat logged and therefore were killed!"
command /cl [<boolean>]:
  if arg 1 is false:
    set {DoCL} to false
    send "&cDisabled Combat Log"
  else:
    if arg 1 is true:
      set {DoCL} to true
      send "&aEnabled Combat Log"