summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreeyorp <Freeyorp101@hotmail.com>2010-04-11 16:55:26 +1200
committerFreeyorp <Freeyorp101@hotmail.com>2010-05-24 23:33:30 +1200
commit01dc57b12f8af4880ce57063bdaaf28d02269543 (patch)
tree22c298349a6b5979a69220af7f6a0eeced21f1da
parent371db803633dcc4185e147f5ddff08c7bd5aa613 (diff)
downloadserverdata-01dc57b12f8af4880ce57063bdaaf28d02269543.tar.gz
serverdata-01dc57b12f8af4880ce57063bdaaf28d02269543.tar.bz2
serverdata-01dc57b12f8af4880ce57063bdaaf28d02269543.tar.xz
serverdata-01dc57b12f8af4880ce57063bdaaf28d02269543.zip
Fixes to Easter 2010
-rw-r--r--conf/magic.conf.template14
-rw-r--r--db/const.txt2
-rw-r--r--npc/009-1_Hurnscald/old_woman.txt4
-rw-r--r--npc/028-1/Doctor.txt12
-rw-r--r--npc/easter/2010/helper.txt2
5 files changed, 27 insertions, 7 deletions
diff --git a/conf/magic.conf.template b/conf/magic.conf.template
index 5125d0cd..1e63c5f2 100644
--- a/conf/magic.conf.template
+++ b/conf/magic.conf.template
@@ -1328,6 +1328,16 @@ NONMAGIC SILENT SPELL easter (type : STRING) : "#m" =
{
doevent "Doctor#who::OnManualStopTimer";
}
+ ) ELSE IF (type == "DOC_SHIFT_OVERTICK_UP") THEN (
+ {
+ set $Easter_2010_Npc_State1, ($Easter_2010_Npc_State1 & (~E10_DOCTOR_TIMER_OVERTICK_MASK << E10_DOCTOR_TIMER_OVERTICK_SHIFT)) | ((((($Easter_2010_Npc_State1 >> E10_DOCTOR_TIMER_OVERTICK_SHIFT) & E10_DOCTOR_TIMER_OVERTICK_MASK) + 1 ) << E10_DOCTOR_TIMER_OVERTICK_SHIFT));
+ message strcharinfo(0), "New overtick: '" + (($Easter_2010_Npc_State1 >> E10_DOCTOR_TIMER_OVERTICK_SHIFT) & E10_DOCTOR_TIMER_OVERTICK_MASK) + "'.";
+ }
+ ) ELSE IF (type == "DOC_SHIFT_OVERTICK_DOWN") THEN (
+ {
+ set $Easter_2010_Npc_State1, ($Easter_2010_Npc_State1 & (~E10_DOCTOR_TIMER_OVERTICK_MASK << E10_DOCTOR_TIMER_OVERTICK_SHIFT)) | ((((($Easter_2010_Npc_State1 >> E10_DOCTOR_TIMER_OVERTICK_SHIFT) & E10_DOCTOR_TIMER_OVERTICK_MASK) - 1 ) << E10_DOCTOR_TIMER_OVERTICK_SHIFT));
+ message strcharinfo(0), "New overtick: '" + (($Easter_2010_Npc_State1 >> E10_DOCTOR_TIMER_OVERTICK_SHIFT) & E10_DOCTOR_TIMER_OVERTICK_MASK) + "'.";
+ }
) ELSE IF (type == "DOC_SHIFT_RESUME") THEN (
{
doevent "Doctor#who::OnManualStartTimer";
@@ -1338,11 +1348,11 @@ NONMAGIC SILENT SPELL easter (type : STRING) : "#m" =
}
) ELSE IF (type == "BLOCKER_DISABLE") THEN (
{
- doevent "Control#Helper::OnBarrierDisable";
+ set $Easter_2010_Npc_State2, ($Easter_2010_Npc_State2 & ~(E10_BARRIER_MASK << E10_BARRIER_SHIFT)) | (E10_BARRIER_OPEN << E10_BARRIER_SHIFT);
}
) ELSE IF (type == "BLOCKER_ENABLE") THEN (
{
- doevent "Control#Helper::OnBarrierEnable";
+ set $Easter_2010_Npc_State2, ($Easter_2010_Npc_State2 & ~(E10_BARRIER_MASK << E10_BARRIER_SHIFT)) | (E10_BARRIER_ACTIVE << E10_BARRIER_SHIFT);
}
) ELSE message(caster, "Unknown action '" + type + "'!");
diff --git a/db/const.txt b/db/const.txt
index 8a2ddd04..a6466bb0 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -283,6 +283,7 @@ E10_BARRIER_MASK 1
E10_BARRIER_SHIFT 4
E10_BARRIER_OPEN 0
E10_BARRIER_ACTIVE 1
+E10_PRE_WARP_SHIFT 5
// Dealing with the doctor
E10_DOCTOR_HELP_STATES_MASK 15
@@ -329,6 +330,7 @@ E10_STONES_SKULL 8
E10_STONES_CRYSTAL 9
E10_STONES_RAGS 10
E10_STONES_PETAL 11
+E10_STONES_NEVERMIND 12
E10_ISLAND_MENU_DEATH_AWE 12
E10_ISLAND_MENU_SCARED 13
E10_ISLAND_MENU_WISPS 14
diff --git a/npc/009-1_Hurnscald/old_woman.txt b/npc/009-1_Hurnscald/old_woman.txt
index b021ae0b..a8d02128 100644
--- a/npc/009-1_Hurnscald/old_woman.txt
+++ b/npc/009-1_Hurnscald/old_woman.txt
@@ -7,9 +7,9 @@
mes "\"Hello deary.\"";
next;
- if ((Inspector >= 1 && Inspector <= 7) || Inspector == 9) goto L_NohMask;
goto L_Easter;
-
+ if ((Inspector >= 1 && Inspector <= 7) || Inspector == 9) goto L_NohMask;
+
L_Continue:
if ((Inspector >= 1 && Inspector <= 7) || Inspector == 9) goto L_NohMask;
close;
diff --git a/npc/028-1/Doctor.txt b/npc/028-1/Doctor.txt
index be5dcfd5..c00a319a 100644
--- a/npc/028-1/Doctor.txt
+++ b/npc/028-1/Doctor.txt
@@ -1,6 +1,7 @@
// Yes, it really does start at 0,0.
028-1.gat,0,0,0 script Doctor#who 184,{
+ if ($Easter_2010_Npc_State2 & (1 << E10_PRE_WARP_SHIFT)) goto L_pre_warp;
// States here
callsub S_Helped_Count;
if (@Easter_2010_helper >= 2 && !((Easter_2010_QuestState >> E10_FLAG_MID_REWARD_SHIFT) & E10_FLAG_MID_REWARD_MASK))
@@ -1007,6 +1008,7 @@ L_stones_crystal:
set @menuid[@c], E10_STONES_RAGS;
set @c, @c +1;
+L_stones_rags:
if (countitem("DarkPetal") < 1) goto L_stones_petal;
set @menuitems$[@c], "A Dark Petal?";
set @menuid[@c], E10_STONES_PETAL;
@@ -1880,13 +1882,19 @@ L_At_Cave:
// === Event functions ===
// =======================
+L_pre_warp:
+ mes "\"Sorry, no time, have to go!\"";
+ close;
+
+OnTimer65000:
+ if (!(($Easter_2010_Npc_State1 & E10_TIMER_STATE_DOCTOR_MASK) >> E10_TIMER_STATE_DOCTOR_SHIFT < ($Easter_2010_Npc_State1 >> E10_DOCTOR_TIMER_OVERTICK_SHIFT) & E10_DOCTOR_TIMER_OVERTICK_MASK)) set $Easter_2010_Npc_State2, $Easter_2010_Npc_State2 | (1 << E10_PRE_WARP_SHIFT);
-OnTimer30000:
+OnTimer120000:
setnpctimer 0;
if (($Easter_2010_Npc_State1 & E10_TIMER_STATE_DOCTOR_MASK) >> E10_TIMER_STATE_DOCTOR_SHIFT < ($Easter_2010_Npc_State1 >> E10_DOCTOR_TIMER_OVERTICK_SHIFT) & E10_DOCTOR_TIMER_OVERTICK_MASK) goto L_timer_increment;
-
OnResetWarp:
set $Easter_2010_Npc_State1, $Easter_2010_Npc_State1 & (~E10_TIMER_STATE_DOCTOR_MASK << E10_TIMER_STATE_DOCTOR_SHIFT);
+ set $Easter_2010_Npc_State2, $Easter_2010_Npc_State2 & ~(1 << E10_PRE_WARP_SHIFT);
OnDoWarp:
setarray $@xcoord, 0, 21, 83, 65, 116, 110;
setarray $@ycoord, 0, 105, 34, 95, 69, 124;
diff --git a/npc/easter/2010/helper.txt b/npc/easter/2010/helper.txt
index 2e37bbd2..2dfccae1 100644
--- a/npc/easter/2010/helper.txt
+++ b/npc/easter/2010/helper.txt
@@ -1,5 +1,5 @@
028-1.gat,130,47,0 script Control#Helper 127,{
-end;
+close;
OnBarrierEnable:
set $Easter_2010_Npc_State2, ($Easter_2010_Npc_State2 & ~(E10_BARRIER_MASK << E10_BARRIER_SHIFT)) | (E10_BARRIER_ACTIVE << E10_BARRIER_SHIFT);