From 9fc926a4e8ebb8f827d45d60300ea6d993f2be82 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 16 May 2020 22:21:13 -0300 Subject: Prepare the essential part for handing Aurora Events ranked rewards --- npc/commands/event.txt | 3 +++ npc/functions/aurora.txt | 14 ++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'npc') diff --git a/npc/commands/event.txt b/npc/commands/event.txt index 0d9d161bf..f7a99bdda 100644 --- a/npc/commands/event.txt +++ b/npc/commands/event.txt @@ -69,6 +69,9 @@ function script sClear { kamibroadcast("Regnum's Blessing is over."); } + // Hand Aurora Event Rewards + callfunc("FYRewardEvent"); + // Simpler events $PATRICK_DAYCTRL=0; $PATRICK_DAYMAX=0; diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt index 217dfce8e..7ebd4c616 100644 --- a/npc/functions/aurora.txt +++ b/npc/functions/aurora.txt @@ -170,3 +170,17 @@ function script FYStopEvent { return; } +// Handle the ending of Aurora Events +function script FYRewardEvent { + setarray .@av$, "Expo", "Fishing"; + if (array_find(.@av$, $EVENT$) >= 0) { + debugmes("Rewards are due"); + // This code absolutely can't fail: + .@nb = query_sql("SELECT c.name, i.count2, c.char_id 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, $@aurora_charid); + // rodex_sendmail($@aurora_charid, "Aurora Events", "Event Reward!", "Message", gp, item, $@aurora_value); + // Destroy the quest + DelQuestFromEveryPlayer(Q_AuroraEvent); + } + return; +} + -- cgit v1.2.3-60-g2f50