Skocz do zawartości
  • 0

Kity


FezZu

Pytanie

Czesc! Potrzebuje skryptu na /kit.

Chce aby było tam ile czasu zostało do odebrania znowu kitu. np. &cTen zestaw będziesz mógl odebrać za: 23h59m50s.

 

Dla tego co będzie robił:

Zrób tylko 1 kit, ja sobie to poedytuje.

 

              Z Góry dziękuje

 

Odnośnik do komentarza
https://skript.pl/temat/31111-kity/
Udostępnij na innych stronach

9 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
#
# This script is a template for commands which have a cooldown.
# I will add a more intuitive way of handling cooldowns/countdowns in the future,
# But for now please use something like this.
# Make sure that you do not use delays for cooldowns as they stop when the server stops.
#

# This command allows each player to get infinite cakes
# but the command has a cooldown of one minute (per player)
command /cake:
	description: Recieve a cake, but you can only do this once per minute!
	permission: cake.is_a_lie
	executable by: players
	trigger:
		# stores how long it's been since the player last used this command
		set {_waited} to difference between {cake.%player%.lastused} and now
		# checks whether the player has used the command within the last minute
		if {_waited} is less than a minute:
			message "You have to wait %difference between a minute and {_waited}% before you can use this command again!"
			stop
		
		# some condition which sould not start the cooldown
		# (if the player doesn't get the cake he should be able to use the command again immediately)
		player doesn't have space for a cake:
			message "You do not have enough space in your inventory to hold the cake!"
			stop
			
		# do the action of the command
		give a cake to the player
		
		# and finally start the cooldown
		set {cake.%player%.lastused} to now

 

Odnośnik do komentarza
https://skript.pl/temat/31111-kity/#findComment-202629
Udostępnij na innych stronach

  • 0
11 minut temu, Zaaxel napisał:

#
# This script is a template for commands which have a cooldown.
# I will add a more intuitive way of handling cooldowns/countdowns in the future,
# But for now please use something like this.
# Make sure that you do not use delays for cooldowns as they stop when the server stops.
#

# This command allows each player to get infinite cakes
# but the command has a cooldown of one minute (per player)
command /cake:
	description: Recieve a cake, but you can only do this once per minute!
	permission: cake.is_a_lie
	executable by: players
	trigger:
		# stores how long it's been since the player last used this command
		set {_waited} to difference between {cake.%player%.lastused} and now
		# checks whether the player has used the command within the last minute
		if {_waited} is less than a minute:
			message "You have to wait %difference between a minute and {_waited}% before you can use this command again!"
			stop
		
		# some condition which sould not start the cooldown
		# (if the player doesn't get the cake he should be able to use the command again immediately)
		player doesn't have space for a cake:
			message "You do not have enough space in your inventory to hold the cake!"
			stop
			
		# do the action of the command
		give a cake to the player
		
		# and finally start the cooldown
		set {cake.%player%.lastused} to now

 

nie da sie go tak przerobic.

Odnośnik do komentarza
https://skript.pl/temat/31111-kity/#findComment-202631
Udostępnij na innych stronach

  • 0
28 minut temu, FezZu napisał:

nie da sie go tak przerobic.

Da się jeżeli logicznie się myśli, ja zrobiłem pod coś innego jednak pozostały czas pokazuje w dziwny sposób bona przykład "29 days and 23.95 hours"

Odnośnik do komentarza
https://skript.pl/temat/31111-kity/#findComment-202634
Udostępnij na innych stronach

  • 0

Lepszego skryptu na kity nie znajdziesz: 

 

1 godzinę temu, Zaaxel napisał:

Da się jeżeli logicznie się myśli, ja zrobiłem pod coś innego jednak pozostały czas pokazuje w dziwny sposób bona przykład "29 days and 23.95 hours"

Jeżeli się logicznie myśli to przerobienie daty ze Skripta na jakąś normalną też nie będzie stanowić problemu.

 

+Ciekawostka: Od Skript 2.2 dev34 (chyba) cooldown w komendzie można dodawać w ten sposób:

command /komenda [<text>]:
	cooldown: 3 seconds
	cooldown message: Zwolnij szatanie.
	trigger:
		send arg 1

 

Odnośnik do komentarza
https://skript.pl/temat/31111-kity/#findComment-202653
Udostępnij na innych stronach

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Nieaktywny
Odpowiedz na pytanie...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

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

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