Skocz do zawartości
  • 0

Jedno działa dwa to za dużo


KodziaK
 Udostępnij

Pytanie

Witam mam kod:

Spoiler

on place:
	if tool of player is mossy cobblestone of thorns 10:
		send "&aPostawiles CobbleX'a!"
		add location of event-block to {KCobbleX::cobblexy::*}
on break:
	if event-block is mossy cobblestone:
		if {KCobbleX::cobblexy::*} contain location of event-block:
			remove location of event-block from {KCobbleX::cobblexy::*}
			send "Lol :D"
command /test [<integer>]:
	trigger:
		add 1 mossy cobblestone of thorns 10 named "&aCobbleX" with lore "&7Postaw na ziemi i rozwal!" to player

 

Gdy postawie jednego CobbleX'a i go zniszczę to pojawia się "Lol :D"

Alę gdy postawię dwa CobbleX'y na raz nie niszcząc poprzedniego to już "Lol :D" się nie pojawia :(

Wie ktoś jak to naprawić?

Odnośnik do komentarza
Udostępnij na innych stronach

5 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
on place:
	if tool of player is mossy cobblestone of thorns 10:
		send "&aPostawiles CobbleX'a!"
		add location of event-block to {KCobbleX::cobblexy::*}
on break:
	if event-block is mossy cobblestone:
		loop {KCobbleX::cobblexy::*}:
			if location of event-block is loop-value:
				remove location of event-block from {KCobbleX::cobblexy::*}
				send "Lol :D"
command /test [<integer>]:
	trigger:
		add 1 mossy cobblestone of thorns 10 named "&aCobbleX" with lore "&7Postaw na ziemi i rozwal!" to player

prosze bez testów zrobione nie działa ponieważ dałes cantains a trzeba w takim wypadku loopować :) 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
command /test [<integer>]:
	trigger:
		add 1 mossy cobblestone of thorns 10 named "&aCobbleX" with lore "&7Postaw na ziemi i rozwal!" to player

on place:
	if player's tool is mossy cobblestone of thorns 10 named "&aCobbleX" with lore "&7Postaw na ziemi i rozwal!":
		set {cx::%block%} to 1
		send "Postawiles cobblex"

on break:
	if event-bloock is mossy cobblestone:
		if {cx::%block%} is 1:
			clear {cx::%block%}
			send "Wylosowales item"
			set {_a} to 1 or 2 or 3
			if {_a} is 1:
				drop 1 diamond at block
			if {_a} is 2:
				drop 1 emerald at block
			if {_a} is 3:
				drop 1 gold block at block
 

Proszę ;)

Edytowane przez xTea_199
Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...