Skocz do zawartości
  • 0

Woda ktora rozwala


maniovsky

Pytanie

chodzi oto ze gdy ktos stawia wode na polplytke to polplytka znika 

chcialbym aby ona jej nie niszczyla tutaj kod na znikanie wody 

on place water:
    wait 10 tick
    set event-block to air
    stop
on right click with bucket:
    remove 1 bucket from player
    send "&7zabieram puste wiadro"
    wait 1 seconds
    send "Oddaje napelnione"
    add 1 water bucket named "&a&lWATERSKILL" with lore "KLIKNIJ ABY AKTYWOWAC" to the player's inventory

Odnośnik do komentarza
https://skript.pl/temat/17265-woda-ktora-rozwala/
Udostępnij na innych stronach

4 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
on place water:
	set {_target} to player's target block
	set {_targetloc} to location of player's target block
	set {slot.%player%} to player's current hotbar slot
	wait 1 tick
	if {_target} is not any slab:
		if {_target} is not any pressure plate:
			if {_target} is not air:
				execute console command "wiaderko %player%"
				if block at {_targetloc} is any pressure plate:
					add 1 to y-coordinate of {_targetloc}	
					wait 1 second
					set block at {_targetloc} to air
				else:
					wait 1 second
					set block at {_targetloc} to air				
					stop
				stop
			else:	
				execute console command "wiaderko %player%"
				wait 1 second
				loop blocks in radius 2 around {_targetloc}:
					loop-block is water:
						set loop-block to air
				stop
		else:	
			add 1 to y-coordinate of {_targetloc}
			set block at {_targetloc} to water
			add 1 to y-coordinate of {_targetloc}
			set block at {_targetloc} to stone
			set block at {_targetloc} to air
			execute console command "wiaderko %player%"
			wait 1 second
			loop blocks in radius 2 around {_targetloc}:
				loop-block is water:
					set loop-block to air
			stop
	else:	
		execute console command "wiaderko %player%"
		wait 1 second
		loop blocks in radius 2 around {_targetloc}:
			loop-block is water:
				set loop-block to air
		stop
command /wiaderko [<player>]:
	trigger:
		set slot {slot.%player-arg%} of player-arg to air
		send "&7zabieram puste wiadro" to player-arg
		wait 1 seconds
		send "Oddaje napelnione" to player-arg
		set slot {slot.%player-arg%} of player-arg to water bucket named "&a&lWATERSKILL" with lore "KLIKNIJ ABY AKTYWOWAC"		

prosze :)

jedyny znany błąd to gry gracz w przeciągu 0.05 sec zmieni block z płytki naciskowej na jakiś inny to woda sie nie postawi ale ten bug wytępuje tylko gry stoimy na ziemi i jest on dośc rzadki bo potrzeba do tego jednej dwudziestej sekundy (1 tick) licze na plusik 

Edytowane przez Michma1707
Odnośnik do komentarza
https://skript.pl/temat/17265-woda-ktora-rozwala/#findComment-118520
Udostępnij na innych stronach

  • 0
on right click with bucket:
	cancel event
on place water:
	set {_loccccc} to location of event-block
	set {_locccc} to block at {_loccccc}
	set {_target} to player's target block
	set {_targetloc} to location of player's target block
	set {slot.%player%} to player's current hotbar slot
	wait 1 tick
	if {_target} is not any slab:
		if {_target} is not any pressure plate:
			if {_target} is not air:
				set event-block to water
				execute console command "wiaderko %player%"
				if block at {_targetloc} is any pressure plate:
					add 1 to y-coordinate of {_targetloc}	
					wait 1 second
					set event-block to air
					stop
				else:
					wait 1 second
					set event-block to air				
					stop
				stop
			else:	
				execute console command "wiaderko %player%"
				wait 1 second
				loop blocks in radius 2 around {_targetloc}:
					loop-block is water:
						set loop-block to air
				stop
		else:	
			add 1 to y-coordinate of {_targetloc}
			set block at {_targetloc} to water
			execute console command "wiaderko %player%"
			wait 1 second
			set block at {_targetloc} to air
			stop
	else:	
		remove 0.5 from x-coordinate of {_loccccc}
		remove 0.5 from y-coordinate of {_loccccc}
		remove 0.5 from z-coordinate of {_loccccc}
		send "%{_loccccc}% %{_locccc}%"
		if block at {_loccccc} is water:
			set block at {_loccccc} to water
			execute console command "wiaderko %player%"
			wait 1 second
			set block at {_loccccc} to air
			stop
		if block at {_loccccc} is set:
			add 1 to y-coordinate of {_loccccc}	
			set block at {_loccccc} to water
			execute console command "wiaderko %player%"
			wait 1 second
			loop blocks in radius 2 around {_loccccc}:
				loop-block is water:
					set loop-block to air	
			stop
		stop
command /wiaderko [<player>]:
	trigger:
		set slot {slot.%player-arg%} of player-arg to air
		send "&7zabieram puste wiadro" to player-arg
		wait 1 seconds
		send "Oddaje napelnione" to player-arg
		set slot {slot.%player-arg%} of player-arg to water bucket named "&a&lWATERSKILL" with lore "KLIKNIJ ABY AKTYWOWAC"	

prosze 100% działą nawet poprawiłem buga :) oraz odkryłem że to jest op jeśli chodzi o uciekanie :P po ścianach

Edytowane przez kaol48s
Odnośnik do komentarza
https://skript.pl/temat/17265-woda-ktora-rozwala/#findComment-118555
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ę...