Skocz do zawartości
  • 0

Problem z thorem


C4LLM3P3T3R

Pytanie

on rightclick:
    if player don't have permission "axe.wale":
        if {cooldown::thor} is not 20:
            if {axe::%player%} is 20:
                send "&4>>&6Zużyłeś swój limit!"
                stop
               
            else:    
                if player have permission "axe.wale":
                    if player is holding a golden axe named "&4Młot thora!":
                        strike lightning at the targeted entity
    
                else:
                    if player is holding a golden axe named "&4Młot thora!":
                        strike lightning at the targeted entity
                        add 1 to {axe::%player%}
        else:
            if player is holding a golden axe named "&4Młot thora!":
                strike lightning at the targeted entity
                add 1 to {axe::%player%}
    else:
        if player have permission "axe.wale":
            if player is holding a golden axe named "&4Młot thora!":
                strike lightning at the targeted entity
every second:
    if {axe::%player%} is 20:
        add 1 to {cooldown::thor}
        if {cooldown::thor} is 20:
            clear {cooldown::thor}
    

Na linijce z "if {axe::%player%} is 20:" jest błąd "There's no world in a periodic event if no world is given in the event (e.g. like 'every hour in "world"') (thor.sk, line 26: if {axe::%player%} is 20:')". Czy robię coś źle?

Odnośnik do komentarza
https://skript.pl/temat/34856-problem-z-thorem/
Udostępnij na innych stronach

3 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

dodaj loop all players i zamień %player% na %loop-player%

every second:
    loop all players:
        if {axe::%loop-player%} is 20:
            add 1 to {cooldown::thor}
            if {cooldown::thor} is 20:
                clear {cooldown::thor}

 

Odnośnik do komentarza
https://skript.pl/temat/34856-problem-z-thorem/#findComment-223982
Udostępnij na innych stronach

  • 0
3 minuty temu, Helios1993 napisał:

dodaj loop all players i zamień %player% na %loop-player%


every second:
    loop all players:
        if {axe::%loop-player%} is 20:
            add 1 to {cooldown::thor}
            if {cooldown::thor} is 20:
                clear {cooldown::thor}

 

Nie ważne, już działa. Wykombinowałem, że nie trzeba dawajć %player% tylko wystarczy np {axe::licz}. Kolejny do zamknięcia!

Odnośnik do komentarza
https://skript.pl/temat/34856-problem-z-thorem/#findComment-223983
Udostępnij na innych stronach

  • 0

Tylko jeśli nie dasz gracza, to gdy użyjesz itemu, inni gracze będą mieli ten sam cooldown. Pewnie znajdzie się jakiś troll co na afku będzie używał item żeby blokować to innym. Lepiej dać wszędzie po "::" %player% (albo %loop-player%).

Odnośnik do komentarza
https://skript.pl/temat/34856-problem-z-thorem/#findComment-223987
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ę...