summaryrefslogtreecommitdiff
path: root/npc/003-1/events.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-17 14:07:00 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-17 14:07:00 -0300
commit4bcefd14ac0a97b27e8b6a44cfd838b8c34f1ba1 (patch)
tree72eba20b447327d58d1fd6d531be142ba4f27615 /npc/003-1/events.txt
parent0b33ade667185acb95cec7e9b19b74fdfdc63f0f (diff)
downloadserverdata-4bcefd14ac0a97b27e8b6a44cfd838b8c34f1ba1.tar.gz
serverdata-4bcefd14ac0a97b27e8b6a44cfd838b8c34f1ba1.tar.bz2
serverdata-4bcefd14ac0a97b27e8b6a44cfd838b8c34f1ba1.tar.xz
serverdata-4bcefd14ac0a97b27e8b6a44cfd838b8c34f1ba1.zip
Hopefully, this will NOT break Easter and Valentine.
We will know for sure next year, cya %%a
Diffstat (limited to 'npc/003-1/events.txt')
-rw-r--r--npc/003-1/events.txt58
1 files changed, 44 insertions, 14 deletions
diff --git a/npc/003-1/events.txt b/npc/003-1/events.txt
index 1def03e13..5e8580376 100644
--- a/npc/003-1/events.txt
+++ b/npc/003-1/events.txt
@@ -2,31 +2,60 @@
// Author:
// Jesusalva
// Description:
-// The NPCs on this file are for when events end.
-// TODO: Unify the script, change the NPC display depending on event
-// Use duplicate() command to make it available in other towns as well
+// Controls events, part of Aurora Event System
+//
+// See also: functions/aurora.txt, functions/seasons.txt, command/event.txt,
+// event.txt, functions/soulmenhir.txt and, of course, the event maps (if any).
+//
+// Script Variables:
+// Q_AuroraEvent
+// Quest Variable: FYEVENT_CYCLE, Score, ClaimedControl
+//
+// TODO: Use duplicate() command to make it available in other towns as well
// Easter
003-1,47,53,0 script Aurora NPC_FEMALE,{
- function handleEaster();
- function handleValentine();
- function handleStPatrick();
- function handleAurora();
- // Switch annuals
+ function handleEaster;
+ function handleValentine;
+ function handleStPatrick;
+ function handleAurora;
+
+ // Handle annuals
+ //.@v_stday = getvariableofnpc(.valentine_stday, "#EventCore");
+ //.@v_stmon = getvariableofnpc(.valentine_stmon, "#EventCore");
+ .@v_endday = getvariableofnpc(.valentine_endday, "#EventCore");
+ .@v_endmon = getvariableofnpc(.valentine_endmon, "#EventCore");
+
+ //.@e_stday = getvariableofnpc(.easter_stday, "#EventCore");
+ //.@e_stmon = getvariableofnpc(.easter_stmon, "#EventCore");
+ .@e_endday = getvariableofnpc(.easter_endday, "#EventCore");
+ .@e_endmon = getvariableofnpc(.easter_endmon, "#EventCore");
+
+ .@dy=gettime(GETTIME_DAYOFMONTH);
+ .@mo=gettime(GETTIME_MONTH);
+
+ // Debug Overrides
+ if ($@DEBUG_OD)
+ .@dy=$@DEBUG_OD;
+ if ($@DEBUG_OM)
+ .@mo=$@DEBUG_OM;
+
+ // Annual rewards can only be claimed until the month ends
if ($EVENT$ == "Patrick")
handleStPatrick();
- /*
- else if ($EVENT$ == "Valentine")
+ else if (.@mo == .@v_endmon && .@dy > .@v_endday)
handleValentine();
- else if ($EVENT$ == "Easter")
+ else if (.@mo == .@e_endmon && .@dy > .@e_endday)
handleEaster();
- */
- // Generic
+ // Another event is going on, smoothly handle it
if ($EVENT$ != "")
handleAurora();
+ else
+ mesc l("Currently, there is no event going on."), 1;
- // No event ongoing
+ // We finished, possibly without speaking a single word D:
+ mes "";
mesn;
mesq l("Remember, you can talk to my friends in other towns as well!");
close;
@@ -36,6 +65,7 @@
OnRestore:
setnpcdisplay .name$, "Aurora", NPC_FEMALE;
OnInit:
+ .@npcId = getnpcid(.name$);
setunitdata(.@npcId, UDT_HEADTOP, Cap);
setunitdata(.@npcId, UDT_HEADMIDDLE, RedStockings);
setunitdata(.@npcId, UDT_HEADBOTTOM, BunnyEars);