Skocz do zawartości
  • 0

Sklep GUI problem


maCotsu

Pytanie

Witam, napotkałem problem podczas pisania skryptu otóż gdy kliknę na item w sklepie to powinno mi  go dodać do eq. Niestety tak się nie dzieję :c

 

Oto kawałki kodu:

format slot 2 of player with 1 diamond to be unstealableformat slot 3 of player with 1 leather helmet named "&5&lKaptur Nowicjusza" to close then run "/kupkapno"format slot 6 of player with 1 diamond to be unstealable
 
command /kupkapno:[]trigger:[][]if {gold.%player%} is greater than {@cena_kaptura_nowicjusza}:[][][]give 1 leather helmet named "&5&lKaptur Nowicjusza" to the player[][][]stop

 

Odnośnik do komentarza
https://skript.pl/temat/7825-sklep-gui-problem/
Udostępnij na innych stronach

8 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

bo taka komenda jest wykonywana przez konsolę.

Możesz wykorzystać lambdę, aby było to wykorzystane przez gracza, czyli:

format stlot.... to close then run [execute player command "kupkapno"]
Odnośnik do komentarza
https://skript.pl/temat/7825-sklep-gui-problem/#findComment-61948
Udostępnij na innych stronach

  • 0
command /kupkapno:trigger:if {gold.%player%} is greater than {@cena_kaptura_nowicjusza}:give 1 leather helmet named "&5&lKaptur Nowicjusza" to the playerstopcommand /kupszano:trigger:if {gold.%player%} is greater than {@cena_szaty_nowicjusza}:give 1 leather tunic named "&5&lSzata Nowicjusza" to the playerstopcommand /kupspno:trigger:if {gold.%player%} is greater than {@cena_spodni_nowicjusza}:give 1 leather pants named "&5&lSpodnie Nowicjusza" to the playerstopcommand /kupbuno:trigger:if {gold.%player%} is greater than {@cena_butow_nowicjusza}:give 1 leather boots named "&5&lButy Nowicjusza" to the playerstop command /sklep [<text&gt]:trigger:if arg 1 is "maga":open chest with 4 rows named "&6&lSklep Maga" to the playerwait 2 tick format slot 2 of player with 1 diamond to be unstealableformat slot 3 of player with 1 leather helmet named "&5&lKaptur Nowicjusza" to close then run [execute player command "kupkapno"]format slot 6 of player with 1 diamond to be unstealable format slot 11 of player with 1 diamond to be unstealableformat slot 12 of player with 1 leather tunic named "&5&lSzata Nowicjusza" to close then run [execute player command "kupszano"]format slot 15 of player with 1 diamond to be unstealable format slot 20 of player with 1 diamond to be unstealableformat slot 21 of player with 1 leather pants named "&5&lSpodnie Nowicjusza" to close then run [execute player command "kupspno"]format slot 24 of player with 1 diamond to be unstealable format slot 29 of player with 1 diamond to be unstealableformat slot 30 of player with 1 leather boots named "&5&lButy Nowicjusza" to close then run [execute player command "kupbuno"]format slot 33 of player with 1 diamond to be unstealable 
Edytowane przez maCotsu
Odnośnik do komentarza
https://skript.pl/temat/7825-sklep-gui-problem/#findComment-61954
Udostępnij na innych stronach

  • 0

Lepszym rozwiązaniem będzie coś takiego (jednak pobierz sobie najlepiej WildSkript i SkQuery dla pewności żeby działało), przez taką metodę nie trzeba robić żadnych zbędnych komend.

command /sklep [<text&gt]:    trigger:        if arg 1 is "maga":            open chest with 4 rows named "&6&lSklep Maga" to the player            wait 2 tick            format slot 2 of player with 1 diamond to be unstealable            format slot 3 of player with 1 leather helmet named "&5&lKaptur Nowicjusza" to close then run [function "kupkapno" {player}]            format slot 6 of player with 1 diamond to be unstealable            format slot 11 of player with 1 diamond to be unstealable            format slot 12 of player with 1 leather tunic named "&5&lSzata Nowicjusza" to close then run [function "kupszano" {player}]            format slot 15 of player with 1 diamond to be unstealable            format slot 20 of player with 1 diamond to be unstealable            format slot 21 of player with 1 leather pants named "&5&lSpodnie Nowicjusza" to close then run [function "kupspno" {player}]            format slot 24 of player with 1 diamond to be unstealable            format slot 29 of player with 1 diamond to be unstealable            format slot 30 of player with 1 leather boots named "&5&lButy Nowicjusza" to close then run [function "kupbuno" {player}]            format slot 33 of player with 1 diamond to be unstealablemethod "kupkapno" {gracz}:    set {_player} to arg{1};    if {gold.%{_player}%} is greater than or equal to {@cena_kaptura_nowicjusza}:        give 1 leather helmet named "&5&lKaptur Nowicjusza" to the {_player}        stopmethod "kupszano" {gracz}:    set {_player} to arg{1};    if {gold.%{_player}%} is greater than or equal to {@cena_szaty_nowicjusza}:        give 1 leather tunic named "&5&lSzata Nowicjusza" to the {_player}        stopmethod "kupspno" {gracz}:    set {_player} to arg{1};    if {gold.%{_player}%} is greater than or equal to {@cena_spodni_nowicjusza}:        give 1 leather pants named "&5&lSpodnie Nowicjusza" to the {_player}        stopmethod "kupbuno" {gracz}:    set {_player} to arg{1};    if {gold.%{_player}%} is greater than or equal to {@cena_butow_nowicjusza}:        give 1 leather boots named "&5&lButy Nowicjusza" to the {_player}        stop
Odnośnik do komentarza
https://skript.pl/temat/7825-sklep-gui-problem/#findComment-64522
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ę...