Skocz do zawartości
  • 0

Pomoc przy skrypcie


BlackRode

Pytanie

Skrypt laguje pomoże ktoś :<

Problem jest pod koniec skryptu chodzi o czas.


 

Spoiler

command /wyplata [<text>] [<text>]:
    trigger:
        if arg 1 is not set:
            send "&3Lista wyplat:"
            send "&e- /Wyplata gracz &3(%{wgracz.%player%}%/120) &a- 16 monet"
            send "&e- /Wyplata yt &3(%{wyt.%player%}%/120) &a- 32 monety"
            send "&e- /Wyplata Evip &3(%{wvip.%player%}%/120) &a- 64 monety"
            send "&e- /Wyplata Sponsora &3(%{wsvip.%player%}%/120) &a- 128 monet"
        if arg 1 is "gracz":
            if {wgracz.%player%} is larger than 119:
                set {wgracz.%player%} to 0
                send "&aPomyslnie wyplacono!"
                give 16 sunflower of unbreaking 10 named "&a&l+ &e&lMoneta &a&l+" to the player
            else:
                send "&aNie posiadasz &c120/120 Minut! [&e%{wgracz.%player%}%/120] &2(Nalezy byc zalogowanym by sie zaliczylo!)"
        if arg 1 is "yt":
            player has permission "wyplata.yt":
                if {wyt.%player%} is larger than 119:
                    send "&aPomyslnie wyplacono!"
                    set {wyt.%player%} to 0
                    give 32 sunflower of unbreaking 10 named "&a&l+ &e&lMoneta &a&l+" to the player
                else:
                    send "&aNie posiadasz &c120/120 Minut! [&e%{wyt.%player%}%/120] &2(Nalezy byc zalogowanym by sie zaliczylo!)"
            else:
                send "&4Nie masz dostepu do tej wyplaty!"
        if arg 1 is "Evip":
            player has permission "wyplata.evip":
                if {wvip.%player%} is larger than 119:
                    send "&aPomyslnie wyplacono!"
                    set {wvip.%player%} to 0
                    give 64 sunflower of unbreaking 10 named "&a&l+ &e&lMoneta &a&l+" to the player
                else:
                    send "&aNie posiadasz &c120/120 Minut! [&e%{wvip.%player%}%/120] &2(Nalezy byc zalogowanym by sie zaliczylo!)"
            else:
                send "&4Nie masz dostepu do tej wyplaty!"
        if arg 1 is "Sponsor":
            player has permission "wyplata.sponsor":
                if {wsvip.%player%} is larger than 119:
                    send "&aPomyslnie wyplacono!"
                    set {wsvip.%player%} to 0
                    give 128 sunflower of unbreaking 10 named "&a&l+ &e&lMoneta &a&l+" to the player
                else:
                    send "&aNie posiadasz &c120/120 Minut! [&e%{wsvip.%player%}%/120] &2(Nalezy byc zalogowanym by sie zaliczylo!)"
            else:
                send "&4Nie masz dostepu do tej wyplaty!"
variables:
        {wgracz.%player%} = 120
        {wyt.%player%} = 120
        {wvip.%player%} = 120
        {wsvip.%player%} = 120
        {lel.%player%} = 5
on join:
    wait 0.1 seconds
    execute console command "/hwyp %player%"
command /hwyp [<player>]:
    trigger:
        add 3 to {wgracz.%player-arg%}
        if {wgracz.%player-arg%} is larger than 120:
            set {wgracz.%player-arg%} to 120
        add 3 to {wyt.%player-arg%}
        if {wyt.%player-arg%} is larger than 120:
            set {wyt.%player-arg%} to 120
        add 3 to {wvip.%player-arg%}
        if {wvip.%player-arg%} is larger than 120:
            set {wvip.%player-arg%} to 120
        add 3 to {wsvip.%player-arg%}
        if {wsvip.%player-arg%} is larger than 120:
            set {wsvip.%player-arg%} to 120
        add 30 to {lel.%player-arg%}
        if {lel.%player-arg%} is larger than 4:
            set {lel.%player-arg%} to 0
            if {wgracz.%player-arg%} is 120:
                send "&aWyplata &cgracza&a jest dostepna! &3/Wyplata GRACZ"
            if {wyt.%player-arg%} is 120:
                player-arg has permission "ranga.yt":
                    send "&aWyplata &cyoutubera&a jest dostepna! &3/Wyplata YT"
            if {wvip.%player-arg%} is 120:
                player-arg has permission "ranga.vip":
                    send "&aWyplata &cEvipa&a jest dostepna! &3/Wyplata Evip"
            if {wsvip.%player-arg%} is 120:
                player-arg has permission "ranga.svip":
                    send "&aWyplata &cSponsora&a jest dostepna! &3/Wyplata Sponsor"
        wait 3 minute
        execute player-arg command "/hwyp %player-arg%"

 

 

Edytowane przez Ixidi
[code] i spoiler
Odnośnik do komentarza
https://skript.pl/temat/24223-pomoc-przy-skrypcie/
Udostępnij na innych stronach

15 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
2 minuty temu, bopke napisał:

Jaki jest ten problem? Wyskakują błędy w konsoli?
A może coś działa nie tak?

 

2 godziny temu, BlackRode napisał:

Skrypt laguje pomoże ktoś :<

Problem jest pod koniec skryptu chodzi o czas.

Zmień 0.1 sekundy na 1 sekundę, różnicy nie ma a skrypt ma pełną sekundę na załadowanie się a nie tylko 1/10

Odnośnik do komentarza
https://skript.pl/temat/24223-pomoc-przy-skrypcie/#findComment-162282
Udostępnij na innych stronach

  • 0
54 minuty temu, keebe napisał:

Generalnie, najbardziej irracjonalne zjawisko, dotychczas przez użytkownika Skripta.
Używając skryptów musisz liczyć się z samym faktem, że Scripty lagują bardziej niż pluginy.

Tak zgadza się tyle, że to jest jakiś ogromny laguzaur a nie jakieś małe ścinki :<

2 godziny temu, ByczekTV napisał:

może wait 3 minutes , a nie wait 3 minute ?

Poprawiłem

Odnośnik do komentarza
https://skript.pl/temat/24223-pomoc-przy-skrypcie/#findComment-162359
Udostępnij na innych stronach

  • 0
5 godzin temu, kopselek napisał:

ustawiłeś tam dużo zmiennych które obciążają serwer dlatego laguje, oraz wait 0.1 seconds które też obiąża

Możesz napisać podobny skrypt mniej obciążający serwer? ?

Odnośnik do komentarza
https://skript.pl/temat/24223-pomoc-przy-skrypcie/#findComment-162618
Udostępnij na innych stronach

  • 0
Spoiler

command /wyplata [<text>] [<text>]:
    trigger:
        if arg 1 is not set:
            send "&3Lista wyplat:"
            send "&e- /Wyplata gracz &3(%{wgracz::%player%}%/120) &a- 16 monet"
            send "&e- /Wyplata yt &3(%{wyt::%player%}%/120) &a- 32 monety"
            send "&e- /Wyplata Evip &3(%{wvip::%player%}%/120) &a- 64 monety"
            send "&e- /Wyplata Sponsora &3(%{wsvip::%player%}%/120) &a- 128 monet"
        if arg 1 is "gracz":
            if {wgracz::%player%} is larger than 119:
                set {wgracz::%player%} to 0
                send "&aPomyslnie wyplacono!"
                give 16 sunflower of unbreaking 10 named "&a&l+ &e&lMoneta &a&l+" to the player
            else:
                send "&aNie posiadasz &c120/120 Minut! [&e%{wgracz::%player%}%/120] &2(Nalezy byc zalogowanym by sie zaliczylo!)"
        if arg 1 is "yt":
            player has permission "wyplata.yt":
                if {wyt::%player%} is larger than 119:
                    send "&aPomyslnie wyplacono!"
                    set {wyt::%player%} to 0
                    give 32 sunflower of unbreaking 10 named "&a&l+ &e&lMoneta &a&l+" to the player
                else:
                    send "&aNie posiadasz &c120/120 Minut! [&e%{wyt::%player%}%/120] &2(Nalezy byc zalogowanym by sie zaliczylo!)"
            else:
                send "&4Nie masz dostepu do tej wyplaty!"
        if arg 1 is "Evip":
            player has permission "wyplata.evip":
                if {wvip::%player%} is larger than 119:
                    send "&aPomyslnie wyplacono!"
                    set {wvip::%player%} to 0
                    give 64 sunflower of unbreaking 10 named "&a&l+ &e&lMoneta &a&l+" to the player
                else:
                    send "&aNie posiadasz &c120/120 Minut! [&e%{wvip::%player%}%/120] &2(Nalezy byc zalogowanym by sie zaliczylo!)"
            else:
                send "&4Nie masz dostepu do tej wyplaty!"
        if arg 1 is "Sponsor":
            player has permission "wyplata.sponsor":
                if {wsvip::%player%} is larger than 119:
                    send "&aPomyslnie wyplacono!"
                    set {wsvip::%player%} to 0
                    give 128 sunflower of unbreaking 10 named "&a&l+ &e&lMoneta &a&l+" to the player
                else:
                    send "&aNie posiadasz &c120/120 Minut! [&e%{wsvip::%player%}%/120] &2(Nalezy byc zalogowanym by sie zaliczylo!)"
            else:
                send "&4Nie masz dostepu do tej wyplaty!"
variables:
        {wgracz::%player%} = 120
        {wyt::%player%} = 120
        {wvip::%player%} = 120
        {wsvip::%player%} = 120
        {lel::%player%} = 5
on join:
    wait 0.1 seconds
    execute console command "/hwyp %player%"
command /hwyp [<player>]:
    trigger:
        add 3 to {wgracz::%player-arg%}
        if {wgracz::%player-arg%} is larger than 120:
            set {wgracz::%player-arg%} to 120
        add 3 to {wyt::%player-arg%}
        if {wyt::%player-arg%} is larger than 120:
            set {wyt::%player-arg%} to 120
        add 3 to {wvip::%player-arg%}
        if {wvip::%player-arg%} is larger than 120:
            set {wvip::%player-arg%} to 120
        add 3 to {wsvip::%player-arg%}
        if {wsvip::%player-arg%} is larger than 120:
            set {wsvip::%player-arg%} to 120
        add 30 to {lel::%player-arg%}
        if {lel::%player-arg%} is larger than 4:
            set {lel::%player-arg%} to 0
            if {wgracz::%player-arg%} is 120:
                send "&aWyplata &cgracza&a jest dostepna! &3/Wyplata GRACZ"
            if {wyt::%player-arg%} is 120:
                player-arg has permission "ranga.yt":
                    send "&aWyplata &cyoutubera&a jest dostepna! &3/Wyplata YT"
            if {wvip::%player-arg%} is 120:
                player-arg has permission "ranga.vip":
                    send "&aWyplata &cEvipa&a jest dostepna! &3/Wyplata Evip"
            if {wsvip::%player-arg%} is 120:
                player-arg has permission "ranga.svip":
                    send "&aWyplata &cSponsora&a jest dostepna! &3/Wyplata Sponsor"
        wait 3 minute
        execute player-arg command "/hwyp %player-arg%"

 

 

Edytowane przez Vylence
Odnośnik do komentarza
https://skript.pl/temat/24223-pomoc-przy-skrypcie/#findComment-162767
Udostępnij na innych stronach

  • 0
5 godzin temu, keebe napisał:
  Ukryj zawartość


command /wyplata [<text>] [<text>]:
    trigger:
        if arg 1 is not set:
            send "&3Lista wyplat:"
            send "&e- /Wyplata gracz &3(%{wgracz::%player%}%/120) &a- 16 monet"
            send "&e- /Wyplata yt &3(%{wyt::%player%}%/120) &a- 32 monety"
            send "&e- /Wyplata Evip &3(%{wvip::%player%}%/120) &a- 64 monety"
            send "&e- /Wyplata Sponsora &3(%{wsvip::%player%}%/120) &a- 128 monet"
        if arg 1 is "gracz":
            if {wgracz::%player%} is larger than 119:
                set {wgracz::%player%} to 0
                send "&aPomyslnie wyplacono!"
                give 16 sunflower of unbreaking 10 named "&a&l+ &e&lMoneta &a&l+" to the player
            else:
                send "&aNie posiadasz &c120/120 Minut! [&e%{wgracz::%player%}%/120] &2(Nalezy byc zalogowanym by sie zaliczylo!)"
        if arg 1 is "yt":
            player has permission "wyplata.yt":
                if {wyt::%player%} is larger than 119:
                    send "&aPomyslnie wyplacono!"
                    set {wyt::%player%} to 0
                    give 32 sunflower of unbreaking 10 named "&a&l+ &e&lMoneta &a&l+" to the player
                else:
                    send "&aNie posiadasz &c120/120 Minut! [&e%{wyt::%player%}%/120] &2(Nalezy byc zalogowanym by sie zaliczylo!)"
            else:
                send "&4Nie masz dostepu do tej wyplaty!"
        if arg 1 is "Evip":
            player has permission "wyplata.evip":
                if {wvip::%player%} is larger than 119:
                    send "&aPomyslnie wyplacono!"
                    set {wvip::%player%} to 0
                    give 64 sunflower of unbreaking 10 named "&a&l+ &e&lMoneta &a&l+" to the player
                else:
                    send "&aNie posiadasz &c120/120 Minut! [&e%{wvip::%player%}%/120] &2(Nalezy byc zalogowanym by sie zaliczylo!)"
            else:
                send "&4Nie masz dostepu do tej wyplaty!"
        if arg 1 is "Sponsor":
            player has permission "wyplata.sponsor":
                if {wsvip::%player%} is larger than 119:
                    send "&aPomyslnie wyplacono!"
                    set {wsvip::%player%} to 0
                    give 128 sunflower of unbreaking 10 named "&a&l+ &e&lMoneta &a&l+" to the player
                else:
                    send "&aNie posiadasz &c120/120 Minut! [&e%{wsvip::%player%}%/120] &2(Nalezy byc zalogowanym by sie zaliczylo!)"
            else:
                send "&4Nie masz dostepu do tej wyplaty!"
variables:
        {wgracz::%player%} = 120
        {wyt::%player%} = 120
        {wvip::%player%} = 120
        {wsvip::%player%} = 120
        {lel::%player%} = 5
on join:
    wait 0.1 seconds
    execute console command "/hwyp %player%"
command /hwyp [<player>]:
    trigger:
        add 3 to {wgracz::%player-arg%}
        if {wgracz::%player-arg%} is larger than 120:
            set {wgracz::%player-arg%} to 120
        add 3 to {wyt::%player-arg%}
        if {wyt::%player-arg%} is larger than 120:
            set {wyt::%player-arg%} to 120
        add 3 to {wvip::%player-arg%}
        if {wvip::%player-arg%} is larger than 120:
            set {wvip::%player-arg%} to 120
        add 3 to {wsvip::%player-arg%}
        if {wsvip::%player-arg%} is larger than 120:
            set {wsvip::%player-arg%} to 120
        add 30 to {lel::%player-arg%}
        if {lel::%player-arg%} is larger than 4:
            set {lel::%player-arg%} to 0
            if {wgracz::%player-arg%} is 120:
                send "&aWyplata &cgracza&a jest dostepna! &3/Wyplata GRACZ"
            if {wyt::%player-arg%} is 120:
                player-arg has permission "ranga.yt":
                    send "&aWyplata &cyoutubera&a jest dostepna! &3/Wyplata YT"
            if {wvip::%player-arg%} is 120:
                player-arg has permission "ranga.vip":
                    send "&aWyplata &cEvipa&a jest dostepna! &3/Wyplata Evip"
            if {wsvip::%player-arg%} is 120:
                player-arg has permission "ranga.svip":
                    send "&aWyplata &cSponsora&a jest dostepna! &3/Wyplata Sponsor"
        wait 3 minute
        execute player-arg command "/hwyp %player-arg%"

 

Przetestuje jutro :>

 

Odnośnik do komentarza
https://skript.pl/temat/24223-pomoc-przy-skrypcie/#findComment-162860
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ę...