determinuje1

Make a skript for 1.21.4 that is a netherite axe with sharpness 6 named Młot Magmy that on hit with cooldown 120 seconds breaks 75 durabilty disables fire resitance and makes lava particles around the victim you can get it by /mlotmagmy and its only for op

Kodari AI
KodariApr 23 at 8:05 pm 2,860 (v2)

I’ll create a custom weapon Skript featuring the “Młot Magmy” netherite axe with special abilities.

MagmaHammer
A custom weapon system featuring the Młot Magmy (Magma Hammer), a powerful netherite axe with Sharpness 6. On hit, it triggers devastating effects with a 120-second cooldown: breaks 75 durability from victim's armor, disables fire resistance, and spawns menacing lava particles around the target. Includes an OP-only command to obtain the legendary weapon.

Setup Instructions:

  1. Place the file: Copy magma-hammer.sk to plugins/Skript/scripts/

  2. Reload: Run /sk reload magma-hammer or restart server

  3. Get the weapon: Use /mlotmagmy (OP only)

Features:

  • ⚔️ Netherite axe with Sharpness 6 named “Młot Magmy”

  • 🔥 120-second cooldown ability that triggers on hit

  • 💥 Deals 75 durability damage split across victim’s armor

  • 🚫 Removes fire resistance effect from victim

  • 🌋 Spawns lava/flame particles around victim for 3 seconds

  • 🔊 Epic sound effects on activation

The weapon identifies itself by name and lore, cooldowns are tracked per-player using UUIDs, and all effects activate automatically when you hit an entity with the axe!

determinuje1

the durability and the particles dont work

Kodari AI
KodariApr 23 at 8:18 pm 1,353 (v2)

I can help troubleshoot! Here are the likely issues:

Durability Problem:

  • Skript’s damage effect on items can be unreliable in newer versions

  • You might need SkBee addon for proper NBT durability manipulation

  • Alternative: Use set durability of {item} to (durability of {item} + 75)

  • Make sure you’re checking if armor slots is set before trying to damage them

Particle Problem:

  • In 1.21.4, the particle name might be wrong. Common working names:

    • lava ✓

    • flame ✓

    • drip_lava or dripping_lava (these work better)

  • The while loop for 3 seconds might not be working properly in Skript

  • You may need to use wait between particle spawns

  • Offset values might be too small to see

Quick Checks:

  1. Do you see ANY errors in console when the script loads?

  2. Does the cooldown message appear when you hit something? (This tells us if the hit detection works)

  3. Do you have any particle-related addons installed? (SkBee helps a lot)

  4. What Skript version are you running?

Which part should we focus on first - durability or particles?

Kodari can make mistakes. Review important code before using.
Files
magma-hammer.sk
Code
1 106
magma-hammer.sk
# Młot Magmy (Magma Hammer)
# Author: Generated
# Version: 1.0
# MC Version: 1.21.4
#
# Features:
# - Netherite axe with Sharpness 6
# - 120 second cooldown ability
# - Breaks 75 armor durability on hit
# - Disables fire resistance
# - Spawns lava particles around victim
# - OP-only command to obtain

options:
    prefix: &6[Młot Magmy]&r
    weapon-name: &c&lMłot Magmy
    cooldown: 120 # seconds
    durability-damage: 75
    particle-duration: 3 # seconds
    particle-amount: 50

# Command to get the Młot Magmy
command /mlotmagmy:
    permission: op
    permission message: &cOnly operators can use this command!
    trigger:
        give player 1 netherite axe of sharpness 6 named "{@weapon-name}" with lore "&7Legendarny topór magmy" and "&7Zdolność: Erupcja (120s cooldown)" and "&c▪ Niszczy pancerz" and "&c▪ Usuwa odporność na ogień" and "&c▪ Wyzwala lawe"
        send "{@prefix} &aOtrzymałeś Młot Magmy!" to player
        play sound "block.anvil.use" with volume 1 and pitch 1.2 at player

# Handle the special attack
on damage:
    attacker is a player
    victim is a player or mob
    attacker's tool is netherite axe
    name of attacker's tool is "{@weapon-name}"
    
    # Check if player is on cooldown
    if {mlotmagmy.cooldown::%attacker's uuid%} is set:
        set {_remaining} to difference between {mlotmagmy.cooldown::%attacker's uuid%} and now
        if {_remaining} is more than 0 seconds:
            set {_seconds} to {_remaining} in seconds
            send "{@prefix} &cKooldown: &e%{_seconds}%s" to attacker
            stop
    
    # Apply the special ability
    send "{@prefix} &6⚡ ERUPCJA MAGMY!" to attacker
    send "{@prefix} &cZostałeś trafiony Młotem Magmy!" to victim
    
    # Set cooldown
    set {mlotmagmy.cooldown::%attacker's uuid%} to {@cooldown} seconds from now
    
    # Play sound effects
    play sound "entity.generic.explode" with volume 1 and pitch 0.8 at victim
    play sound "block.lava.pop" with volume 1 and pitch 0.5 at victim
    
    # Remove fire resistance from victim
    if victim has fire resistance:
        remove fire resistance from victim
        send "&c✖ Twoja odporność na ogień została usunięta!" to victim
    
    # Apply fire effect
    ignite victim for 5 seconds
    
    # Damage armor durability
    if victim is a player:
        set {_helmet} to victim's helmet
        set {_chestplate} to victim's chestplate
        set {_leggings} to victim's leggings
        set {_boots} to victim's boots

        # Damage each armor piece (split 75 durability across all pieces)
        set {_damage} to round({@durability-damage} / 4)
        if {_helmet} is set:
            damage {_helmet} by {_damage}
        if {_chestplate} is set:
            damage {_chestplate} by {_damage}
        if {_leggings} is set:
            damage {_leggings} by {_damage}
        if {_boots} is set:
            damage {_boots} by {_damage}

        send "&c⚠ Twój pancerz został uszkodzony!" to victim
    
    # Spawn lava particles around victim
    loop {@particle-duration} times:
        wait 1 second
        loop {@particle-amount} times:
            set {_x} to random number between -1.5 and 1.5
            set {_y} to random number between 0 and 2
            set {_z} to random number between -1.5 and 1.5
            set {_loc} to location of victim
            add {_x} to x-coordinate of {_loc}
            add {_y} to y-coordinate of {_loc}
            add {_z} to z-coordinate of {_loc}
            play particle lava at {_loc} for all players
            play particle flame at {_loc} for all players

# Clear cooldown on player quit (optional - remove if you want cooldown to persist)
on quit:
    delete {mlotmagmy.cooldown::%player's uuid%}

# Script load message
on script load:
    send "{@prefix} &aScript loaded successfully!" to console
    send "&7Version: 1.0 | MC 1.21.4" to console