Skocz do zawartości
  • 0

Bedrock


gnomq
 Udostępnij

Pytanie

7 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
6 minut temu, gnomq2000 napisał:

Klikając PPM na bedrocka złotym kilofem o nazwie '&atest'  zniszczy bedrocka oraz będzie efekt eksplozji. Usuwanie bedrocka można używać co minutę.

Proszę.

on right click:
	if player's tool is not golden pickaxe named "&atest":
		stop
	if clicked block is not bedrock:
		stop
	if {superKilof::cooldown::%player%} is not set:
		set {superKilof::cooldown::%player%} to now
		subtract 1 minute from {superKilof::cooldown::%player%}
	if difference between {superKilof::cooldown::%player%} and now is less than 1 minute:
		stop
	set {superKilof::cooldown::%player%} to now
	break targeted block naturally
	create a fake explosion at clicked block

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
5 minut temu, Kormic napisał:

Proszę.

on right click:
	if player's tool is not golden pickaxe named "&atest":
		stop
	if clicked block is not bedrock:
		stop
	if {superKilof::cooldown::%player%} is not set:
		set {superKilof::cooldown::%player%} to now
		subtract 1 minute from {superKilof::cooldown::%player%}
	if difference between {superKilof::cooldown::%player%} and now is less than 1 minute:
		stop
	set {superKilof::cooldown::%player%} to now
	break targeted block naturally
	create a fake explosion at clicked block

 

pryma, ale czy dodasz wiadomość z odliczaniem w sekundach za ile można ponownie zniszczyć skałę?

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
2 minuty temu, gnomq2000 napisał:

pryma, ale czy dodasz wiadomość z odliczaniem w sekundach za ile można ponownie zniszczyć skałę?

on right click:
	if player's tool is not golden pickaxe named "&atest":
		stop
	if clicked block is not bedrock:
		stop
	if {superKilof::cooldown::%player%} is not set:
		set {superKilof::cooldown::%player%} to now
		subtract 1 minute from {superKilof::cooldown::%player%}
	if difference between {superKilof::cooldown::%player%} and now is less than 1 minute:
		set {_c} to {superKilof::cooldown::%player%}
		add 1 minute to {_c}
		set {_diff} to difference between {_c} and now
		set {_diff} to translateTimespan({_diff})
		send "&cMozesz uzyc niszczenia bedrocka ponownie za &6%{_diff}%&c!" to player
		stop
	set {superKilof::cooldown::%player%} to now
	break clicked block naturally
	create a fake explosion at clicked block

Wymagana tutaj jest funkcja translateTimespan (ta z moich poprzednich skryptów z chociażby cooldownem na czat).

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
10 minut temu, Kormic napisał:
on right click:
	if player's tool is not golden pickaxe named "&atest":
		stop
	if clicked block is not bedrock:
		stop
	if {superKilof::cooldown::%player%} is not set:
		set {superKilof::cooldown::%player%} to now
		subtract 1 minute from {superKilof::cooldown::%player%}
	if difference between {superKilof::cooldown::%player%} and now is less than 1 minute:
		set {_c} to {superKilof::cooldown::%player%}
		add 1 minute to {_c}
		set {_diff} to difference between {_c} and now
		set {_diff} to translateTimespan({_diff})
		send "&cMozesz uzyc niszczenia bedrocka ponownie za &6%{_diff}%&c!" to player
		stop
	set {superKilof::cooldown::%player%} to now
	break clicked block naturally
	create a fake explosion at clicked block

Wymagana tutaj jest funkcja translateTimespan (ta z moich poprzednich skryptów z chociażby cooldownem na czat).

elegancko działa dzięki :> 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Dla wszystkich w potrzebie załączam funkcję translateTimespan():

function translateTimespan(t: timespan) :: text:
	set {_t} to "%{_t}%"
	replace all "seconds" with "sekund" in {_t}
	replace all "second" with "sekunde" in {_t}
	replace all "minutes" with "minut" in {_t}
	replace all "minute" with "minute" in {_t}
	replace all "hours" with "godzin" in {_t}
	replace all "hour" with "godzine" in {_t}
	replace all "months" with "miesiecy" in {_t}
	replace all "month" with "miesiac" in {_t}
	replace all "years" with "lat" in {_t}
	replace all "year" with "rok" in {_t}
	return "%{_t}%"

Wystarczy ją wkleić gdzieś do kodu (najlepiej na górze).

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
34 minuty temu, Kormic napisał:

Dla wszystkich w potrzebie załączam funkcję translateTimespan():

function translateTimespan(t: timespan) :: text:
	set {_t} to "%{_t}%"
	replace all "seconds" with "sekund" in {_t}
	replace all "second" with "sekunde" in {_t}
	replace all "minutes" with "minut" in {_t}
	replace all "minute" with "minute" in {_t}
	replace all "hours" with "godzin" in {_t}
	replace all "hour" with "godzine" in {_t}
	replace all "months" with "miesiecy" in {_t}
	replace all "month" with "miesiac" in {_t}
	replace all "years" with "lat" in {_t}
	replace all "year" with "rok" in {_t}
	return "%{_t}%"

Wystarczy ją wkleić gdzieś do kodu (najlepiej na górze).

dzięki, mam tę funkcję w poprzednim skrypcie :) 

 

temat do zamknięcia 

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ę...