From c564106e55cd9f850df74dbde6beae82c936b38e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 17 May 2020 14:29:36 -0300 Subject: I'm forced to declare FYEventUsesRanking() in scoreboards.txt but anyway. This should fix some ugliness. --- npc/functions/scoreboards.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'npc/functions/scoreboards.txt') 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"; -- cgit v1.2.3-70-g09d2