Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Błąd w skrypcie na Kowala


dragon5585

Rekomendowane odpowiedzi

Opublikowano

Witam mam taki problem z jednym skryptem i nie potrafię go naprawić. Mógłby mi ktoś pomóc? 
 

Logi z konsoli:

[13:06:21 ERROR]: #!#!
[13:06:21 ERROR]: #!#! [Skript] Severe Error:
[13:06:21 ERROR]: #!#! Could not load RPG_kowal_v1.0.sk
[13:06:21 ERROR]: #!#!
[13:06:21 ERROR]: #!#! If you're developing an add-on for Skript this likely means that you have done something wrong.
[13:06:21 ERROR]: #!#! If you're a server admin however please go to http://dev.bukkit.org/server-mods/skript/tickets/
[13:06:21 ERROR]: #!#! and check whether this error has already been reported.
[13:06:21 ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it,
[13:06:21 ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error.
[13:06:21 ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well.
[13:06:21 ERROR]: #!#! By following this guide fixing the error should be easy and done fast.
[13:06:21 ERROR]: #!#!
[13:06:21 ERROR]: #!#! Stack trace:
[13:06:21 ERROR]: #!#! ch.njol.skript.SkriptAPIException: The class 'enchantment' does not provide a default expression. Either allow null (with %-enchantment%) or make it mandatory [pattern: [the] (%enchantment% level|level of [[the] enchant[ment]] %enchantment%) o(f|n) %itemtypes%]
[13:06:21 ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:220)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:164)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parseSingleExpr(SkriptParser.java:509)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parseObjectExpression(SkriptParser.java:380)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parseExpression(SkriptParser.java:286)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:990)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:981)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:209)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:164)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.lang.Statement.parse(Statement.java:42)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:615)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.lang.TriggerSection.<init>(TriggerSection.java:55)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.lang.Conditional.<init>(Conditional.java:44)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:701)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.lang.TriggerSection.<init>(TriggerSection.java:55)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.lang.Conditional.<init>(Conditional.java:44)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:701)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.command.Commands.loadCommand(Commands.java:449)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadScript(ScriptLoader.java:462)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:262)
[13:06:21 ERROR]: #!#!     at ch.njol.skript.SkriptCommand.onCommand(SkriptCommand.java:155)
[13:06:21 ERROR]: #!#!     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
[13:06:21 ERROR]: #!#!     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181)
[13:06:21 ERROR]: #!#!     at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:767)
[13:06:21 ERROR]: #!#!     at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerConnection.java:1013)
[13:06:21 ERROR]: #!#!     at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:850)
[13:06:21 ERROR]: #!#!     at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28)
[13:06:21 ERROR]: #!#!     at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayInChat.java:65)
[13:06:21 ERROR]: #!#!     at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:184)
[13:06:21 ERROR]: #!#!     at net.minecraft.server.v1_7_R4.ServerConnection.c(ServerConnection.java:81)
[13:06:21 ERROR]: #!#!     at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:731)
[13:06:21 ERROR]: #!#!     at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289)
[13:06:21 ERROR]: #!#!     at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584)
[13:06:21 ERROR]: #!#!     at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490)
[13:06:21 ERROR]: #!#!     at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628)
[13:06:21 ERROR]: #!#!
[13:06:21 ERROR]: #!#! Version Information:
[13:06:21 ERROR]: #!#!   Skript: 2.1.2
[13:06:21 ERROR]: #!#!   Bukkit: 1.7.10-R0.1-SNAPSHOT
[13:06:21 ERROR]: #!#!   Minecraft: 1.7.10
[13:06:21 ERROR]: #!#!   Java: 1.8.0_101
[13:06:21 ERROR]: #!#!
[13:06:21 ERROR]: #!#! Running CraftBukkit: false
[13:06:21 ERROR]: #!#!
[13:06:21 ERROR]: #!#! Current node: set {_sharp} to level of sharpness of player-arg's tool (RPG_kowal_v1.0.sk, line 316)
[13:06:21 ERROR]: #!#! Current item: null
[13:06:21 ERROR]: #!#!
[13:06:21 ERROR]: #!#! Thread: Server thread
[13:06:21 ERROR]: #!#!
[13:06:21 ERROR]: #!#! End of Error.
[13:06:21 ERROR]: #!#!


A po wpisaniu /sk reload RPG_kowal_v1.0.sk pokazuje takie 2 błędy:

[22:35:52 ERROR]: ''10 without particles'' is not a number (RPG_kowal_v1.0.sk, line 120: apply slowness '10 without particles' to last spawned entity for 999 days')
[22:35:52 ERROR]: Can't compare a slot with ('sword', 'axe', 'pickaxe', 'spade', 'bow', 'shield', 'helmet', 'chestplate', 'elytra', 'leggings', 'boots', 'flint', 'steel' and 'fishing rod') (RPG_kowal_v1.0.sk, line 220: if player-arg's tool is sword or axe or pickaxe or spade or bow or shield or helmet or chestplate or elytra or leggings or boots or flint and steel or fishing rod:')

Wersje Silnika, Skriptu, SkQuery oraz WildSkript:
 

 CraftBukkit version git-Spigot-1592 (MC: 1.7.10) (Implementing API version 1.7.10-R0.1-SNAPSHOT)

Skript version 2.1.2
SkQuery version 3.5.0
WildSkript version 1.8

Ps: Zmieniałem wersje Skriptu i błąd nadal występował to samo z silnikiem. 

 

Cytuj

 

Edytuj

Opublikowano

# ############# #
#   RPG kowal   #
# ############# #


# ################################### #
#       author: matix119              #
#       version: 1.0                  #
# ZAKAZ EDYTOWANIA TYCH INFORMACJI!!! #
# ################################### #


# ################################################# #
# Oficjalna strona skryptu:                         #
#    matix119.000webhostapp.com/skrypty/rpg-system/ #
# Ważne zasady użytkowania skryptu:                 #
#    matix119.000webhostapp.com/regulamin/          #
# ################################################# #


# ############################################################ #
# INFORMACJA: W celu wykorzystania pełnych możliwości skryptu, #
# zalecam używać mojego skryptu RPG basic.                     #
# ############################################################ #

options:
# ####################################################################################### #
#                                       USTAWIENIA                                        #
#                                                                                         #
#   Podaj nazwę NPC, który będzie pełnić rolę kowala.
        npc-name: &4Kowal
#                                                                                         #
#   Ustaw typ moba dla NPC. Dozwolone wartości: zombie, skeleton.                         #
        npc-type: zombie
#                                                                                         #
#   Ustaw promień, w którym NPC będzie sprawdzany na swojej lokalizacji.                  #
        npc-radius: 2
#                                                                                         #
#   Ustaw nazwę otwieranego okna GUI po kliknięciu na kowala.                             #
        GUI-name: &4&lKowal
#                                                                                         #
#   Ustaw maksymalny poziom ulepszenia przedmiotu u kowala.                               #
        max-upgrade-level: 9
#                                                                                         #
#   Ustaw cenę naprawy przedmiotu u kowala.                                               #
        repair-cost: 1000
#                                                                                         #
#   Ustaw podstawową cenę ulepszenia przedmiotu u kowala.                                 #
        upgrade-cost: 5000
#                                                                                         #
#   Czy koszt ulepszenia ma być mnożony w zależności od aktualnego poziomu ulepszenia     #
#   przedmiotu?                                                                           #
        increasing-costs: true
#                                                                                         #
#   Ustaw szansę (w procentach) na spalenie przedmiotu u kowala. Dozwolone wartości:      #
#   0 - 100.                                                                              #
        chance-burn-item: 50
#                                                                                         #
#   Ustaw przedział, w którym będzie losowane od ilu do ilu punktów zostanie przyznane    #
#   do ulepszenia broni.                                                                  #
        upgrade-min: 1
        upgrade-max: 5
#                                                                                         #
# ####################################################################################### #


command /kowal [<text>]:
    permission: admin
    permission message: &4Nie masz dostępu do tej komendy.
    trigger:
        if arg 1 is "ustaw" or "set" or "create" or "spawn":
            if {kowal} is set:
                loop all entities in radius {@npc-radius} around {kowal}:
                    if name of loop-entity is "{@npc-name}":
                        teleport loop-entity to location of player
                send "&aPrzeniesiono lokalizację dla kowala w tym miejscu." to player
            if {kowal} is not set:
                send "&aUstawiono lokalizację w tym miejscu dla kowala. Kowal powinien się za chwilę tu pojawić." to player
            set {kowal} to location of player
        if arg 1 is "usun" or "usuń" or "remove" or "delete" or "del":
            if {kowal} is set:
                send "&aUsunięto lokalizację kowala (%{kowal}%)." to player
                loop all entities in radius {@npc-radius} around {kowal}:
                    if name of loop-entity is "{@npc-name}":
                        clear loop-entity
                delete {kowal}
            else:
                send "&cLokalizacja kowala nie została ustawiona." to player
        if arg 1 is "tp" or "teleport":
            if {kowal} is set:
                teleport player to {kowal}
                send "&aPrzeteleportowano do kowala!" to player
            else:
                send "&cLokalizacja kowala nie została ustawiona." to player
        if arg 1 is "help" or "pomoc" or "?":
            send "&6/kowal set &3- tworzy NPC kowala." to player
            send "&6/kowal del &3- usuwa NPC kowala." to player
            send "&6/kowal tp &3- teleportuje do kowala." to player
        if arg 1 is not set:
            execute player command "/kowal help"
        if arg 1 is not "ustaw" or "set" or "create" or "spawn" or "usun" or "usuń" or "remove" or "delete" or "del" or "tp" or "teleport" or "help" or "pomoc" or "?":
            execute player command "/kowal help"

on target:
    if name of entity contains "{@npc-name}":
        cancel event

on damage:
    if name of victim contains "{@npc-name}":
        cancel event

every 10 seconds:
    if {kowal} is set:
        loop all entities in radius {@npc-radius} around {kowal}:
            if name of loop-entity contains "{@npc-name}":
                set {_check} to true
        if {_check} is not set:
            spawn {@npc-type} at location of {kowal}
            set the last spawned entity's display name to "{@npc-name}"
            apply slowness 10 without particles to last spawned entity for 999 days
            set last spawned entity's max health to 99999
            set {_check} to true
        if {_check} is set:
            loop all entities in radius {@npc-radius} around location of {kowal}:
                if name of loop-entity contains "{@npc-name}":
                    set {_p} to "Blacksmiths" parsed as offlineplayer
                    set helmet of loop-entity to {_p}'s skull
                    set chestplate of loop-entity to a iron chestplate
                    set leggings of loop-entity to a iron leggings
                    set boots of loop-entity to a iron boots
                    set tool of loop-entity to stone spade
                    heal loop-entity
                    if round x-location of loop-entity is not round x-location of {kowal}:
                        teleport loop-entity to location of {kowal}
                    if round y-location of loop-entity is not round y-location of {kowal}:
                        teleport loop-entity to location of {kowal}
                    if round z-location of loop-entity is not round z-location of {kowal}:
                        teleport loop-entity to location of {kowal}

on rightclick on {@npc-type}:
    if name of clicked entity contains "{@npc-name}":
        execute console command "/kowal-gui %player%"

on rightclick:
    if name of targeted entity contains "{@npc-name}":
        if distance between player and targeted entity <= 3:
            cancel event

command /kowal-gui [<player>] [<text>]:
    permission: admin
    permission message: &4Nie masz dostępu do tej komendy.
    executable by: player and console
    trigger:
        set {_lvl} to 0
        set {_itemname} to name of player-arg's tool
        set {_name::*} to {_itemname} split at " "
        loop {_name::*}:
            if loop-index = "%size of {_name::*}%":
                if first 1 character of loop-value is "+":
                    set {_l} to length of loop-value
                    set {_lvl} to last {_l} - 1 characters of loop-value
                    set {_lvl} to {_lvl} parsed as integer
                    if {_lvl} is integer:
                        set {_newname} to subtext of {_itemname} from characters 1 to length of {_itemname} - {_l}
                        set {_newname} to "%{_newname}%+%{_lvl}+1%"
                    else:
                        set {_lvl} to 0
                        set {_newname} to "%{_itemname}% +1"
                else:
                    set {_lvl} to 0
                    set {_newname} to "%{_itemname}% +1"
        if {@increasing-costs} is true:
            set {_costupgrade} to ({_lvl}+1)*{@upgrade-cost}
        if {@increasing-costs} is false:
            set {_costupgrade} to {@upgrade-cost}
        if arg 2 is not set:
            open chest with 1 rows named "{@GUI-name}" to player-arg
            wait 1 tick
            set {_loreinfo1} to "|| ||&bSzansa na ulepszenie wynosi {@chance-burn-item}%%.||&bW razie niepowodzenia przedmiot spali się!||&6Aby uchronić przedmiot przed spaleniem,||&6musisz posiadać &l1x Magiczne kowadło&6."
            if {_lvl} < {@max-upgrade-level}:
                set {_loreinfo2} to "|| ||&2Proponowana cena za ulepszenie do||&2poziomu &6&l+%{_lvl}+1% &2wynosi: &e&l%{_costupgrade}%$&2.|| ||&aKliknij, aby ulepszyć trzymany przedmiot!"
            else:
                set {_loreinfo2} to "|| ||&cTwój przedmiot jest ulepszony do||&cmaksymalnego poziomu!"
            set {_lore0} to "&aTutaj możesz ulepszyć swój przedmiot.||&aPrzedmiot musi posiadać &nbonus siły&a."
            set player-arg's current inventory's slot 0 to anvil named "&e&lUlepsz siłę" with lore "%{_lore0}%%{_loreinfo1}%%{_loreinfo2}%"
            set {_lore1} to "&aTutaj możesz ulepszyć swój przedmiot.||&aPrzedmiot musi posiadać &nbonus zręczności&a."
            set player-arg's current inventory's slot 1 to anvil named "&e&lUlepsz zręczność" with lore "%{_lore1}%%{_loreinfo1}%%{_loreinfo2}%"
            set {_lore2} to "&aTutaj możesz ulepszyć swój przedmiot.||&aPrzedmiot musi posiadać &nbonus zwinności&a."
            set player-arg's current inventory's slot 2 to anvil named "&e&lUlepsz zwinność" with lore "%{_lore2}%%{_loreinfo1}%%{_loreinfo2}%"
            set {_lore3} to "&aTutaj możesz ulepszyć swój przedmiot.||&aPrzedmiot musi posiadać &nbonus szczęścia&a."
            set player-arg's current inventory's slot 3 to anvil named "&e&lUlepsz szczęście" with lore "%{_lore3}%%{_loreinfo1}%%{_loreinfo2}%"
            set {_lore4} to "&aTutaj możesz ulepszyć swój przedmiot.||&aPrzedmiot musi posiadać &nzaklęcie ostrości&a."
            set player-arg's current inventory's slot 4 to anvil named "&e&lUlepsz ostrość" with lore "%{_lore4}%%{_loreinfo1}%%{_loreinfo2}%"
            set {_lore5} to "&aTutaj możesz ulepszyć swój przedmiot.||&aPrzedmiot musi posiadać &nzaklęcie mocy&a."
            set player-arg's current inventory's slot 5 to anvil named "&e&lUlepsz moc" with lore "%{_lore5}%%{_loreinfo1}%%{_loreinfo2}%"
            set {_lore7} to "&aTutaj możesz naprawić swój zużyty||&aprzedmiot.|| ||&2Koszt naprawy: &e&l{@repair-cost}$&2."
            set player-arg's current inventory's slot 7 to anvil of unbreaking 10 named "&e&lNapraw przedmiot" with lore "%{_lore7}%"
            set {_lore8} to "&aDaj 64 sztuki stali kowalskiej dla kowala,||&aa otrzymasz 1 magiczne kowadło."
            set player-arg's current inventory's slot 8 to iron ingot of unbreaking 10 named "&e&lWymień stal kowalską na magiczne kowadło" with lore "%{_lore8}%"
        if arg 2 is set:
            set {_anvil} to 1 anvil of unbreaking 10 named "&6&lMagiczne kowadło" with lore "&aChroni przed spaleniem||&aprzedmiotu u kowala."
            if arg 2 is "8":
                set {_iron} to 64 iron ingot of unbreaking 10 named "&7&lStal kowalska"
                if player-arg has {_iron}:
                    remove {_iron} from player-arg
                    give {_anvil} to player-arg
                    send "&aOtrzymałeś 1 magiczne kowadło." to player-arg
                    stop
                else:
                    send "&cNie masz 64 sztuk stali kowalskiej." to player-arg
                    stop
            if player-arg's tool is air:
                send "&cMusisz trzymać w ręku przedmiot!" to player-arg
                stop
            if arg 2 is "7":
                if player-arg's account < {@repair-cost}:
                    send "&cNie masz wystarczającej ilości pieniędzy." to player-arg
                    stop
                else:
                    if player-arg's tool is sword or axe or pickaxe or spade or bow or shield or helmet or chestplate or elytra or leggings or boots or flint and steel or fishing rod:
                        if data value of player-arg's tool > 0:
                            remove {@repair-cost} from player-arg's account
                            repair player-arg's tool
                            send "&2Twój przedmiot został naprawiony." to player-arg
                            stop
                        else:
                            send "&cNie ma potrzeby naprawy tego przedmiotu." to player-arg
                            stop
                        else:
                            send "&cNie mogę naprawić tego typu przedmiotu." to player-arg
                            stop
            if "%{_itemname}%" is "<none>":
                send "&cTego przedmiotu nie mogę ulepszyć." to player-arg
                stop
            if arg 2 is "0" or "1" or "2" or "3" or "4" or "5":
                if {_lvl} >= {@max-upgrade-level}:
                    send "&cTwój przedmiot jest ulepszony do maksymalnego poziomu!" to player-arg
                    stop
                if player-arg's account < {_costupgrade}:
                    send "&cNie masz wystarczającej ilości pieniędzy." to player-arg
                    stop
            set {_rand} to random integer from {@upgrade-min} to {@upgrade-max}
            set {_lore::*} to lore of player-arg's tool split at "||"
            loop {_lore::*}:
                set {_check} to uncoloured loop-value
                replace all "+" and "%%" with "" in {_check}
                if arg 2 is "0":
                    if {_check} contains "Siła: ":
                        replace "Siła: " with "" in {_check}
                        set {_noerror0} to true
                        set {_line} to loop-index parsed as integer
                        set {_check} to {_check} parsed as integer
                        chance of {@chance-burn-item}%:
                            set {_spalony} to true
                        if {_spalony} is not set:
                            add {_rand} to {_check}
                            if {_check} > 0:
                                set {_check} to "+%{_check}%"
                            set line {_line} of player-arg's tool's lore to "&8Siła: &7%{_check}%"
                if arg 2 is "1":
                    if {_check} contains "Zręczność: ":
                        replace "Zręczność: " with "" in {_check}
                        set {_noerror1} to true
                        set {_line} to loop-index parsed as integer
                        set {_check} to {_check} parsed as integer
                        chance of {@chance-burn-item}%:
                            set {_spalony} to true
                        if {_spalony} is not set:
                            add {_rand} to {_check}
                            if {_check} > 0:
                                set {_check} to "+%{_check}%"
                            set line {_line} of player-arg's tool's lore to "&8Zręczność: &7%{_check}%"
                if arg 2 is "2":
                    if {_check} contains "Zwinność: ":
                        replace "Zwinność: " with "" in {_check}
                        set {_noerror2} to true
                        set {_line} to loop-index parsed as integer
                        set {_check} to {_check} parsed as integer
                        chance of {@chance-burn-item}%:
                            set {_spalony} to true
                        if {_spalony} is not set:
                            add {_rand} to {_check}
                            if {_check} > 0:
                                set {_check} to "+%{_check}%"
                            set line {_line} of player-arg's tool's lore to "&8Zwinność: &7%{_check}%"
                if arg 2 is "3":
                    if {_check} contains "Szczęście: ":
                        replace "Szczęście: " with "" in {_check}
                        set {_noerror3} to true
                        set {_line} to loop-index parsed as integer
                        set {_check} to {_check} parsed as integer
                        chance of {@chance-burn-item}%:
                            set {_spalony} to true
                        if {_spalony} is not set:
                            add {_rand} to {_check}
                            if {_check} > 0:
                                set {_check} to "+%{_check}%"
                            set line {_line} of player-arg's tool's lore to "&8Szczęście: &7%{_check}%"
            if {_noerror0} is not set:
                if arg 2 is "0":
                    send "&cNie mogę ulepszyć Twojego przedmiotu, ponieważ nie posiada on bonusu siły." to player-arg
                    stop
            if {_noerror1} is not set:
                if arg 2 is "1":
                    send "&cNie mogę ulepszyć Twojego przedmiotu, ponieważ nie posiada on bonusu zręczności." to player-arg
                    stop
            if {_noerror2} is not set:
                if arg 2 is "2":
                    send "&cNie mogę ulepszyć Twojego przedmiotu, ponieważ nie posiada on bonusu zwinności." to player-arg
                    stop
            if {_noerror3} is not set:
                if arg 2 is "3":
                    send "&cNie mogę ulepszyć Twojego przedmiotu, ponieważ nie posiada on bonusu szczęścia." to player-arg
                    stop
            if arg 2 is "4":
                set {_sharp} to level of sharpness of player-arg's tool
                if {_sharp} = 0:
                    send "&cNie mogę ulepszyć Twojego przedmiotu, ponieważ nie posiada on zaklęcia ostrości." to player-arg
                    stop
                chance of {@chance-burn-item}%:
                    set {_spalony} to true
                if {_spalony} is not set:
                    add {_rand} to {_sharp}
                    set {_zaklecie} to "sharpness %{_sharp}%" parsed as enchantment type
                    enchant player-arg's tool with sharpness 0
                    enchant player-arg's tool with {_zaklecie}
            if arg 2 is "5":
                set {_power} to level of power of player-arg's tool
                if {_power} = 0:
                    send "&cNie mogę ulepszyć Twojego przedmiotu, ponieważ nie posiada on zaklęcia mocy." to player-arg
                    stop
                chance of {@chance-burn-item}%:
                    set {_spalony} to true
                if {_spalony} is not set:
                    add {_rand} to {_power}
                    set {_zaklecie} to "power %{_power}%" parsed as enchantment type
                    enchant player-arg's tool with power 0
                    enchant player-arg's tool with {_zaklecie}
            if {_spalony} is not set:
                send "&2Udało się ulepszyć Twój przedmiot." to player-arg
                set name of player-arg's tool to {_newname}
                remove {_costupgrade} from player-arg's account
            if {_spalony} is set:
                remove {_costupgrade}/2 from player-arg's account
                if player-arg has {_anvil}:
                    remove {_anvil} from player-arg
                    send "&6Twój przedmiot został uchroniony przed spaleniem przy pomocy magicznego kowadła. Zwrócono połowę kosztów za próbę ulepszenia." to player-arg
                else:
                    delete player-arg's tool
                    send "&4Twój przedmiot spalił się i nie udało się go ulepszyć! Zwrócono połowę kosztów za próbę ulepszenia." to player-arg

on inventory click:
    set {_inv} to name of player's current inventory
    set {_click} to player's current inventory's slot slot
    if {_inv} contains "{@GUI-name}":
        cancel event
        if {_click} is null or none or air:
            stop
        if "%{_click}%" is "<none>":
            stop
        if "%event-slot%" contains "inventory of <none>":
            set {_click2} to event-slot
            execute console command "/kowal-gui %player% %index of event-slot%"
            close player's inventory

command /kowal-itemy:
    permission: admin
    permission message: &4Nie masz dostępu do tej komendy.
    trigger:
        give 1 anvil of unbreaking 10 named "&6&lMagiczne kowadło" with lore "&aChroni przed spaleniem||&aprzedmiotu u kowala." to player
        give 16 iron ingot of unbreaking 10 named "&7&lStal kowalska" to player
        # ################################################################### #
        # INFORMACJA: Stal kowalska powinna ogółem dropić z mobów (jak robisz #
        # serwer RPG). Zebraną stal wymienia się na magiczne kowadło. Stal    #
        # można wymienić u kowala, jednak można zrobić wymianę np. u osadnika #
        # z pluginu Shopkeepers.                                              #
        # ################################################################### #

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...