zrobiłem skrypt, polegający na tym że jak osoba kliknie w npc, pojawia jej się gui z główkami. Wybiera którą chcę, i wykonuje się komenda /skin <nazwa skina>. Dodatkowo chciałem że jak ktoś ma nick Tomaszek123 to będzie napis "SKin chłopaka"... Oto kod:
on load:
clear {skin::*}
add "Tidzimi" to {skin::*}
add "Roxmb" to {skin::*}
add "Dream" to {skin::*}
add "022Stefania" to {skin::*}
add "dreamstar22" to {skin::*}
add "DaDragonBro" to {skin::*}
add "Doknes" to {skin::*}
add "Herobrine" to {skin::*}
add "standdouble1" to {skin::*}
add "_YouTube_" to {skin::*}
add "GoldCop" to {skin::*}
add "Santa" to {skin::*}
add "Nexe333" to {skin::*}
add "Aquarius_ScN" to {skin::*}
add "Pikachu" to {skin::*}
add "waflooowy" to {skin::*}
add "TobiaszGaming" to {skin::*}
on right click on player:
name of clicked player is "&aWybierz skina"
set {_gui} to chest with 3 rows named "&aWybierz skina:"
set slot 0 of {_gui} to skull of "Tidzimi" parsed as offline player named "&aSkin: &2Tidzimi"
set slot 1 of {_gui} to skull of "Roxmb" parsed as offline player named "&aSkin: &2RoxMb"
set slot 2 of {_gui} to skull of "Dream" parsed as offline player named "&aSkin: &2Dream"
set slot 3 of {_gui} to skull of "022Stefania" parsed as offline player named "&aSkin: &dDziewczyny"
set slot 4 of {_gui} to skull of "dreamstar22" parsed as offline player named "&aSkin: &eKanapki"
set slot 5 of {_gui} to skull of "DaDragonBro" parsed as offline player named "&aSkin: &bKaczora Donalda"
set slot 6 of {_gui} to skull of "Doknes" parsed as offline player named "&aSkin: &1Doknes"
set slot 7 of {_gui} to skull of "Herobrine" parsed as offline player named "&aSkin: &fHerobrine"
set slot 9 of {_gui} to skull of "standdouble1" parsed as offline player named "&aSkin: &6Chłopaka"
set slot 10 of {_gui} to skull of "_YouTube_" parsed as offline player named "&aSkin: &cYouTube"
set slot 11 of {_gui} to skull of "GoldCop" parsed as offline player named "&aSkin: &6Król"
set slot 12 of {_gui} to skull of "Santa" parsed as offline player named "&aSkin: &4Mikołaja"
set slot 13 of {_gui} to skull of "Nexe333" parsed as offline player named "&aSkin: &9Nexe"
set slot 14 of {_gui} to skull of "Aquarius_ScN" parsed as offline player named "&aSkin: &6&lNorbiros"
set slot 15 of {_gui} to skull of "Pikachu" parsed as offline player named "&aSkin: &ePikachu"
set slot 16 of {_gui} to skull of "waflooowy" parsed as offline player named "&aSkin: &6&lwafloowy"
set slot 18 of {_gui} to skull of "TobiaszGaming" parsed as offline player named "&aSkin: &8TobiaszGaming"
set slot 8 of {_gui} to structure block named "&8Wyczyść &7Skina"
set slot 17 of {_gui} to barrier named "&c&lZamknij menu"
set slot 26 of {_gui} to command block named "&8Odśwież &7Skin" with lore "&5Tylko dla kont premium!"
open {_gui} to player
on inventory click:
event-inventory is not player's inventory
if name of event-inventory is "&aWybierz skina:":
cancel event
if clicked slot is 8:
execute player command "skin clear"
close player's inventory
stop
if clicked slot is 17:
close player's inventory
stop
if clicked slot is 26:
execute player command "skin update"
close player's inventory
stop
if type of clicked slot is air:
stop
set {_item} to clicked slot
set {_item} to "%{_item} + 1%" parsed as number
if {_item} is more than 8:
remove 1 from {_item}
if {_item} is more than 17:
remove 1 from {_item}
set {_item} to "%{skin::%{_item}%}%"
execute player command "skin set %{_item}%"
close player's inventory
I teraz jest problem. Gdy klikne 1 raz po wbiciu. Przez około 10 sekund, zatrzymuje serwer, tps spada to 17, nie otwiera. Potem otwiera się ekwipunek. A potem już wszystko normalnie działa do otwierania. I czemu tylko za 1 razem laguje? Jest ktoś wstanie mi wytłumaczyć? I powiedzieć jak naprawić?
A i wiem że kod brzydko napisany, ale pisałem na szybko, i nie miałem czasu
Pytanie
Norbiros 20
Witam,
zrobiłem skrypt, polegający na tym że jak osoba kliknie w npc, pojawia jej się gui z główkami. Wybiera którą chcę, i wykonuje się komenda /skin <nazwa skina>. Dodatkowo chciałem że jak ktoś ma nick Tomaszek123 to będzie napis "SKin chłopaka"... Oto kod:
on load: clear {skin::*} add "Tidzimi" to {skin::*} add "Roxmb" to {skin::*} add "Dream" to {skin::*} add "022Stefania" to {skin::*} add "dreamstar22" to {skin::*} add "DaDragonBro" to {skin::*} add "Doknes" to {skin::*} add "Herobrine" to {skin::*} add "standdouble1" to {skin::*} add "_YouTube_" to {skin::*} add "GoldCop" to {skin::*} add "Santa" to {skin::*} add "Nexe333" to {skin::*} add "Aquarius_ScN" to {skin::*} add "Pikachu" to {skin::*} add "waflooowy" to {skin::*} add "TobiaszGaming" to {skin::*} on right click on player: name of clicked player is "&aWybierz skina" set {_gui} to chest with 3 rows named "&aWybierz skina:" set slot 0 of {_gui} to skull of "Tidzimi" parsed as offline player named "&aSkin: &2Tidzimi" set slot 1 of {_gui} to skull of "Roxmb" parsed as offline player named "&aSkin: &2RoxMb" set slot 2 of {_gui} to skull of "Dream" parsed as offline player named "&aSkin: &2Dream" set slot 3 of {_gui} to skull of "022Stefania" parsed as offline player named "&aSkin: &dDziewczyny" set slot 4 of {_gui} to skull of "dreamstar22" parsed as offline player named "&aSkin: &eKanapki" set slot 5 of {_gui} to skull of "DaDragonBro" parsed as offline player named "&aSkin: &bKaczora Donalda" set slot 6 of {_gui} to skull of "Doknes" parsed as offline player named "&aSkin: &1Doknes" set slot 7 of {_gui} to skull of "Herobrine" parsed as offline player named "&aSkin: &fHerobrine" set slot 9 of {_gui} to skull of "standdouble1" parsed as offline player named "&aSkin: &6Chłopaka" set slot 10 of {_gui} to skull of "_YouTube_" parsed as offline player named "&aSkin: &cYouTube" set slot 11 of {_gui} to skull of "GoldCop" parsed as offline player named "&aSkin: &6Król" set slot 12 of {_gui} to skull of "Santa" parsed as offline player named "&aSkin: &4Mikołaja" set slot 13 of {_gui} to skull of "Nexe333" parsed as offline player named "&aSkin: &9Nexe" set slot 14 of {_gui} to skull of "Aquarius_ScN" parsed as offline player named "&aSkin: &6&lNorbiros" set slot 15 of {_gui} to skull of "Pikachu" parsed as offline player named "&aSkin: &ePikachu" set slot 16 of {_gui} to skull of "waflooowy" parsed as offline player named "&aSkin: &6&lwafloowy" set slot 18 of {_gui} to skull of "TobiaszGaming" parsed as offline player named "&aSkin: &8TobiaszGaming" set slot 8 of {_gui} to structure block named "&8Wyczyść &7Skina" set slot 17 of {_gui} to barrier named "&c&lZamknij menu" set slot 26 of {_gui} to command block named "&8Odśwież &7Skin" with lore "&5Tylko dla kont premium!" open {_gui} to player on inventory click: event-inventory is not player's inventory if name of event-inventory is "&aWybierz skina:": cancel event if clicked slot is 8: execute player command "skin clear" close player's inventory stop if clicked slot is 17: close player's inventory stop if clicked slot is 26: execute player command "skin update" close player's inventory stop if type of clicked slot is air: stop set {_item} to clicked slot set {_item} to "%{_item} + 1%" parsed as number if {_item} is more than 8: remove 1 from {_item} if {_item} is more than 17: remove 1 from {_item} set {_item} to "%{skin::%{_item}%}%" execute player command "skin set %{_item}%" close player's inventoryI teraz jest problem. Gdy klikne 1 raz po wbiciu. Przez około 10 sekund, zatrzymuje serwer, tps spada to 17, nie otwiera. Potem otwiera się ekwipunek. A potem już wszystko normalnie działa do otwierania. I czemu tylko za 1 razem laguje? Jest ktoś wstanie mi wytłumaczyć? I powiedzieć jak naprawić?
A i wiem że kod brzydko napisany, ale pisałem na szybko, i nie miałem czasu
Odnośnik do komentarza
https://skript.pl/temat/49005-skrypt-na-skiny/Udostępnij na innych stronach
5 odpowiedzi na to pytanie
Rekomendowane odpowiedzi
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ą.