summaryrefslogtreecommitdiff
path: root/npc/003-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-18 08:01:14 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-18 08:01:14 -0300
commitb5bef5ac0a351b6954282ad08dff0a2ac41bd731 (patch)
tree6d6c04331a86a3074282f1553d8051b0bf05d312 /npc/003-1
parentd4b6ef35782c2dececbe77734321d7e15eec5d48 (diff)
downloadserverdata-b5bef5ac0a351b6954282ad08dff0a2ac41bd731.tar.gz
serverdata-b5bef5ac0a351b6954282ad08dff0a2ac41bd731.tar.bz2
serverdata-b5bef5ac0a351b6954282ad08dff0a2ac41bd731.tar.xz
serverdata-b5bef5ac0a351b6954282ad08dff0a2ac41bd731.zip
Hopefully, if I did not forgot a bug along the way:
Aurora Ranked Events will be working! \o/ Remember to submit daily in order to get your points :3
Diffstat (limited to 'npc/003-1')
-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();