summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/003-1/events.txt29
1 files changed, 22 insertions, 7 deletions
diff --git a/npc/003-1/events.txt b/npc/003-1/events.txt
index 09cc3da43..6521667f1 100644
--- a/npc/003-1/events.txt
+++ b/npc/003-1/events.txt
@@ -311,12 +311,6 @@ function handleStPatrick {
L_Aurora:
// Define script variables
.@WHAT$=l("event");
- // TODO: Three arrays: Min points, Reward ID, Reward Amount
- // A default, and the script may also override
- // (But, hmm, functions. Nasty; Better have them declared in aurora.txt)
- // FIXME: Server restart and data loss
- // TODO: Handle the collecting things in an extra menu / function; The core
- // should be in aurora.txt
// Fill them with specific details, if available
if ($EVENT$ == "Expo") {
@@ -416,6 +410,7 @@ function auroraRankings {
return;
}
+
function auroraCurrentRankings {
if (FYEventUsesRanking()) {
HallOfAurora();
@@ -426,11 +421,31 @@ function auroraCurrentRankings {
return;
}
-// TODO
+
function auroraListRewards {
+ .@s=getq2(Q_AuroraEvent);
+ .@r=getq3(Q_AuroraEvent);
+ mesn;
+ freeloop(true);
+ for (.@i=0; .@i < getarraysize($FYREWARD_PT); .@i++) {
+ mes l("%d pts - %d %s",
+ $FYREWARD_PT[.@i], $FYREWARD_AM[.@i], getitemlink($FYREWARD_ID[.@i]));
+ // You're at this milestone? Hmm
+ if (.@r == .@i) {
+ // Your score is enough: rank you up
+ if (.@s >= $FYREWARD_PT[.@i]) {
+ inventoryplace $FYREWARD_ID[.@i], $FYREWARD_AM[.@i];
+ getitem $FYREWARD_ID[.@i], $FYREWARD_AM[.@i];
+ .@r+=1;
+ setq3 Q_AuroraEvent, .@r;
+ }
+ }
+ }
+ freeloop(false);
return;
}
+
function auroraSubmit {
.@q2=getq2(Q_AuroraEvent);
FYE_Submit();