Files
apex-kits.sk
Code
1 200
apex-kits.sk
# Apex SMP-inspired kits
# Place in plugins/Skript/scripts/ and run /sk reload apex-kits
options:
prefix: &6[Apex]&r
gladiator-radius: 8
function apexKitInfo(p: player, kit: text):
if {_kit} is "Assassin":
send "&8&lAssassin &7| &aBuff: &bSpeed II and invisibility&7 | &cDebuff: Protection is limited to III." to {_p}
else if {_kit} is "Midas":
send "&6&lMidas &7| &aBuff: Apples and carrots become golden while held in your inventory&7 | &cDebuff: Hunger drains twice as fast." to {_p}
else if {_kit} is "Vampire":
send "&4&lVampire &7| &aBuff: Deal bonus damage below 4 hearts&7 | &cDebuff: Weakness in daylight." to {_p}
else if {_kit} is "Pyromancer":
send "&c&lPyromancer &7| &aBuff: Fire resistance and bonus attack damage&7 | &cDebuff: Slowness while in water." to {_p}
else if {_kit} is "Frost":
send "&b&lFrost &7| &aBuff: Slow enemies on hit, gain speed on ice, and heal on powdered snow&7 | &cDebuff: Take half damage from fire." to {_p}
else if {_kit} is "Gladiator":
send "&6&lGladiator &7| &aBuff: Nearby players gain Resistance I&7 | &cDebuff: You do not receive the Resistance effect." to {_p}
else if {_kit} is "Hunter":
send "&2&lHunter &7| &aBuff: Track the last player you killed with &e/kit track&7 | &cDebuff: None." to {_p}
else if {_kit} is "Tank":
send "&7&lTank &7| &aBuff: 15-heart maximum health&7 | &cDebuff: Permanent Slowness I." to {_p}
else if {_kit} is "Guardian":
send "&e&lGuardian &7| &aBuff: Resistance I&7 | &cDebuff: Weakness I. (Custom kit.)" to {_p}
else:
send "{@prefix} &cUnknown kit. Use &e/kit&c to see the kits." to {_p}
function apexKitList(p: player):
set {_current} to {apex.kit::%uuid of {_p}%}
send "&8&m----------------------------------------" to {_p}
send "&6&lApex Kits &7| Your kit: &e%{_current}%" to {_p}
apexKitInfo({_p}, "Assassin")
apexKitInfo({_p}, "Midas")
apexKitInfo({_p}, "Vampire")
apexKitInfo({_p}, "Pyromancer")
apexKitInfo({_p}, "Frost")
apexKitInfo({_p}, "Gladiator")
apexKitInfo({_p}, "Hunter")
apexKitInfo({_p}, "Tank")
apexKitInfo({_p}, "Guardian")
send "&7Use &e/kit <name>&7 for one kit's details, or &e/kit track&7 as Hunter." to {_p}
send "&8&m----------------------------------------" to {_p}
on join:
add "Assassin" to {_kits::*}
add "Midas" to {_kits::*}
add "Vampire" to {_kits::*}
add "Pyromancer" to {_kits::*}
add "Frost" to {_kits::*}
add "Gladiator" to {_kits::*}
add "Hunter" to {_kits::*}
add "Tank" to {_kits::*}
add "Guardian" to {_kits::*}
set {apex.kit::%uuid of player%} to random element out of {_kits::*}
if {apex.kit::%uuid of player%} is "Tank":
set max health of player to 30
else:
set max health of player to 20
send "{@prefix} &eYour random kit is &6%{apex.kit::%uuid of player%}%&e. Use &6/kit&e to view all kits." to player
command /kit [<text>]:
aliases: /apexkit
trigger:
if arg-1 is not set:
apexKitList(player)
stop
if arg-1 is "track":
if {apex.kit::%uuid of player%} is not "Hunter":
send "{@prefix} &cOnly Hunters can use this command." to player
stop
if {apex.track.location::%uuid of player%} is not set:
send "{@prefix} &cYou have not tracked a player yet. Kill a player first." to player
stop
set compass target of player to {apex.track.location::%uuid of player%}
send "{@prefix} &eCompass pointed to the last location of &b%{apex.track.name::%uuid of player%}%&e." to player
stop
apexKitInfo(player, arg-1)
command /apex [<text>]:
trigger:
if arg-1 is "kit":
apexKitList(player)
else if arg-1 is "track":
if {apex.kit::%uuid of player%} is not "Hunter":
send "{@prefix} &cOnly Hunters can use tracking." to player
else if {apex.track.location::%uuid of player%} is set:
set compass target of player to {apex.track.location::%uuid of player%}
send "{@prefix} &eCompass pointed to the last location of &b%{apex.track.name::%uuid of player%}%&e." to player
else:
send "{@prefix} &cYou have not tracked a player yet. Kill a player first." to player
else:
send "{@prefix} &eUsage: &6/apex kit &7or &6/apex track" to player
every 2 seconds:
loop all players:
set {_kit} to {apex.kit::%uuid of loop-player%}
if {_kit} is "Assassin":
apply speed 2 to loop-player for 4 seconds
apply invisibility 1 to loop-player for 4 seconds
else if {_kit} is "Midas":
apply glowing 1 to loop-player for 4 seconds
else if {_kit} is "Vampire":
if time in loop-player's world is between 0:00 and 12:00:
if block above loop-player is air:
apply weakness 1 to loop-player for 4 seconds
else if {_kit} is "Pyromancer":
apply fire resistance 1 to loop-player for 4 seconds
if loop-player is in water:
apply slowness 1 to loop-player for 4 seconds
else if {_kit} is "Frost":
if block below loop-player is ice:
apply speed 1 to loop-player for 4 seconds
else if block below loop-player is packed ice:
apply speed 1 to loop-player for 4 seconds
else if block below loop-player is blue ice:
apply speed 1 to loop-player for 4 seconds
if block below loop-player is powder snow:
heal loop-player by 1
else if {_kit} is "Gladiator":
loop all players in radius {@gladiator-radius} around loop-player:
if loop-player-2 is not loop-player-1:
apply resistance 1 to loop-player-2 for 4 seconds
else if {_kit} is "Tank":
apply slowness 1 to loop-player for 4 seconds
else if {_kit} is "Guardian":
apply resistance 1 to loop-player for 4 seconds
apply weakness 1 to loop-player for 4 seconds
else if {_kit} is "Hunter":
apply night vision 1 to loop-player for 4 seconds
every 10 seconds:
loop all players:
if {apex.kit::%uuid of loop-player%} is "Midas":
if food level of loop-player > 0:
set food level of loop-player to food level of loop-player - 1
on pickup:
if {apex.kit::%uuid of player%} is "Midas":
if event-item is apple:
set {_amount} to amount of event-item
cancel event
remove event-entity
give {_amount} of golden apple to player
else if event-item is carrot:
set {_amount} to amount of event-item
cancel event
remove event-entity
give {_amount} of golden carrot to player
on drop:
if {apex.kit::%uuid of player%} is "Midas":
if event-item is golden apple:
set {_amount} to amount of event-item
cancel event
remove {_amount} of golden apples from player
drop {_amount} of apple at location of player
else if event-item is golden carrot:
set {_amount} to amount of event-item
cancel event
remove {_amount} of golden carrots from player
drop {_amount} of carrot at location of player
on damage:
if attacker is a player:
if {apex.kit::%uuid of attacker%} is "Vampire":
if health of attacker < 8:
increase damage by 2
else if {apex.kit::%uuid of attacker%} is "Pyromancer":
increase damage by 2
if {apex.kit::%uuid of attacker%} is "Frost":
apply slowness 1 to victim for 3 seconds
if victim is a player:
if {apex.kit::%uuid of victim%} is "Frost":
if damage cause is fire:
set damage to damage * 0.5
if damage cause is fire tick:
set damage to damage * 0.5
if damage cause is lava:
set damage to damage * 0.5
if damage cause is hot floor:
set damage to damage * 0.5
on death of player:
if attacker is a player:
if {apex.kit::%uuid of attacker%} is "Hunter":
set {apex.track.location::%uuid of attacker%} to location of victim
set {apex.track.name::%uuid of attacker%} to name of victim
send "{@prefix} &eHunter's trace acquired: &b%name of victim%&e. Use &6/kit track&e to point your compass." to attacker