Skocz do zawartości
  • 0

Problem z GUI


Crido

Pytanie

Cześć,

Mam GUI (kod podam na samym dole) i chodzi mi o to że jak się kliknie na item (koxy) wyświetli się wiadomość na czacie i wyśle komende (na dole strony) wie ktoś jak to zrobić? 


 

command /v [<text>]:
    trigger:
        if player has permission "vip":
            open chest with 3 rows named "&6 Itemy na gildie" to player
            set {_i} to 0
            loop 10 times:
                format slot {_i} of player with gray glass pane named " " to be unstealable 
                add 1 to {_i}
            set {_i} to 17
            loop 10 times:
                format slot {_i} of player with gray glass pane named " " to be unstealable 
                add 1 to {_i}
            #10-16
            format slot 10 of player with bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716" to be unstealable
            format slot 11 of player with bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716" to be unstealable
            format slot 12 of player with enchanted golden apple named "&7KOXY" with lore "Potrzebujesz: &716":
            format slot 13 of player with enchanted golden apple named "&7KOXY" with lore "Potrzebujesz: &716" to be unstealable
            format slot 14 of player with enchanted golden apple named "&7KOXY" with lore "Potrzebujesz: &716" to be unstealable
            format slot 15 of player with bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716" to be unstealable
            format slot 16 of player with bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716" to be unstealable

I chcę by wysłało np send 

send "tekst"

i żeby poszła dalsza komenda

 

    aliases: vanish 
    trigger:
        if {v::%player%} is not set: 
            set {v::%player%} to true
            send "&8» Aktywowano vanisha!"
            loop all players: 
                if loop-player don't have permission "crido.vanishshow":
                    add loop-player to {_g::*}
            hide player from {_g::*}
            stop
        if {v::%player%} is set:
            clear {v::%player%}
            send "&8» Zdezaktywowano vanisha"
            reveal player to all players
            stop

on pickup:
    if {v::%player%} is set:
        cancel event

on damage:
    if {v::%attacker%} is set:
        cancel event
        send "&8» Hej hej hej ! jestes na vanishu wylacz go jak chcesz kogos atakowac !" 

on quit:
    if {v::%player%} is set:
        clear {v::%player%}
Edytowane przez Crido
Odnośnik do komentarza
https://skript.pl/temat/32321-problem-z-gui/
Udostępnij na innych stronach

6 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
16 minut temu, Medyk324 napisał:

on inventory click:
    if inventory name of player's current inventory is "&6 Itemy na gildie"
		if "%slot%" is "13":
			send "elo" to player
			execute player command "/vanish" as op
			

 

słabo to działa 

Odnośnik do komentarza
https://skript.pl/temat/32321-problem-z-gui/#findComment-210079
Udostępnij na innych stronach

  • 0
command /v [<text>]:
    trigger:
        if player has permission "vip":
            open chest with 3 rows named "&6 Itemy na gildie" to player
            loop 3*9 times:
  				set player's current inventory's slot ((loop-number)-1) to gray glass pane named " "
            set player's current inventory's slot 10 to bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 11 to named "&7Biblioteczki" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 12 to enchanted golden apple named "&7KOXY" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 13 to enchanted golden apple named "&7KOXY" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 14 to enchanted golden apple named "&7KOXY" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 15 to bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 16 to bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716"
on inventory click:
  	if inventory name of player's current inventory is "&6 Itemy na gildie":
  		cancel event #Dzieki CANCEL EVENT nie mozna wyjac itemow.
  		if clicked slot is (nr slota):
  			send "&cHej!" to player
  			execute player command "komenda"

Proszę.

Odnośnik do komentarza
https://skript.pl/temat/32321-problem-z-gui/#findComment-210100
Udostępnij na innych stronach

  • 0

@Grex Dzięki, nie działa 

 

Ale naprawiłem oto kod :

 

command /vv [<text>]:
    trigger:
        if player has permission "vip":
            open chest with 3 rows named "&6 Itemy na gildie" to player
            loop 9 times:
            set player's current inventory's slot 10 to bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 11 to bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 12 to enchanted golden apple named "&7KOXY" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 13 to enchanted golden apple named "&7KOXY" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 14 to enchanted golden apple named "&7KOXY" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 15 to bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 16 to bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716"
on inventory click:
	if inventory name of player's current inventory is "&6 Itemy na gildie":
		cancel event #Dzieki CANCEL EVENT nie mozna wyjac itemow.
		if clicked slot is 13:
		send "&cHej!" to player
		execute player command "time set day"
		stop

 

Edytowane przez Crido
Odnośnik do komentarza
https://skript.pl/temat/32321-problem-z-gui/#findComment-210124
Udostępnij na innych stronach

  • 0
19 godzin temu, Crido napisał:

@Grex Dzięki, nie działa 

 

Ale naprawiłem oto kod :

 


command /vv [<text>]:
    trigger:
        if player has permission "vip":
            open chest with 3 rows named "&6 Itemy na gildie" to player
            loop 9 times:
            set player's current inventory's slot 10 to bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 11 to bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 12 to enchanted golden apple named "&7KOXY" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 13 to enchanted golden apple named "&7KOXY" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 14 to enchanted golden apple named "&7KOXY" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 15 to bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716"
            set player's current inventory's slot 16 to bookshelf named "&7Biblioteczki" with lore "Potrzebujesz: &716"
on inventory click:
	if inventory name of player's current inventory is "&6 Itemy na gildie":
		cancel event #Dzieki CANCEL EVENT nie mozna wyjac itemow.
		if clicked slot is 13:
		send "&cHej!" to player
		execute player command "time set day"
		stop

 

Ale co nie działa? i po co ci to 'loop 9 times' ??

Ja użyłem tego, by wypełnić wszystkie puste sloty powietrzem...

loop 3*9 times:
  		set player's current inventory's slot ((loop-number)-1) to gray glass pane named " "

 

Odnośnik do komentarza
https://skript.pl/temat/32321-problem-z-gui/#findComment-210161
Udostępnij na innych stronach

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
Odpowiedz na pytanie...

×   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ę...