Skocz do zawartości
  • 0

Jak zrobić zmienną - tekst


DeLajt

Pytanie

Witam robie eq w gui i potrzebuje aby komendą zmienić część tekstu np pisze : Event i tutaj ( ON lub OFF )

Chce aby po wpisaniu np:

 

/event on tekst w gui zmieniał się na Event on

/event off tekst w gui zmieniał się na Event off

 

Próbowałem option i variables i nie wiem czemu nie działą ;/ 

 

Tu mam kod z gui 

 


		format slot 18 of player with light gray dye named "&bEvent Parkour" with lore "&8&l> &7 Event: {@parkour}"  to close then run [make player execute "/warp parkour"]

Za {@parkour} ma  być on lub off

Odnośnik do komentarza
Udostępnij na innych stronach

13 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
command /event [<text>]:
	trigger:
		if arg 1 is "on":
			set {parkour} to "on"
			send "&aWlaczyles parkour!"
		if arg 1 is "off":
			set {parkour} to "off"
			send "&cWylaczyles parkour!"

command /jakiescmd:
	trigger:
		open chest with 3 rows named "Eventy" to player
		wait 3 ticks
		format slot 18 of player with light gray dye named "&bEvent Parkour" with lore "&8&l> &7 Event: %{parkour}%"  to close then run "/jakiescmd2"

Prosze :D

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Mi wyświetla :D

Po wpisaniu /event on/off wlacza/wylacza event.

Potem, po wpisaniu komendy /jakiescmd wyswietla :)

(Wymaga SkQuery)

 

//EIDT

@ShroN

Jak już to :D

Ale nie jest to konieczne.

variables:
	{parkour} = off

 

Edytowane przez Ixidi
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

@Ixidi

Masz błąd...

variables:
	{parkour} = true
command /event [<text>]:
	trigger:
		if arg 1 is "on":
			set {parkour} to true
			send "&aWlaczyles parkour!"
			stop
		if arg 1 is "off":
			set {parkour} to false
			send "&cWylaczyles parkour!"
			stop
command /jakiescmd:
	trigger:
		open chest with 3 rows named "Eventy" to player
		wait 3 ticks
  		if {parkour} is true
			format slot 18 of player with light gray dye named "&bEvent Parkour" with lore "&8&l> &7 Event: ON"  to close then run "/jakiescmd2"
  		else:
  			format slot 18 of player with light gray dye named "&bEvent Parkour" with lore "&8&l> &7 Event: OFF"  to close then run "/jakiescmd2"

Teraz powinno działać

@Ixidi

Sorry, jednak ja się pomyliłem xd, poprawka X2

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

@UP nie wypali mam kilka takich "ikonek" w gui..

Chce przy każdym evencie zrobić możliwość on / off

To mój cały kod : 

 

command /przewodnik1:
    trigger:
        open chest with 3 rows named "&8&l> &4Przewodnik po serwerze" to player
        format slot 0 of player with 1 of emerald named "&6Spawn" with lore "&8&l> &7Teleport na spawn"  to close then run [make player execute "/spawn"]
        format slot 2 of player with 1 of diamond sword named "&6Ranking" with lore "&8&l> &7Rankingi serwerowe"  to close then run [make player execute "/ranking"]
        format slot 4 of player with 1 of book named "&6Komendy" with lore "&8&l> &7Komendy serwerowe"  to close then run [make player execute "/komendy"]
        format slot 6 of player with 1 of cobblestone named "&6Drop cobbla do banku" with lore "&8&l> &7Ustal czy chcesz drop ||&8&l> &7cobbla do eq czy do banku"  to be unstealable
        format slot 8 of player with 1 of  feather named "&6Opcje czatu" with lore "&8&l> &7Ustal czy czat ma byc||&8&l> &7wlaczony czy tez nie"  to be unstealable
        format slot 10 of player with chest named "&6Kit gracz" with lore "&8&l> &7Podstawowe eq gracza"  to close then run [make player execute "/k gracz"]
        format slot 11 of player with chest named "&6Kit bonus" with lore "&8&l> &7Bonusowe eq co 24h"  to close then run [make player execute "/k bonus"]
        format slot 12 of player with chest named "&6Kit vip" with lore "&8&l> &7Ekwipunek dla ViP"  to close then run [make player execute "/k vip"]
        format slot 15 of player with light green wool named "&aDrop cobbla do banku" with lore "&8&l> &7Drop bedzie skladowany w banku"  to close then run [make player execute "/bank wlacz"]
        format slot 17 of player with light green wool named "&aCzat ON" with lore "&8&l> &7Czat dla Ciebie bedzie wlaczony"  to close then run [make player execute "/czat on"]
        format slot 19 of player with lapis lazuli named "&bEvent OX" with lore "&8&l> &7Event: {@parkour}"  to close then run [make player execute "/event ox"]
        format slot 20 of player with rose red named "&bEvent Zuo" with lore "&8&l> &7Event: {@parkour}"  to close then run [make player execute "/event zuo "]
        format slot 21 of player with cactus green dye named "&bEvent Rybacki" with lore "&8&l> &7Event: {@parkour}"  to close then run [make player execute "/event rybacki"]
        format slot 22 of player with dandelion yellow named "&bEvent PvP" with lore "&8&l> &7Event: {@parkour}"  to close then run [make player execute "/warp event pvp"]
        format slot 24 of player with red wool named "&cDrop cobbla do eq" with lore "&8&l> &7Drop bedzie skladowany w eq"  to close then run [make player execute "/bank wylacz"]
        format slot 26 of player with red wool named "&cCzat OFF" with lore "&8&l> &7Czat dla Ciebie bedzie wylaczony"  to close then run [make player execute "/czat off"]

on rightclick with book:
    name of player's tool is "&4Przewodnik Krwi":
        wait 1 tick
        make player execute "/przewodnik1"
        
command /przewodnik:
    trigger:
        give 1 book named "&4Przewodnik Krwi" to the player

 

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Nie mam czasu pisac calego skryptu, ale pokaze ci jak to zrobic:

Najpierw tworzysz komende ktora zmienia typ zmiennej

variables:
	{parkour} = off #Gdzie parkour wpisz nazwe eventu
command /parkour [<text>]: #Gdzie parkour wpisz nazwe eventu
	trigger:
		if arg 1 is "on":
			set {parkour} to true #Gdzie parkour wpisz nazwe eventu
			send "&aWlaczyles parkour!"
			stop
		if arg 1 is "off":
			set {parkour} to false #Gdzie parkour wpisz nazwe eventu
			send "&cWylaczyles parkour!"
			stop

Nastepnie w opisie przedmiotu w gui dodajesz ta zmienna:

format slot 19 of player with lapis lazuli named "&bEvent Parkour" with lore "&8&l> &7Event: %{@parkour}%"  to close then run [make player execute "/event ox"]

Tam gdzie masz zmienna {parkour} wpisujesz nazwe zmiennej ktora ustawiles wyzej ({ox} itp).

Gdy zrobisz okolo 5 takich komend lub 1 z argumentami, to zrobisz to czego chcesz :)

Sorry jeśli troche zawile :P

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Wszystko to co mi dałeś : 

 

command /parkour [<text>]: #Gdzie parkour wpisz nazwe eventu
	trigger:
		if arg 1 is "on":
			set {parkour} to true #Gdzie parkour wpisz nazwe eventu
			send "&aWlaczyles parkour!"
			stop
		if arg 1 is "off":
			set {parkour} to false #Gdzie parkour wpisz nazwe eventu
			send "&cWylaczyles parkour!"
			stop
  
  format slot 18 of player with lapis lazuli named "&bEvent Parkour" with lore "&8&l> &7Event: %{@parkour}%"  to close then run [make player execute "/event parkour"]
  
  variables:
	{xparkour} = true
	{xox} = true
	{xzuo} = true
	{xrybacki} = true
	{xpvp} = true
	{parkour} = off #Gdzie parkour wpisz nazwe eventu

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

@DeLajt

variables:
	{parkour} = off

command /parkour [<text>]: #Gdzie parkour wpisz nazwe eventu
	trigger:
		if arg 1 is "off":
			set {parkour} to "on" #Gdzie parkour wpisz nazwe eventu
			send "&cWylaczyles parkour!"
			stop
		if arg 1 is "on":
			set {parkour} to "off" #Gdzie parkour wpisz nazwe eventu
			send "&aWlaczyles parkour!"
			stop
			
command /przewodnik:
	trigger:
		open chest with 1 rows named "&acos" to player
		wait 1 tick
		format slot 5 of player with lapis lazuli named "&bEvent Parkour" with lore "&8&l> &7Event: %{parkour}%"  to close then run [make player execute "/event parkour"]

 

Odnośnik do komentarza
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ę...