summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-18 05:50:27 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-18 05:50:27 -0300
commit5c90003cf468780c7dc6c3860928749afaf07a42 (patch)
treeffe832ee4e34feec4f8e4186e57de2a75424489d
parentf3251c4c49743dbdaf9cb22a4f4d10ff07d118eb (diff)
downloadserverdata-5c90003cf468780c7dc6c3860928749afaf07a42.tar.gz
serverdata-5c90003cf468780c7dc6c3860928749afaf07a42.tar.bz2
serverdata-5c90003cf468780c7dc6c3860928749afaf07a42.tar.xz
serverdata-5c90003cf468780c7dc6c3860928749afaf07a42.zip
Sketch Normalize functions for Aurora Events (will be cast after a server restart)
-rw-r--r--npc/003-1/events.txt3
-rw-r--r--npc/functions/aurora.txt13
-rw-r--r--npc/functions/event.txt1
3 files changed, 16 insertions, 1 deletions
diff --git a/npc/003-1/events.txt b/npc/003-1/events.txt
index bb686ecf1..efbc745ae 100644
--- a/npc/003-1/events.txt
+++ b/npc/003-1/events.txt
@@ -314,6 +314,9 @@ L_Aurora:
// 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") {
diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt
index 1eca1f6a8..02b4aae35 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, ClaimedControl
+// Quest Variable: DayCtrl, Score, ClaimedControl
// AEF: BEGIN
function script FYNewEvent {
@@ -226,3 +226,14 @@ function script FYRewardEvent {
return;
}
+
+
+// Normalize Aurora Event after a server restart
+function script FYE_Normalize {
+ if ($EVENT$ == "Regnum") {
+ // Reapply the Regnum's blessing
+ setmapflag($REGNUM_BLESSMAP$, mf_bexp, 200);
+ }
+ return;
+}
+
diff --git a/npc/functions/event.txt b/npc/functions/event.txt
index 1bd39b2b8..8f55bfb21 100644
--- a/npc/functions/event.txt
+++ b/npc/functions/event.txt
@@ -276,6 +276,7 @@ OnInit:
// Some setup
disablenpc "sPatrick";
+ FYE_Normalize();
// Check for events every midnight
OnClock0000: