Category: Skript/Web
Suggested name: SkStats
What I want:
I want someone to make my stats skript
compatible so it can be displayed on a website similar to how this skript does it.
Ideas for commands:
Ideas for permissions:
When I'd like it by: Don't need it right now necessarily but I would like it in a reasonable time.
Suggested name: SkStats
What I want:
I want someone to make my stats skript
code_language.skript:
options:
p: &3&l(STATS)&7
t: &7
h: &a
h2: &f
debug: &8(DEBUG)&7
permissionError: &4&lERROR &cInsufficient Permissions
error: &4&lERROR&c
function modifyStats(p: player, stat: text, mode: text, modifier: text, a: integer):
set {_uuid} to {_p}'s uuid
if {_modifier} = "+":
add ({_a}) to {stats_.%{_mode}%.%{_stat}%::%{_uuid}%}
else if {_modifier} = "-":
remove ({_a}) from {stats_.%{_mode}%.%{_stat}%::%{_uuid}%}
function calculateRanking(p: player):
set {_uuid} to {_p}'s uuid
if {stats_.ranking.unrankedMatches.num::%{_uuid}%} > 0:
stop
if {stats_.ranking.num::%{_uuid}%} is between 0 and 99: # V
if {stats_.ranking::%{_uuid}%} = "&a&lIV":
simpleTitle("&cYou have been demoted||&a&lIV &a➜ &a&lV", 1, 5, 1, {_uuid})
set {stats_.ranking::%{_uuid}%} to "&a&lV"
else if {stats_.ranking.num::%{_uuid}%} is between 100 and 199: # IV
if {stats_.ranking::%{_uuid}%} = "&a&lV":
simpleTitle("&2You have been promoted||&a&lV &a➜ &a&lIV", 1, 5, 1, {_uuid})
loop 5 times:
wait 0.5 seconds
launch "BALL_LARGE" firework at {_uuid} timed 0 coloured "green" and "lime"
else if {stats_.ranking::%{_uuid}%} = "&a&lIII":
simpleTitle("&cYou have been demoted||&a&lIII &a➜ &a&lIV", 1, 5, 1, {_uuid})
set {stats_.ranking::%{_uuid}%} to "&a&lIV"
else if {stats_.ranking.num::%{_uuid}%} is between 200 and 299: # III
if {stats_.ranking::%{_uuid}%} = "&a&lIV":
simpleTitle("&2You have been promoted||&a&lIV &a➜ &a&lIII", 1, 5, 1, {_uuid})
loop 5 times:
wait 0.5 seconds
launch "BALL_LARGE" firework at {_uuid} timed 0 coloured "green" and "lime"
else if {stats_.ranking::%{_uuid}%} = "&a&lII":
simpleTitle("&cYou have been demoted||&a&lII &a➜ &a&lIII", 1, 5, 1, {_uuid})
set {stats_.ranking::%{_uuid}%} to "&a&lIII"
else if {stats_.ranking.num::%{_uuid}%} is between 300 and 399: # II
if {stats_.ranking::%{_uuid}%} = "&a&lII":
simpleTitle("&2You have been promoted||&a&lIII &a➜ &a&lII", 1, 5, 1, {_uuid})
loop 5 times:
wait 0.5 seconds
launch "BALL_LARGE" firework at {_uuid} timed 0 coloured "green" and "lime"
else if {stats_.ranking::%{_uuid}%} = "&a&lIII":
simpleTitle("&cYou have been demoted||&a&lI &a➜ &a&lII", 1, 5, 1, {_uuid})
set {stats_.ranking::%{_uuid}%} to "&a&lII"
else if {stats_.ranking.num::%{_uuid}%} is between 400 and 500: # I
if {stats_.ranking.num::%{_uuid}%} = "&a&lII":
simpleTitle("&2You have been promoted||&a&lII &a➜ &a&lI", 1, 5, 1, {_uuid})
loop 5 times:
wait 0.5 seconds
launch "BALL_LARGE" firework at {_uuid} timed 0 coloured "green" and "lime"
set {stats_.ranking::%{_uuid}%} to "&a&lI"
function modifyRankPoints(p: player, type: text):
set {_uuid} to {_p}'s uuid
if {_type} = "kills":
if {stats_.ranking::%{_uuid}%} = "&a&lV":
add 5 to {stats_.ranking.num::%{_uuid}%}
else if {stats_.ranking::%{_uuid}%} = "&a&lIV":
add 4 to {stats_.ranking.num::%{_uuid}%}
else if {stats_.ranking::%{_uuid}%} = "&a&lIII":
add 3 to {stats_.ranking.num::%{_uuid}%}
else if {stats_.ranking::%{_uuid}%} = "&a&lII":
add 2 to {stats_.ranking.num::%{_uuid}%}
else if {stats_.ranking::%{_uuid}%} = "&a&lI":
add 2 to {stats_.ranking.num::%{_uuid}%}
else if {stats_.ranking::%{_uuid}%} = "&a&lUnranked":
add 4 to {stats_.ranking.num::%{_uuid}%}
else if {_type} = "wins":
add 10 to {stats_.ranking.num::%{_uuid}%}
#broadcast "{@debug} placementMatches of &o%{_p}% &f%{stats_.ranking.unrankedMatches.num::%{_uuid}%}%"
if {stats_.ranking.unrankedMatches.num::%{_uuid}%} > 0:
remove 1 from {stats_.ranking.unrankedMatches.num::%{_uuid}%}
send "" to {_p}
send "&2&lYou have&r &a%{stats_.ranking.unrankedMatches.num::%{_uuid}%}% &2&lPlacement Matches remaining." to {_p}
send "" to {_p}
else if {stats_.ranking.unrankedMatches.num::%{_uuid}%} < 0:
calculateRanking({_p})
else if {_type} = "deaths":
if {stats_.ranking::%{_uuid}%} = "&a&lV":
remove 5 from {stats_.ranking.num::%{_uuid}%}
else if {stats_.ranking::%{_uuid}%} = "&a&lIV":
remove 6 from {stats_.ranking.num::%{_uuid}%}
else if {stats_.ranking::%{_uuid}%} = "&a&lIII":
remove 7 from {stats_.ranking.num::%{_uuid}%}
else if {stats_.ranking::%{_uuid}%} = "&a&lII":
remove 8 from {stats_.ranking.num::%{_uuid}%}
else if {stats_.ranking::%{_uuid}%} = "&a&lI":
remove 9 from {stats_.ranking.num::%{_uuid}%}
else if {stats_.ranking::%{_uuid}%} = "&a&lUnranked":
remove 6 from {stats_.ranking.num::%{_uuid}%}
#broadcast "{@debug} placementMatches of &o%{_p}% &f%{stats_.ranking.unrankedMatches.num::%{_uuid}%}%"
if {stats_.ranking.unrankedMatches.num::%{_uuid}%} > 0:
remove 1 from {stats_.ranking.unrankedMatches.num::%{_uuid}%}
send "" to {_p}
send "&2&lYou have&r &a%{stats_.ranking.unrankedMatches.num::%{_uuid}%}% &2&lPlacement Matches remaining." to {_p}
send "" to {_p}
else if {stats_.ranking.unrankedMatches.num::%{_uuid}%} < 0:
calculateRanking({_p})
command /stats [<offline player=%sender%>]:
trigger:
send "{@p} {@h2}%offline player-arg%'s {@t}Solo Stats" to sender
send ""
send " &8▪ &b&lRanking &a&l%{stats_.ranking::%offline player-arg's uuid%}%"
if {stats_.ranking::%offline player-arg's uuid%} = "&a&lUnranked":
send " &8▪ &b&lPlacement Matches Remaining &a%{stats_.ranking.unrankedMatches.num::%offline player-arg's uuid%}%"
send " &8▪ &bKills &f%{stats_.solo.kills::%offline player-arg's uuid%}%" to sender
send " &8▪ &bDeaths &f%{stats_.solo.deaths::%offline player-arg's uuid%}%" to sender
send " &8▪ &bGames Won &f%{stats_.solo.wins::%offline player-arg's uuid%}%" to sender
send " &8▪ &bGames Played &f%{stats_.solo.played::%offline player-arg's uuid%}%" to sender
command /resetStats [<offline player=%sender%>]:
permission: command.resetStats
permission message: {@permissionError}
trigger:
set {stats_.solo.kills::%offline player-arg's uuid%} to 0
set {stats_.solo.deaths::%offline player-arg's uuid%} to 0
set {stats_.solo.wins::%offline player-arg's uuid%} to 0
set {stats_.solo.played::%offline player-arg's uuid%} to 0
set {stats_.ranking.num::%offline player-arg's uuid%} to 150
set {stats_.ranking::%offline player-arg's uuid%} to "&a&lUnranked"
set {stats_.ranking.unrankedMatches.num::%offline player-arg's uuid%} to 10
on join:
if {stats_.solo.kills::%event-player's uuid%} is not set:
set {stats_.solo.kills::%event-player's uuid%} to 0
if {stats_.solo.deaths::%event-player's uuid%} is not set:
set {stats_.solo.deaths::%event-player's uuid%} to 0
if {stats_.solo.wins::%event-player's uuid%} is not set:
set {stats_.solo.wins::%event-player's uuid%} to 0
if {stats_.solo.played::%event-player's uuid%} is not set:
set {stats_.solo.played::%event-player's uuid%} to 0
if {stats_.ranking.num::%event-player's uuid%} is not set:
set {stats_.ranking.num::%event-player's uuid%} to 150
if {stats_.ranking::%event-player's uuid%} is not set:
set {stats_.ranking::%event-player's uuid%} to "&a&lUnranked"
if {stats_.ranking.unrankedMatches.num::%event-player's uuid%} is not set:
set {stats_.ranking.unrankedMatches.num::%event-player's uuid%} to 10
wait 0.5 seconds
calculateRanking(event-player)
Ideas for commands:
Ideas for permissions:
When I'd like it by: Don't need it right now necessarily but I would like it in a reasonable time.