Skocz do zawartości
  • 0

gdzie jest błąd


Pytanie

tak jest w temacie szukam błędu

 

on mine of stone:
 if gamemode of player is survival:
   if player's tool is pickaxe of fortune 0:
     if player's y-coordinate is smaller than {@diamondvip}:
       if player has permissions "drop.vip":
         chance of {@wydiamondvip}%:
           send "&6Gratulacje, udalo ci sie znalesc 1 &bDiament"
           drop 1 diamond
           play raw sound "random.bow" at player with pitch 10 volume 10
           add 5 to {pkt.%name of player%}
           stop
#-----------------------------------------------------------------------------------------------------------
         else:
           if gamemode of player is survival:
             if player's tool is pickaxe of fortune 1:
               if player's y-coordinate is smaller than {@diamondvip}:
                 if player has permissions "drop.vip":
                   chance of {@wydiamondvip1}%:
                     send "&6Gratulacje, udalo ci sie znalesc 1 &bDiament"
                     drop 1 diamond
                     play raw sound "random.bow" at player with pitch 10 volume 10
                     add 5 to {pkt.%name of player%}
                     stop
#------------------------------------------------------------------------------------------------------------
           else:
             if gamemode of player is survival:
               if player's tool is pickaxe of fortune 2:
                 if player's y-coordinate is smaller than {@diamondvip}:
                   if player has permissions "drop.vip":
                     chance of {@wydiamondvip2}%:
                       send "&6Gratulacje, udalo ci sie znalesc 1 &bDiament"
                       drop 1 diamond
                       play raw sound "random.bow" at player with pitch 10 volume 10
                       add 5 to {pkt.%name of player%}
                       stop
#------------------------------------------------------------------------------------------------------------
             else:
               if gamemode of player is survival:
                 if player's tool is pickaxe of fortune 3:
                   if player's y-coordinate is smaller than {@diamondvip}:
                     if player has permissions "drop.vip":
                       chance of {@wydiamondvip3}%:
                         send "&6Gratulacje, udalo ci sie znalesc 1 &bDiament"
                         drop 1 diamond
                         play raw sound "random.bow" at player with pitch 10 volume 10
                         add 5 to {pkt.%name of player%}
                         stop
#------------------------------------------------------------------------------------------------------------

 

błąd polega na tym że skrypt nie wykrywa fortuny. Czy kopie zwykłym czy z fortuną 1,2,3 nie wykrywa fortuny. Szanse na drop są inne

Odnośnik do komentarza
https://skript.pl/temat/1405-gdzie-jest-b%C5%82%C4%85d/
Udostępnij na innych stronach

2 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Najpierw sprawdzasz czy kilof gracza ma enchant 'fortune 0', a później próbujesz sprawdzić czy ma enchant 'fortune 1/2/3' - co jest niemożliwe skoro ma enchant 'fortune 0'. Swoją drogą nie jestem pewien czy enchant typu 'cośtam 0' jest w ogóle możliwy.

 

Wyeliminowałem ten błąd i zoptymalizowałem kod:

on mine of stone:    gamemode of player is survival     # drop diamentów dla dla vipów    player has permissions "drop.vip":        y-coordinate of event-block is smaller than {@diamondvip} # czy wykopany blok był odpowiednio głęboko        tool of player is pickaxe of fortune 1: # czy kilof gracza ma enchant 'fortune 1'            chance of {@wydiamondvip1}%            drop 1 diamond            send "&6Gratulacje, udalo ci sie znalesc 1 &bDiament"            play raw sound "random.bow" at player with pitch 10 volume 10            add 5 to {pkt.%name of player%}            stop        tool of player is pickaxe of fortune 2: # czy kilof gracza ma enchant 'fortune 2'            chance of {@wydiamondvip2}%            drop 1 diamond            send "&6Gratulacje, udalo ci sie znalesc 1 &bDiament"            play raw sound "random.bow" at player with pitch 10 volume 10            add 5 to {pkt.%name of player%}            stop        tool of playeris pickaxe of fortune 3: # czy kilof gracza ma enchant 'fortune 3'            chance of {@wydiamondvip3}%            drop 1 diamond            send "&6Gratulacje, udalo ci sie znalesc 1 &bDiament"            play raw sound "random.bow" at player with pitch 10 volume 10            add 5 to {pkt.%name of player%}            stop        # jeśli nie został spełniony któryś z powyższych warunków (czyli kiedy kilof nie ma fortuny) wykonywany jest ten kod:        chance of {@wydiamondvip}%        drop 1 diamond        send "&6Gratulacje, udalo ci sie znalesc 1 &bDiament"        play raw sound "random.bow" at player with pitch 10 volume 10        add 5 to {pkt.%name of player%}        stop
Odnośnik do komentarza
https://skript.pl/temat/1405-gdzie-jest-b%C5%82%C4%85d/#findComment-11282
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...