Tried separating code exec from fetching

main
Anorak_1 2022-12-02 20:56:45 +00:00
parent 8d80f0d021
commit 4e3c8aff4d
1 changed files with 86 additions and 112 deletions

198
papik.sk
View File

@ -132,115 +132,98 @@ on placeholderapi placeholder request for the prefix "game":
if the identifier is "hra":
set {_name} to "Hry" parsed as offline player
set the result to placeholder "objective_score_XD" from {_name}
every 10 seconds:
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}
clear {4stteam}
clear {5stteam}
clear {6stteam}
clear {7stteam}
clear {8stteam}
clear {9stteam}
clear {10stteam}
set {1stset} to ""
set {2stset} to ""
set {3stset} to ""
set {4stset} to ""
set {5stset} to ""
set {6stset} to ""
set {7stset} to ""
set {8stset} to ""
set {9stset} to ""
set {10stset} to ""
loop 10 times:
if 10st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {10stteam} is not set:
set {10stteam} to "IDList%loop-number%"
set {10stset} to "True"
continue
if 9st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {9stteam} is not set:
set {9stteam} to "IDList%loop-number%"
set {9stset} to "True"
continue
if 8st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {8stteam} is not set:
set {8stteam} to "IDList%loop-number%"
set {8stset} to "True"
continue
if 7st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {7stteam} is not set:
set {7stteam} to "IDList%loop-number%"
set {7stset} to "True"
continue
if 6st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {6stteam} is not set:
set {6stteam} to "IDList%loop-number%"
set {6stset} to "True"
continue
if 5st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {5stteam} is not set:
set {5stteam} to "IDList%loop-number%"
set {5stset} to "True"
continue
if 4st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {3stteam} is not set:
set {4stteam} to "IDList%loop-number%"
set {4stset} to "True"
continue
if 3st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {3stteam} is not set:
set {3stteam} to "IDList%loop-number%"
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%"
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%"
set {1stset} to "True"
on placeholderapi placeholder request for the prefix "game1":
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}
clear {4stteam}
clear {5stteam}
clear {6stteam}
clear {7stteam}
clear {8stteam}
clear {9stteam}
clear {10stteam}
set {1stset} to ""
set {2stset} to ""
set {3stset} to ""
set {4stset} to ""
set {5stset} to ""
set {6stset} to ""
set {7stset} to ""
set {8stset} to ""
set {9stset} to ""
set {10stset} to ""
loop 10 times:
if 10st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {10stteam} is not set:
set {10stteam} to "IDList%loop-number%"
#remove "IDList%loop-number%" from {_teams::*}
set {10stset} to "True"
continue
if 9st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {9stteam} is not set:
set {9stteam} to "IDList%loop-number%"
#remove "IDList%loop-number%" from {_teams::*}
set {9stset} to "True"
continue
if 8st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {8stteam} is not set:
set {8stteam} to "IDList%loop-number%"
#remove "IDList%loop-number%" from {_teams::*}
set {8stset} to "True"
continue
if 7st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {7stteam} is not set:
set {7stteam} to "IDList%loop-number%"
#remove "IDList%loop-number%" from {_teams::*}
set {7stset} to "True"
continue
if 6st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {6stteam} is not set:
set {6stteam} to "IDList%loop-number%"
#remove "IDList%loop-number%" from {_teams::*}
set {6stset} to "True"
continue
if 5st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {5stteam} is not set:
set {5stteam} to "IDList%loop-number%"
#remove "IDList%loop-number%" from {_teams::*}
set {5stset} to "True"
continue
if 4st element of {team_all_point::*} is {teampoints::IDList%loop-number%}:
if {3stteam} is not set:
set {4stteam} to "IDList%loop-number%"
#remove "IDList%loop-number%" from {_teams::*}
set {4stset} to "True"
continue
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 100
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 "&r&7-"
else:
#set the result to "%prefix of team {1stteam}% &r%{teampoints::%{1stteam}%}%"
set the result to "&r%teamInfo({1stteam})% &r%{teampoints::%{1stteam}%}%"
else:
set the result to "&7-"
@ -250,7 +233,6 @@ on placeholderapi placeholder request for the prefix "game1":
if {teampoints::%{2stteam}%} is 0:
set the result to "&7-"
else:
#set the result to "%prefix of team {2stteam}% &r%{teampoints::%{2stteam}%}%"
set the result to "&r%teamInfo({2stteam})% &r%{teampoints::%{2stteam}%}%"
else:
set the result to "&7-"
@ -259,7 +241,6 @@ on placeholderapi placeholder request for the prefix "game1":
if {teampoints::%{3stteam}%} is 0:
set the result to "&7-"
else:
#set the result to "%prefix of team {3stteam}% &r%{teampoints::%{3stteam}%}%"
set the result to "&r%teamInfo({3stteam})% &r%{teampoints::%{3stteam}%}%"
else:
set the result to "&7-"
@ -268,7 +249,6 @@ on placeholderapi placeholder request for the prefix "game1":
if {teampoints::%{4stteam}%} is 0:
set the result to "&7-"
else:
#set the result to "%prefix of team {4stteam}% &r%{teampoints::%{4stteam}%}%"
set the result to "&r%teamInfo({4stteam})% &r%{teampoints::%{4stteam}%}%"
else:
set the result to "&7-"
@ -277,7 +257,6 @@ on placeholderapi placeholder request for the prefix "game1":
if {teampoints::%{5stteam}%} is 0:
set the result to "&7-"
else:
#set the result to "%prefix of team {5stteam}% &r%{teampoints::%{5stteam}%}%"
set the result to "&r%teamInfo({5stteam})% &r%{teampoints::%{5stteam}%}%"
else:
set the result to "&7-"
@ -286,7 +265,6 @@ on placeholderapi placeholder request for the prefix "game1":
if {teampoints::%{6stteam}%} is 0:
set the result to "&7-"
else:
#set the result to "%prefix of team {6stteam}% &r%{teampoints::%{6stteam}%}%"
set the result to "&r%teamInfo({6stteam})% &r%{teampoints::%{6stteam}%}%"
else:
set the result to "&7-"
@ -295,7 +273,6 @@ on placeholderapi placeholder request for the prefix "game1":
if {teampoints::%{7stteam}%} is 0:
set the result to "&7-"
else:
#set the result to "%prefix of team {7stteam}% &r%{teampoints::%{7stteam}%}%"
set the result to "&r%teamInfo({7stteam})% &r%{teampoints::%{7stteam}%}%"
else:
set the result to "&7-"
@ -304,7 +281,6 @@ on placeholderapi placeholder request for the prefix "game1":
if {teampoints::%{8stteam}%} is 0:
set the result to "&7-"
else:
#set the result to "%prefix of team {8stteam}% &r%{teampoints::%{8stteam}%}%"
set the result to "&r%teamInfo({8stteam})% &r%{teampoints::%{8stteam}%}%"
else:
set the result to "&7-"
@ -313,7 +289,6 @@ on placeholderapi placeholder request for the prefix "game1":
if {teampoints::%{9stteam}%} is 0:
set the result to "&7-"
else:
#set the result to "%prefix of team {9stteam}% &r%{teampoints::%{9stteam}%}%"
set the result to "&r%teamInfo({9stteam})% &r%{teampoints::%{9stteam}%}%"
else:
set the result to "&7-"
@ -322,7 +297,6 @@ on placeholderapi placeholder request for the prefix "game1":
if {teampoints::%{10stteam}%} is 0:
set the result to "&7-"
else:
#set the result to "%prefix of team {10stteam}% &r%{teampoints::%{10stteam}%}%"
set the result to "&r%teamInfo({10stteam})% &r%{teampoints::%{10stteam}%}%"
else:
set the result to "&7-"