Sam w sobie skrypt dziala jednak zapetla jedna wartosc oraz zamiast nickow jest <none>
Kod:
on load:
set {symbol} to " ---> "
function createTop(t: string, i: integer) :: strings:
set {_offlinePlayers::*} to all offline players
loop {_offlinePlayers::*}:
if {%{_t}%::%loop-value%} is set:
add {%{_t}%::%loop-value%} to {_top::*}
add loop-value to {_players::*}
loop {_i} times:
set {_max} to max({_top::*})
loop {_top::*}:
if loop-value-2 = {_max}:
set {_index} to loop-index
delete {_top::%{_index}%}
add "%{_players::%{_index}%}%%{symbol}%%{_max}%" to {_return::*}
delete {_players::%{_index}%}
return {_return::*}
function getTop(t: string, list: strings) :: strings:
loop {_list::*}:
set {_split::*} to loop-value split at {symbol}
add {_split::1} to {_players::*}
add {_split::2} to {_top::*}
if {_t} = "players":
return {_players::*}
else:
return {_top::*}
on inventory click:
if "%inventory name of player's current inventory%" is "&8[ &6Topki Serwerowe &8]":
cancel event
options:
format: &7{TOP}. &f{NICK} &8» &6{VALUE}
command /top [<text>]:
trigger:
open chest with 1 rows named "&8[ &6Topki Serwerowe &8]" to player
set {_topki::*} to createTop("coins", 8)
set {_i} to diamond named "&eTop posiadanych coinsow"
set {_line} to 1
loop {_topki::*}:
set {_list::*} to loop-value split at " ---> "
set {_f} to "{@format}"
replace all "{TOP}" with "%loop-index%" in {_f}
replace all "{NICK}" with "%{_list::1}%" in {_f}
replace all "{VALUE}" with "%{_list::2}%" in {_f}
set line {_line} of lore of {_i} to colored {_f}
add 1 to {_line}
set player's current inventory's slot 0 to {_i}
Pytanie
Funek1337 8
Sam w sobie skrypt dziala jednak zapetla jedna wartosc oraz zamiast nickow jest <none>
Kod:
on load: set {symbol} to " ---> " function createTop(t: string, i: integer) :: strings: set {_offlinePlayers::*} to all offline players loop {_offlinePlayers::*}: if {%{_t}%::%loop-value%} is set: add {%{_t}%::%loop-value%} to {_top::*} add loop-value to {_players::*} loop {_i} times: set {_max} to max({_top::*}) loop {_top::*}: if loop-value-2 = {_max}: set {_index} to loop-index delete {_top::%{_index}%} add "%{_players::%{_index}%}%%{symbol}%%{_max}%" to {_return::*} delete {_players::%{_index}%} return {_return::*} function getTop(t: string, list: strings) :: strings: loop {_list::*}: set {_split::*} to loop-value split at {symbol} add {_split::1} to {_players::*} add {_split::2} to {_top::*} if {_t} = "players": return {_players::*} else: return {_top::*} on inventory click: if "%inventory name of player's current inventory%" is "&8[ &6Topki Serwerowe &8]": cancel event options: format: &7{TOP}. &f{NICK} &8» &6{VALUE} command /top [<text>]: trigger: open chest with 1 rows named "&8[ &6Topki Serwerowe &8]" to player set {_topki::*} to createTop("coins", 8) set {_i} to diamond named "&eTop posiadanych coinsow" set {_line} to 1 loop {_topki::*}: set {_list::*} to loop-value split at " ---> " set {_f} to "{@format}" replace all "{TOP}" with "%loop-index%" in {_f} replace all "{NICK}" with "%{_list::1}%" in {_f} replace all "{VALUE}" with "%{_list::2}%" in {_f} set line {_line} of lore of {_i} to colored {_f} add 1 to {_line} set player's current inventory's slot 0 to {_i}Wersja skript: 2.2
Edytowane przez HeezQWrzucam zdjęcie w link bezpośredni
Notatka dodana przez HeezQ
Odnośnik do komentarza
https://skript.pl/temat/34071-nie-dzia%C5%82aj%C4%85cy-skrypt-na-topki/Udostępnij na innych stronach
3 odpowiedzi na to pytanie
Rekomendowane odpowiedzi
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ą.