diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-05-17 14:29:36 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-05-17 14:29:36 -0300 |
commit | c564106e55cd9f850df74dbde6beae82c936b38e (patch) | |
tree | 72af0e7c597806c5ab4b921c632fff4ba4618f86 /npc/functions/scoreboards.txt | |
parent | e1ab16e6730e3ceac2a048a01292721caf919f43 (diff) | |
download | serverdata-c564106e55cd9f850df74dbde6beae82c936b38e.tar.gz serverdata-c564106e55cd9f850df74dbde6beae82c936b38e.tar.bz2 serverdata-c564106e55cd9f850df74dbde6beae82c936b38e.tar.xz serverdata-c564106e55cd9f850df74dbde6beae82c936b38e.zip |
I'm forced to declare FYEventUsesRanking() in scoreboards.txt but anyway.
This should fix some ugliness.
Diffstat (limited to 'npc/functions/scoreboards.txt')
-rw-r--r-- | npc/functions/scoreboards.txt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/npc/functions/scoreboards.txt b/npc/functions/scoreboards.txt index 083723b05..3c501653e 100644 --- a/npc/functions/scoreboards.txt +++ b/npc/functions/scoreboards.txt @@ -4,6 +4,16 @@ // Description: // Leaderboards + GM Command Log +// Returns if an event is a ranked Aurora Event or not +// (Had to be moved from functions/aurora.txt) +function script FYEventUsesRanking { + setarray .@av$, "Expo", "Fishing"; + if (array_find(.@av$, $EVENT$) >= 0) { + return true; + } + return false; +} + function script ScoreboardsReload { debugmes "Reloading scoreboards..."; .@nb = query_sql("select name, zeny from `char` WHERE `guild_id`!=1 ORDER BY zeny DESC LIMIT 15", $@hofortune_name$, $@hofortune_value); @@ -25,7 +35,7 @@ function script ScoreboardsReload { .@nb = query_sql("SELECT c.name, i.count2 FROM `quest` AS i, `char` AS c WHERE i.quest_id="+SQuest_Christmas+" AND i.char_id=c.char_id ORDER BY i.count2 DESC LIMIT 5", $@xmas_box_name$, $@xmas_box_value); .@nb = query_sql("SELECT c.name, i.count3 FROM `quest` AS i, `char` AS c WHERE i.quest_id="+SQuest_Christmas+" AND i.char_id=c.char_id ORDER BY i.count3 DESC LIMIT 5", $@xmas_gp_name$, $@xmas_gp_value); } - if ($EVENT$ == "Expo" || $EVENT$ == "Fishing") { + if (FYEventUsesRanking()) { .@nb = query_sql("SELECT c.name, i.count2 FROM `quest` AS i, `char` AS c WHERE i.quest_id="+Q_AuroraEvent+" AND i.char_id=c.char_id ORDER BY i.count2 DESC LIMIT 10", $@aurora_name$, $@aurora_value); } debugmes "Scoreboards reloaded"; |