Files
abyssal_artifacts.sk
Code
1 668
abyssal_artifacts.sk
# Abyssal Artifacts
# Place this file in plugins/Skript/scripts/
# Reload with: /sk reload abyssal_artifacts
options:
prefix: &3&lAbyss &8»&r
abyss-blue: &3
abyss-dark: &1
function abyssFullSet(p: player) :: boolean:
if name of {_p}'s helmet is not "&3Abyssal Helmet":
return false
if name of {_p}'s chestplate is not "&3Abyssal Chestplate":
return false
if name of {_p}'s leggings is not "&3Abyssal Leggings":
return false
if name of {_p}'s boots is not "&3Abyssal Boots":
return false
return true
function abyssCooldown(p: player, key: text, seconds: number):
set {_id} to "%uuid of {_p}%"
set {_cooldown} to {_seconds}
if {abyss.tide::%{_id}%} is "low":
set {_cooldown} to {_cooldown} * 0.7
set {abyss.cooldown::%{_id}%::%{_key}%} to true
wait {_cooldown} seconds
delete {abyss.cooldown::%{_id}%::%{_key}%}
function abyssGive(p: player, artifact: text):
if {_artifact} is "blade":
give {_p} 1 diamond sword named "&3Abyssal Blade"
send "{@prefix} &fYou received the &3Abyssal Blade&f." to {_p}
else if {_artifact} is "waraxe":
give {_p} 1 netherite axe named "&3Abyssal Waraxe"
send "{@prefix} &fYou received the &3Abyssal Waraxe&f." to {_p}
else if {_artifact} is "helmet":
give {_p} 1 diamond helmet named "&3Abyssal Helmet"
send "{@prefix} &fYou received the &3Abyssal Helmet&f." to {_p}
else if {_artifact} is "chestplate":
give {_p} 1 diamond chestplate named "&3Abyssal Chestplate"
send "{@prefix} &fYou received the &3Abyssal Chestplate&f." to {_p}
else if {_artifact} is "leggings":
give {_p} 1 diamond leggings named "&3Abyssal Leggings"
send "{@prefix} &fYou received the &3Abyssal Leggings&f." to {_p}
else if {_artifact} is "boots":
give {_p} 1 diamond boots named "&3Abyssal Boots"
send "{@prefix} &fYou received the &3Abyssal Boots&f." to {_p}
else if {_artifact} is "tides":
give {_p} 1 heart of the sea named "&3Abyssal Tides"
send "{@prefix} &fYou received the &3Abyssal Tides&f." to {_p}
else if {_artifact} is "pierce":
give {_p} 1 crossbow named "&3Abyssal Pierce"
send "{@prefix} &fYou received &3Abyssal Pierce&f." to {_p}
else if {_artifact} is "trident":
give {_p} 1 trident named "&3Abyssal Trident"
send "{@prefix} &fYou received the &3Abyssal Trident&f." to {_p}
else if {_artifact} is "joust":
give {_p} 1 iron sword named "&3Abyssal Joust"
send "{@prefix} &fYou received &3Abyssal Joust&f." to {_p}
else if {_artifact} is "steed":
give {_p} 1 saddle named "&3Abyssal Steed"
send "{@prefix} &fYou received &3Abyssal Steed&f." to {_p}
else if {_artifact} is "shell":
give {_p} 1 turtle helmet named "&3Abyssal Shell"
send "{@prefix} &fYou received the &3Abyssal Shell&f." to {_p}
else if {_artifact} is "lure":
give {_p} 1 fishing rod named "&3Abyssal Lure"
send "{@prefix} &fYou received &3Abyssal Lure&f." to {_p}
else if {_artifact} is "idol":
give {_p} 1 conduit named "&3Abyssal Idol"
send "{@prefix} &fYou received the &3Abyssal Idol&f." to {_p}
else if {_artifact} is "pickaxe":
give {_p} 1 diamond pickaxe named "&3Abyssal Pickaxe"
send "{@prefix} &fYou received &3Abyssal Pickaxe&f." to {_p}
else if {_artifact} is "mace":
give {_p} 1 mace named "&3Abyssal Mace"
send "{@prefix} &fYou received &3Abyssal Mace&f." to {_p}
function abyssGiveAll(p: player):
abyssGive({_p}, "blade")
abyssGive({_p}, "waraxe")
abyssGive({_p}, "helmet")
abyssGive({_p}, "chestplate")
abyssGive({_p}, "leggings")
abyssGive({_p}, "boots")
abyssGive({_p}, "tides")
abyssGive({_p}, "pierce")
abyssGive({_p}, "trident")
abyssGive({_p}, "joust")
abyssGive({_p}, "steed")
abyssGive({_p}, "shell")
abyssGive({_p}, "lure")
abyssGive({_p}, "idol")
abyssGive({_p}, "pickaxe")
abyssGive({_p}, "mace")
command /abyss [<text>]:
permission: abyss.command
permission message: &cYou do not have permission to use this command.
trigger:
if arg-1 is not set:
abyssGiveAll(player)
send "{@prefix} &fAll Abyssal artifacts have been granted." to player
stop
if arg-1 is "all":
abyssGiveAll(player)
send "{@prefix} &fAll Abyssal artifacts have been granted." to player
stop
if arg-1 is "list":
send "&3&lAbyssal Artifacts" to player
send "&8- &fblade, waraxe, helmet, chestplate, leggings, boots" to player
send "&8- &ftides, pierce, trident, joust, steed, shell" to player
send "&8- &flure, idol, pickaxe, mace" to player
send "&8Use &3/abyss <artifact>&f or &3/abyss all&f." to player
stop
if arg-1 is "tide":
if {abyss.tide::%uuid of player%} is "high":
set {abyss.tide::%uuid of player%} to "low"
send "{@prefix} &fTide changed to &bLow Tide&f." to player
else:
set {abyss.tide::%uuid of player%} to "high"
send "{@prefix} &fTide changed to &3High Tide&f." to player
stop
if arg-1 is "blade" or arg-1 is "waraxe" or arg-1 is "helmet" or arg-1 is "chestplate" or arg-1 is "leggings" or arg-1 is "boots" or arg-1 is "tides" or arg-1 is "pierce" or arg-1 is "trident" or arg-1 is "joust" or arg-1 is "steed" or arg-1 is "shell" or arg-1 is "lure" or arg-1 is "idol" or arg-1 is "pickaxe" or arg-1 is "mace":
abyssGive(player, arg-1)
stop
send "{@prefix} &cUnknown artifact. Use &f/abyss list&c."
on join:
if {abyss.tide::%uuid of player%} is not set:
set {abyss.tide::%uuid of player%} to "low"
every 1 second:
loop all players:
if name of loop-player's helmet is "&3Abyssal Helmet":
if loop-player is in water:
apply night vision 1 to loop-player for 3 seconds
loop all players in radius 15 around loop-player:
if loop-player-2 is in water:
apply glowing 1 to loop-player-2 for 2 seconds
if name of loop-player's leggings is "&3Abyssal Leggings":
if loop-player is sprinting:
apply speed 1 to loop-player for 2 seconds
play effect "splash" at loop-player
if abyssFullSet(loop-player) is true:
apply dolphin's grace 1 to loop-player for 3 seconds
every 5 seconds:
loop all players:
if abyssFullSet(loop-player) is true:
if loop-player is in rain:
heal loop-player by 1 heart
play effect "heart" at loop-player
every 20 seconds:
loop all players:
if name of loop-player's chestplate is "&3Abyssal Chestplate":
if {abyss.waterShield::%uuid of loop-player%} is not set:
set {abyss.waterShield::%uuid of loop-player%} to true
send action bar "&3&lWater Shield &fready" to loop-player
every 1 second:
loop {abyss.whirlpool::*}:
set {_center} to {abyss.whirlpool::%loop-index%}
if {_center} is set:
loop all players in radius 8 around {_center}:
if loop-player-2 is not an operator:
set {_pull} to vector from loop-player-2 to {_center}
set velocity of loop-player-2 to {_pull}
apply slowness 1 to loop-player-2 for 2 seconds
play effect "splash" at {_center}
every 1 second:
loop {abyss.gravity::*}:
set {_center} to {abyss.gravity::%loop-index%}
if {_center} is set:
loop all players in radius 6 around {_center}:
if loop-player-2 is not an operator:
set {_pull} to vector from loop-player-2 to {_center}
set velocity of loop-player-2 to {_pull}
apply slowness 2 to loop-player-2 for 2 seconds
every 1 second:
loop {abyss.shrine::*}:
set {_center} to {abyss.shrine::%loop-index%}
if {_center} is set:
loop all players in radius 7 around {_center}:
if loop-player-2 is in world of {_center}:
if loop-player-2 has permission "abyss.shrine.ally":
heal loop-player-2 by 1 heart
else:
apply mining fatigue 1 to loop-player-2 for 3 seconds
apply slowness 1 to loop-player-2 for 3 seconds
damage loop-player-2 by 1 heart
play effect "splash" at {_center}
on damage:
if victim is a player:
if attacker is a player: