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 na cobbelY


Rekomendowane odpowiedzi

Opublikowano

Cześć !

Mam problem ze skryptem na cobbelY, gdy go niszcze zawsze dropa to samo (złote jabłka) ale wyskakuje, że dropnąłem min. książke czy obsydian. W czym problem? (skrypt znalazłem w necie, po czym go przerobiłem) 

options:

#Item potrzebny do utworzenia cobble Y
        potrzebne: 192 cobblestone
#Item który odpowiada CobbleY 
        cobbley: lapis lazuli ore
#Itemy które wypadają
        item1: Golden Apple
        item2: Ender Pearl
        item3: book
        item4: tnt
        item5: apple
        item6: obsidian
        item7: cobblestone 
itemy
        item1szansa: 10
        item2szansa: 15
        item3szansa: 20
        item4szansa: 30
        item5szansa: 40
        item6szansa: 50
        item7szansa: 60
#Komenda na tworzenie CobbleY  
command /cobbley:
        trigger:
                if player has {@potrzebne}:
                        remove {@potrzebne} from the player    
                        give player {@cobbley} named "&aCobble&eY"
                        send "<orange>Otrzymales/as <green>Cobble&eY"
                        log "%player%-CobbleY" to "Lizak3/cobbley/%player%.log"
#Do polaczenia ze statystykami                 
                        add 1 to {wykopanycobbley.%player%}
                        player has permission "Lizak3.team.Czerwoni":
                                add 1 to {cobbleyczerwoni}
                        player has permission "Lizak3.team.Niebiescy": 
                                add 1 to {cobbleyniebiescy}
                        stop trigger   
                else:
                        send "<red>Nie masz <bold>192 (3x64) cobblestone"
 
#Event na losowanie itemu        (Jak dodajesz to zaczynaj od tych z najmniejszym procentem)
on break of {@cobbley}:
        cancel event
        set event-block to air
        damage player's tool by 1
#Szansa na itemy.      
  else:
        chance of {@item1szansa}%:
                if player's tool is pickaxe of fortune 1:
                        drop random number between 1 and 2 of {@item1} at event-block
                        send "<orange>Gratulacje znalazles/as refka"
                        stop
                else if player's tool is pickaxe of fortune 2:
                        drop random number between 2 and 3 of {@item1} at event-block
                        send "<orange>Gratulacje znalazles/as refka"
                        stop
                else if player's tool is pickaxe of fortune 3:
                        drop random number between 3 and 4 of {@item1} at event-block
                        send "<orange>Gratulacje znalazles/as refka"
                        stop
                else:
                        drop {@item1} at event-block
                        send "<orange>Gratulacje znalazles/as refka"
                        stop
        chance of {@item1szansa}%:
                if player's tool is pickaxe of fortune 1:
                        drop random number between 1 and 2 of {@item2} at event-block
                        send "<orange>Gratulacje znalazles/as perełke"
                        stop
                else if player's tool is pickaxe of fortune 2:
                        drop random number between 2 and 3 of {@item2} at event-block
                        send "<orange>Gratulacje znalazles/as perełke"
                        stop
                else if player's tool is pickaxe of fortune 3:
                        drop random number between 3 and 4 of {@item2} at event-block
                        send "<orange>Gratulacje znalazles/as perełke"
                        stop
                else:
                        drop {@item1} at event-block
                        send "<orange>Gratulacje znalazles/as perełke"
                        stop
        chance of {@item3szansa}%:
                if player's tool is pickaxe of fortune 1:
                        drop random number between 2 and 5 of {@item3} at event-block
                        send "<orange>Gratulacje znalazles/as książke"
                        stop
                else if player's tool is pickaxe of fortune 2:
                        drop random number between 3 and 6 of {@item3} at event-block
                        send "<orange>Gratulacje znalazles/as książke"
                        stop
                else if player's tool is pickaxe of fortune 3:
                        drop random number between 4 and 8 of {@item3} at event-block
                        send "<orange>Gratulacje znalazles/as książke"
                        stop
                else:
                        drop {@item1} at event-block
                        send "<orange>Gratulacje znalazles/as książke"
                        stop
        chance of {@item4szansa}%:
                if player's tool is pickaxe of fortune 1:
                        drop random number between 3 and 6 of {@item4} at event-block
                        send "<orange>Gratulacje znalazles/as tnt"
                        stop
                else if player's tool is pickaxe of fortune 2:
                        drop random number between 4 and 8 of {@item4} at event-block
                        send "<orange>Gratulacje znalazles/as tnt"
                        stop
                else if player's tool is pickaxe of fortune 3:
                        drop random number between 5 and 10 of {@item4} at event-block
                        send "<orange>Gratulacje znalazles/as tnt"
                        stop
                else:
                        drop {@item1} at event-block
                        send "<orange>Gratulacje znalazles/as tnt"
                        stop
        chance of {@item5szansa}%:
                if player's tool is pickaxe of fortune 1:
                        drop random number between 2 and 4 of {@item5} at event-block
                        send "<orange>Gratulacje znalazles/as jabłko"
                        stop
                else if player's tool is pickaxe of fortune 2:
                        drop random number between 3 and 6 of {@item5} at event-block
                        send "<orange>Gratulacje znalazles/as jabłko"
                        stop
                else if player's tool is pickaxe of fortune 3:
                        drop random number between 3 and 8 of {@item5} at event-block
                        send "<orange>Gratulacje znalazles/as jabłko"
                        stop
                else:
                        drop {@item1} at event-block
                        send "<orange>Gratulacje znalazles/as jabłko"
                        stop
        chance of {@item6szansa}%:
                if player's tool is pickaxe of fortune 1:
                        drop random number between 5 and 10 of {@item6} at event-block
                        send "<orange>Gratulacje znalazles/as obsydian"
                        stop
                else if player's tool is pickaxe of fortune 2:
                        drop random number between 15 and 20 of {@item6} at event-block
                        send "<orange>Gratulacje znalazles/as obsydian"
                        stop
                else if player's tool is pickaxe of fortune 3:
                        drop random number between 20 and 25 of {@item6} at event-block
                        send "<orange>Gratulacje znalazles/as obsydian"
                        stop
                else:
                        drop {@item1} at event-block
                        send "<orange>Gratulacje znalazles/as obsydian"
                        stop
        chance of {@item7szansa}%:
                if player's tool is pickaxe of fortune 1:
                        drop random number between 10 and 20 of {@item7} at event-block
                        send "<orange>Gratulacje znalazles/as Jajka spawnujace krowe"
                        stop
                else if player's tool is pickaxe of fortune 2:
                        drop random number between 20  and 30 of {@item7} at event-block
                        send "<orange>Gratulacje znalazles/as bruk"
                        stop
                else if player's tool is pickaxe of fortune 3:
                        drop random number between 32 and 64 of {@item7} at event-block
                        send "<orange>Gratulacje znalazles/as bruk"
                        stop
                else:
                        drop {@item1} at event-block
                        send "<orange>Gratulacje znalazles/as bruk"
                        stop
 
 
 
PS: Gdy wpisuje komende /skript reload cobbley wyskakuje to
 indenation error: expected 8 spaces but found `->_`[-> = tab, _=space, ? = other whitespace]   (cobbley.sk line 14:itemy`)
indentation error: expacted 8 spaces, but found `->,>,>_ _ _`[-> = tab,_=space, ? =other whitespace] (cobbley.sk, line 46:else:`)

1377531174-U173186.png

Opublikowano

Wszystko jest napisane:
w linijce 14 i 46 na początku są pomieszane spacje i taby,

musisz się zdecydować na jedno - zamień taby na spacje lub odwrotnie.
Powinno być ok :)

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...