Files
sunsmp.sk
Code
1 843
sunsmp.sk
# ============================================================
# SunSMP - Celestial Bodies System
# Version: 1.1
# ============================================================
# Place in: plugins/Skript/scripts/
# Reload: /sk reload sunsmp
# ============================================================
# Commands:
# /start - Choose your celestial body (first time only)
# /skill - Activate your ultimate ability (level 6+)
# /cb - View your current celestial body info
# ============================================================
options:
prefix: "&8[&6SunSMP&8]&r"
leveler_name: "&6&lCelestial Leveler"
leveler_lore: "&7Harness the power of the cosmos|&7to evolve your celestial form|&r|&eUsable up to Level 3"
# ============================================================
# GLOBAL VARIABLES INITIALIZATION
# ============================================================
on load:
delete {_recipe_exists}
set {_recipe_exists} to true
# Register Celestial Leveler recipe
add shaped recipe for "celestial_leveler":
result: nether star named "{@leveler_name}" with lore "{@leveler_lore}"
shape:
- "nin"
- "iwi"
- "nin"
ingredients:
n = netherite ingot
i = netherite upgrade smithing template
w = wither star
broadcast "&6☀ &eSunSMP &6Celestial System &aonline&6!"
console send "&a[SunSMP] Celestial Bodies System loaded successfully."
# ============================================================
# START COMMAND - CELESTIAL BODY SELECTION
# ============================================================
command /start:
description: "Choose your celestial body"
trigger:
if {sunsmp::%uuid of player%::body} is set:
send "{@prefix} &cYou have already chosen a celestial body!"
send "{@prefix} &7Use &e/cb &7to view your current body."
stop
# Open selection GUI - 6 rows
open chest with 6 rows named "&8✦ Select Your Celestial Body ✦" to player
# Background glass panes
set {_i} to 0
while {_i} < 54:
format slot {_i} of player with gray stained glass pane named "&r" to player
add 1 to {_i}
# SUN - Slot 19
format slot 19 of player with sunflower named "&e☀ &6Sun" with lore \
"&7Become a beacon of life and flame,", \
"&7burning bright against the darkness.", \
"&r", \
"&6&lPASSIVE I &7(Lvl 1): &cInfinite Fire Resistance", \
"&6&lPASSIVE II &7(Lvl 3): &cInfinite Strength I", \
"&6&lULTIMATE &7(Lvl 6): &eSun's Wrath", \
"&r", \
"&e&lCLICK TO SELECT" to player with close
# MOON - Slot 21
format slot 21 of player with quartz block named "&7☽ &fMoon" with lore \
"&7Walk in perpetual twilight,", \
"&7swift and unseen.", \
"&r", \
"&6&lPASSIVE I &7(Lvl 1): &bInfinite Night Vision", \
"&6&lPASSIVE II &7(Lvl 3): &fInfinite Speed I", \
"&6&lULTIMATE &7(Lvl 6): &7Moon's Glory", \
"&r", \
"&e&lCLICK TO SELECT" to player with close
# STAR - Slot 23
format slot 23 of player with nether star named "&b★ &3Star" with lore \
"&7Command the heavens themselves,", \
"&7a celestial force of justice.", \
"&r", \
"&6&lPASSIVE I &7(Lvl 1): &aInfinite Hero of the Village", \
"&6&lPASSIVE II &7(Lvl 3): &cFalling Fire Strike", \
"&6&lULTIMATE &7(Lvl 6): &bFalling Star", \
"&r", \
"&e&lCLICK TO SELECT" to player with close
# NOVA - Slot 25
format slot 25 of player with blue orchid named "&d✦ &5Nova" with lore \
"&7Explosive and untamed,", \
"&7a supernova waiting to happen.", \
"&r", \
"&6&lPASSIVE I &7(Lvl 1): &bInfinite Dolphin's Grace", \
"&6&lPASSIVE II &7(Lvl 3): &625% Blast Resistance", \
"&6&lULTIMATE &7(Lvl 6): &4Dying Star", \
"&r", \
"&e&lCLICK TO SELECT" to player with close
# Info item - Slot 40
format slot 40 of player with book named "&e&lCelestial Information" with lore \
"&7Each celestial body has &e6 levels&7.", \
"&7Progress through levels to unlock", \
"&7powerful passives and abilities.", \
"&r", \
"&6Levels 1-3: &7Use a Celestial Leveler", \
"&6Levels 3-6: &7Steal levels from other players", \
"&7in PvP combat.", \
"&r", \
"&7You may only choose &cONCE&7!" to player with close
# ============================================================
# CELESTIAL BODY SELECTION GUI HANDLER
# ============================================================
on inventory click:
if title of inventory is "&8✦ Select Your Celestial Body ✦":
cancel event
# Slot validation - only slots 19, 21, 23, 25 work
if clicked slot is 19:
if {sunsmp::%uuid of player%::body} is set:
close player's inventory
send "{@prefix} &cYou already have a celestial body!"
stop
set {sunsmp::%uuid of player%::body} to "sun"
set {sunsmp::%uuid of player%::level} to 1
set {sunsmp::%uuid of player%::skill_cooldown} to 0
close player's inventory
play sound "entity.player.levelup" to player with volume 1 and pitch 1
send "{@prefix} &eYou have chosen &6☀ The Sun&e!"
send "{@prefix} &7Passive granted: &cInfinite Fire Resistance"
# Apply initial effects immediately
apply fire resistance 1 to player for 999999 seconds (ambient)
# Title animation
send title "&6☀ Sun" to player for 10 seconds
send subtitle "&7You are a beacon of life and flame" to player for 10 seconds
else if clicked slot is 21:
if {sunsmp::%uuid of player%::body} is set:
close player's inventory
send "{@prefix} &cYou already have a celestial body!"
stop
set {sunsmp::%uuid of player%::body} to "moon"
set {sunsmp::%uuid of player%::level} to 1
set {sunsmp::%uuid of player%::skill_cooldown} to 0
close player's inventory
play sound "entity.player.levelup" to player with volume 1 and pitch 1
send "{@prefix} &fYou have chosen &7☽ The Moon&f!"
send "{@prefix} &7Passive granted: &bInfinite Night Vision"
apply night vision 1 to player for 999999 seconds (ambient)
send title "&7☽ Moon" to player for 10 seconds
send subtitle "&7You walk in perpetual twilight" to player for 10 seconds
else if clicked slot is 23:
if {sunsmp::%uuid of player%::body} is set:
close player's inventory
send "{@prefix} &cYou already have a celestial body!"
stop
set {sunsmp::%uuid of player%::body} to "star"
set {sunsmp::%uuid of player%::level} to 1
set {sunsmp::%uuid of player%::skill_cooldown} to 0
close player's inventory
play sound "entity.player.levelup" to player with volume 1 and pitch 1
send "{@prefix} &bYou have chosen &b★ The Star&b!"
send "{@prefix} &7Passive granted: &aInfinite Hero of the Village"
apply hero of the village 1 to player for 999999 seconds (ambient)
send title "&b★ Star" to player for 10 seconds
send subtitle "&7You command the heavens themselves" to player for 10 seconds
else if clicked slot is 25:
if {sunsmp::%uuid of player%::body} is set:
close player's inventory
send "{@prefix} &cYou already have a celestial body!"
stop
set {sunsmp::%uuid of player%::body} to "nova"
set {sunsmp::%uuid of player%::level} to 1
set {sunsmp::%uuid of player%::skill_cooldown} to 0
close player's inventory
play sound "entity.player.levelup" to player with volume 1 and pitch 1
send "{@prefix} &dYou have chosen &5✦ The Nova&d!"
send "{@prefix} &7Passive granted: &bInfinite Dolphin's Grace"