summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/const.txt4
-rw-r--r--db/item_db.txt2
-rwxr-xr-xnpc/easter/2010/eggs.txt14
3 files changed, 18 insertions, 2 deletions
diff --git a/db/const.txt b/db/const.txt
index a6466bb0..4bc17d62 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -284,6 +284,8 @@ E10_BARRIER_SHIFT 4
E10_BARRIER_OPEN 0
E10_BARRIER_ACTIVE 1
E10_PRE_WARP_SHIFT 5
+E10_NEEDLE_SHIFT 6
+E10_NEEDLE_MASK 31
// Dealing with the doctor
E10_DOCTOR_HELP_STATES_MASK 15
@@ -316,6 +318,8 @@ E10_STATE_REWARDS_SHIFT 18
E10_STATE_REWARDS_MASK 3
E10_STATE_REWARD_RABBIT_EARS 1
E10_STATE_REWARD_EGGSHELL 2
+E10_LOC_NEEDLE_SHIFT 20
+E10_LOC_NEEDLE_MASK 31
// Menus
E10_STONES_WISP 0
diff --git a/db/item_db.txt b/db/item_db.txt
index 71f0a7af..8511195f 100644
--- a/db/item_db.txt
+++ b/db/item_db.txt
@@ -331,7 +331,7 @@
1242, SnowGoggles, Snow Goggles, 5, 7500, 5000, 10, , 5, , -2, 0, 2, 256, , 0, 0, {}, {}
1243, PaperHat, Paper Party Hat, 5, 10, 5, 1, , 1, , 0, 0, 2, 256, , 0, 0, {}, {}
1244, DarkTalisman, Dark Talisman, 5, 0, 0, 0, , 30, , 100, 0, 2, 512, , 0, 0, {}, { set @minLvl, 1; callfunc "RestrictedItem"; set @val, getopt2; if (!(@val & 1024)) setopt2 getopt2 | 1024; bonus bMaxHp, 30000; bonus bFlee, -150; }
-1245, BentNeedle, Bent Needle, 3, 700, 100, 1, , , , , , 2, , , 0, 0, {}, {}
+1245, BentNeedle, Bent Needle, 3, 700, 1, 100, , , , , , 2, , , 0, 0, {}, {}
1246, DarkEasterEgg, Dark Easter Egg, 3, 700, 50, 10, , , , , , 2, , , 0, 0, {}, {}
1247, HeartGlasses, Heart Glasses, 5, 7500, 5000, 10, , 4, , 5, 0, 2, 256, , 0, 0, {}, {}
1248, Blueberries, Blueberries, 0, 1000, 500, 120, , , , , , 2, , , 0, , { itemheal 800, 0; }, {}
diff --git a/npc/easter/2010/eggs.txt b/npc/easter/2010/eggs.txt
index 5f174beb..0b1af508 100755
--- a/npc/easter/2010/eggs.txt
+++ b/npc/easter/2010/eggs.txt
@@ -76,8 +76,20 @@
set @obj, 12;
callfunc "Easter2010Loc_Check1";
if (@result != 0) close;
- if (rand(100) == 0) getitem "BentNeedle", 1;
+ if ((Easter_2010_QuestState >> E10_LOC_NEEDLE_SHIFT) & E10_LOC_NEEDLE_MASK == ($Easter_2010_Npc_State2 >> E10_NEEDLE_SHIFT) & E10_NEEDLE_MASK && rand(100) == 0) goto L_Needle;
close;
+
+L_Needle:
+ getitem "BentNeedle", 1;
+ set Easter_2010_QuestState, Easter_2010_QuestState & ~(E10_LOC_NEEDLE_MASK << E10_LOC_NEEDLE_SHIFT) | (rand(E10_LOC_NEEDLE_MASK) << E10_LOC_NEEDLE_SHIFT);
+ end;
+
+OnInit:
+ initnpctimer;
+
+OnTimer300000:
+ set $Easter_2010_Npc_State2, $Easter_2010_Npc_State2 & ~(E10_NEEDLE_MASK << E10_NEEDLE_SHIFT) | (rand(E10_NEEDLE_MASK) << E10_NEEDLE_SHIFT);
+ setnpctimer 0;
}
008-1.gat,88,48,0 script Target 127,{