Skocz do zawartości
  • 0

Skrypt na Guardian


IprOseK

Pytanie

6 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Temat został przeniesiony z Zarejestruj się lub zaloguj, aby zobaczyć ukrytą treść! > Zarejestruj się lub zaloguj, aby zobaczyć ukrytą treść! do Zarejestruj się lub zaloguj, aby zobaczyć ukrytą treść! > Zarejestruj się lub zaloguj, aby zobaczyć ukrytą treść!.

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Coś z zasadą na singlu

/gamerule keepinventory true

ale nie wiem jak to przerobić na pojedynczego gracza.

Po śmierci tworzyć NPC co teleportuje wszystkie jego itemy w 1 miejsce po czym kiedy gracz się pojawi ponownie to NPC teleportuje do niego wszystkie itemy i zniknie.

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
on rightclick on sign:
	line 1 of the clicked block is "Guardian":
		line 2 of the clicked block is "Cena: 100000$":
			line 3 of the clicked block is "zachowuje itemy":
				line 4 of the clicked block is "po smierci":
					if balance of player >= 100000:
						remove 100000 from balance of player
						add 1 to {Guardian::%player%}
						send "&ekupiłeś Guardiana za &2&l100000$"
					else:
						send "&4&lBlad:&cNie masz &2&l100000$"
on death:
	if {Guardian::%victim%} is not set:
		set {Guardian::%victim%} to 0
	if {Guardian::%victim%} >= 1:
		remove 1 from {Guardian::%victim%}
		set {drop::%victim%} to serialized inventory of player
		clear drops
on respawn:
	if {drop::%player%} is set:
		wait 1 tick
		spawn a villager at location of player
		set name of last spawned entity to "&4&lGuardian gracza: &e&l%player%"
		set {_} to last spawned entity
		restore inventory of player from {drop::%player%}
		clear {drop::%player%}
		send "&eUratowalem twoje itemki~Guardian pozostało %{Guardian::%player%}% uzyc"
		wait 5 seconds
		kill {_}

zamiast guardiana zrobiłem villagera bo niemam takiego silnika aby testować z guardianami (1.7.2) ale wszystko działa tylko zbroi nie zapisuje ale to wystarczy dodać w on death

set {helm::%victim%} to helmet of victim

i tak z klatą spodniami i butami

i przy respawn

equip player with {helm::%victim%} parsed as item

:v:v:v:v:v:v:v:v:v:v:v:v:v

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

@kaol48s chyba troszke go nie zrozumiales

ja pozwole sobie tutaj wstawic swoj skrypt , ktory pisalem juz dawno temu

Spoiler



variables:
	{guardian::%player%} = 0
on rightclick on sign:
	if line 1 of event-block is "&1[Guardian]":
		if line 2 of event-block is "MAGICZNE BOSKIE":
			if line 3 of event-block is "BOGOSLAWIENSTWO":
				if line 4 of event-block is "$100000":
					if player's money is more than or equal to 100000:
						add 1 to {guardian::%player%}
						remove 100000 from player's money
						send "&6[SignShop] &fYou paid &a$100000&f for 1 additional Guardians(s)! You now have %{guardian::%player%}% Guardian(s)."
					else:
						send "&6[SignShop] &fYou don't have &a$100000 &fto pay"
on death of player:
	if {guardian::%victim%} is not 0:
		set {loot::%victim%} to location at (victim's x-coordinate, 254, victim's z-coordinate)
		set {loot2::%victim%} to location at (victim's x-coordinate+1, 254, victim's z-coordinate)
		set block at {loot::%victim%} to chest
		set block at {loot2::%victim%} to chest
		add drops to block at {loot::%victim%}
		clear drops
on respawn:
	if {guardian::%player%} is not 0:
		wait a second
		send "&6[SignShop] &fYou have 1 Guardian(s) left!"
		add all items in inventory of block at {loot::%player%} to player's inventory
		clear inventory of block at {loot::%player%}
		set block at {loot::%player%} to air
		set block at {loot2::%player%} to air
		clear {loot::%player%}
		clear {loot2::%player%}
		remove 1 from {guardian::%player%}
	
on respawn:
	if {guardian::%player%} is 0:
		Send "&6[SignShop] &fYou don`t have any more Guardians, your inventory was not saved!"

 

Identyczny jak na starym craftboard ;D

Edytowane przez Sewer
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ę...