Skocz do zawartości
  • 0

Czemu tu daje a tu nie?


Vineroy

Pytanie

10 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Bo komendę wykonuje konsola a nie gracz, gdzie masz dawanie itemu dajesz je obiektowi który wpisuje komendę a w tym wypadku jest to konsola

tutaj zamiast PLAYER daj arg-1 / argument / arg1 

on command "/warp enchant":
    give diamond sword of sharpness 5  and unbreaking 3  to the arg1
    give diamond helmet of protection 4 and unbreaking 3 to the arg1
    give diamond chestplate of protection 4 and unbreaking 3 to the arg1
    give diamond leggings of protection 4 and unbreaking 3 to the arg1
    give diamond boots of protection 4 and unbreaking 3 to the arg1

powinno załapać, choć wątpię, lepiej jak dodasz do GUI od razu dawanie itemów 

on right click:
	if player's tool is clock:
	if name of player's tool is "&4&lKlikaj":
		open chest with 3 rows named "Areny" to players
		wait 1 tick
		format slot 10 of player with 1 of stone named "Arena knock" to run "teleportuj enchant %player%"
		format slot 9 of player with 1 of stone named "Arena TEST" to run "teleportuj TEST %player%"
command /teleportuj enchant <player>:
	executable by: console
	trigger:
		execute console command "warp enchant %arg1%"
		give diamond sword of sharpness 5  and unbreaking 3  to the arg1
		give diamond helmet of protection 4 and unbreaking 3 to the arg1
		give diamond chestplate of protection 4 and unbreaking 3 to the arg1
		give diamond leggings of protection 4 and unbreaking 3 to the arg1
		give diamond boots of protection 4 and unbreaking 3 to the arg1	

nie podałem jak ty "to run "warp enchant %plasyer%"" bo chcę wykonać inną komendę która doda nam itemy i przeteleportuje 

więc stworzyłem dodatkową komendę którą wykona tylko konsola, konsola przeteleportuje gracza na dany warp (komenda z ESS) i da itemki

Odnośnik do komentarza
https://skript.pl/temat/18938-czemu-tu-daje-a-tu-nie/#findComment-129158
Udostępnij na innych stronach

  • 0

Ok dzięki a zrobisz że po wejściu na warp'a usuwa wszystkie itemy i dodaje te które są ustawione?

I jeszcze zrób jak możesz że po wpisaniu komendy /spawn usuwa wszystkie itemy gracza i dodaje mu dane itemy już mam itemy przygotowane i sobie je sam wkleje

z góry dzieki! @JPablo

Edytowane przez Vineroy
Odnośnik do komentarza
https://skript.pl/temat/18938-czemu-tu-daje-a-tu-nie/#findComment-129161
Udostępnij na innych stronach

  • 0

do usuwania dodaj po prostu linijkę kodu

 

execute console command "ci %arg1%"    < jeżeli to GUI

execute console command "ci %player%"   < jeżeli to zwykłą komenda wpisywana przez gracza

 

Itemy już masz, po kliknięciu czegoś w GUI co ustawiłeś, konsola wykona komendę "teleportuj ..." komenda teleportuj zawiera 2 rzeczy, teleportuje na dany warp + daje itemy

twój pomysł wyglądałby tak

on right click:
	if player's tool is clock:
	if name of player's tool is "&4&lKlikaj":
		open chest with 3 rows named "Areny" to players
		wait 1 tick
		format slot 10 of player with 1 of stone named "Arena knock" to run "teleportuj enchant %player%"
		format slot 9 of player with 1 of stone named "Arena TEST" to run "teleportuj TEST %player%"
command /teleportuj enchant <player>:
	executable by: console
	trigger:
  		execute console command "clearinventory %arg1"
		execute console command "warp enchant %arg1%"
		give diamond sword of sharpness 5  and unbreaking 3  to the arg1
		give diamond helmet of protection 4 and unbreaking 3 to the arg1
		give diamond chestplate of protection 4 and unbreaking 3 to the arg1
		give diamond leggings of protection 4 and unbreaking 3 to the arg1
		give diamond boots of protection 4 and unbreaking 3 to the arg1	

 

Odnośnik do komentarza
https://skript.pl/temat/18938-czemu-tu-daje-a-tu-nie/#findComment-129162
Udostępnij na innych stronach

  • 0
17 minut temu, Vineroy napisał:

Ok wszystko działa!

Zrobisz jeszcze z spawn ? że po wpisaniu /spawn czyści graczu ekwipunek i dodaje mu dane itemy

A jakie itemy to już sobie ustawie 

@JPablo

on command "spawn":
	clear player's inventory
    

 

Odnośnik do komentarza
https://skript.pl/temat/18938-czemu-tu-daje-a-tu-nie/#findComment-129166
Udostępnij na innych stronach

  • 0

Tak jak up ;)

A jak masz w GUI spawn to zrób tak:

on right click:
	if player's tool is clock:
	if name of player's tool is "&4&lKlikaj":
		open chest with 3 rows named "Areny" to players
		wait 1 tick
		format slot 10 of player with 1 of stone named "Arena knock" to run "teleportuj enchant %player%"
		format slot 9 of player with 1 of stone named "Arena TEST" to run "teleportuj SPAWN %player%"
command /teleportuj enchant <player>:
	executable by: console
	trigger:
  		execute console command "clearinventory %arg1"
		execute console command "warp enchant %arg1%"
		give diamond sword of sharpness 5  and unbreaking 3  to the arg1
		give diamond helmet of protection 4 and unbreaking 3 to the arg1
		give diamond chestplate of protection 4 and unbreaking 3 to the arg1
		give diamond leggings of protection 4 and unbreaking 3 to the arg1
		give diamond boots of protection 4 and unbreaking 3 to the arg1
  command /teleportuj spawn <player>:
	executable by: console
	trigger:
  		execute console command "clearinventory %arg1"
		execute console command "spawn %arg1%"

 

Odnośnik do komentarza
https://skript.pl/temat/18938-czemu-tu-daje-a-tu-nie/#findComment-129167
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ę...