Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Thank you for using my Skript for your request!
- # In the configuration you can change anything you want.
- # CONFIG:
- options:
- # Prefix: This will be used for pretty much every message
- # Make sure to have no space after the Prefix!
- Prefix: &d&lBedr0ck&5&lPVP &8>>
- # If set to true, escape commands will be disabled while combat logged.
- CommandsDisable: true
- # Gets warned as they leave whilst Combat Logged:
- WarnOnLeave: true
- # Gets /killed upon join after Combat Logging:
- KillOnJoin: true
- # Messages
- # Message as they get killed upon joining:
- JoinKilledMsg: &cSince you combat logged you have been /killed
- # Message if player got hit by another player:
- HittedMsg: &cYou have been combat tagged for 10 seconds by
- # You can use %attacker% and %victim% for this:
- HittedMsg2: &e(%attacker%)! &4Do not log out
- # Message if player hits another player:
- HittingMsg: &cYou have been combat tagged for 10 seconds by
- HittingMsg2: &e(%attacker%)! &4Do not log out
- HittingMsg3: &cYou are attacking &e(%victim%) &cDo not log out!
- # Message once they are out of the Combat Log:
- CombatOverMsg: &aYou are no longer in combat. You may log out or /spawn
- # Combat Log Bypass Permission:
- CLBypassPerm: combatlog.bypass
- # The code starts here!
- # Please only change it, if you know what you are doing!
- on quit:
- {CL::%uuid of player%::in.combat} is true
- if {@WarnOnLeave} is true:
- execute console command "warn %event-player% Combat Log"
- delete {CL::%uuid of player%::*}
- set {CombatLogged::%uuid of player%} to true
- on command:
- {CL::%uuid of player%::in.combat} is true
- if {@CommandsDisable} is true:
- command is "spawn" or "warp" or "tp" or "tpa" or "tpaccept" or "tpahere" or "back" or "home" or "world" or "god" or "gamemode"
- message "&cYou cant do that while Combat Logged!"
- on damage:
- victim is a player
- attacker is a player
- attacker is not the victim
- if victim has permission "{@CLBypassPerm}":
- stop
- else:
- if {CL::%uuid of victim%::in.combat} is true:
- set {CL::%uuid of victim%::in.seconds.until.out} to 10
- stop
- send "{@Prefix} {@HittedMsg}" to victim
- send "{@Prefix} {@HittedMsg2}" to victim
- set {CL::%uuid of victim%::in.combat} to true
- set {CL::%uuid of victim%::in.seconds.until.out} to 10
- while {CL::%uuid of victim%::in.seconds.until.out} is more than 1:
- {CL::%uuid of victim%::in.seconds.until.out} is not set:
- stop
- subtract 1 from {CL::%uuid of victim%::in.seconds.until.out}
- wait 1 second
- delete {CL::%uuid of victim%::in.combat}
- delete {CL::%uuid of victim%::in.seconds.until.out}
- send "{@Prefix} {@CombatOverMsg}" to victim
- on death:
- delete {CL::%uuid of event-player%::in.combat}
- delete {CL::%uuid of event-player%::in.seconds.until.out}
- on damage:
- victim is a player
- attacker is a player
- attacker is not the victim
- if {CL::%uuid of attacker%::in.combat} is true:
- set {CL::%uuid of attacker%::in.seconds.until.out} to 10
- stop
- send "{@Prefix} {@HittingMsg}" to attacker
- send "{@Prefix} {@HittingMsg2}" to attacker
- send "{@Prefix} {@HittingMsg3}" to attacker
- set {CL::%uuid of attacker%::in.combat} to true
- set {CL::%uuid of attacker%::in.seconds.until.out} to 10
- while {CL::%uuid of attacker%::in.seconds.until.out} is more than 1:
- {CL::%uuid of attacker%::in.seconds.until.out} is not set:
- stop
- subtract 1 from {CL::%uuid of attacker%::in.seconds.until.out}
- wait 1 second
- delete {CL::%uuid of attacker%::in.combat}
- delete {CL::%uuid of attacker%::in.seconds.until.out}
- send "{@Prefix} {@CombatOverMsg}" to attacker
- on join:
- delete {CL::%uuid of event-player%::*}
- if {CombatLogged::%uuid of event-player%}:
- if {@KillOnJoin} is true:
- wait 1 second
- execute console command "/kill %event-player%"
- send "{@Prefix} {@JoinKilledMsg}"
- delete {CombatLogged::%uuid of event-player%}
- on script load:
- delete {CL::*}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement