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

[Problem] Skrypt nie działa poprawnie.


Rekomendowane odpowiedzi

Opublikowano

mam problem ze skriptem pobrałem z forum xxxxxx i początkowo działa dostawałem skrzynie i klucz jak dodałem ity to mam taki problem

 

/case add [nazwa] Stworzyło mi skrzynie

/case additem [nazwa skrzyni] Pisze że istenie juz ta skrzynia

/case givekey Ta skrzynia nie istnieje

/case givechest tak samo jak z givekey

options:
        tag: &8[&6Case&8]
        chance key: 0.1
        chance chest: 1
method "wybor" {player}:
        set {_1} to arg{1};
        open chest with 6 rows named "&6&lLista skrzynek" to {_1}
        wait 1 tick
        loop {case::chestlist::*}:
                set {_case%loop-index%} to loop-value
        loop (size of {case::chestlist::*}) times:
                format slot loop-number - 1 of {_1} with 1 of chest named "&6%{_case%loop-number%}%" to close then run "case method %{_case%loop-number%}% %{_1}%"
method "opening" {player and case}:
        set {_1} to arg{1};
        set {_2} to arg{2};
        remove 1 tripwire hook named "&6Klucz do skrzyni &c%{_2}%" from {_1}'s inventory
        remove 1 chest named "&c%{_2}%" from {_1}'s inventory
        set {case::%{_1}%::open} to true
        open chest with 6 rows named "&6&lSkrzynia &c&l%{_2}%" to {_1}
        wait 1 tick
        loop {case::itemlist::%{_2}%::*}:
                set {_skin%loop-index%} to loop-value
        loop (size of {case::itemlist::%{_2}%::*}) times:
                format slot loop-number + 26 of {_1} with 1 of {_skin%loop-number%} to be unstealable
        loop 9 times:
                set {_item%loop-number%} to random element out of {case::itemlist::%{_2}%::*}
                format slot loop-number + 8 of {_1} with 1 of {_item%loop-number%} to be unstealable
                format slot loop-number - 1 of {_1} with 1 of black stained glass pane to be unstealable
                format slot loop-number + 17 of {_1} with 1 of black stained glass pane to be unstealable
        format slot 4 of {_1} with 1 of hopper to be unstealable
        play raw sound "random.pop" at {_1} with pitch 0.5 volume 1
        wait 2 seconds
        loop 30 times:
                if {case::%{_1}%::open} is true:
                        wait 5 tick
                        play raw sound "random.pop" at {_1} with pitch 1.5 volume 1
                        loop 8 times:
                                set {_item%loop-number-2%} to {_item%loop-number-2 + 1%}
                                format slot loop-number-2 + 8 of {_1} with 1 of {_item%loop-number-2%} to be unstealable
                        set {_item9} to random element out of {case::itemlist::%{_2}%::*}
                        format slot 17 of {_1} with 1 of {_item9} to be unstealable
        wait 3 seconds
        open chest with 1 rows named "&6&lWygrales:" to {_1}
        wait 1 tick
        give {_1} {_item5}
        format slot 4 of {_1} with 1 of {_item5} to close
        play raw sound "mob.endermen.portal" at {_1} with pitch 0.001 volume 1
command /case [<text>] [<text>] [<text>]:
        trigger:
                if player has permission "case.*":
                        if arg 1 is not set:
                                execute player command "/case null"
                        if arg 1 is not "add" or "remove" or "additem" or "removeitem" or "givekey" or "givechest" or "list" or "method":
                                send "{@tag}"
                                send "&6/case add <name>"
                                send "&6/case remove <name>"
                                send "&6/case additem <name>"
                                send "&6/case removeitem <name>"
                                send "&6/case givekey <name>"
                                send "&6/case givechest <name>"
                                send "&6/case list"
                        if arg 1 is "add":
                                if arg 2 is set:
                                        if {case::chestlist::*} contains arg 2:
                                                send "{@tag} &7Taka skrzynia juz istnieje!"
                                        else:
                                                add arg 2 to {case::chestlist::*}
                                                send "{@tag} &7Dodano skrzynie o nazwie &6%arg 2%&7."
                                else:
                                        send "&6/case add <name>"
                        if arg 1 is "remove":
                                if arg 2 is set:
                                        if {case::chestlist::*} contains arg 2:
                                                remove arg 2 from {case::chestlist::*}
                                                delete {case::itemlist::%arg 2%::*}
                                                send "{@tag} &7Usunieto skrzynie o nazwie &6%arg 2%&7."
                                        else:
                                                send "{@tag} &7Taka skrzynia nie istnieje!"
                                else:
                                        send "&6/case remove <name>"
                        if arg 1 is "additem":
                                if arg 2 is set:
                                        if {case::chestlist::*} contains arg 2:
                                                if {case::itemlist::%arg 2%::*} contains player's tool:
                                                        send "{@tag} &7Ta skrzynka zawiera już taki przedmiot!"
                                                else:
                                                        add player's tool to {case::itemlist::%arg 2%::*}
                                                        send "{@tag} &7Dodano &6%player's tool%&7 do skrzyni &6%arg 2%&7."
                                        else:
                                                send "{@tag} &7Taka skrzynia juz istnieje!"
                                else:
                                        send "&6/case additem <name>"
                        if arg 1 is "removeitem":
                                if arg 2 is set:
                                        if {case::chestlist::*} contains arg 2:
                                                if {case::itemlist::%arg 2%::*} contains player's tool:
                                                        remove player's tool from {case::itemlist::%arg 2%::*}
                                                        send "{@tag} &7Usunieto &6%player's tool%&7 ze skrzyni &6%arg 2%&7."
                                                else:
                                                        send "{@tag} &7W tej skrzynce nie ma takiego przedmiotu!"
                                        else:
                                                send "{@tag} &7Taka skrzynia nie istnieje!"
                                else:
                                        send "&6/case removeitem <name>"
                        if arg 1 is "givekey":
                                if arg 2 is set:
                                        if {case::chestlist::*} contains arg 2:
                                                add 1 tripwire hook named "&6Klucz do skrzyni &c%arg 2%" to player's inventory
                                        else:
                                                send "{@tag} &7Taka skrzynia nie istnieje!"
                                else:
                                        send "&6/case givekey <name>"
                        if arg 1 is "givechest":
                                if arg 2 is set:
                                        if {case::chestlist::*} contains arg 2:
                                                add 1 chest named "&c%arg 2%" to player's inventory
                                        else:
                                                send "{@tag} &7Taka skrzynia nie istnieje!"
                                else:
                                        send "&6/case givechest <name>"
                        if arg 1 is "list":
                                function "wybor" {player};
                        if arg 1 is "method":
                                set {_player} to arg 3 parsed as player
                                if {_player}'s inventory contains tripwire hook named "&6Klucz do skrzyni &c%arg 2%":
                                        if {_player}'s inventory contains chest named "&c%arg 2%":
                                                function "opening" {{_player} and arg 2};
                                        else:
                                                send "{@tag} &7Nie posiadasz tej skrzyni!" to {_player}
                                else:
                                        send "{@tag} &7Nie posiadasz klucza do tej skrzyni!" to {_player}
                else:
                        send "&cBrak uprawnien."
on inventory close:
        if {case::%player%::open} is true:
                set {case::%player%::open} to false
on quit:
        if {case::%player%::open} is true:
                set {case::%player%::open} to false
on right click:
        if player's tool is chest:
                if {case::chestlist::*} contains uncolored name of player's tool:
                        cancel event
                        execute player command "case method %uncolored name of player's tool% %player%"
        if player's tool is tripwire hook:
                if name of player's tool contains "&6Klucz do skrzyni":
                        cancel event
                        function "wybor" {player};
on mine of stone:
        chance of {@ chest}%:
                set {_x} to random element out of {case::chestlist::*}
                drop chest named "%{_x}%"
                play raw sound "mob.endermen.portal" at player with pitch 0.001 volume 1
        chance of {@ key}%:
                set {_x} to random element out of {case::chestlist::*}
                drop tripwire hook named "&6Klucz do skrzyni &c%{_x}%"
                play raw sound "mob.endermen.portal" at player with pitch 0.001 volume 1

CPU i5 6600k 4,1GHZ | RAM HyperX SAVAGE 16GB RAMGPU ASUS GTX 1070 ROG STRIX 8GOC |

SSD1 Samsung EVO 850 120GB| SSD2 ADATA SP600 120GB |HDD Toshiba 1TB

Reklama serwera minigames w starym stylu Kliknij tutaj

 

Opublikowano

Nie wiem czemu, bo mi działa, pamiętaj, że oprócz skript musisz posiadać jeszcze skQuery

bo ja chciałem stworzyć 2 skrzynie nie napisał ze max 1 i sie zepsuł

CPU i5 6600k 4,1GHZ | RAM HyperX SAVAGE 16GB RAMGPU ASUS GTX 1070 ROG STRIX 8GOC |

SSD1 Samsung EVO 850 120GB| SSD2 ADATA SP600 120GB |HDD Toshiba 1TB

Reklama serwera minigames w starym stylu Kliknij tutaj

 

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...