summaryrefslogtreecommitdiff
path: root/npc/functions/aurora.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-17 04:11:49 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-17 04:11:49 -0300
commit1d24be501f3f3d733344826262964255f7c6c380 (patch)
tree34f3ae2f645acbec9a704e4b3b8f4b62ffb7f19f /npc/functions/aurora.txt
parentb3743ce47335ae8c41730b73ee3a8365f29baa6f (diff)
downloadserverdata-1d24be501f3f3d733344826262964255f7c6c380.tar.gz
serverdata-1d24be501f3f3d733344826262964255f7c6c380.tar.bz2
serverdata-1d24be501f3f3d733344826262964255f7c6c380.tar.xz
serverdata-1d24be501f3f3d733344826262964255f7c6c380.zip
Rankings from the Aurora Event Framework will now send rewards as expected.
Rewards will be sent via rodex mail
Diffstat (limited to 'npc/functions/aurora.txt')
-rw-r--r--npc/functions/aurora.txt20
1 files changed, 19 insertions, 1 deletions
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);