ecohero__
📎 1 file 3,050 chars
📄
pasted-code-1772032651657.txt
txt 278 lines
▶
It must be compatible with:

Skript 2.9.5 – 2.10.x

SkBee 3.6.x+

Minecraft 1.21.4

No modern return functions

No unsupported syntax

No complex Java expressions

The system must be optimized and low-lag.

🌌 Lives System

Every player starts with 5 lives.

Store lives in {lives::%player%}.

On player death:

Remove 1 life.

On player kill:

Add 1 life.

Max lives = 5

Min lives = 0

If lives = 0:

Switch to spectator mode (configurable).

Add command:

/lives → shows remaining lives.

🌟 Spirit System
General

7 total spirits:

Nightmare

Lock

Efreet

Sword

Storm

Trickster

Knowledge

Each player can have only 1 spirit.

Store spirit in {spirit::%player%}.

Store tier in {spirit.tier::%player%}:

1 = Sealed

2 = Unsealed

3 = Inversed

On first join:

Assign random spirit

Set tier to 1

Command:

/spirit → shows current spirit + tier.

🔺 Evolution Stone

Craftable item named "&dEvolution Stone"

On right-click:

If tier = 1 → set to 2

If tier = 2 → set to 3

If tier = 3 → message "Max tier reached"

Add particles + sound.

Add cooldown variable {evo.cd::%player%}.

🔁 Spirit Swapper

Craftable item "&5Spirit Swapper"

On right-click:

Open chest INVENTORY GUI

Show 7 spirit options

On click:

Set new spirit

Reset tier to 1

Close INVENTORY GUI

🌑 Nightmare Spirit

Sealed:

⏳ Time Skip

Save location every second in {nightmare.loc::%player%}

Teleport back 5 seconds ago on ability use.

Unsealed:

🕰 Shadow Assassin

Apply invisibility for 10 seconds.

Inversed:

💀 Lifespan Drain

When hitting player:

Deal extra damage

Remove 2 hunger

Remove 1 heart

🔐 Lock Spirit

Sealed:

🔒 Ability Seal

Set {sealed::%target%} true for 6 seconds.

Unsealed:

🧲 Gravity Lock

Freeze target for 3 seconds (cancel movement event).

Inversed:

🗝 Zone Lock

Prevent block break/place in 7 block radius.

🔥 Efreet Spirit

Sealed:

🌋 Inferno Dash

Push player forward with velocity.

Small explosion effect (no block damage).

Unsealed:

🔥 Burning Aura

Every 2 seconds burn nearby enemies.

Inversed:

💥 Fireburst

Shoot fireball with cooldown.

⚔️ Sword Spirit

Sealed:

⚡ Blade Outrage

Launch enemy upward.

Unsealed:

🛡 Parry Window

Negate damage for 2 seconds.

Inversed:

🗡 Rage Mode

Increase damage for 15 seconds.

🌪 Storm Spirit

Sealed:

🌪 Tornado Leap

Launch player upward.

Unsealed:

💨 Tornado Dash

Dash forward.

Inversed:

🌩 Lightning Strike

Strike nearby players for 5 seconds.

🧙 Trickster Spirit

Sealed:

🎭 Disguise

Change player display name temporarily.

Unsealed:

🌀 False Damage

Cancel damage for 5 seconds.

Inversed:

🪞 Mirror World

Teleport enemy 30 blocks upward safely for 5 seconds.

🧠 Knowledge Spirit

Sealed:

📜 Veil of Insight

Shuffle enemy hotbar on hit.

Unsealed:

✨ Illumination of Truth

Glow nearby enemies.

Inversed:

⛓ Restraint

Prevent sprint + jump for 5 seconds.

Performance Rules

Use minimal loops.

Use wait instead of while loops.

No unsupported Skript expressions.

Clean, organized structure.

Use functions only if compatible with Skript 2.9.5+.
Kodari AI
KodariFeb 25 at 3:28 pm 11,043 (v2)

Let me plan the files:

  • lives.sk - Lives system

  • spirits_core.sk - Spirit assignment, commands, GUI

  • evolution.sk - Evolution Stone + Spirit Swapper items & crafting

  • spirit_nightmare.sk - Nightmare abilities

  • spirit_lock.sk - Lock abilities

  • spirit_efreet.sk - Efreet abilities

  • spirit_sword.sk - Sword abilities

  • spirit_storm.sk - Storm abilities

  • spirit_trickster.sk - Trickster abilities

  • spirit_knowledge.sk - Knowledge abilities

SpiritLivesSystem
A Skript-based lives and spirit system for Minecraft 1.21.4. Players start with 5 lives, losing one on death and gaining one on kill. Seven unique spirits (Nightmare, Lock, Efreet, Sword, Storm, Trickster, Knowledge) are randomly assigned on first join, each with 3 tiers (Sealed, Unsealed, Inversed) unlocked via a craftable Evolution Stone. A Spirit Swapper item opens a GUI to switch spirits. Fully optimized for low-lag performance.

Here’s the full system, split across clean organized files:



📁 File Structure

File
Purpose
lives.sk
Lives system (start/death/kill/command)
spirits_core.sk
Spirit assignment, tier names,
/spirit
evolution.sk
Evolution Stone + Spirit Swapper crafting & GUI
spirit_nightmare.sk
Nightmare: Time Skip / Shadow Assassin / Lifespan Drain
spirit_lock.sk
Lock: Ability Seal / Gravity Lock / Zone Lock
spirit_efreet.sk
Efreet: Inferno Dash / Burning Aura / Fireburst
spirit_sword.sk
Sword: Blade Outrage / Parry Window / Rage Mode
spirit_storm.sk
Storm: Tornado Leap / Tornado Dash / Lightning Strike
spirit_trickster.sk
Trickster: Disguise / False Damage / Mirror World
spirit_knowledge.sk
Knowledge: Hotbar Shuffle / Glow / Restraint

🚀 Installation

  1. Place all .sk files into plugins/Skript/scripts/

  2. Run /skript reload all or restart your server

  3. Requires Skript 2.9.5+ and SkBee 3.6+

⚙️ Key Design Notes

  • All abilities are triggered via Shift (sneak toggle) — no extra addon keybind needed

  • Sealed abilities check {sealed::uuid} so Lock’s seal actually blocks sneak-based abilities on targets

  • Cooldowns use simple boolean variables + wait — zero performance overhead

  • Location history for Nightmare uses a 5-slot rolling buffer (updated every second, 5 variables max)

  • No while loops anywhere — all repeating logic uses every X seconds or wait

Kodari can make mistakes. Review important code before using.
Files
evolution.sk
lives.sk
spirit_efreet.sk
spirit_knowledge.sk
spirit_lock.sk
spirit_nightmare.sk
spirit_storm.sk
spirit_sword.sk
spirit_trickster.sk
spirits_core.sk
spirits_efreet.sk
spirits_knowledge.sk
spirits_lock.sk
spirits_nightmare.sk
spirits_storm.sk
spirits_sword.sk
spirits_trickster.sk
Code
17 1,280
spirits_core.sk
# ============================================================
# Spirits Core System - Functions, Items, Swapper, Evolution
# Compatible: Skript 2.9.5+, SkBee 3.6.x+, Minecraft 1.21.4
# ============================================================

options:
    prefix: &7[&5Spirit&7]&r

# ── First Join & Join ─────────────────────────────────────────

on first join:
    set {_spirits::1} to "Nightmare"
    set {_spirits::2} to "Lock"
    set {_spirits::3} to "Efreet"
    set {_spirits::4} to "Sword"
    set {_spirits::5} to "Storm"
    set {_spirits::6} to "Trickster"
    set {_spirits::7} to "Knowledge"
    set {_r} to random integer between 1 and 7
    set {spirit::%player's uuid%} to {_spirits::%{_r}%}
    set {spirit.tier::%player's uuid%} to 1
    set {lives::%player's uuid%} to 5
    wait 1 tick
    send "{@prefix} &7You have been bonded with the &5%{spirit::%player's uuid%}% Spirit&7! Tier: &7Sealed" to player

on join:
    if {spirit::%player's uuid%} is not set:
        set {_spirits::1} to "Nightmare"
        set {_spirits::2} to "Lock"
        set {_spirits::3} to "Efreet"
        set {_spirits::4} to "Sword"
        set {_spirits::5} to "Storm"
        set {_spirits::6} to "Trickster"
        set {_spirits::7} to "Knowledge"
        set {_r} to random integer between 1 and 7
        set {spirit::%player's uuid%} to {_spirits::%{_r}%}
        set {spirit.tier::%player's uuid%} to 1
    if {lives::%player's uuid%} is not set:
        set {lives::%player's uuid%} to 5

# ── Spirit Command ────────────────────────────────────────────

command /spirit:
    trigger:
        set {_s} to {spirit::%player's uuid%}
        set {_t} to {spirit.tier::%player's uuid%}
        if {_s} is not set:
            send "{@prefix} &cYou have no spirit assigned." to player
            stop
        if {_t} is 1:
            set {_tn} to "&7Sealed"
        else if {_t} is 2:
            set {_tn} to "&bUnsealed"
        else if {_t} is 3:
            set {_tn} to "&dInversed"
        else:
            set {_tn} to "&8Unknown"
        send "{@prefix} &7Spirit: &5%{_s}% &7| Tier: %{_tn}%" to player

# ── Lives Command ─────────────────────────────────────────────

command /lives:
    trigger:
        set {_l} to {lives::%player's uuid%}
        if {_l} is not set:
            set {_l} to 5
        send "{@prefix} &7Lives remaining: &c%{_l}%&7/&c5" to player

# ── Lives System ──────────────────────────────────────────────

on death of player:
    set {_victim} to victim
    set {_killer} to attacker
    if {lives::%{_victim}'s uuid%} is not set:
        set {lives::%{_victim}'s uuid%} to 5
    remove 1 from {lives::%{_victim}'s uuid%}
    if {lives::%{_victim}'s uuid%} < 0:
        set {lives::%{_victim}'s uuid%} to 0
    send "{@prefix} &cYou lost a life! Lives: &4%{lives::%{_victim}'s uuid%}%&c/5" to {_victim}
    if {lives::%{_victim}'s uuid%} is 0:
        send "{@prefix} &4You have no lives left! Entering spectator mode." to {_victim}
        wait 1 tick
        set gamemode of {_victim} to spectator
    if {_killer} is a player:
        if {lives::%{_killer}'s uuid%} is not set:
            set {lives::%{_killer}'s uuid%} to 5
        if {lives::%{_killer}'s uuid%} < 5:
            add 1 to {lives::%{_killer}'s uuid%}
            send "{@prefix} &aYou gained a life! Lives: &2%{lives::%{_killer}'s uuid%}%&a/5" to {_killer}

on respawn:
    if {lives::%player's uuid%} is 0:
        wait 1 tick
        set gamemode of player to spectator

# ── Give Items Commands ───────────────────────────────────────

command /giveevostone [<player>]:
    permission: spirits.admin
    trigger:
        if arg-1 is not set:
            give 1 nether star named "&dEvolution Stone" with lore "&7Use to evolve your spirit" to player
            send "{@prefix} &aYou received an Evolution Stone!" to player
        else:
            give 1 nether star named "&dEvolution Stone" with lore "&7Use to evolve your spirit" to arg-1
            send "{@prefix} &aGave Evolution Stone to %arg-1%!" to player
            send "{@prefix} &aYou received an Evolution Stone!" to arg-1

command /giveswapper [<player>]:
    permission: spirits.admin
    trigger:
        if arg-1 is not set:
            give 1 ender eye named "&5Spirit Swapper" with lore "&7Use to change your spirit" to player
            send "{@prefix} &aYou received a Spirit Swapper!" to player
        else:
            give 1 ender eye named "&5Spirit Swapper" with lore "&7Use to change your spirit" to arg-1
            send "{@prefix} &aGave Spirit Swapper to %arg-1%!" to player
            send "{@prefix} &aYou received a Spirit Swapper!" to arg-1

# ── Evolution Stone Usage ─────────────────────────────────────

on right click:
    if name of player's tool is "&dEvolution Stone":
        cancel event
        if {evo.cd::%player's uuid%} is set:
            send "{@prefix} &cEvolution on cooldown!" to player
            stop
        set {_tier} to {spirit.tier::%player's uuid%}
        if {_tier} is not set:
            send "{@prefix} &cYou have no spirit!" to player
            stop
        if {_tier} is 3:
            send "{@prefix} &cMax tier reached!" to player
            stop
        add 1 to {spirit.tier::%player's uuid%}
        set {_nt} to {spirit.tier::%player's uuid%}
        if {_nt} is 2:
            set {_newTier} to "&bUnsealed"
        else:
            set {_newTier} to "&dInversed"
        remove 1 of player's tool from player
        send "{@prefix} &aSpirit evolved to %{_newTier}%&a!" to player
        play sound "entity.player.levelup" with volume 1 and pitch 1.2 at player
        play sound "block.beacon.activate" with volume 0.5 and pitch 1.5 at player
        set {evo.cd::%player's uuid%} to true
        wait 10 seconds
        delete {evo.cd::%player's uuid%}

# ── Spirit Swapper Usage ──────────────────────────────────────

on right click:
    if name of player's tool is "&5Spirit Swapper":
        cancel event
        remove 1 of player's tool from player
        set {_gui} to chest inventory with 1 row named "&5Choose Your Spirit"
        set slot 0 of {_gui} to wither skeleton skull named "&0Nightmare" with lore "&7Dark time manipulation"
        set slot 1 of {_gui} to iron door named "&7Lock" with lore "&7Sealing and freezing"
        set slot 2 of {_gui} to blaze powder named "&6Efreet" with lore "&7Fire and explosions"
        set slot 3 of {_gui} to iron sword named "&fSword" with lore "&7Blade mastery"
        set slot 4 of {_gui} to feather named "&bStorm" with lore "&7Wind and lightning"
        set slot 5 of {_gui} to jack o'lantern named "&aTrickster" with lore "&7Deception and illusion"
        set slot 6 of {_gui} to book named "&eKnowledge" with lore "&7Wisdom and restraint"
        open {_gui} to player

on inventory click:
    if name of event-inventory is "&5Choose Your Spirit":
        cancel event
        set {_slot} to index of event-slot
        if {_slot} is 0:
            set {_spirit} to "Nightmare"
        else if {_slot} is 1:
            set {_spirit} to "Lock"
        else if {_slot} is 2:
            set {_spirit} to "Efreet"
        else if {_slot} is 3:
            set {_spirit} to "Sword"
        else if {_slot} is 4:
            set {_spirit} to "Storm"
        else if {_slot} is 5:
            set {_spirit} to "Trickster"
        else if {_slot} is 6:
            set {_spirit} to "Knowledge"
        else:
            stop
        set {spirit::%player's uuid%} to {_spirit}
        set {spirit.tier::%player's uuid%} to 1
        close player's inventory
        send "{@prefix} &7You are now bonded with the &5%{_spirit}% Spirit&7! Tier: &7Sealed" to player
        play sound "entity.evoker.prepare_summon" with volume 1 and pitch 1 at player

# ── Crafting Recipes (SkBee 3.6.x+ compatible) ───────────────

on load:
    set {_stone} to nether star named "&dEvolution Stone" with lore "&7Use to evolve your spirit"
    set {_swapper} to ender eye named "&5Spirit Swapper" with lore "&7Use to change your spirit"
    register new shaped recipe for {_stone} with id "spirits:evo_stone":
        diamond, nether star, diamond
        nether star, emerald, nether star
        diamond, nether star, diamond
    register new shaped recipe for {_swapper} with id "spirits:spirit_swapper":