diff options
Diffstat (limited to 'npc')
-rw-r--r-- | npc/003-1/events.txt | 58 | ||||
-rw-r--r-- | npc/functions/aurora.txt | 2 |
2 files changed, 45 insertions, 15 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); diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt index a8ba3b160..e0d9aa5ef 100644 --- a/npc/functions/aurora.txt +++ b/npc/functions/aurora.txt @@ -24,7 +24,7 @@ // $@REGNUM_BLESSMAP_H$ // Human-readable form of the map under Regnum's Blessing // Q_AuroraEvent -// Quest Variable: FYEVENT_CYCLE, Score, ?? +// Quest Variable: FYEVENT_CYCLE, Score, ClaimedControl // AEF: BEGIN function script FYNewEvent { |