Skocz do zawartości
  • 0

POPRAWIENIE


EspaniololxPl

Pytanie

wytabuje ktos, skrypt nie jest moj.

command /zadania [<text>] [<player>]:
	trigger:
		if executor is player:
			if arg-1 is not set:
				open chest with 6 rows named "&e&lZadania" to player
				wait 2 tick
				set {_} to 1
				loop {zadania::*}:
					clear {_itemy}
					clear {_nagroda}
					set {_s} to 0
					loop {ukonczone::zadania::%player%::*}:
						if "%loop-value-2%" is "%loop-value-1%":
							format slot {_} -1 of player with red wool named "&e&lZadanie %{_}%" with lore "&cUkonczone" to be unstealable
							set {_s} to 1
					if {_s} is not 1:
						set {_itemy} to "%{itemy::%loop-value%::*}%"
						replace all ", " with "||&e&l- " in {_itemy}
						replace all "and " with "||&e&l- " in {_itemy}
						set {_nagroda} to "%{nagroda::%loop-value%::*}%"
						replace all ", " with "||&e&l- " in {_nagroda}
						replace all "and " with "||&e&l- " in {_nagroda}
						format slot {_} -1 of player with paper named "&e&lZadanie %{_}%" with lore "&cWymagane przednioty:||&e&l- %{_itemy}%||||&2&lNagroda:||&e&l- %{_nagroda}%" to run "zadania %{_}% %player%"
					add 1 to {_}
			else:
				stop
		else:
			loop {zadania::*}:
				if arg-1 is "%loop-value-1%":
					loop {itemy::%arg-1%::*}:
						broadcast "%loop-value-2%   %arg-1%"
						if player-arg has loop-value-2:
							send "masz %loop-value-2%" to player-arg
						else:
							send "&cNie masz %loop-value-2%" to player-arg
							stop
					loop {itemy::%loop-value-1%::*}:
						remove loop-value-2 from player-arg
					loop {nagroda::%loop-value-1%::*}:
						give player-arg loop-value-2
					send "&2Ukonczyles zadanie %loop-value-1%" to player-arg
					add "%loop-value-1%" to {ukonczone::zadania::%player-arg%::*}
					make player-arg execute command "zadania"
command /admin [<text>] [<text>] [<text>]:
	trigger:
		if player is op
			if arg-1 is not set:
				send "&e&l/admin stworz &8&l- &etworzy zadanie"
				send "&e&l/admin itemy &8&l- &eedytuje wymagane itemy za zadanie"
				send "&e&l/admin nagroda &8&l- &eedytuje nagroda za zadanie"
				send "&e&l/admin usun &8&l- &eusuwa zadanie"
			if arg-1 is "stworz":
				set {_} to size of {zadania::*} +1
				add {_} to {zadania::*}
				send "stworzono zadanie %{_}%"
			if arg-1 is "usun":
				loop {zadania::*}:
					if arg-2 is "%loop-value%":
						clear {nagroda::%loop-value%::*}
						clear {itemy::%loop-value%::*}
						remove loop-value from {zadania::*}
						send "usunieto zadanie %arg-2%"
						loop {ukonczone::zadania::*}:
							remove arg-2 from {ukonczone::zadania::%loop-index-2%::*}
			if arg-1 is "itemy":
				loop {zadania::*}:
					if arg-2 is "%loop-value%":
						open chest with 3 rows named "itemy do zadania %arg-2%" to player
						wait 2 tick
						set {_} to 0
						loop {itemy::%loop-value%::*}:
							set slot {_} of player's current inventory to loop-value-2 
							add 1 to {_}
			if arg-1 is "nagroda":
				loop {zadania::*}:
					if arg-2 is "%loop-value%":
						open chest with 3 rows named "nagroda do zadania %arg-2%" to player
						wait 2 tick
						set {_} to 0
						loop {nagroda::%loop-value%::*}:
							set slot {_} of player's current inventory to loop-value-2 
							add 1 to {_}
on inventory close:
	if inventory name of player's current inventory contains "nagroda do zadania":
		set {_} to "%inventory name of player's current inventory%"
		replace all "nagroda do zadania " with "" in {_}
		clear {nagroda::%{_}%::*}
		loop 3*9 times:
			if slot loop-number -1 of player's current inventory is not air:
				add slot loop-number -1 of player's current inventory to {nagroda::%{_}%::*}
		send "&2Zapisano nagrody zadania %{_}%"
	if inventory name of player's current inventory contains "itemy do zadania":
		set {_} to "%inventory name of player's current inventory%"
		replace all "itemy do zadania " with "" in {_}
		clear {itemy::%{_}%::*}
		loop 3*9 times:
			if slot loop-number -1 of player's current inventory is not air:
				add slot loop-number -1 of player's current inventory to {itemy::%{_}%::*}
		send "&2Zapisano itemy zadania %{_}%"
Odnośnik do komentarza
Udostępnij na innych stronach

4 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

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