From 1d24be501f3f3d733344826262964255f7c6c380 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 17 May 2020 04:11:49 -0300 Subject: Rankings from the Aurora Event Framework will now send rewards as expected. Rewards will be sent via rodex mail --- npc/functions/aurora.txt | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'npc') diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt index 5b84bf7b5..fc6d37004 100644 --- a/npc/functions/aurora.txt +++ b/npc/functions/aurora.txt @@ -195,7 +195,25 @@ function script FYRewardEvent { // 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); $MOST_HEROIC$=$@aurora_name$[0]; - // rodex_sendmail($@aurora_charid, "Aurora Events", "Event Reward!", "Message", gp, item, $@aurora_value); + for (.@i=0;.@i < getarraysize($@aurora_charid);.@i++) { + switch (.@i+1) { + case 1: + .@prize=120; break; + case 2: + .@prize=100; break; + case 3: + .@prize=80; break; + case 4: + case 5: + .@prize=60; break; + case 6: + case 7: + .@prize=40; break; + default: + .@prize=20; + } + rodex_sendmail($@aurora_charid[.@i], "Aurora Events", $EVENT$+" Reward!", "Final Ranking: #"+(.@i+1)+". Congratulations on making "+$@aurora_value[.@i]+" points on the event!", 0, StrangeCoin, .@prize); + } // Destroy the quest DelQuestFromEveryPlayer(Q_AuroraEvent); DelItemFromEveryPlayer(EventTreasure1); -- cgit v1.2.3-70-g09d2