K0yy0vok

Irj nekem egy ability scriptet Legyen Erő 2 sajat 30 seces meg erő 3 globalis speed 1 sajat speed 2 globalis ezek elgyenek a globalt kiirja global 3 percig tart es kesz ero 2 blazepowder ero 3 blaze rod speed 1 sugar speed2 bone es kesz hex szineket tamogassa hex szinel legyen

Kodari AI
KodariOct 18 at 6:53 am 1
AbilityEssenceSystem
Creates a Minecraft plugin where players craft ability essences using specific items. Erő 2 essence (blaze powder) grants Strength 2 for 30 seconds. Erő 3 essence (blaze rod) grants Strength 3 globally for 3 minutes. Speed 1 essence (sugar) grants Speed 1 for 30 seconds. Speed 2 essence (bone) grants Speed 2 globally for 3 minutes. Global effects apply to all players server-wide, while personal effects apply only to the user. Essences are consumed on use via right-click, with cooldown management and effect duration tracking.

[Generation stopped]

K0yy0vok

Skriptbe ird

Kodari AI
KodariOct 18 at 6:54 am 1

Elkészült az abilities.sk.

  • Jobb klikk: blaze powder = Erő II, 30 mp; sugar = Gyorsaság I, 30 mp.

  • Globális: blaze rod = Erő III, bone = Gyorsaság II, mindkettő 3 percig. A közben belépő játékosok is megkapják az aktív globális hatást.

  • Tárgy adása: /abilitygive <játékos> <strength2|strength3|speed1|speed2> — ability.admin jogosultság kell hozzá.

  • A hex színekhez Skript 2.6+ szükséges.

Kodari can make mistakes. Review important code before using.
Files
abilities.sk
Code
1 72
abilities.sk
command /abilitygive <player> <text>:
    permission: ability.admin
    permission message: "&#ff5555Ehhez nincs jogosultságod."
    trigger:
        if arg-2 is "strength2":
            set {_item} to blaze powder
            set name of {_item} to "&#ff5555Erő II képesség"
        else if arg-2 is "strength3":
            set {_item} to blaze rod
            set name of {_item} to "&#ff3333Erő III globális képesség"
        else if arg-2 is "speed1":
            set {_item} to sugar
            set name of {_item} to "&#55ffffGyorsaság I képesség"
        else if arg-2 is "speed2":
            set {_item} to bone
            set name of {_item} to "&#33bbffGyorsaság II globális képesség"
        else:
            send "&#ff5555Használat: /abilitygive <játékos> <strength2|strength3|speed1|speed2>" to sender
            stop
        give {_item} to arg-1
        send "&#55ff55Megkaptad a képesség tárgyat: &f%arg-2%." to sender

on right click:
    if event-hand is off hand:
        stop
    if player's tool is air:
        stop
    set {_itemName} to uncolored name of player's tool
    if {_itemName} is "Erő II képesség":
        cancel event
        remove 1 of player's tool from player's inventory
        apply potion of strength 2 to player for 30 seconds
        send "&#ff5555Erő II aktiválva &7(30 másodperc)." to player
    else if {_itemName} is "Erő III globális képesség":
        cancel event
        remove 1 of player's tool from player's inventory
        set {ability.global.strength3} to 180
        loop all players:
            apply potion of strength 3 to loop-player for 3 minutes
        broadcast "&#ff3333%player% aktiválta a globális Erő III képességet! &7(3 perc)"
    else if {_itemName} is "Gyorsaság I képesség":
        cancel event
        remove 1 of player's tool from player's inventory
        apply potion of speed 1 to player for 30 seconds
        send "&#55ffffGyorsaság I aktiválva &7(30 másodperc)." to player
    else if {_itemName} is "Gyorsaság II globális képesség":
        cancel event
        remove 1 of player's tool from player's inventory
        set {ability.global.speed2} to 180
        loop all players:
            apply potion of speed 2 to loop-player for 3 minutes
        broadcast "&#33bbff%player% aktiválta a globális Gyorsaság II képességet! &7(3 perc)"

every 1 second:
    if {ability.global.strength3} is set:
        if {ability.global.strength3} > 1:
            subtract 1 from {ability.global.strength3}
        else:
            delete {ability.global.strength3}
    if {ability.global.speed2} is set:
        if {ability.global.speed2} > 1:
            subtract 1 from {ability.global.speed2}
        else:
            delete {ability.global.speed2}

on join:
    if {ability.global.strength3} is set:
        if {ability.global.strength3} > 0:
            apply potion of strength 3 to player for {ability.global.strength3} seconds
    if {ability.global.speed2} is set:
        if {ability.global.speed2} > 0:
            apply potion of speed 2 to player for {ability.global.speed2} seconds