Skript_flags/papik.sk

167 lines
7.4 KiB
Plaintext
Raw Normal View History

2022-08-12 18:34:10 +00:00
command /scoreupdate:
permission: skript.op
trigger:
set {teampoints_reset} to 0
on join:
set join message to "§e%player% se připojil."
on quit:
set leave message to "§e%player% se odpojil."
on placeholderapi placeholder request for the prefix "player":
2022-09-13 18:24:15 +00:00
if the identifier is "znak":
2022-09-13 18:29:06 +00:00
if placeholder "team_name" from player is "IDList1":
set the result to "紅"
if placeholder "team_name" from player is "IDList2":
set the result to "橙"
if placeholder "team_name" from player is "IDList3":
set the result to "黃"
if placeholder "team_name" from player is "IDList4":
set the result to "婊"
if placeholder "team_name" from player is "IDList5":
set the result to "綠"
if placeholder "team_name" from player is "IDList6":
set the result to "松"
if placeholder "team_name" from player is "IDList7":
set the result to "色"
if placeholder "team_name" from player is "IDList8":
set the result to "藍"
if placeholder "team_name" from player is "IDList9":
set the result to "紫"
if placeholder "team_name" from player is "IDList10":
set the result to "粉"
2022-09-13 18:31:00 +00:00
if the identifier is "jmeno":
if placeholder "team_name" from player is "IDList1":
2022-09-13 18:35:25 +00:00
set the result to "&cKarmínová"
2022-09-13 18:31:00 +00:00
if placeholder "team_name" from player is "IDList2":
2022-09-13 18:35:25 +00:00
set the result to "&6Jantarová"
2022-09-13 18:31:00 +00:00
if placeholder "team_name" from player is "IDList3":
2022-09-13 18:35:25 +00:00
set the result to "&eKrémová"
2022-09-13 18:31:00 +00:00
if placeholder "team_name" from player is "IDList4":
2022-09-13 18:35:25 +00:00
set the result to "&aLimetková"
2022-09-13 18:31:00 +00:00
if placeholder "team_name" from player is "IDList5":
2022-09-13 18:35:25 +00:00
set the result to "&2Smaragdová"
2022-09-13 18:31:00 +00:00
if placeholder "team_name" from player is "IDList6":
2022-09-13 18:35:25 +00:00
set the result to "&3Azurová"
2022-09-13 18:31:00 +00:00
if placeholder "team_name" from player is "IDList7":
2022-09-13 18:35:25 +00:00
set the result to "&bBlankytná"
2022-09-13 18:31:00 +00:00
if placeholder "team_name" from player is "IDList8":
2022-09-13 18:35:25 +00:00
set the result to "&9Nebeská"
2022-09-13 18:31:00 +00:00
if placeholder "team_name" from player is "IDList9":
2022-09-13 18:35:25 +00:00
set the result to "&5Nachová"
2022-09-13 18:31:00 +00:00
if placeholder "team_name" from player is "IDList10":
2022-09-13 18:35:25 +00:00
set the result to "&dŠvestková"
2022-09-13 18:31:00 +00:00
2022-09-13 18:24:15 +00:00
2022-08-12 18:34:10 +00:00
if the identifier is "teammate": # The placeholder would be 'custom_message'
loop entries of team placeholder "team_name" from player:
if loop-value is not player:
if loop-value's gamemode is spectator:
add "§m&7%loop-value% ☠" to {_team_players::*}
else:
add "%loop-value% §a%loop-value's health * 2%%placeholder "team_color" from player%❤" to {_team_players::*}
if {_team_players::*} is not set:
set the result to "&7-"
else:
set the result to "%{_team_players::*}%"
if the identifier is "myself":
set the result to "%player% §a%player's health * 2%%placeholder "team_color" from player%❤"
if the identifier is "teampoints":
loop entries of team placeholder "team_name" from player:
add placeholder "objective_score_GridoGames" from loop-value to {_team_points::*}
loop {_team_points::*}:
set {_team_point} to {_team_point} + loop-value parsed as integer
set the result to "%{_team_point}%"
on placeholderapi placeholder request for the prefix "game":
2022-09-11 17:35:41 +00:00
if the identifier is "maxkola":
set {_name} to "MaxKolo" parsed as offline player
set the result to placeholder "objective_score_XD" from {_name}
if the identifier is "minuta":
set {_name} to "Minuty" parsed as offline player
set the result to placeholder "objective_score_XD" from {_name}
if the identifier is "sekunda":
set {_name} to "Sekundy" parsed as offline player
set the result to placeholder "objective_score_XD" from {_name}
2022-08-12 18:34:10 +00:00
if the identifier is "kola":
set {_name} to "Kola" parsed as offline player
set the result to placeholder "objective_score_XD" from {_name}
if the identifier is "hra":
set {_name} to "Hry" parsed as offline player
set the result to placeholder "objective_score_XD" from {_name}
if the identifier is "poradi1":
if {teampoints_reset} < 0:
set {_lu} to "Anorak_1" parsed as player
clear {team_all_points::*}
loop 10 times:
clear {_team_point}
clear {_team_points::*}
loop entries of team "IDList%loop-number%":
add placeholder "objective_score_GridoGames" from loop-value-2 to {_team_points::*}
loop {_team_points::*}:
set {_team_point} to {_team_point} + loop-value-2 parsed as integer
if entries of team "IDList%loop-number%" is set:
set {teampoints::IDList%loop-number%} to {_team_point}
add {_team_point} to {team_all_points::*}
set {team_all_point::*} to reversed sorted {team_all_points::*}
clear {1stteam}
clear {2stteam}
clear {3stteam}
set {1stset} to ""
set {2stset} to ""
set {3stset} to ""
loop 10 times:
if 3st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {3stteam} is not set:
set {3stteam} to "IDList%loop-number%"
#remove "IDList%loop-number%" from {_teams::*}
set {3stset} to "True"
continue
if 2st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {2stteam} is not set:
set {2stteam} to "IDList%loop-number%"
#remove "IDList%loop-number%" from {_teams::*}
set {2stset} to "True"
continue
if 1st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {1stteam} is not set:
set {1stteam} to "IDList%loop-number%"
#remove "IDList%loop-number%" from {_teams::*}
set {1stset} to "True"
# reset loop
set {teampoints_reset} to 60
else: # {teampoints_reset} < 0:
set {teampoints_reset} to {teampoints_reset} - 1
if prefix of team {1stteam} is set:
if {teampoints::%{1stteam}%} is 0:
set the result to "&7-"
else:
set the result to "%prefix of team {1stteam}% &r%{teampoints::%{1stteam}%}%"
else:
set the result to "&7-"
#set {new::*} to sorted {play::*}
if the identifier is "poradi2":
if prefix of team {2stteam} is set:
if {teampoints::%{2stteam}%} is 0:
set the result to "&7-"
else:
set the result to "%prefix of team {2stteam}% &r%{teampoints::%{2stteam}%}%"
else:
set the result to "&7-"
if the identifier is "poradi3":
if prefix of team {3stteam} is set:
if {teampoints::%{3stteam}%} is 0:
set the result to "&7-"
else:
set the result to "%prefix of team {3stteam}% &r%{teampoints::%{3stteam}%}%"
else:
set the result to "&7-"