spearess

make me a plugin

๐Ÿ“Ž 1 file 2,964 chars
๐Ÿ“„
pasted-code-1782502547858.txt
txt 93 lines
โ–ถ
# -------------------------
# GIVE WAVELOCK
# -------------------------
command /wavelock:
    permission: op
    trigger:
        execute console command "give %player% minecraft:mace"
        wait 1 tick
        set name of player's tool to "&b&lWavelock"
        send "&3You received &b&lWavelock&3!"

# -------------------------
# DASH ABILITY
# -------------------------
on right click:
    if name of player's tool is not "&b&lWavelock":
        stop

    if {wavelock.cooldown.%player%} is true:
        send action bar "&cWave Dash: ON COOLDOWN" to player
        stop

    set {wavelock.cooldown.%player%} to true

    push player forward at speed 2.4
    push player upward at speed 0.3

    send action bar "&b๐ŸŒŠ Wave Dash!" to player

    # ๐ŸŒŠ FOLLOWING PARTICLE EFFECT (SHORT TRAIL)
    set {_i} to 0
    loop 10 times:
        wait 1 tick

        execute console command "particle minecraft:soul_fire_flame ~ ~1 ~ 0.3 0.3 0.3 0.01 8 %player%"
        add 1 to {_i}

    wait 8 seconds
    set {wavelock.cooldown.%player%} to false


# -------------------------
# COMBO SYSTEM
# -------------------------
on damage:
    attacker is player
    if name of attacker's tool is not "&b&lWavelock":
        stop

    if {wavelock.combo.%attacker%} is not set:
        set {wavelock.combo.%attacker%} to 0

    add 1 to {wavelock.combo.%attacker%}
    set {wavelock.last.%attacker%} to now

    send action bar "&bCombo: &f%{wavelock.combo.%attacker%}%&7/4" to attacker

    # hit particles
    execute console command "particle minecraft:soul ~ ~1 ~ 0.4 0.4 0.4 0.01 15 %victim%"

    # 4th hit effect
    if {wavelock.combo.%attacker%} >= 4:
        add 10 to damage
        send action bar "&3๐ŸŒŠ CRUSHING WAVE!" to attacker

        execute console command "particle minecraft:soul_fire_flame ~ ~1 ~ 1 1 1 0.02 40 %victim%"
        execute console command "particle minecraft:soul ~ ~1 ~ 1 1 1 0.02 60 %victim%"

        set {wavelock.combo.%attacker%} to 0


# -------------------------
# AUTO RESET + HUD
# -------------------------
every 1 second:
    loop all players:

        if name of loop-player's tool is "&b&lWavelock":

            # ensure combo exists
            if {wavelock.combo.%loop-player%} is not set:
                set {wavelock.combo.%loop-player%} to 0

            # reset combo after inactivity
            if {wavelock.last.%loop-player%} is set:
                if difference between now and {wavelock.last.%loop-player%} >= 6 seconds:
                    set {wavelock.combo.%loop-player%} to 0

            # HUD
            if {wavelock.cooldown.%loop-player%} is true:
                send action bar "&3๐ŸŒŠ Combo: &f%{wavelock.combo.%loop-player%}%&7/4 &8| &cDash: ON COOLDOWN" to loop-player
            else:
                send action bar "&3๐ŸŒŠ Combo: &f%{wavelock.combo.%loop-player%}%&7/4 &8| &aDash Ready" to loop-player
Kodari can make mistakes. Review important code before using.
Files

No files in this session

Code