Skocz do zawartości

KB-Efekty (Efekty na serwerze)


Rekomendowane odpowiedzi

Robiłem to na mój serwer EZZHC

Nie wiem czy jest dokładnie dobrze robiłem to kilka miesięcy temu i nie patrzyłem czy wszystko jest dobrze :) 

Spoiler

command /efekty:
    trigger:
        open chest with 4 rows named "&a&lEFEKTY" to player
        wait 2 ticks
        format slot 0 of player with 160:0 named "" to close
        format slot 1 of player with 160:0 named "" to close
        format slot 2 of player with 160:0 named "" to close
        format slot 3 of player with 160:0 named "" to close
        format slot 4 of player with 160:0 named "" to close
        format slot 5 of player with 160:0 named "" to close
        format slot 6 of player with 160:0 named "" to close
        format slot 7 of player with 160:0 named "" to close
        format slot 8 of player with 160:0 named "" to close
        format slot 9 of player with 160:0 named "" to close
        format slot 10 of player with 160:0 named "" to close
        format slot 13 of player with 160:0 named "" to close
        format slot 16 of player with 160:0 named "" to close
        format slot 17 of player with 160:0 named "" to close
        format slot 18 of player with 160:0 named "" to close
        format slot 19 of player with 160:0 named "" to close
        format slot 20 of player with 160:0 named "" to close
        format slot 24 of player with 160:0 named "" to close
        format slot 25 of player with 160:0 named "" to close
        format slot 26 of player with 160:0 named "" to close
        format slot 27 of player with 160:0 named "" to close
        format slot 28 of player with 160:0 named "" to close
        format slot 29 of player with 160:0 named "" to close
        format slot 30 of player with 160:0 named "" to close
        format slot 31 of player with 160:0 named "" to close
        format slot 32 of player with 160:0 named "" to close
        format slot 33 of player with 160:0 named "" to close
        format slot 34 of player with 160:0 named "" to close
        format slot 35 of player with 160:0 named "" to close
        format slot 11 of player with 373:8258 named "&eEfekt: &aSEED 1" with lore "&eKoszt: &a32 Emeraldow||&eCzas: &a3 MIN||||&a» &eKliknij aby zakupic &aEfekt!" to close then run [execute player command "/ezzhc:speed %player%"]
        format slot 12 of player with 373:8258 named "&eEfekt: &aSPEED 1" with lore "&eKoszt: &a64 Emeraldow||&eCzas: &a8 MIN||||&a» &eKliknij aby zakupic &aEfekt!" to close then run [execute player command "/ezzhc:speed1 %player%"]
        format slot 14 of player with 373:8201 named "&eEfekt: &aSTRENGHT 1" with lore "&eKoszt: &a32 Emeraldow||&eCzas: &a3 MIN||||&a» &eKliknij aby zakupic &aEfekt!" to close then run [execute player command "/ezzhc:sila %player%"]
        format slot 15 of player with 373:8201 named "&eEfekt: &aSTRENGHT 1" with lore "&eKoszt: &a128 Emeraldow||&eCzas: &a8 MIN||||&a» &eKliknij aby zakupic &aEfekt!" to close then run [execute player command "/ezzhc:sila1 %player%"]
        format slot 21 of player with 138 named "&eEfekt: &aHASTE I" with lore "&eKoszt &a16 Blokow Zlota||&eCzas: &a10 MIN||||&a» &eKliknij aby zakupic &aEfekt!" to close then run [execute player command "/ezzhc:haste %player%"]
        format slot 22 of player with 138 named "&eEfekt: &aHASTE I" with lore "&eKoszt &a32 Blokow Zlota||&eCzas: &a15 MIN||||&a» &eKliknij aby zakupic &aEfekt!" to close then run [execute player command "/ezzhc:haste1 %player%"]
        format slot 23 of player with 138 named "&eEfekt: &aHASTE II" with lore "&eKoszt &a64 Blokow Zlota||&eCzas: &a5 MIN||||&a» &eKliknij aby zakupic &aEfekt!" to close then run [execute player command "/ezzhc:haste2 %player%"]
        stop
command /ezzhc:sila [<player>]:
    trigger:
        if player-arg has 32 Emerald:
            remove 32 Emerald from player-arg
            remove Strength from player-arg
            wait 10 ticks 
            apply Strength to the player-arg for 180 seconds
            broadcast "&eGracz &a%arg 1% &ezakupil efekt &aSTRENGHT &ena &a3 &em."
        elsE:
            send "&4Blad: &cNie masz 32 Emeraldow!" to player-arg
            stop
command /ezzhc:sila1 [<player>]:
    trigger:
        if player-arg has 128 Emerald:
            remove 128 Emerald from player-arg
            remove Strength from player-arg
            wait 10 ticks
            apply Strength to the player-arg for 480 seconds
            broadcast "&eGracz &a%arg 1% &ezakupil efekt &aSTRENGHT &ena &a8 &em."
        elsE:
            send "&4Blad: &cNie masz 128 Emeraldow!" to player-arg
            stop
command /ezzhc:speed [<player>]:
    trigger:
        if player-arg has 32 Emerald:
            remove 32 Emerald from player-arg
            remove Speed from player-arg
            wait 10 ticks
            apply Speed to the player-arg for 180 seconds
            broadcast "&eGracz &a%arg 1% &ezakupil efekt &aSPEED &ena &a3 &em."
        elsE:
            send "&4Blad: &cNie masz 32 Emeraldow!" to player-arg
            stop
command /ezzhc:speed1 [<player>]:
    trigger:
        if player-arg has 64 Emerald:
            remove 64 Emerald from player-arg
            remove Speed from player-arg
            wait 10 ticks
            apply Speed to the player-arg for 480 seconds
            broadcast "&eGracz &a%arg 1% &ezakupil efekt &aSPEED &ena &a8 &em."
        elsE:
            send "&4Blad: &cNie masz 64 Emeraldow!" to player-arg
            stop
command /ezzhc:haste2 [<player>]:
    trigger:
        if player-arg has 64 GOLD BLOCK:
            remove 64 GOLD BLOCK from player-arg
            remove FAST DIGGING 2 from player-arg
            remove FAST DIGGING from player-arg
            wait 10 ticks
            apply FAST DIGGING 2 to the player-arg for 300 seconds
            broadcast "&eGracz &a%arg 1% &ezakupil efekt &aHASTE 2 &ena &a5 &em."
        elsE:
            send "&4Blad: &cNie masz 64 Blokow zlota!" to player-arg
            stop
command /ezzhc:haste1 [<player>]:
    trigger:
        if player-arg has 32 GOLD BLOCK:
            remove 32 GOLD BLOCK from player-arg
            remove FAST DIGGING from player-arg
            wait 10 ticks
            apply FAST DIGGING to the player-arg for 900 seconds
            broadcast "&eGracz &a%arg 1% &ezakupil efekt &aHASTE &ena &a15 &em."
        elsE:
            send "&4Blad: &cNie masz 32 Blokow zlota!" to player-arg
            stop
command /ezzhc:haste [<player>]:
    trigger:
        if player-arg has 16 GOLD BLOCK:
            remove 16 GOLD BLOCK from player-arg
            remove FAST DIGGING from player-arg
            wait 10 ticks
            apply FAST DIGGING to the player-arg for 600 seconds
            broadcast "&eGracz &a%arg 1% &ezakupil efekt &aHASTE &ena &a10 &em."
        elsE:
            send "&4Blad: &cNie masz 16 Blokow zlota!" to player-arg
            stop

 

DL:  https://code.skript.pl/IAT2DQE4/

//Kod tak długi, że musiałem go upchnąć do spoilera ~ :derpy: 

Edytowane przez Derpy Hooves
Odnośnik do komentarza
https://skript.pl/temat/15582-kb-efekty-efekty-na-serwerze/
Udostępnij na innych stronach

17 minut temu, rudyxd napisał:

przydalaby sie optymalizacja, ale dla easyhc, gdzie gra okolo 20 osob skrypt nie bedzie lagowal

A co tu jest do optymalizacji? Nie ma eventów lagujących jak "on any move" czy "on every x". Owszem kod da się skrócić, lecz nie jest to zbytnio potrzebne.

Odnośnik do komentarza
https://skript.pl/temat/15582-kb-efekty-efekty-na-serwerze/#findComment-106920
Udostępnij na innych stronach

Teraz, KrejzolekPRO napisał:

A co tu jest do optymalizacji? Nie ma eventów lagujących jak "on any move" czy "on every x". Owszem kod da się skrócić, lecz nie jest to zbytnio potrzebne.

jezeli masz dlugi kod to moze dluzej skrypt ladowac i rozne rzeczy wykonywac z opoznieniem, nie bede juz sie rozpisywal, poniewaz twoje ostatnie zdanie wszystko tlumaczy.

Odnośnik do komentarza
https://skript.pl/temat/15582-kb-efekty-efekty-na-serwerze/#findComment-106923
Udostępnij na innych stronach

  • 1 miesiąc temu...

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Nieaktywny
Dodaj odpowiedź do tematu...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

  • Ostatnio przeglądający   0 użytkowników

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