Skocz do zawartości
  • 0

Blok teleportacji


arixgry

Pytanie

Witajcie mam prośbę chodzi o to aby napisać skrypt na blok teleportujący potwory.                                                                                                                                      Blok ma mieć zasięg 20 z każdy bok , nielimitowany  zasięg w górę i ma teleportować potwory pod siebie tak aby spadały na dół.                                                  Potwory ( Zombie , Szkielet , Creeper , Pająk , Zombie Villager , Wiedźma , Pigman)                                                                                                                                        Tu mam nieudany kod pod ten skrypt ponieważ blok teleportuje potwory nawet z dołu a do tego potwory same się w nim dodają  przykład: jest jeden creeper to teleportuje creepera i do teko te wszystkie potwory.

options:
	item: emerald block named "&6Teleporter mobow"
	block: emerald block
on script load:
	wait 1 tick
	register new shaped recipe for {@item} using diamond, diamond, diamond, diamond, egg, diamond, diamond, diamond, diamond

on place:
	if player's tool is {@item}:
		set {_l} to location of event-block
		set block at {_l} to {@block}
		while type of block at {_l} is {@block}:
			loop all zombies in radius 15 around event-block:
				if type of loop-entity is not player:
					teleport zombies to block under {_l}
			wait 2 second

                          

Odnośnik do komentarza
https://skript.pl/temat/35372-blok-teleportacji/
Udostępnij na innych stronach

11 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Nawet to moj kod xd

options:
	item: emerald block named "&6Teleporter mobow"
	block: emerald block
on script load:
	wait 1 tick
	register new shaped recipe for {@item} using diamond, diamond, diamond, diamond, egg, diamond, diamond, diamond, diamond

on place:
	if player's tool is {@item}:
		set {_l} to location of event-block
		set block at {_l} to {@block}
		while type of block at {_l} is {@block}:
			loop all zombies in radius 15 around event-block:
                If y-coord of loop-entity >= y-coord of {_l}:
                    if type of loop-entity is not player:
                        teleport zombies to block under {_l}
			wait 2 second

 

Odnośnik do komentarza
https://skript.pl/temat/35372-blok-teleportacji/#findComment-227181
Udostępnij na innych stronach

  • 0
15 godzin temu, xAxee napisał:

Co

options:
	item: emerald block named "&6Teleporter mobow"
	block: emerald block
on script load:
	wait 1 tick
	register new shaped recipe for {@item} using diamond, diamond, diamond, diamond, egg, diamond, diamond, diamond, diamond

on place:
	if player's tool is {@item}:
		set {_l} to location of event-block
		set block at {_l} to {@block}
		while type of block at {_l} is {@block}:
			loop all zombies in radius 15 around event-block:
				If y-coord of loop-entity >= y-coord of {_l}:
					if type of loop-entity is not player:
			teleport zombies to block under {_l}
			wait 2 second

Otóż potwory teleportują się nawet gdy sa 50 bloków dalej i nadal jest ten problem iż potwory gdy spadają teleportują się nadal do tego bloku tak jakby je cofa

Edytowane przez arixgry
Odnośnik do komentarza
https://skript.pl/temat/35372-blok-teleportacji/#findComment-227213
Udostępnij na innych stronach

  • 0
W dniu 28.10.2019 o 13:01, arixgry napisał:

options:
	item: emerald block named "&6Teleporter mobow"
	block: emerald block
on script load:
	wait 1 tick
	register new shaped recipe for {@item} using diamond, diamond, diamond, diamond, egg, diamond, diamond, diamond, diamond

on place:
	if player's tool is {@item}:
		set {_l} to location of event-block
		set block at {_l} to {@block}
		while type of block at {_l} is {@block}:
			loop all zombies in radius 15 around event-block:
				If y-coord of loop-entity >= y-coord of {_l}:
					if type of loop-entity is not player:
			teleport zombies to block under {_l}
			wait 2 second

Otóż potwory teleportują się nawet gdy sa 50 bloków dalej i nadal jest ten problem iż potwory gdy spadają teleportują się nadal do tego bloku tak jakby je cofa

mam rozumieć że nie ma żadnych błędów

Odnośnik do komentarza
https://skript.pl/temat/35372-blok-teleportacji/#findComment-227332
Udostępnij na innych stronach

  • 0

 

>[2K[20:24:53 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (blok.sk, line 15: if type of loop-entity is not player:')

Między innymi teleportuje zombie z obszaru nawet 100 kratek dalej a jest ustawione na max 15 kratek ....

Do tego potwory gdy się teleportują pod blok i spadają to je znów teleportuje do bloku

Jeśli chcesz zobaczyć o Co mi dokładnie chodzi wbij na My-land.pl wersja 1.12.2 to CI pokaże 

Odnośnik do komentarza
https://skript.pl/temat/35372-blok-teleportacji/#findComment-227340
Udostępnij na innych stronach

  • 0
options:
	item: emerald block named "&6Teleporter mobow"
	block: emerald block
on script load:
	wait 1 tick
	register new shaped recipe for {@item} using diamond, diamond, diamond, diamond, egg, diamond, diamond, diamond, diamond

on place:
	if player's tool is {@item}:
		set {_l} to location of event-block
		set block at {_l} to {@block}
		while type of block at {_l} is {@block}:
			loop all zombies in radius 15 around event-block:
				If y-coord of loop-entity >= y-coord of {_l}:
					teleport loop-entity to block under {_l}
			wait 2 seconds

 

Edytowane przez Shooterowy
Odnośnik do komentarza
https://skript.pl/temat/35372-blok-teleportacji/#findComment-227343
Udostępnij na innych stronach

  • 0

Tutaj kod napisany po mojemu:

options:
	item: emerald block named "&6Teleporter mobow"
	block: emerald block
on Skript start:
	register new shaped recipe for {@item} using diamond, diamond, diamond, diamond, egg, diamond, diamond, diamond, diamond
on place:
	if player's tool is {@item}:
		set event-block to {@block}
		set {Teleporter::%event-location%} to event-location
on break:
	if {Teleporter::%event-location%} is set:
		cancel event
		clear {Teleporter::%event-location%}
		set event-block to air
		drop {@item} at event-location
every 2 seconds:
	loop {Teleporter::*}:
		if block at loop-value is not {@block}:
			clear {Teleporter::%loop-index%}
			exit loop
		set {_loc1} to location of block 20 meters southwest of loop-value
		set {_loc2} to location of block 20 meters northeast of loop-value
		set y-loc of {_loc2} to 255
		teleport all zombies and skeletons and spiders and creepers and witches and zombie pigmen and zombie villagers where [entity input's location is within {_loc1} to {_loc2}] to block below loop-value

 

A tutaj ten wcześniejszy kod z dodanymi mobami: (Zmieniłem on script load na on Skript start)

 

options:
	item: emerald block named "&6Teleporter mobow"
	block: emerald block
on Skript start:
	wait 1 tick
	register new shaped recipe for {@item} using diamond, diamond, diamond, diamond, egg, diamond, diamond, diamond, diamond

on place:
	if player's tool is {@item}:
		set {_l} to location of event-block
		set block at {_l} to {@block}
		while type of block at {_l} is {@block}:
			loop all zombies and skeletons and creepers and spiders and witches and zombie pigmen and zombie villagers in radius 15 around event-block:
				If y-coord of loop-entity >= y-coord of {_l}:
					teleport loop-entity to block under {_l}
			wait 2 seconds

 

Edytowane przez Shooterowy
Odnośnik do komentarza
https://skript.pl/temat/35372-blok-teleportacji/#findComment-227362
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ę...