Skocz do zawartości
  • 0

Skrypt na zmienne GUI


TheFightaz

Pytanie

Czesc,
Mam pewien kod 

1 GUI:

command /gui:
	trigger:
		set {_guiCollection} to a new chest inventory with 5 row with name "&2&lMc&6&lSquare&f&l.pl &8| &6Kolekcja"
		set slot (integers between 0 and 19) and (integers between 25 and 44) of {_guiCollection} to green stained glass pane named "&7"
		set slot 20 of {_guiCollection} to diamond ore named "              &a> &c| &7Kolekcja &bGórnika &c| &a<" with lore "&a> &c| &7Kliknij &aLPM &7i zobacz swoją kolekcje &bGórnika" and "" and "&a> &c| &7Twoje postępy &b- %{progressBarPlayerMiner.%player%}% &7| &cMAX&8)"
		set slot 21 of {_guiCollection} to oak sapling named "              &a> &c| &7Kolekcja &2Drwala &c| &a<" with lore "&a> &c| &7Kliknij &aLPM &7i zobacz swoją kolekcje &2Drwala" and "" and "&a> &c| &7Twoje postępy &b- %{progressBarPlayerWoodcutter.%player%}% &7| &cMAX&8)"
		set slot 22 of {_guiCollection} to bone named "              &a> &c| &7Kolekcja &cWalki &c| &a<" with lore "&a> &c| &7Kliknij &aLPM &7i zobacz swoją kolekcje &cWalki" and "" and "&a> &c| &7Twoje postępy &b- %{progressBarPlayerCombat.%player%}% &7| &cMAX&8)"
		set slot 23 of {_guiCollection} to hay bale named "              &a> &c| &7Kolekcja &eFarmera &c| &a<" with lore "&a> &c| &7Kliknij &aLPM &7i zobacz swoją kolekcje &eFarmera" and "" and "&a> &c| &7Twoje postępy &b- %{progressBarPlayerFarmer.%player%}% &7| &cMAX&8)"
		set slot 24 of {_guiCollection} to wither skeleton skull named "              &a> &c| &7Kolekcja &4Bossów &c| &a<" with lore "&a> &c| &7Kliknij &aLPM &7i zobacz swoją kolekcje &4Bossów" and "" and "&a> &c| &7Twoje postępy &b- %{progressBarPlayerBoss.%player%}% &7| &cMAX&8)"
		open {_guiCollection} to player

 

2 GUI:
 

	clicked slot is 20:
		wait 2 tick
		set {_guiCollectionMiner} to a new chest inventory with 5 row with name "&2&lMc&6&lSquare&f&l.pl &8| &6Kolekcja &bGórnika"
		set slot (integers between 0 and 9) and 17,18,26,27 and (integers between 35 and 43) of {_guiCollectionMiner} to green stained glass pane named "&7"
		set slot 10 of {_guiCollectionMiner} to gray dye named "&7Kolekcja &aCobblestone" with lore "" and "&a> &c| &7Znajdz ten przedmiot" and "&7aby odblokować jego &akolekcje"
		set slot 44 of {_guiCollectionMiner} to arrow named "&cPowrót &7do &aKolekcji"
		open {_guiCollectionMiner} to player


I czy jest mozliwosc tym sposobem, gdy gracz wykopie cobblestone, to *slot 10* zamieni się w cobblestone z innym lore?
próbowałem cos takiego :
 

on mine:
	if event-block is cobblestone:
		add 1 to {collectionMinerCobblestone.%player%}
		set slot 10 of {_guiCollectionMiner} to cobblestone named "&7Kolekcja &aCobblestone" with lore "&7Test"
		send "Odblokowales kolekcje"

Ale niestety nie dziala

Odnośnik do komentarza
https://skript.pl/temat/53982-skrypt-na-zmienne-gui/
Udostępnij na innych stronach

3 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
on mine cobblestone:
	set {collected.cobblestone.%player%} to 1

command /gui:
	trigger:

		set {_guiCollection} to a new chest inventory with 5 row with name "&2&lMc&6&lSquare&f&l.pl &8| &6Kolekcja"
		set slot (integers between 0 and 19) and (integers between 25 and 44) of {_guiCollection} to green stained glass pane named "&7"
		set slot 20 of {_guiCollection} to diamond ore named "              &a> &c| &7Kolekcja &bGórnika &c| &a<" with lore "&a> &c| &7Kliknij &aLPM &7i zobacz swoją kolekcje &bGórnika" and "" and "&a> &c| &7Twoje postępy &b- %{progressBarPlayerMiner.%player%}% &7| &cMAX&8)"
		set slot 21 of {_guiCollection} to oak sapling named "              &a> &c| &7Kolekcja &2Drwala &c| &a<" with lore "&a> &c| &7Kliknij &aLPM &7i zobacz swoją kolekcje &2Drwala" and "" and "&a> &c| &7Twoje postępy &b- %{progressBarPlayerWoodcutter.%player%}% &7| &cMAX&8)"
		set slot 22 of {_guiCollection} to bone named "              &a> &c| &7Kolekcja &cWalki &c| &a<" with lore "&a> &c| &7Kliknij &aLPM &7i zobacz swoją kolekcje &cWalki" and "" and "&a> &c| &7Twoje postępy &b- %{progressBarPlayerCombat.%player%}% &7| &cMAX&8)"
		set slot 23 of {_guiCollection} to hay bale named "              &a> &c| &7Kolekcja &eFarmera &c| &a<" with lore "&a> &c| &7Kliknij &aLPM &7i zobacz swoją kolekcje &eFarmera" and "" and "&a> &c| &7Twoje postępy &b- %{progressBarPlayerFarmer.%player%}% &7| &cMAX&8)"
		set slot 24 of {_guiCollection} to wither skeleton skull named "              &a> &c| &7Kolekcja &4Bossów &c| &a<" with lore "&a> &c| &7Kliknij &aLPM &7i zobacz swoją kolekcje &4Bossów" and "" and "&a> &c| &7Twoje postępy &b- %{progressBarPlayerBoss.%player%}% &7| &cMAX&8)"
		open {_guiCollection} to player
		
		
on inventory click:
	event-inventory is not player's inventory
	if name of event-inventory is "&2&lMc&6&lSquare&f&l.pl &8| &6Kolekcja":
		cancel event
		if clicked slot is 20:
			wait 2 tick
			set {_guiCollectionMiner} to a new chest inventory with 5 row with name "&2&lMc&6&lSquare&f&l.pl &8| &6Kolekcja &bGórnika"
			set slot (integers between 0 and 9) and 17,18,26,27 and (integers between 35 and 43) of {_guiCollectionMiner} to green stained glass pane named "&7"
			if {collected.cobblestone.%player%} is not set:
				set slot 10 of {_guiCollectionMiner} to gray dye named "&7Kolekcja &aCobblestone" with lore "" and "&a> &c| &7Znajdz ten przedmiot" and "&7aby odblokować jego &akolekcje"
			else if {collected.cobblestone.%player%} is 1:
				set slot 10 of {_guiCollectionMiner} to cobblestone named "&7Kolekcja &aCobblestone" with lore "&7Test"
			set slot 44 of {_guiCollectionMiner} to arrow named "&cPowrót &7do &aKolekcji"
			open {_guiCollectionMiner} to player
		


Jak coś to zajmowalem się wyłącznie tematem zmiany ikony w gui do eventu mine cobblestone możesz dopisac reszte co tam miales

Edytowane przez Saanjuk
objaśnienie
Odnośnik do komentarza
https://skript.pl/temat/53982-skrypt-na-zmienne-gui/#findComment-328041
Udostępnij na innych stronach

  • 0

Zrobiłem podobnie 

if {collectionCobblestone.%player%} is false:
			set slot 10 of {_guiCollectionMiner} to gray dye named "&7Kolekcja &aCobblestone" with lore "" and "&a> &c| &7Znajdz ten przedmiot" and "&7aby odblokować jego &akolekcje"
		else:
			set slot 10 of {_guiCollectionMiner} to cobblestone named "&7Kolekcja &aCobblestone" with lore "" and "&a> &c| &7Statystyki" and "&7Zdobyte &b- %{collectionProgress.%player%} %&8(&a%{collectionMinerCobblestone.%player%}%&7/&c%{progressCollection.%player%}%&8)" and "" and "&7Zdobądź &adoświadczenie &7i odblokuj:" and "" and "&a> &c| &7NAGRODA"
		if {collectionIron.%player%} is false:
			set slot 11 of {_guiCollectionMiner} to gray dye named "&7Kolekcja &aZelaza" with lore "" and "&a> &c| &7Znajdz ten przedmiot" and "&7aby odblokować jego &akolekcje"
		else:
			set slot 11 of {_guiCollectionMiner} to iron ingot named "&7Kolekcja &aZelaza" with lore "" and "&a> &c| &7Statystyki" and "&7Zdobyte &b- %{collectionProgress.%player%}% &8(&a%{collectionMinerIron.%player%}%&7/&c%{progressCollection.%player%}%&8)" and "" and "&7Zdobądź &adoświadczenie &7i odblokuj:" and "" and "&a> &c| &7NAGRODA"
		if {collectionGold.%player%} is false:
			set slot 12 of {_guiCollectionMiner} to gray dye named "&7Kolekcja &aZłota" with lore "" and "&a> &c| &7Znajdz ten przedmiot" and "&7aby odblokować jego &akolekcje"
		else:
			set slot 12 of {_guiCollectionMiner} to gold ingot named "&7Kolekcja &aZłota" with lore "" and "&a> &c| &7Statystyki" and "&7Zdobyte &b- %{collectionProgress.%player%}% &8(&a%{collectionMinerGold.%player%}%&7/&c%{progressCollection.%player%}%&8)" and "" and "&7Zdobądź &adoświadczenie &7i odblokuj:" and "" and "&a> &c| &7NAGRODA"
		if {collectionRedstone.%player%} is false:
			set slot 13 of {_guiCollectionMiner} to gray dye named "&7Kolekcja &aRedstone" with lore "" and "&a> &c| &7Znajdz ten przedmiot" and "&7aby odblokować jego &akolekcje"
		else:
			set slot 13 of {_guiCollectionMiner} to redstone named "&7Kolekcja &aRedstone" with lore "" and "&a> &c| &7Statystyki" and "&7Zdobyte &b- %{collectionProgress.%player%}% &8(&a%{collectionMinerRedstone.%player%}%&7/&c%{progressCollection.%player%}%&8)" and "" and "&7Zdobądź &adoświadczenie &7i odblokuj:" and "" and "&a> &c| &7NAGRODA"

 i działa, dzięki za pomoc. Mozna zamykac

Odnośnik do komentarza
https://skript.pl/temat/53982-skrypt-na-zmienne-gui/#findComment-328077
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ę...