Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- Prefix: &8[&eKing Of The Sky&8]
- HighlightColor: &e
- ChatColor: &r
- BreakAttemptSound: random.break
- BreakAttemptPitch: 1
- YouWereHealedSound: note.pling
- YouWereHealedPitch: 2
- #= Commands =#
- command /kots [<text>] [<world>]:
- aliases: /kingofthesky
- trigger:
- if arg-1 is "on" or "enable":
- command sender has permission "Skript.KingOfTheSky":
- if {KOTS.Enabled} is not set:
- set {KOTS.Enabled} to true
- broadcast "{@Prefix}{@ChatColor} Enabled by {@HighlightColor}%command sender%!"
- else:
- message "{@Prefix}{@ChatColor} Already enabled!" to the command sender
- stop trigger
- else:
- execute console command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
- message "{@Prefix}{@ChatColor} You don't have permission for that!" to the command sender
- else if arg-1 is "off" or "disable":
- command sender has permission "Skript.KingOfTheSky":
- if {KOTS.Enabled} is true:
- delete {KOTS.Enabled}
- broadcast "{@Prefix}{@ChatColor} Disabled by {@HighlightColor}%command sender%!"
- if the block at ({KOTS.GoldBlock}) is gold block:
- set the block at ({KOTS.GoldBlock}) to air
- delete {KOTS.GoldBlock}
- delete {KOTS.LatestAtGoldBlock}
- else:
- message "{@Prefix}{@ChatColor} Already disabled!" to the command sender
- stop trigger
- else:
- execute console command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
- message "{@Prefix}{@ChatColor} You don't have permission for that!" to the command sender
- else if arg-1 is "toggle" or "switch":
- if {KOTS.Enabled} is true:
- command sender command "/kots off"
- stop trigger
- if {KOTS.Enabled} is not set:
- command sender command "/kots on"
- stop trigger
- else if arg-1 is "who":
- if {KOTS.LatestAtGoldBlock} is set:
- message "{@Prefix}{@ChatColor} {@HighlightColor}%{KOTS.LatestAtGoldBlock}%{@ChatColor} is the King of the Sky!"
- stop trigger
- message "{@Prefix}{@ChatColor} There is no King of the Sky!"
- else if arg-1 is "setup" or "block":
- if {KOTS.Enabled} is not set:
- message "{@Prefix}{@ChatColor} Enable first!"
- message "{@Prefix}{@ChatColor} /kingofthesky on"
- stop trigger
- if arg-2 is not set:
- message "{@Prefix}{@ChatColor} /kingofthesky setup <world>"
- stop trigger
- set {KOTS.GoldBlock} to (the location at 0.5, 200.5, 0.5 of the world (arg-2))
- set the block at {KOTS.GoldBlock} to gold block
- broadcast "{@Prefix}{@ChatColor} Gold block setup at 0, 200, 0!"
- else if arg-1 is "help" or "?" or "question" or "info" or "information":
- message "" to the command sender
- if command sender has permission "Skript.KingOfTheSky":
- message "{@Prefix}{@ChatColor} /King of the Sky {@HighlightColor}on/off/toggle" to the command sender
- message "{@Prefix}{@ChatColor} Scenario by: {@HighlightColor}/u/bucklakeluki"
- if command sender is "Fleft":
- message "{@Prefix}{@ChatColor} Skript: {@HighlightColor}You!" to the command sender
- else:
- message "{@Prefix}{@ChatColor} Skript: {@HighlightColor}Fleft" to the command sender
- message "" to the command sender
- message "{@Prefix}{@ChatColor} In {@HighlightColor}King Of The Sky{@ChatColor}, there is a gold" to the command sender
- message "{@Prefix}{@ChatColor} block {@HighlightColor}200{@ChatColor} blocks above 0,0." to the command sender
- message "{@Prefix}{@ChatColor} Every minute, the player standing on this block" to the command sender
- message "{@Prefix}{@ChatColor} will be healed {@HighlightColor}half a heart." to the command sender
- message "{@Prefix}{@ChatColor} To counter this, when you shoot someone," to the command sender
- message "{@Prefix}{@ChatColor} you switch positions." to the command sender
- message "" to the command sender
- else if arg-1 is not set:
- command sender command "/kots help"
- else:
- command sender command "/kots help"
- #= KOTS Monument Healing =#
- every minute:
- {KOTS.Enabled} is true:
- {KOTS.GoldBlock} is set:
- loop all players:
- set {_loc} to (the location at (block below loop-player))
- if {_loc} is equal to {KOTS.GoldBlock}:
- if {KOTS.LatestAtGoldBlock} is not set:
- set {KOTS.LatestAtGoldBlock} to loop-player
- heal loop-player by 0.5 heart
- execute console command "/playsound {@YouWereHealedSound} %loop-player% ~ ~ ~ 1 {@YouWereHealedPitch} 1"
- message "{@Prefix}{@ChatColor} You were healed half a heart!" to loop-player
- if loop-player is not {KOTS.LatestAtGoldBlock}:
- set {KOTS.LatestAtGoldBlock} to loop-player
- broadcast "{@Prefix}{@ChatColor} {@HighlightColor}%loop-player%{@ChatColor} is the King of the Sky!"
- #= KOTS Anti-Mine =#
- on mine:
- {KOTS.Enabled} is true:
- set {_loc} to location of event-block
- if {_loc} is equal to {KOTS.GoldBlock}:
- cancel the event
- message "{@Prefix}{@ChatColor} You can't break the monument!"
- execute console command "/playsound {@BreakAttemptSound} %player% ~ ~ ~ 1 {@BreakAttemptPitch} 1"
- on place:
- {KOTS.Enabled} is true:
- set {_loc} to location of event-block
- loop blocks in radius 2 around {_loc}:
- set {_loopLoc} to (the location at loop-block)
- if {_loopLoc} is equal to {KOTS.GoldBlock}:
- cancel the event
- message "{@Prefix}{@ChatColor} You can't place blocks around the monument!" to event-player
- execute console command "/playsound {@BreakAttemptSound} %event-player% ~ ~ ~ 1 {@BreakAttemptPitch} 1"
- #= King Death Removal =#
- on death of player:
- {KOTS.Enabled} is true:
- {KOTS.LatestAtGoldBlock} is equal to victim:
- broadcast "{@Prefix}{@ChatColor} The current King of the Sky has died!"
- delete {KOTS.LatestAtGoldBlock}
- #= Switcheroo =#
- on damage:
- {KOTS.Enabled} is true:
- attacker is a player:
- attacker is alive:
- victim is a player:
- victim is alive:
- damage was caused by projectile:
- projectile is an arrow:
- set {_KOTS.TempLoc} to (location of victim)
- teleport victim to (location 0.3 below attacker)
- teleport attacker to {_KOTS.TempLoc}
- command damage:
- permission: skript.op
- trigger:
- damage (command sender) by 3 hearts
Advertisement
Add Comment
Please, Sign In to add comment