Skocz do zawartości
  • 0

Skrypt na Sklep w GUI (Z każdym itemkiem)


kkxd
 Udostępnij

Pytanie

3 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
options:
	ilosc.wierszy.na.jednej.stronie: 6
command /sklep [<number>]:
	trigger:
		if arg-1 is set:
			open chest with {@ilosc.wierszy.na.jednej.stronie} rows named "skelp" to player
			wait 2 tick
			set {_1} to 0
			loop {strona%arg-1%::*}:
				format slot {_1} of player with loop-value named "&2Cena: &8%{cena::%loop-value-1%}%" to close then run [execute console command "kupuje %loop-value-1% %{cena::%loop-value-1%}% %player%"]
				add 1 to {_1}
command /dodaj [<number>]:
	trigger:
		if player is op:
			if arg-1 is not set:
				send "&4Blad:&8wpisz /dodaj [numer strony] - usunie wszystkie itemki z twojego eq i doda je do tej strony [tylko 1 z kazdego rodzaju czyli jak masz pelne eq stone to doda tylko 1 i tylko 1 raz :)] cene ustawia sie indywidualnie /ustawcena"
			if arg-1 is number:
				loop all items in player's inventory:
					if size of {strona%arg-1%::*} >= {@ilosc.wierszy.na.jednej.stronie}*9:
						send "&4Blad:&8Strona jest przepelniona"
						stop
					else:
						remove 1 of loop-item from {strona%arg-1%::*}
						add 1 of loop-item to {strona%arg-1%::*}
						remove all loop-item from player
				send "&2Dodano itemki z EQ do stony &8%arg-1%&2 skelpu [&6Zapelnienie strony: &9%size of {strona%arg-1%::*}%&8/&9%{@ilosc.wierszy.na.jednej.stronie}*9%&2]"
command /ustawcena [<number>]:
	trigger:
		if player is op:
			set player's tool to 1 of player's tool
			if arg-1 is set:
				if player's tool is not air:
					loop 100 times:
						loop {strona%loop-number%::*}:
							if "%loop-value%" is "%player's tool%":
								set {cena::%loop-value%} to arg-1
								send "&2Ustawiono cene &8%loop-value%&2 na&8 %arg-1%"
								stop
					send "&4&lBlad:&8%player's tool% nie jest w zadnym sklepie ponizej 100 "
				else:
					send "&4&lBlad:&8Nie mozna sprzedac powietrza"
					stop
			else:
				send "&4&lBlad:&8/ustawcena [cena] - ustawiania cene itemku w rece na podana"
command /usun [<number>]:
	trigger:
		if player is op:
			if arg-1 is not set:
				send "&4&lBlad:&8Wpisz /usun [numer srtony z ktorej chcesz usunac item z reki]"
				stop
			if arg-1 is set:
				loop {strona%arg-1%::*}:
					if "%loop-value%" is "%1 of player's tool%":
						send "&2Pomyslnie usunieto &8%1 of player's tool% &2z strony&8 %arg-1%"
						remove 1 of player's tool from {strona%arg-1%::*}
						stop
				send "&4&lBlad:&8Na stronie %arg-1% nie ma &6%1 of player's tool%"
command /kupuje [<text>] [<integer>] [<player>]:		
	executable by: console
	trigger:
		if arg-1 is set:	
			if arg-2 is set:
				if balance of player-arg is more or equal to integer-arg:
					set {_i} to arg-1 parsed as item
					if player-arg can hold 1 of {_i}:
						remove arg-2 from player-arg's balance
						give player-arg 1 of {_i}
						send "&2kupiono &8%arg-1% &2za&8 %arg-2% &2kasy" to player-arg
					else:
						send "&4&lBlad:&8Nie masz miejsca" to player-arg
				else:
					send "&4&lBlad:&8Nie masz dosc kasy" to player-arg
			

prosze :D

/sklep [number strony] odpala dana strone sklepu

/dodaj [number strony] dodaje wszystkie itemki z twojego eq do danej strony sklepu

/ustawcena [cena] ustawia cene itemku trzymanego w rece

/usun [number strony] usuwa item z reki z podanej strony

/kupije [item] [kasa] wykonywuje sie przez konsole wiec nic nie ruszac

Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...