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 | |
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')
-rw-r--r-- | npc/003-1/events.txt | 7 | ||||
-rw-r--r-- | npc/functions/aurora.txt | 3 | ||||
-rw-r--r-- | npc/functions/scoreboards.txt | 12 |
3 files changed, 18 insertions, 4 deletions
diff --git a/npc/003-1/events.txt b/npc/003-1/events.txt index 4cb31b4e8..8bcbaeb6a 100644 --- a/npc/003-1/events.txt +++ b/npc/003-1/events.txt @@ -333,7 +333,7 @@ L_Aurora: select l("Event Details"), l("Event Ranking Rewards"), - l("Current Rankings"), + rif(FYEventUsesRanking(), l("Current Rankings")), l("List rewards"), l("Claim rewards"), l("That's all, thanks!"); @@ -405,7 +405,10 @@ function auroraRankings { } function auroraCurrentRankings { - HallOfAurora(); + if (FYEventUsesRanking()) + HallOfAurora(); + else + mesq l("Personally, I like unranked events more than ranked ones..."); return; } diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt index e0d9aa5ef..1eca1f6a8 100644 --- a/npc/functions/aurora.txt +++ b/npc/functions/aurora.txt @@ -7,7 +7,7 @@ // // Controls weekly events so Saulc, seeds and I can take vacations. // See also: seasons.txt, command/event.txt, event.txt, 003-1/events.txt -// soulmenhir.txt and, of course, the event maps (if any). +// soulmenhir.txt, scoreboards.txt and, of course, the event maps (if any). // Aurora Event Framework functions are called by event.txt // specs override and is overriden by those defined in commands/event.txt @@ -188,6 +188,7 @@ function script FYStopEvent { return; } + // Handle the ending of Aurora Events function script FYRewardEvent { setarray .@av$, "Expo", "Fishing"; 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"; |