Skocz do zawartości
  • 0

Skrypt na aktywność


Pytanie

Siema potrzebowałbym skrypt mierzący aktywność graczy na serwerze 
komenda /czas (player) [bez argumentu czas gracza wywołującego komende]

najlepiej w gui:

pokazany czas spędzony łącznie na serwerze

czas ogólnie spędzony na serwerze

top osób które spędziły najwięcej czasu ogólnie na serwerze 
 

Odnośnik do komentarza
https://skript.pl/temat/34846-skrypt-na-aktywno%C5%9B%C4%87/
Udostępnij na innych stronach

4 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
29 minut temu, DαrϰVεnuς napisał:

jest to dobry skrypt ale nie ma gui i topki osób 

 

Odnośnik do komentarza
https://skript.pl/temat/34846-skrypt-na-aktywno%C5%9B%C4%87/#findComment-223956
Udostępnij na innych stronach

  • 0
on join:
	if {Time::spent::%player%} is not set:
		set {Time::spent::%player%} to 0 seconds
	set {Time::lastseen::%player%} to now
on quit:
	add difference between {Time::lastseen::%player%} and now to {Time::spent::%player%}
	set {Time::lastseen::%player%} to now
command /czas [<text="%player%">]:
	trigger:
		if {Time::spent::%argument%} is not set:
			send "&cBłąd: Nie ma takiego gracza."
			stop
		set {Time::openedinventory::%player%} to true
		set {_target} to argument parsed as offline player
		open chest with 6 rows named "&eCzas" to player
		loop 54 times:
			set slot loop-number -1 of player's current inventory to green glass pane named " "
		set slot 4 of player's current inventory to {_target}'s skull named "&9%argument%"
		while {Time::openedinventory::%player%} is set:
			set {_total} to {Time::spent::%argument%}
			if {_target} is online:
				set {_session} to difference between {Time::lastseen::%argument%} and now
				set {_t} to "%{_session}%"
				replace "days" and "day" with "dni" in {_t}
				replace "hours" and "hour" with "godzin" in {_t}
				replace "minutes" and "minute" with "minut" in {_t}
				replace "seconds" and "second" with "sekund" in {_t}
				replace " and" with "" in {_t}
				set slot 11 of player's current inventory to clock named "&aBieżąca sesja" with lore "&c%{_t}%"
				add {_session} to {_total}
			else:
				set slot 11 of player's current inventory to ender pearl named "&aOstatnio widziany" with lore "&c%{Time::lastseen::%argument%}%"
			set {_t} to "%{_total}%"
			replace "days" and "day" with "dni" in {_t}
			replace "hours" and "hour" with "godzin" in {_t}
			replace "minutes" and "minute" with "minut" in {_t}
			replace "seconds" and "second" with "sekund" in {_t}
			replace " and" with "" in {_t}
			set slot 15 of player's current inventory to paper named "&aŁączny czas gry" with lore "&c%{_t}%"
			set {_s} to 29
			loop {Time::spent::*}:
				add loop-index to {_players::*}
			loop 10 times:
				loop {_players::*}:
					set {_ttarget} to loop-value-2 parsed as offline player
					set {_total} to {Time::spent::%loop-value-2%}
					if {_ttarget} is online:
						add difference between {Time::lastseen::%loop-value-2%} and now to {_total}
					if {_top::%loop-number%::player} is not set:
						set {_top::%loop-number%::player} to loop-value-2
						set {_top::%loop-number%::total} to {_total}
					else if {_total} is more than {_top::%loop-number%::total}:
						set {_top::%loop-number%::player} to loop-value-2
						set {_top::%loop-number%::total} to {_total}
				remove {_top::%loop-number%::player} from {_players::*}
				if {_top::%loop-number%::player} is set:
					set {_ttarget} to {_top::%loop-number%::player} parsed as offline player
					set {_t} to "%{_top::%loop-number%::total}%"
					replace "days" and "day" with "dni" in {_t}
					replace "hours" and "hour" with "godzin" in {_t}
					replace "minutes" and "minute" with "minut" in {_t}
					replace "seconds" and "second" with "sekund" in {_t}
					replace " and" with "" in {_t}
					set slot {_s} of player's current inventory to {_ttarget}'s skull named "&6%loop-number%. &9%{_ttarget}%" with lore "&c%{_t}%"
					add 1 to {_s}
					if {_s} is 33:
						add 5 to {_s}
				else:
					exit loop
			wait a second
on inventory click:
	if inventory name of player's current inventory is "&eCzas":
		cancel event
on inventory close:
	if {Time::openedinventory::%player%} is set:
		clear {Time::openedinventory::%player%}

 

Do napisania dodatkowy kod który przelicza dziesiętne części godzin na minuty, minut na sekundy.

Odnośnik do komentarza
https://skript.pl/temat/34846-skrypt-na-aktywno%C5%9B%C4%87/#findComment-223958
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ę...