summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-11-12 09:24:59 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-11-12 09:24:59 +0100
commit92edc7656445e89c7ce1d229970f03ff55708e5b (patch)
treeb4e713a304b211b3772e038dbff2b3024dac118c
parent6670219b5862db29302161c9b84da732df14fd05 (diff)
downloadserverdata-92edc7656445e89c7ce1d229970f03ff55708e5b.tar.gz
serverdata-92edc7656445e89c7ce1d229970f03ff55708e5b.tar.bz2
serverdata-92edc7656445e89c7ce1d229970f03ff55708e5b.tar.xz
serverdata-92edc7656445e89c7ce1d229970f03ff55708e5b.zip
Converted some files from DOS to UNIX newlines
-rw-r--r--npc/easter2008/npc.txt96
-rw-r--r--npc/functions/soul_menhir.txt68
-rw-r--r--npc/halloween/2006/monsters.txt18
-rw-r--r--npc/new_11-1-snow-village/amrak.txt34
-rw-r--r--npc/new_11-1-snow-village/soul-menhir.txt12
-rw-r--r--npc/new_12-1-ice-cave/monsters.txt40
-rw-r--r--npc/new_12-1-ice-cave/passages.txt4
-rw-r--r--npc/new_13-1-snow-village-shops/furquest.txt658
-rw-r--r--npc/new_14-1-south-woodland/passages.txt6
-rw-r--r--npc/new_15-1-woodland-desert/monsters.txt40
-rw-r--r--npc/new_15-1-woodland-desert/passages.txt6
-rw-r--r--npc/new_16-1-south-east-woodland/monsters.txt70
-rw-r--r--npc/new_16-1-south-east-woodland/passages.txt8
-rw-r--r--npc/new_17-1-cave-big/monsters.txt40
-rw-r--r--npc/new_17-1-cave-big/passages.txt4
-rw-r--r--npc/new_18-1-woodland-village/hinnak.txt198
-rw-r--r--npc/new_18-1-woodland-village/monsters.txt68
-rw-r--r--npc/new_19-1-woodland-village/jack.txt504
-rw-r--r--npc/new_19-1-woodland-village/milly.txt50
-rw-r--r--npc/new_19-1-woodland-village/old_man.txt68
-rw-r--r--npc/new_19-1-woodland-village/old_woman.txt112
-rw-r--r--npc/new_19-1-woodland-village/sabine.txt52
-rw-r--r--npc/new_19-1-woodland-village/soul-menhir.txt16
-rw-r--r--npc/new_20-1-woodland-village/alan.txt422
-rw-r--r--npc/new_20-1-woodland-village/drunks.txt32
-rw-r--r--npc/new_20-1-woodland-village/misc.txt22
-rw-r--r--npc/new_20-1-woodland-village/nicholas.txt808
-rw-r--r--npc/new_20-1-woodland-village/richard.txt12
-rw-r--r--npc/new_20-1-woodland-village/selim.txt278
-rw-r--r--npc/new_20-1-woodland-village/shops.txt68
-rw-r--r--npc/new_20-1-woodland-village/waitress.txt102
-rw-r--r--npc/new_21-1-ice-cave2/monsters.txt40
-rw-r--r--npc/new_21-1-ice-cave2/passages.txt2
-rw-r--r--npc/new_26-1-hill1/monsters.txt104
-rw-r--r--npc/new_26-1-hill1/passages.txt22
-rw-r--r--npc/new_27-1-hill2/monsters.txt40
-rw-r--r--npc/new_27-1-hill2/passages.txt18
-rw-r--r--npc/new_28-1-hillwest/monsters.txt126
-rw-r--r--npc/new_28-1-hillwest/passages.txt6
-rw-r--r--npc/new_29-1-west-woodland/monsters.txt138
-rw-r--r--npc/new_29-1-west-woodland/passages.txt4
-rw-r--r--npc/new_3-1-tulimshar/soul-menhir.txt12
-rw-r--r--npc/new_3-1-tulimshar/workers.txt26
-rw-r--r--npc/new_30-1-west-woodland-cave/passages.txt6
-rw-r--r--npc/new_31-1-southwest-woodland/alice.txt92
-rw-r--r--npc/new_31-1-southwest-woodland/monsters.txt92
-rw-r--r--npc/new_32-1-south-woodland-2/monsters.txt80
-rw-r--r--npc/new_32-1-south-woodland-2/passages.txt2
-rw-r--r--npc/new_33-1-hill-northwest/monsters.txt152
-rw-r--r--npc/new_33-1-hill-northwest/passages.txt2
-rw-r--r--npc/new_34-1-north-beach/passages.txt4
-rw-r--r--npc/new_35-1-woodland-village/passages.txt10
-rw-r--r--npc/new_36-1-magic-house/passages.txt6
-rw-r--r--npc/new_37-1-woodland-mine/passages.txt10
-rw-r--r--npc/new_38-1-woodland-mine/caul.txt958
-rw-r--r--npc/new_38-1-woodland-mine/passages.txt22
-rw-r--r--npc/xmas2007/after-xmas.txt278
-rw-r--r--npc/xmas2007/pre-xmas.txt448
-rw-r--r--tools/Purger.java360
59 files changed, 3488 insertions, 3488 deletions
diff --git a/npc/easter2008/npc.txt b/npc/easter2008/npc.txt
index dd97425a..d1698ff2 100644
--- a/npc/easter2008/npc.txt
+++ b/npc/easter2008/npc.txt
@@ -1,49 +1,49 @@
-new_3-1.gat,40,40,6 script EasterBunny 139,{
- if (QUEST_Easter08_state > 0) goto L_Finished;
-
- mes "[Easter Bunny]";
- mes "Hi handsome! Happy Easter to you.";
- next;
-
- set @cond, 0;
- if (countitem(1208) > 0) set @cond, @cond + 1;
- if (countitem(1209) > 0) set @cond, @cond + 1;
- if (countitem(1210) > 0) set @cond, @cond + 1;
- if (countitem(1211) > 0) set @cond, @cond + 1;
- if (countitem(1212) > 0) set @cond, @cond + 1;
- if (countitem(1213) > 0) set @cond, @cond + 1;
-
- if (@cond == 6) goto L_Give;
-
- L_Message:
- mes "[Easter Bunny]";
- mes "Do you want to take part in the big easter egg hunt?";
- mes "";
- mes "There are fluffys all around the world with their magic easter eggs.";
- mes "When you catch them and collect 6 different kinds of eggs I will";
- mes "give you a special prize!";
- if (@cond > 0) mes "You already have found "+@cond+" different eggs!";
- close;
-
- L_Give:
- delitem 1208, 1;
- delitem 1209, 1;
- delitem 1210, 1;
- delitem 1211, 1;
- delitem 1212, 1;
- delitem 1213, 1;
- mes "[Easter Bunny]";
- mes "Here is your prize:";
- mes "The official easter 2008 headgear!";
- mes "Have fun!";
- getitem 1214, 1;
- set QUEST_Easter08_state, 1;
- close;
-
- L_Finished:
- mes "[Easter Bunny]";
- mes "You already completed the quest.";
- mes "But maybe you would like to help others complete it, too?";
- close;
-
+new_3-1.gat,40,40,6 script EasterBunny 139,{
+ if (QUEST_Easter08_state > 0) goto L_Finished;
+
+ mes "[Easter Bunny]";
+ mes "Hi handsome! Happy Easter to you.";
+ next;
+
+ set @cond, 0;
+ if (countitem(1208) > 0) set @cond, @cond + 1;
+ if (countitem(1209) > 0) set @cond, @cond + 1;
+ if (countitem(1210) > 0) set @cond, @cond + 1;
+ if (countitem(1211) > 0) set @cond, @cond + 1;
+ if (countitem(1212) > 0) set @cond, @cond + 1;
+ if (countitem(1213) > 0) set @cond, @cond + 1;
+
+ if (@cond == 6) goto L_Give;
+
+ L_Message:
+ mes "[Easter Bunny]";
+ mes "Do you want to take part in the big easter egg hunt?";
+ mes "";
+ mes "There are fluffys all around the world with their magic easter eggs.";
+ mes "When you catch them and collect 6 different kinds of eggs I will";
+ mes "give you a special prize!";
+ if (@cond > 0) mes "You already have found "+@cond+" different eggs!";
+ close;
+
+ L_Give:
+ delitem 1208, 1;
+ delitem 1209, 1;
+ delitem 1210, 1;
+ delitem 1211, 1;
+ delitem 1212, 1;
+ delitem 1213, 1;
+ mes "[Easter Bunny]";
+ mes "Here is your prize:";
+ mes "The official easter 2008 headgear!";
+ mes "Have fun!";
+ getitem 1214, 1;
+ set QUEST_Easter08_state, 1;
+ close;
+
+ L_Finished:
+ mes "[Easter Bunny]";
+ mes "You already completed the quest.";
+ mes "But maybe you would like to help others complete it, too?";
+ close;
+
} \ No newline at end of file
diff --git a/npc/functions/soul_menhir.txt b/npc/functions/soul_menhir.txt
index b51dc593..f807b7fb 100644
--- a/npc/functions/soul_menhir.txt
+++ b/npc/functions/soul_menhir.txt
@@ -1,34 +1,34 @@
-function script SoulMenhir {
- mes "[Soul Menhir]";
- mes "(A mystical aura surrounds this stone. You feel mysteriously attracted to it. Something tells you to touch it. What do you do?)";
- next;
-
- menu
- "Touch it", -,
- "Leave it alone", return;
-
- if (Menhir_Activated == 1) goto L_Shortversion;
-
- mes "[Soul Menhir]";
- mes "(You touch the mysteriouse stone. Somehow it feels warm and cold at the same time.)";
- next;
-
- mes "[Soul Menhir]";
- mes "(Suddenly a strange sensation flows through you. It feels like your soul leaves your body and becomes one with the stone.)";
- next;
-
- mes "[Soul Menhir]";
- mes "(As suddenly as the feeling started it stops. The strange attraction is away from one moment to the next and the menhir feels like just an ordinary stone.)";
- next;
-
- set Menhir_Activated, 1;
- goto L_Save;
-
-L_Shortversion:
- mes "[Soul Menhir]";
- mes "(A strange sensation flows through you. It feels like your soul leaves your body and becomes one with the stone. as suddenly as the feeling started it stops.)";
- next;
-
-L_Save:
- savepoint @map$, @x, @y;
-}
+function script SoulMenhir {
+ mes "[Soul Menhir]";
+ mes "(A mystical aura surrounds this stone. You feel mysteriously attracted to it. Something tells you to touch it. What do you do?)";
+ next;
+
+ menu
+ "Touch it", -,
+ "Leave it alone", return;
+
+ if (Menhir_Activated == 1) goto L_Shortversion;
+
+ mes "[Soul Menhir]";
+ mes "(You touch the mysteriouse stone. Somehow it feels warm and cold at the same time.)";
+ next;
+
+ mes "[Soul Menhir]";
+ mes "(Suddenly a strange sensation flows through you. It feels like your soul leaves your body and becomes one with the stone.)";
+ next;
+
+ mes "[Soul Menhir]";
+ mes "(As suddenly as the feeling started it stops. The strange attraction is away from one moment to the next and the menhir feels like just an ordinary stone.)";
+ next;
+
+ set Menhir_Activated, 1;
+ goto L_Save;
+
+L_Shortversion:
+ mes "[Soul Menhir]";
+ mes "(A strange sensation flows through you. It feels like your soul leaves your body and becomes one with the stone. as suddenly as the feeling started it stops.)";
+ next;
+
+L_Save:
+ savepoint @map$, @x, @y;
+}
diff --git a/npc/halloween/2006/monsters.txt b/npc/halloween/2006/monsters.txt
index 91f432d1..1933b383 100644
--- a/npc/halloween/2006/monsters.txt
+++ b/npc/halloween/2006/monsters.txt
@@ -1,9 +1,9 @@
-new_1-1.gat,0,0,0,0 monster Jack 1022,20,0,0,0
-new_3-1.gat,0,0,0,0 monster Fire_Skull 1023,20,0,0,0
-new_7-1.gat,0,0,0,0 monster Poison_Skull 1024,20,0,0,0
-new_9-1.gat,0,0,0,0 monster Jack 1022,20,0,0,0
-new_10-1.gat,0,0,0,0 monster Fire_Skull 1023,20,0,0,0
-new_11-1.gat,0,0,0,0 monster Poison_Skull 1024,20,0,0,0
-new_14-1.gat,0,0,0,0 monster Jack 1022,20,0,0,0
-new_15-1.gat,0,0,0,0 monster Fire_Skull 1023,20,0,0,0
-new_16-1.gat,0,0,0,0 monster Poison_Skull 1024,20,0,0,0
+new_1-1.gat,0,0,0,0 monster Jack 1022,20,0,0,0
+new_3-1.gat,0,0,0,0 monster Fire_Skull 1023,20,0,0,0
+new_7-1.gat,0,0,0,0 monster Poison_Skull 1024,20,0,0,0
+new_9-1.gat,0,0,0,0 monster Jack 1022,20,0,0,0
+new_10-1.gat,0,0,0,0 monster Fire_Skull 1023,20,0,0,0
+new_11-1.gat,0,0,0,0 monster Poison_Skull 1024,20,0,0,0
+new_14-1.gat,0,0,0,0 monster Jack 1022,20,0,0,0
+new_15-1.gat,0,0,0,0 monster Fire_Skull 1023,20,0,0,0
+new_16-1.gat,0,0,0,0 monster Poison_Skull 1024,20,0,0,0
diff --git a/npc/new_11-1-snow-village/amrak.txt b/npc/new_11-1-snow-village/amrak.txt
index 3717685f..b5b52962 100644
--- a/npc/new_11-1-snow-village/amrak.txt
+++ b/npc/new_11-1-snow-village/amrak.txt
@@ -1,17 +1,17 @@
-//
-
-new_11-1.gat,66,90,0 script Amrak 103, {
- mes "[Amrak]";
- mes "\"This... stone...";
- mes "I have never seen a mineral like this";
- mes "before.";
- mes "And some strange... aura... seems to";
- mes "emit from it.\"";
- next;
- mes "[Amrak]";
- mes "\"Where did it come from?";
- mes "How did it got here?";
- mes "What's its purpose?";
- mes "I will solve its riddle for sure.\"";
- close;
-}
+//
+
+new_11-1.gat,66,90,0 script Amrak 103, {
+ mes "[Amrak]";
+ mes "\"This... stone...";
+ mes "I have never seen a mineral like this";
+ mes "before.";
+ mes "And some strange... aura... seems to";
+ mes "emit from it.\"";
+ next;
+ mes "[Amrak]";
+ mes "\"Where did it come from?";
+ mes "How did it got here?";
+ mes "What's its purpose?";
+ mes "I will solve its riddle for sure.\"";
+ close;
+}
diff --git a/npc/new_11-1-snow-village/soul-menhir.txt b/npc/new_11-1-snow-village/soul-menhir.txt
index e88a70cd..7769530c 100644
--- a/npc/new_11-1-snow-village/soul-menhir.txt
+++ b/npc/new_11-1-snow-village/soul-menhir.txt
@@ -1,6 +1,6 @@
-new_11-1.gat,64,89,0 script Soul Menhir 144, {
- set @map$, "new_11-1.gat";
- set @x, 64;
- set @y, 90;
- callfunc "SoulMenhir";
-}
+new_11-1.gat,64,89,0 script Soul Menhir 144, {
+ set @map$, "new_11-1.gat";
+ set @x, 64;
+ set @y, 90;
+ callfunc "SoulMenhir";
+}
diff --git a/npc/new_12-1-ice-cave/monsters.txt b/npc/new_12-1-ice-cave/monsters.txt
index 2cce49b2..b9dce5f5 100644
--- a/npc/new_12-1-ice-cave/monsters.txt
+++ b/npc/new_12-1-ice-cave/monsters.txt
@@ -1,20 +1,20 @@
-// Map: new_12-1
-// This is the Ice Cave below Snow Town.
-//
-
-new_12-1.gat,0,0,0,0 monster Bat 1017,20,0,0,Mob12::OnBat
-new_12-1.gat,0,0,0,0 monster Pinkie 1018,10,0,0,Mob12::OnPinkie
-
-new_12-1.gat,0,0,0 script Mob12 -1,{
-OnBat:
- set @mobID, 1017;
- callfunc "MobPoints";
- break;
-
-OnPinkie:
- set @mobID, 1018;
- callfunc "MobPoints";
- break;
-
- end;
-}
+// Map: new_12-1
+// This is the Ice Cave below Snow Town.
+//
+
+new_12-1.gat,0,0,0,0 monster Bat 1017,20,0,0,Mob12::OnBat
+new_12-1.gat,0,0,0,0 monster Pinkie 1018,10,0,0,Mob12::OnPinkie
+
+new_12-1.gat,0,0,0 script Mob12 -1,{
+OnBat:
+ set @mobID, 1017;
+ callfunc "MobPoints";
+ break;
+
+OnPinkie:
+ set @mobID, 1018;
+ callfunc "MobPoints";
+ break;
+
+ end;
+}
diff --git a/npc/new_12-1-ice-cave/passages.txt b/npc/new_12-1-ice-cave/passages.txt
index efcea31c..3db46ebe 100644
--- a/npc/new_12-1-ice-cave/passages.txt
+++ b/npc/new_12-1-ice-cave/passages.txt
@@ -1,2 +1,2 @@
-new_12-1.gat,31,25 warp totown 2,1,new_11-1.gat,76,36
-new_12-1.gat,26,23 warp toice2 1,0,new_21-1.gat,37,36
+new_12-1.gat,31,25 warp totown 2,1,new_11-1.gat,76,36
+new_12-1.gat,26,23 warp toice2 1,0,new_21-1.gat,37,36
diff --git a/npc/new_13-1-snow-village-shops/furquest.txt b/npc/new_13-1-snow-village-shops/furquest.txt
index dadb4c76..01b6c546 100644
--- a/npc/new_13-1-snow-village-shops/furquest.txt
+++ b/npc/new_13-1-snow-village-shops/furquest.txt
@@ -1,329 +1,329 @@
-//#################################################################################
-// Script by Shaili and QOAL
-//#################################################################################
-
-// Santa's Inn - Agostine, The Legendary Tailor
-new_13-1.gat,102,28,0 script Agostine 137, {
- if (QUEST_WG_state == 1) goto L_State_0_3;
- if (QUEST_WG_state == 2) goto L_State_1;
- if (QUEST_WG_state == 3) goto L_State_2;
- if (QUEST_WG_state == 4) goto L_State_4;
- if (QUEST_WG_state == 5) goto L_State_4_success;
- if (QUEST_WG_state == 6) goto L_State_6;
- if (QUEST_WG_state == 7) goto L_State_11;
- if (QUEST_WG_state == 8) goto L_State_12;
- if (QUEST_WG_state >= 9) goto L_State_13;
-
- mes "\"This goes up, this goes left...\"";
- next;
- mes "\"Mmmm...?\"";
- next;
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Oh, a customer! Let me introduce myself! My name is Agostine!";
- mes "Some people say that I am the best tailor in the world,";
- mes "but I think I am the best one in the universe!";
- mes "So, What can I do for you, my friend?\"";
- next;
- menu
- "I want something new for my wardrobe!", L_State_0_1,
- "Oh, nothing, thanks!", -;
- close;
-
-// Quest #0 - Beginning - Needed: Iron Potion
-
-L_State_0_1:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Well.. you know... working so hard makes me so tired!";
- mes "Can you bring me something tasty to drink, my friend?\"";
- next;
- menu
- "Sure, what kind of drink you like?", L_State_0_2,
- "I'm not your waiter!", -;
- close;
-
-L_State_0_2:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Here we do not have a bar. Let me taste different beverages.";
- mes "I want something new to drink.\"";
- next;
- menu
- "I'll bring you different drinks to try!", L_State_Accept,
- "Maybe a bar will open soon, wait for it.", -;
- close;
-
-L_State_Accept:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Thanks so much.\"";
- set QUEST_WG_state, 1;
- close;
-
-L_State_0_3:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Well, what have you brought me?\"";
- next;
- menu
- "A Cactus Drink.", L_State_0_4,
- "A Cactus Potion.", L_State_0_5,
- "Some milk.", L_State_0_6,
- "A pint of beer.", L_State_0_7,
- "A Iron potion.", L_State_0_9,
- "A Concentration Potion.", L_State_0_8,
- "Nothing, at the moment.", -;
- close;
-
-L_State_0_4:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"So, a Cactus Drink?\"";
- if (countitem(501) < 1) goto L_State_neg;
- next;
- delitem 501, 1;
- goto L_State_bad;
- close;
-
-L_State_0_5:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"So, a Cactus Potion?\"";
- if (countitem(502) < 1) goto L_State_neg;
- next;
- delitem 502, 1;
- goto L_State_bad;
- close;
-
-L_State_0_6:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"So, some milk for me?\"";
- if (countitem(527) < 1) goto L_State_neg;
- delitem 527, 1;
- goto L_State_bad;
- close;
-
-L_State_0_7:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"So, a beer?\"";
- if (countitem(539) < 1) goto L_State_neg;
- next;
- delitem 539, 1;
- goto L_State_bad;
- close;
-
-L_State_0_8:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"So, a Concentration Potion?\"";
- if (countitem(568) < 1) goto L_State_neg;
- next;
- delitem 568, 1;
- goto L_State_bad;
- close;
-
-L_State_0_9:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"So, an Iron Potion?\"";
- if (countitem(567) < 1) goto L_State_neg;
- next;
- delitem 567, 1;
- mes "Agostine looks pleased as he drinks the potion.";
- next;
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Oh! This is damn good! I feel a new man, my friend!\"";
- next;
- set zeny, zeny+500;
- mes "[Agostine, The Legendary Tailor]";
- mes "\"This is a little reward for your help. Take 500 GP, my friend!\"";
- set QUEST_WG_state, 2;
- close;
-
-L_State_neg:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Seems that you lied. You don't have the drink you told me.\"";
- close;
-
-L_State_bad:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Well, I don't like it so much. Bring me something else.\"";
- close;
-
-// First Quest: edited version of Forest Bow Quest - Needed: about 30 White Furs and 15.000 GP
-
-L_State_1:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Mmmm... Let me see... This year light colours are fashionable!";
- mes "Would you like a pair of snow-white Winter Gloves?\"";
- next;
- menu
- "No, thanks. I love dark clothes...", -,
- "You really can do this for me?", L_State_2;
- close;
-
-L_State_2:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Well, Winter Gloves are so fashionable for their lovable fur!";
- mes "Only the best furs can be saw for these gloves!";
- mes "But, as you see, I am a tailor, not a hunter! So, why don't you bring me the best fluffy's fur you can see?\"";
- set QUEST_WG_state, 3;
- next;
- menu
- "You are crazy! I won't kill any animal for this!", -,
- "Sure, I will be back soon!", L_State_3;
- close;
-
-L_State_3:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Remember, I want the best of fur!\"";
- set QUEST_WG_state, 4;
- next;
- close;
-
-L_State_4:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Oh, my friend! Have you brought me some good furs?\"";
- if (countitem(611) < 1) close;
- next;
- menu
- "Here, take a look!", L_State_4_try,
- "Yes, but I need it for something else.", -;
- close;
-
-L_State_4_try:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Let me see, my friend! It needs to be perfect for my gloves!\"";
- mes "Agostine examines the patch of fur.";
- next;
- delitem 611, 1;
- set @Temp1,rand(30);
- if (@Temp1 == 0) goto L_State_4_success;
- mes "Agostine throws away the white fur.";
- next;
- mes "[Agostine, The Legendary Tailor]";
- mes "\"It was awfully cut! You should pay more attention when you kill fluffies!\"";
- if (countitem(611) < 1) close;
- next;
- menu
- "Here I have another one!", L_State_4_try,
- "Sorry, I will be careful...", -;
- close;
-
-L_State_4_success:
- mes "Agostine turns into a smile";
- next;
- mes "[Agostine, The Legendary Tailor]";
- mes "\"It's perfect! Perfect! Good job, my friend! I will prepare your gloves right now!\"";
- next;
- set QUEST_WG_state, 5;
- goto L_State_5;
-
-L_State_5:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Ehm, my friend, my work is not free. I need 15,000 GP for the work.\"";
- next;
- menu
- "You are not a tailor, you are a thief!!", -,
- "I think it's a reasonable price...", L_State_5_pay;
- close;
-
-L_State_5_pay:
- if (zeny < 15000) goto L_State_5_nocash;
- set zeny, zeny-15000;
- getitem 563, 1;
- set QUEST_WG_state, 6;
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Here they are. You will have the more fashionable hands in the world!\"";
- close;
-
-L_State_5_nocash:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Seems like you are out of cash. Come back when you have the money.\"";
- close;
-
-L_State_6:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Oh, I remember you! Your gloves are sooo fashionable, my friend!";
- mes "Well, I have a good news for you. In this issue of 'TMW Fashion'";
- mes "I saw a pretty accessory, a pair of Furry Boots, my friend.";
- mes "I can make your own pair, if you want!\"";
- next;
- menu
- "It's a great idea!", L_State_10,
- "I'm glamourous enough, thanks", -;
- close;
-
-// Start of Second Quest: Furry Boots - Needed: About 30 White Furs, 1 pair of Boots and 15.000 GP
-L_State_10:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Perfect! For satisfying your request I need another perfect White Fur";
- mes "and a pair of Boots, like those you can find in the mines.";
- mes "They will make you lovely, my friend!\"";
- set QUEST_WG_state, 7;
- close;
-
-L_State_11:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"So, my friend, have you brought me the right Fur?\"";
- if (countitem(611) < 1) close;
- next;
- menu
- "Sure, I'm a fluffy hunter!", L_State_11_try,
- "Not yet, sorry.", -;
- close;
-
-L_State_11_try:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"I'd rather see the patch of fur, first.\"";
- next;
- mes "Agostine examines the patch of fur.";
- next;
- delitem 611, 1;
- set @Temp2,rand(30);
- if (@Temp2 == 0) goto L_State_11_success;
- mes "Agostine rips the white fur.";
- next;
- mes "[Agostine, The Legendary Tailor]";
- mes "\"That fur was terrible. I won't work with it!\"";
- if (countitem(611) < 1) close;
- next;
- menu
- "Well, maybe this is better!", L_State_11_try,
- "I will hunt other fluffies...", -;
- close;
-
-L_State_11_success:
- mes "Agostine turns into a smile";
- next;
- mes "[Agostine, The Legendary Tailor]";
- mes "\"This one is good enough, my friend. Good job.\"";
- delitem 611, 1;
- set QUEST_WG_state, 8;
- goto L_State_12;
-
-L_State_12:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"I need also a pair of Boots for the work.";
- mes "And my payment, obviously. 15,000 GP is right.\"";
- next;
- menu
- "Sure, here it is all.", L_State_12_pay,
- "I missed something, I will be back soon!", -;
- close;
-
-L_State_12_pay:
- if (zeny < 15000) goto L_State_12_missing;
- if (countitem(528) < 1) goto L_State_12_missing;
- set zeny, zeny-15000;
- delitem 528, 1;
- getitem 655, 1;
- set QUEST_WG_state, 9;
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Enjoy your new boots, my friend!\"";
- close;
-
-L_State_12_missing:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"Seems you have forgotten something. Check your inventory";
- mes "and your pockets!\"";
- close;
-
-L_State_13:
- mes "[Agostine, The Legendary Tailor]";
- mes "\"You are so glamourous, my dear friend!";
- mes "I have done a very good job on your clothes!\"";
- close;
-}
+//#################################################################################
+// Script by Shaili and QOAL
+//#################################################################################
+
+// Santa's Inn - Agostine, The Legendary Tailor
+new_13-1.gat,102,28,0 script Agostine 137, {
+ if (QUEST_WG_state == 1) goto L_State_0_3;
+ if (QUEST_WG_state == 2) goto L_State_1;
+ if (QUEST_WG_state == 3) goto L_State_2;
+ if (QUEST_WG_state == 4) goto L_State_4;
+ if (QUEST_WG_state == 5) goto L_State_4_success;
+ if (QUEST_WG_state == 6) goto L_State_6;
+ if (QUEST_WG_state == 7) goto L_State_11;
+ if (QUEST_WG_state == 8) goto L_State_12;
+ if (QUEST_WG_state >= 9) goto L_State_13;
+
+ mes "\"This goes up, this goes left...\"";
+ next;
+ mes "\"Mmmm...?\"";
+ next;
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Oh, a customer! Let me introduce myself! My name is Agostine!";
+ mes "Some people say that I am the best tailor in the world,";
+ mes "but I think I am the best one in the universe!";
+ mes "So, What can I do for you, my friend?\"";
+ next;
+ menu
+ "I want something new for my wardrobe!", L_State_0_1,
+ "Oh, nothing, thanks!", -;
+ close;
+
+// Quest #0 - Beginning - Needed: Iron Potion
+
+L_State_0_1:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Well.. you know... working so hard makes me so tired!";
+ mes "Can you bring me something tasty to drink, my friend?\"";
+ next;
+ menu
+ "Sure, what kind of drink you like?", L_State_0_2,
+ "I'm not your waiter!", -;
+ close;
+
+L_State_0_2:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Here we do not have a bar. Let me taste different beverages.";
+ mes "I want something new to drink.\"";
+ next;
+ menu
+ "I'll bring you different drinks to try!", L_State_Accept,
+ "Maybe a bar will open soon, wait for it.", -;
+ close;
+
+L_State_Accept:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Thanks so much.\"";
+ set QUEST_WG_state, 1;
+ close;
+
+L_State_0_3:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Well, what have you brought me?\"";
+ next;
+ menu
+ "A Cactus Drink.", L_State_0_4,
+ "A Cactus Potion.", L_State_0_5,
+ "Some milk.", L_State_0_6,
+ "A pint of beer.", L_State_0_7,
+ "A Iron potion.", L_State_0_9,
+ "A Concentration Potion.", L_State_0_8,
+ "Nothing, at the moment.", -;
+ close;
+
+L_State_0_4:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"So, a Cactus Drink?\"";
+ if (countitem(501) < 1) goto L_State_neg;
+ next;
+ delitem 501, 1;
+ goto L_State_bad;
+ close;
+
+L_State_0_5:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"So, a Cactus Potion?\"";
+ if (countitem(502) < 1) goto L_State_neg;
+ next;
+ delitem 502, 1;
+ goto L_State_bad;
+ close;
+
+L_State_0_6:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"So, some milk for me?\"";
+ if (countitem(527) < 1) goto L_State_neg;
+ delitem 527, 1;
+ goto L_State_bad;
+ close;
+
+L_State_0_7:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"So, a beer?\"";
+ if (countitem(539) < 1) goto L_State_neg;
+ next;
+ delitem 539, 1;
+ goto L_State_bad;
+ close;
+
+L_State_0_8:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"So, a Concentration Potion?\"";
+ if (countitem(568) < 1) goto L_State_neg;
+ next;
+ delitem 568, 1;
+ goto L_State_bad;
+ close;
+
+L_State_0_9:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"So, an Iron Potion?\"";
+ if (countitem(567) < 1) goto L_State_neg;
+ next;
+ delitem 567, 1;
+ mes "Agostine looks pleased as he drinks the potion.";
+ next;
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Oh! This is damn good! I feel a new man, my friend!\"";
+ next;
+ set zeny, zeny+500;
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"This is a little reward for your help. Take 500 GP, my friend!\"";
+ set QUEST_WG_state, 2;
+ close;
+
+L_State_neg:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Seems that you lied. You don't have the drink you told me.\"";
+ close;
+
+L_State_bad:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Well, I don't like it so much. Bring me something else.\"";
+ close;
+
+// First Quest: edited version of Forest Bow Quest - Needed: about 30 White Furs and 15.000 GP
+
+L_State_1:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Mmmm... Let me see... This year light colours are fashionable!";
+ mes "Would you like a pair of snow-white Winter Gloves?\"";
+ next;
+ menu
+ "No, thanks. I love dark clothes...", -,
+ "You really can do this for me?", L_State_2;
+ close;
+
+L_State_2:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Well, Winter Gloves are so fashionable for their lovable fur!";
+ mes "Only the best furs can be saw for these gloves!";
+ mes "But, as you see, I am a tailor, not a hunter! So, why don't you bring me the best fluffy's fur you can see?\"";
+ set QUEST_WG_state, 3;
+ next;
+ menu
+ "You are crazy! I won't kill any animal for this!", -,
+ "Sure, I will be back soon!", L_State_3;
+ close;
+
+L_State_3:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Remember, I want the best of fur!\"";
+ set QUEST_WG_state, 4;
+ next;
+ close;
+
+L_State_4:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Oh, my friend! Have you brought me some good furs?\"";
+ if (countitem(611) < 1) close;
+ next;
+ menu
+ "Here, take a look!", L_State_4_try,
+ "Yes, but I need it for something else.", -;
+ close;
+
+L_State_4_try:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Let me see, my friend! It needs to be perfect for my gloves!\"";
+ mes "Agostine examines the patch of fur.";
+ next;
+ delitem 611, 1;
+ set @Temp1,rand(30);
+ if (@Temp1 == 0) goto L_State_4_success;
+ mes "Agostine throws away the white fur.";
+ next;
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"It was awfully cut! You should pay more attention when you kill fluffies!\"";
+ if (countitem(611) < 1) close;
+ next;
+ menu
+ "Here I have another one!", L_State_4_try,
+ "Sorry, I will be careful...", -;
+ close;
+
+L_State_4_success:
+ mes "Agostine turns into a smile";
+ next;
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"It's perfect! Perfect! Good job, my friend! I will prepare your gloves right now!\"";
+ next;
+ set QUEST_WG_state, 5;
+ goto L_State_5;
+
+L_State_5:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Ehm, my friend, my work is not free. I need 15,000 GP for the work.\"";
+ next;
+ menu
+ "You are not a tailor, you are a thief!!", -,
+ "I think it's a reasonable price...", L_State_5_pay;
+ close;
+
+L_State_5_pay:
+ if (zeny < 15000) goto L_State_5_nocash;
+ set zeny, zeny-15000;
+ getitem 563, 1;
+ set QUEST_WG_state, 6;
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Here they are. You will have the more fashionable hands in the world!\"";
+ close;
+
+L_State_5_nocash:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Seems like you are out of cash. Come back when you have the money.\"";
+ close;
+
+L_State_6:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Oh, I remember you! Your gloves are sooo fashionable, my friend!";
+ mes "Well, I have a good news for you. In this issue of 'TMW Fashion'";
+ mes "I saw a pretty accessory, a pair of Furry Boots, my friend.";
+ mes "I can make your own pair, if you want!\"";
+ next;
+ menu
+ "It's a great idea!", L_State_10,
+ "I'm glamourous enough, thanks", -;
+ close;
+
+// Start of Second Quest: Furry Boots - Needed: About 30 White Furs, 1 pair of Boots and 15.000 GP
+L_State_10:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Perfect! For satisfying your request I need another perfect White Fur";
+ mes "and a pair of Boots, like those you can find in the mines.";
+ mes "They will make you lovely, my friend!\"";
+ set QUEST_WG_state, 7;
+ close;
+
+L_State_11:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"So, my friend, have you brought me the right Fur?\"";
+ if (countitem(611) < 1) close;
+ next;
+ menu
+ "Sure, I'm a fluffy hunter!", L_State_11_try,
+ "Not yet, sorry.", -;
+ close;
+
+L_State_11_try:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"I'd rather see the patch of fur, first.\"";
+ next;
+ mes "Agostine examines the patch of fur.";
+ next;
+ delitem 611, 1;
+ set @Temp2,rand(30);
+ if (@Temp2 == 0) goto L_State_11_success;
+ mes "Agostine rips the white fur.";
+ next;
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"That fur was terrible. I won't work with it!\"";
+ if (countitem(611) < 1) close;
+ next;
+ menu
+ "Well, maybe this is better!", L_State_11_try,
+ "I will hunt other fluffies...", -;
+ close;
+
+L_State_11_success:
+ mes "Agostine turns into a smile";
+ next;
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"This one is good enough, my friend. Good job.\"";
+ delitem 611, 1;
+ set QUEST_WG_state, 8;
+ goto L_State_12;
+
+L_State_12:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"I need also a pair of Boots for the work.";
+ mes "And my payment, obviously. 15,000 GP is right.\"";
+ next;
+ menu
+ "Sure, here it is all.", L_State_12_pay,
+ "I missed something, I will be back soon!", -;
+ close;
+
+L_State_12_pay:
+ if (zeny < 15000) goto L_State_12_missing;
+ if (countitem(528) < 1) goto L_State_12_missing;
+ set zeny, zeny-15000;
+ delitem 528, 1;
+ getitem 655, 1;
+ set QUEST_WG_state, 9;
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Enjoy your new boots, my friend!\"";
+ close;
+
+L_State_12_missing:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"Seems you have forgotten something. Check your inventory";
+ mes "and your pockets!\"";
+ close;
+
+L_State_13:
+ mes "[Agostine, The Legendary Tailor]";
+ mes "\"You are so glamourous, my dear friend!";
+ mes "I have done a very good job on your clothes!\"";
+ close;
+}
diff --git a/npc/new_14-1-south-woodland/passages.txt b/npc/new_14-1-south-woodland/passages.txt
index 3f63f074..787de46c 100644
--- a/npc/new_14-1-south-woodland/passages.txt
+++ b/npc/new_14-1-south-woodland/passages.txt
@@ -1,4 +1,4 @@
-new_14-1.gat,131,53 warp tofield 2,2,new_16-1.gat,25,53
-new_14-1.gat,48,23 warp tofield 1,1,new_9-1.gat,46,99
-new_14-1.gat,14,54 warp tomap31 0,2,new_31-1.gat,92,54
+new_14-1.gat,131,53 warp tofield 2,2,new_16-1.gat,25,53
+new_14-1.gat,48,23 warp tofield 1,1,new_9-1.gat,46,99
+new_14-1.gat,14,54 warp tomap31 0,2,new_31-1.gat,92,54
new_14-1.gat,55,104 warp tomap32 3,1,new_32-1.gat,56,21 \ No newline at end of file
diff --git a/npc/new_15-1-woodland-desert/monsters.txt b/npc/new_15-1-woodland-desert/monsters.txt
index 4d697599..81246489 100644
--- a/npc/new_15-1-woodland-desert/monsters.txt
+++ b/npc/new_15-1-woodland-desert/monsters.txt
@@ -1,20 +1,20 @@
-// Map: new_15-1
-// This is the Desert Beach.
-//
-
-new_15-1.gat,0,0,0,0 monster BlackScorpion 1009,20,0,0,Mob15::OnBlackScorpion
-new_15-1.gat,0,0,0,0 monster Snake 1010,10,0,0,Mob15::OnSnake
-
-new_15-1.gat,0,0,0 script Mob15 -1,{
-OnBlackScorpion:
- set @mobID, 1009;
- callfunc "MobPoints";
- break;
-
-OnSnake:
- set @mobID, 1010;
- callfunc "MobPoints";
- break;
-
- end;
-}
+// Map: new_15-1
+// This is the Desert Beach.
+//
+
+new_15-1.gat,0,0,0,0 monster BlackScorpion 1009,20,0,0,Mob15::OnBlackScorpion
+new_15-1.gat,0,0,0,0 monster Snake 1010,10,0,0,Mob15::OnSnake
+
+new_15-1.gat,0,0,0 script Mob15 -1,{
+OnBlackScorpion:
+ set @mobID, 1009;
+ callfunc "MobPoints";
+ break;
+
+OnSnake:
+ set @mobID, 1010;
+ callfunc "MobPoints";
+ break;
+
+ end;
+}
diff --git a/npc/new_15-1-woodland-desert/passages.txt b/npc/new_15-1-woodland-desert/passages.txt
index d74974ad..b9969e9b 100644
--- a/npc/new_15-1-woodland-desert/passages.txt
+++ b/npc/new_15-1-woodland-desert/passages.txt
@@ -1,3 +1,3 @@
-new_15-1.gat,170,75 warp todesert 2,2,new_1-1.gat,15,66
-new_15-1.gat,20,23 warp towoodland 2,0,new_16-1.gat,120,112
-new_15-1.gat,140,19 warp tobeach 2,0,new_34-1.gat,37,109
+new_15-1.gat,170,75 warp todesert 2,2,new_1-1.gat,15,66
+new_15-1.gat,20,23 warp towoodland 2,0,new_16-1.gat,120,112
+new_15-1.gat,140,19 warp tobeach 2,0,new_34-1.gat,37,109
diff --git a/npc/new_16-1-south-east-woodland/monsters.txt b/npc/new_16-1-south-east-woodland/monsters.txt
index a7119a3c..e384b02b 100644
--- a/npc/new_16-1-south-east-woodland/monsters.txt
+++ b/npc/new_16-1-south-east-woodland/monsters.txt
@@ -1,35 +1,35 @@
-// Map: new_16-1
-// This is South-East Woodland.
-//
-
-new_16-1.gat,0,0,0,0 monster Fluffy 1020,50,0,0,Mob16::OnFluffy
-new_16-1.gat,0,0,0,0 monster Flower 1014,40,0,0,Mob16::OnFlower
-
-new_16-1.gat,0,0,0,0 monster Gamboge 1031,1,2700000,1800000,Mob16::OnGamboge
-
-new_16-1.gat,0,0,0,0 monster SilkWorm 1035,2,60000,30000,Mob16::OnSilkWorm
-
-new_16-1.gat,0,0,0 script Mob16 -1,{
-OnFluffy:
- set @mobID, 1020;
- callfunc "MobPoints";
- break;
-
-OnFlower:
- set @mobID, 1014;
- callfunc "MobPoints";
- break;
-
-OnGamboge:
- set @mobID, 1031;
- callfunc "MobPoints";
- break;
-
-OnSilkWorm:
- set @mobID, 1035;
- callfunc "MobPoints";
- break;
-
-
- end;
-}
+// Map: new_16-1
+// This is South-East Woodland.
+//
+
+new_16-1.gat,0,0,0,0 monster Fluffy 1020,50,0,0,Mob16::OnFluffy
+new_16-1.gat,0,0,0,0 monster Flower 1014,40,0,0,Mob16::OnFlower
+
+new_16-1.gat,0,0,0,0 monster Gamboge 1031,1,2700000,1800000,Mob16::OnGamboge
+
+new_16-1.gat,0,0,0,0 monster SilkWorm 1035,2,60000,30000,Mob16::OnSilkWorm
+
+new_16-1.gat,0,0,0 script Mob16 -1,{
+OnFluffy:
+ set @mobID, 1020;
+ callfunc "MobPoints";
+ break;
+
+OnFlower:
+ set @mobID, 1014;
+ callfunc "MobPoints";
+ break;
+
+OnGamboge:
+ set @mobID, 1031;
+ callfunc "MobPoints";
+ break;
+
+OnSilkWorm:
+ set @mobID, 1035;
+ callfunc "MobPoints";
+ break;
+
+
+ end;
+}
diff --git a/npc/new_16-1-south-east-woodland/passages.txt b/npc/new_16-1-south-east-woodland/passages.txt
index da1a1230..4696b482 100644
--- a/npc/new_16-1-south-east-woodland/passages.txt
+++ b/npc/new_16-1-south-east-woodland/passages.txt
@@ -1,4 +1,4 @@
-new_16-1.gat,120,114 warp todesert 3,0,new_15-1.gat,20,24
-new_16-1.gat,22,54 warp towoodland 2,2,new_14-1.gat,127,53
-new_16-1.gat,68,22 warp warp2 3,1,new_18-1.gat,78,100
-new_16-1.gat,122,21 warp warp2 1,1,new_18-1.gat,132,98
+new_16-1.gat,120,114 warp todesert 3,0,new_15-1.gat,20,24
+new_16-1.gat,22,54 warp towoodland 2,2,new_14-1.gat,127,53
+new_16-1.gat,68,22 warp warp2 3,1,new_18-1.gat,78,100
+new_16-1.gat,122,21 warp warp2 1,1,new_18-1.gat,132,98
diff --git a/npc/new_17-1-cave-big/monsters.txt b/npc/new_17-1-cave-big/monsters.txt
index 43c0c264..95d09026 100644
--- a/npc/new_17-1-cave-big/monsters.txt
+++ b/npc/new_17-1-cave-big/monsters.txt
@@ -1,20 +1,20 @@
-// Map: new_17-1
-// This is the Lake Cave, second level of the Hermit's Cave.
-//
-
-new_17-1.gat,0,0,0,0 monster CaveSnake 1021,40,0,0,Mob17::OnCaveSnake
-new_17-1.gat,0,0,0,0 monster SpikyMushroom 1019,15,0,0,Mob17::OnSpikyMushroom
-
-new_17-1.gat,0,0,0 script Mob17 -1,{
-OnCaveSnake:
- set @mobID, 1021;
- callfunc "MobPoints";
- break;
-
-OnSpikyMushroom:
- set @mobID, 1019;
- callfunc "MobPoints";
- break;
-
- end;
-}
+// Map: new_17-1
+// This is the Lake Cave, second level of the Hermit's Cave.
+//
+
+new_17-1.gat,0,0,0,0 monster CaveSnake 1021,40,0,0,Mob17::OnCaveSnake
+new_17-1.gat,0,0,0,0 monster SpikyMushroom 1019,15,0,0,Mob17::OnSpikyMushroom
+
+new_17-1.gat,0,0,0 script Mob17 -1,{
+OnCaveSnake:
+ set @mobID, 1021;
+ callfunc "MobPoints";
+ break;
+
+OnSpikyMushroom:
+ set @mobID, 1019;
+ callfunc "MobPoints";
+ break;
+
+ end;
+}
diff --git a/npc/new_17-1-cave-big/passages.txt b/npc/new_17-1-cave-big/passages.txt
index 9ab031a1..8192c69e 100644
--- a/npc/new_17-1-cave-big/passages.txt
+++ b/npc/new_17-1-cave-big/passages.txt
@@ -1,2 +1,2 @@
-new_17-1.gat,71,10 warp firstlvl 3,0,new_4-1.gat,31,24
-new_17-1.gat,129,87 warp cave 0,0,new_35-1.gat,21,55
+new_17-1.gat,71,10 warp firstlvl 3,0,new_4-1.gat,31,24
+new_17-1.gat,129,87 warp cave 0,0,new_35-1.gat,21,55
diff --git a/npc/new_18-1-woodland-village/hinnak.txt b/npc/new_18-1-woodland-village/hinnak.txt
index e358b84c..39f4bc5a 100644
--- a/npc/new_18-1-woodland-village/hinnak.txt
+++ b/npc/new_18-1-woodland-village/hinnak.txt
@@ -1,100 +1,100 @@
-//#################################################################################
-//# #
-//# this script file contains the npc scripts for the quest to obtain a scythe. #
-//# #
-//# Needed: 10 Pink Antenna #
-//# #
-//# Reward: Scythe #
-//# #
-//#################################################################################
-
-//Farmer
-
-new_18-1.gat,101,30,0 script Hinnak 142, {
- if (Inspector == 10) goto L_NohMask;
- if (QUEST_Scythe_state == 1) goto L_Exchange;
- if (QUEST_Scythe_state == 2) goto L_ThanksAgain;
- mes "[Farmer Hinnak]";
- mes "\"Argh! I hate them! I @#$% hate them! I @#$% hate these @#$% pinkies!\"";
- next;
-
- menu
- "You need some anger control therapy.", -,
- "Why do you hate them?", L_Reason;
- close;
-
-L_Reason:
- mes "[Farmer Hinnak]";
- mes "\"These @#$% beasts are jumping around in my fields destroying all my harvest.";
- mes "But they are too fast. I can't catch them.\"";
- next;
-
- menu
- "Want me to help you?", L_Help,
- "Well, life ain't fair.", -;
- close;
-
-L_Help:
- mes "[Farmer Hinnak]";
- mes "\"Yes, you look quite fast. Maybe you can catch some of them. That will pay them a lesson.";
- mes "Slay some of them and bring me 10 of their antennae.\"";
- set QUEST_Scythe_state, 1;
- next;
-
- menu
- "Sure, I'm on my way", -,
- "How much is this worth to you?", L_Reward;
- close;
-
-L_Reward:
- mes "[Farmer Hinnak]";
- mes "\"Well, I can't offer you much. But I got an old scythe laying around. Maybe you can use it as a weapon.\"";
- close;
-
-L_Exchange:
- mes "[Farmer Hinnak]";
- mes "Have you got the 10 antennae?";
- next;
-
- if (countitem(614) < 10) goto L_Exchange_Notenough;
-
- menu
- "Not yet, but I am working on it.", -,
- "Sure, here they are!", L_Exchange_Exchange;
- close;
-
-L_Exchange_Exchange:
- delitem 614, 10;
- getitem 623, 1;
- set QUEST_Scythe_state, 2;
- mes "[Farmer Hinnak]";
- mes "\"Thank you very much. I've got something for you. My old scythe. Maybe you can use it as a weapon. It is a bit cumbersome but its strikes are deadly.\"";
- close;
-
-L_Exchange_Notenough:
- menu
- "Not yet, but I am working on it.", -;
- close;
-
-L_ThanksAgain:
- mes "[Farmer Hinnak]";
- mes "Thanks again for helping me with the pinkies.";
- close;
-
-L_NohMask:
- menu
- "Did you see anyone in a mask come by here at night?", L_NohMask_Mask,
- "Did you see anyone with a large satchel come by here at night?", L_NohMask_Satchel,
- "Nothing...", -;
- close;
-
-L_NohMask_Mask:
- mes "[Farmer Hinnak]";
- mes "\"No. It tends to be too dark to see a mask.\"";
- close;
-
-L_NohMask_Satchel:
- mes "[Farmer Hinnak]";
- mes "\"Yes, I saw someone with a large sack on their back go to the minning camp.\"";
- close;
+//#################################################################################
+//# #
+//# this script file contains the npc scripts for the quest to obtain a scythe. #
+//# #
+//# Needed: 10 Pink Antenna #
+//# #
+//# Reward: Scythe #
+//# #
+//#################################################################################
+
+//Farmer
+
+new_18-1.gat,101,30,0 script Hinnak 142, {
+ if (Inspector == 10) goto L_NohMask;
+ if (QUEST_Scythe_state == 1) goto L_Exchange;
+ if (QUEST_Scythe_state == 2) goto L_ThanksAgain;
+ mes "[Farmer Hinnak]";
+ mes "\"Argh! I hate them! I @#$% hate them! I @#$% hate these @#$% pinkies!\"";
+ next;
+
+ menu
+ "You need some anger control therapy.", -,
+ "Why do you hate them?", L_Reason;
+ close;
+
+L_Reason:
+ mes "[Farmer Hinnak]";
+ mes "\"These @#$% beasts are jumping around in my fields destroying all my harvest.";
+ mes "But they are too fast. I can't catch them.\"";
+ next;
+
+ menu
+ "Want me to help you?", L_Help,
+ "Well, life ain't fair.", -;
+ close;
+
+L_Help:
+ mes "[Farmer Hinnak]";
+ mes "\"Yes, you look quite fast. Maybe you can catch some of them. That will pay them a lesson.";
+ mes "Slay some of them and bring me 10 of their antennae.\"";
+ set QUEST_Scythe_state, 1;
+ next;
+
+ menu
+ "Sure, I'm on my way", -,
+ "How much is this worth to you?", L_Reward;
+ close;
+
+L_Reward:
+ mes "[Farmer Hinnak]";
+ mes "\"Well, I can't offer you much. But I got an old scythe laying around. Maybe you can use it as a weapon.\"";
+ close;
+
+L_Exchange:
+ mes "[Farmer Hinnak]";
+ mes "Have you got the 10 antennae?";
+ next;
+
+ if (countitem(614) < 10) goto L_Exchange_Notenough;
+
+ menu
+ "Not yet, but I am working on it.", -,
+ "Sure, here they are!", L_Exchange_Exchange;
+ close;
+
+L_Exchange_Exchange:
+ delitem 614, 10;
+ getitem 623, 1;
+ set QUEST_Scythe_state, 2;
+ mes "[Farmer Hinnak]";
+ mes "\"Thank you very much. I've got something for you. My old scythe. Maybe you can use it as a weapon. It is a bit cumbersome but its strikes are deadly.\"";
+ close;
+
+L_Exchange_Notenough:
+ menu
+ "Not yet, but I am working on it.", -;
+ close;
+
+L_ThanksAgain:
+ mes "[Farmer Hinnak]";
+ mes "Thanks again for helping me with the pinkies.";
+ close;
+
+L_NohMask:
+ menu
+ "Did you see anyone in a mask come by here at night?", L_NohMask_Mask,
+ "Did you see anyone with a large satchel come by here at night?", L_NohMask_Satchel,
+ "Nothing...", -;
+ close;
+
+L_NohMask_Mask:
+ mes "[Farmer Hinnak]";
+ mes "\"No. It tends to be too dark to see a mask.\"";
+ close;
+
+L_NohMask_Satchel:
+ mes "[Farmer Hinnak]";
+ mes "\"Yes, I saw someone with a large sack on their back go to the minning camp.\"";
+ close;
} \ No newline at end of file
diff --git a/npc/new_18-1-woodland-village/monsters.txt b/npc/new_18-1-woodland-village/monsters.txt
index 2bafaaf4..8755285c 100644
--- a/npc/new_18-1-woodland-village/monsters.txt
+++ b/npc/new_18-1-woodland-village/monsters.txt
@@ -1,34 +1,34 @@
-// Map: new_18-1
-// This is Woodland around Hurnscald.
-//
-
-new_18-1.gat,0,0,0,0 monster Pinkie 1018,20,0,0,Mob18::OnPinkie
-new_18-1.gat,0,0,0,0 monster SpikyMushroom 1019,20,0,0,Mob18::OnSpikyMushroom
-
-new_18-1.gat,0,0,0,0 monster Mauve 1029,1,2700000,1800000,Mob18::OnMauve
-
-new_18-1.gat,0,0,0,0 monster SilkWorm 1035,2,60000,30000,Mob18::OnSilkWorm
-
-new_18-1.gat,0,0,0 script Mob18 -1,{
-OnPinkie:
- set @mobID, 1018;
- callfunc "MobPoints";
- break;
-
-OnSpikyMushroom:
- set @mobID, 1019;
- callfunc "MobPoints";
- break;
-
-OnMauve:
- set @mobID, 1029;
- callfunc "MobPoints";
- break;
-
-OnSilkWorm:
- set @mobID, 1035;
- callfunc "MobPoints";
- break;
-
- end;
-}
+// Map: new_18-1
+// This is Woodland around Hurnscald.
+//
+
+new_18-1.gat,0,0,0,0 monster Pinkie 1018,20,0,0,Mob18::OnPinkie
+new_18-1.gat,0,0,0,0 monster SpikyMushroom 1019,20,0,0,Mob18::OnSpikyMushroom
+
+new_18-1.gat,0,0,0,0 monster Mauve 1029,1,2700000,1800000,Mob18::OnMauve
+
+new_18-1.gat,0,0,0,0 monster SilkWorm 1035,2,60000,30000,Mob18::OnSilkWorm
+
+new_18-1.gat,0,0,0 script Mob18 -1,{
+OnPinkie:
+ set @mobID, 1018;
+ callfunc "MobPoints";
+ break;
+
+OnSpikyMushroom:
+ set @mobID, 1019;
+ callfunc "MobPoints";
+ break;
+
+OnMauve:
+ set @mobID, 1029;
+ callfunc "MobPoints";
+ break;
+
+OnSilkWorm:
+ set @mobID, 1035;
+ callfunc "MobPoints";
+ break;
+
+ end;
+}
diff --git a/npc/new_19-1-woodland-village/jack.txt b/npc/new_19-1-woodland-village/jack.txt
index 05524dfb..721c4cce 100644
--- a/npc/new_19-1-woodland-village/jack.txt
+++ b/npc/new_19-1-woodland-village/jack.txt
@@ -1,252 +1,252 @@
-//#################################################################################
-//# #
-//# This script file contains the npc scripts for two quests: #
-//# #
-//# Quest1: Obtaining a Forest bow #
-//# Needed: About 20 Raw logs, 5000gp, some chatting and running #
-//# Reward: Forest bow #
-//# #
-//# Quest2: Obtaining a Wooden shield #
-//# Needed: 40 Raw logs, 5000gp #
-//# Reward: Wooden shield and 2500exp #
-//# #
-//# Variables used: @QUEST_Forestbow_state, nibbles 0 and 1 #
-//#################################################################################
-
-// Lumberjack
-new_19-1.gat,40,45,0 script Jack 141, {
- set @RAWLOG, 569;
- set @RAWLOGS_AMOUNT, 40;
- set @WOODENSHIELD, 602;
- set @SHIELD_COST, 5000;
- set @QUEST_SHIELD_EXP, 2500;
-
- set @Q_Forestbow_MASK, NIBBLE_0_MASK;
- set @Q_Forestbow_SHIFT, NIBBLE_0_SHIFT;
-
- set @Q_Woodenshield_MASK, NIBBLE_1_MASK;
- set @Q_Woodenshield_SHIFT, NIBBLE_1_SHIFT;
-
- set @Q_Forestbow, ((QUEST_Forestbow_state & @Q_Forestbow_MASK) >> @Q_Forestbow_SHIFT);
- set @Q_Woodenshield, ((QUEST_Forestbow_state & @Q_Woodenshield_MASK) >> @Q_Woodenshield_SHIFT);
-
- if (@Q_Woodenshield >= 3) goto L_Shield_state_3;
- if (@Q_Woodenshield == 2) goto L_Shield_state_2;
- if (@Q_Woodenshield == 1) goto L_Shield_state_1;
- if (@Q_Forestbow > 1) goto L_Bow_state_2;
-
- mes "[Jack Lumber]";
- mes "\"Hello there, my name is Jack Lumber, the enemy of all trees. If you need some firewood just let me know.\"";
- next;
- if (Inspector == 1) callsub S_NohMask_Ask;
- if (@Q_Forestbow < 1) close;
-
- menu
- "I heard you aren't delivering any more living wood. Why that?", -;
-
- mes "[Jack Lumber]";
- mes "\"Why not?! I value my life, that's why!.\"";
-
- next;
- menu
- "What do you mean?", -;
-
- mes "[Jack Lumber]";
- mes "\"A week ago I was going to chop down one of those twigleaf trees in the forest to the southwest. These twigleafs are the trees that give me the living wood you speak of. I was just chopping away with my axe and what happened? One of its branches hit me! I thought it fell down or the wind blew it. It hurt! I shook it off and struck it again with my axe and another branch hit me! I got angry and started to chop off all the branches near the ground so this couldn't happen anymore. But I still can't believe what happened next.\"";
-
- next;
- menu
- "What happened? ", -;
-
- mes "[Jack Lumber]";
- mes "\"You'll think I am insane when I tell you.\"";
-
- next;
- menu
- "I won't. I promise.", -;
-
- mes "[Jack Lumber]";
- mes "\"OK. After I chopped off a few branches the whole tree started to move. Its roots tore out of the earth, all the branches started to wave around and a face appeared on the trunk. The whole tree CAME TO LIFE! It was mad!\"";
- next;
- menu
- "Did you run away?", -,
- "Did you fight it?", -;
-
- mes "[Jack Lumber]";
- mes "\"I fought, of course! I took my axe and attacked the beast! It hit me here *points at a bruise at his shoulder*, here *lifts his trouser leg to show another bruise* and here *lifts his shirt and reveals some even worse bruises*. But i didn't give up. I chopped away at it, branch after branch, and in the end I chopped off its roots and it fell to the ground motionless.\"";
-
- next;
- menu
- "So you beat the monster? Then why are you so scared?", -;
-
- mes "[Jack Lumber]";
- mes "\"Well, I was exhausted and had to rest. A few minutes passed and suddenly I was surrounded by a dozen or more of these living trees!\"";
-
- next;
- menu
- "Did you fight them, too? ", -;
-
- mes "[Jack Lumber]";
- mes "\"Are you crazy? I barely destroyed one of those beasts. I was in no shape to fight again. I ran away as fast as i could. Lucky for me the monsters aren't that fast on their tiny root legs. Ha!\"";
-
- next;
- menu
- "So you aren't chopping down trees anymore?", -;
-
- mes "[Jack Lumber]";
- mes "\"I still do. It's my job. But I no longer chop those twigleafs, I'll tell you that. I know the bowyer master wants some wood from them, but I don't care. I won't risk my life for a few gold pieces. If you want to, just go to the southwest. But i won't go there ever again.\"";
-
- next;
- menu
- "Southwest you say? OK, thank you.", -;
-
- set @Q_Forestbow, 2;
- callsub S_Update_Mask;
-
- close;
-
-L_Bow_state_2:
- // Bow state 4: The player has found a perfect piece of wood.
- if (@Q_Forestbow > 3) goto L_Bow_state_4;
-
- mes "\"Good luck hunting those tree monsters - you will need it.\"";
- if (Inspector == 1) goto L_NohMask_Ask;
- close;
-
-L_Bow_state_4:
- mes "[Jack Lumber]";
- mes "\"You've finally found that perfect piece of living wood Alan needs to make a Forest bow, haven't you?\"";
-
- next;
- menu
- "I couldn't afford the bow, though...", L_Shield_state_0,
- "No, I'm still looking.", L_Bow_state_4_reaffirm,
- "Yes, I've got the Forest bow now.", -,
- "I'm a melee warrior, I don't need bows.", L_Shield_state_0;
-
- // Check if the player tells the truth (continue on in any case)
- if (@Q_Forestbow > 4) goto L_Shield_state_0;
-
- mes "[Jack Lumber]";
- mes "\"Hrmph. I'm someone who respects those speaking the truth.\"";
-
- next;
- goto L_Shield_state_0;
-
-L_Bow_state_4_reaffirm:
- mes "[Jack Lumber]";
- mes "\"You should go talk to Alan again.\"";
- close;
-
-L_Shield_state_0:
- set @Q_Woodenshield, 1;
- callsub S_Update_Mask;
-
- if (Sex == 0) set @child_of_jack$, "daughter";
- if (Sex == 1) set @child_of_jack$, "son";
-
- mes "[Jack Lumber]";
- mes "\"You no doubt remember how I struggled with those beasts, fighting for my life. Scared me, those seven-branched little stumps did! Never since that day have I strayed near them. And here comes you, cutting them down one by one. I'm proud of you, to dare those trunks a fight. You're strong as if you were my own " + @child_of_jack$ + "!\"";
- next;
- goto L_Shield_state_1;
-
-L_Shield_state_1:
- mes "[Jack Lumber]";
- mes "\"I have an idea. What would you say about a new shield?\"";
- next;
-
- if (Inspector == 1)
- menu
- "No thanks.", L_End,
- "Yes, please!", -,
- "Actually, I'd like to know if you've seen any strange happenings in town.", L_NohMask_Answer;
- if (Inspector != 1)
- menu
- "No thanks.", L_End,
- "Yes, please!", -;
-
- mes "[Jack Lumber]";
- mes "\"All I need is " + @RAWLOGS_AMOUNT + " raw logs. This needn't be highest-quality wood; pretty much any log you can find should work. Oh, and I'll also need " + @SHIELD_COST + " GP for other materials.\"";
- next;
-
- set @Q_Woodenshield, 2;
- callsub S_Update_Mask;
- close;
-
-L_End:
- close;
-
-L_Shield_state_2:
- mes "[Jack Lumber]";
- mes "\"Let's see if you have enough of everything.\"";
- next;
-
- if (countitem(@RAWLOG) < @RAWLOGS_AMOUNT) goto L_Not_enough_logs;
- if (zeny < @SHIELD_COST) goto L_Not_enough_money;
-
- delitem @RAWLOG, @RAWLOGS_AMOUNT;
- set zeny, zeny - @SHIELD_COST;
- getexp @QUEST_SHIELD_EXP, 0;
- getitem @WOODENSHIELD, 1;
-
- set @Q_Woodenshield, 3;
- callsub S_Update_Mask;
- mes "[Jack Lumber]";
- mes "\"Have a seat.\"";
- mes "Jack saws the logs into pieces, then shaves them until they are smooth to the touch.";
- mes "Applying some strong-smelling liquid, he tans them in darker hues.";
- next;
-
- mes "[Jack Lumber]";
- mes "Grabbing one of two leftover pieces, he begins to carve it into a round shape, then repeats this with the second piece-- shield handles, from what you can tell.";
- next;
-
- mes "[Jack Lumber]";
- mes "Meanwhile, the sun has dried the other pieces. Jack places them next to each other, adds a frame, and nails everything together.";
- mes "The resulting shield looks usable already, but Jack applies another liquid to it and leaves it to dry for a few moments.";
- next;
-
- mes "[Jack Lumber]";
- mes "Finally, he hands the shield to you.";
- mes "\"Enjoy your new shield!\"";
- mes "[" + @QUEST_SHIELD_EXP + " experience points]";
- next;
- goto L_End;
-
-L_Not_enough_logs:
- mes "[Jack Lumber]";
- mes "\"You don't have enough wood for me to craft this shield; I need a total of " + @RAWLOGS_AMOUNT + " raw logs.\"";
- close;
-
-L_Not_enough_money:
- mes "[Jack Lumber]";
- mes "\"You don't have enough gold, I'm afraid. I need " + @SHIELD_COST + " GP to finish your shield.\"";
- close;
-
-L_Shield_state_3:
- mes "[Jack Lumber]";
- mes "\"I hope that my shield will serve you well!\"";
- if (Inspector == 1)
- menu
- "Me too.", -,
- "Have you seen anything that might be connected to the recent robberies in town?", L_NohMask_Answer;
- close;
-
-L_NohMask_Ask:
- menu
- "I'll keep that in mind.", -,
- "Have you seen anything that might be connected to the recent robberies in town?", L_NohMask_Answer;
- return;
-
-L_NohMask_Answer:
- mes "[Jack Lumber]";
- mes "\"Sorry, no.\"";
- close;
-
-S_Update_Mask:
- set QUEST_Forestbow_state,
- (QUEST_Forestbow_state & ~(@Q_Forestbow_MASK | @Q_Woodenshield_MASK))
- | (@Q_Forestbow << @Q_Forestbow_SHIFT)
- | (@Q_Woodenshield << @Q_Woodenshield_SHIFT);
- return;
-}
+//#################################################################################
+//# #
+//# This script file contains the npc scripts for two quests: #
+//# #
+//# Quest1: Obtaining a Forest bow #
+//# Needed: About 20 Raw logs, 5000gp, some chatting and running #
+//# Reward: Forest bow #
+//# #
+//# Quest2: Obtaining a Wooden shield #
+//# Needed: 40 Raw logs, 5000gp #
+//# Reward: Wooden shield and 2500exp #
+//# #
+//# Variables used: @QUEST_Forestbow_state, nibbles 0 and 1 #
+//#################################################################################
+
+// Lumberjack
+new_19-1.gat,40,45,0 script Jack 141, {
+ set @RAWLOG, 569;
+ set @RAWLOGS_AMOUNT, 40;
+ set @WOODENSHIELD, 602;
+ set @SHIELD_COST, 5000;
+ set @QUEST_SHIELD_EXP, 2500;
+
+ set @Q_Forestbow_MASK, NIBBLE_0_MASK;
+ set @Q_Forestbow_SHIFT, NIBBLE_0_SHIFT;
+
+ set @Q_Woodenshield_MASK, NIBBLE_1_MASK;
+ set @Q_Woodenshield_SHIFT, NIBBLE_1_SHIFT;
+
+ set @Q_Forestbow, ((QUEST_Forestbow_state & @Q_Forestbow_MASK) >> @Q_Forestbow_SHIFT);
+ set @Q_Woodenshield, ((QUEST_Forestbow_state & @Q_Woodenshield_MASK) >> @Q_Woodenshield_SHIFT);
+
+ if (@Q_Woodenshield >= 3) goto L_Shield_state_3;
+ if (@Q_Woodenshield == 2) goto L_Shield_state_2;
+ if (@Q_Woodenshield == 1) goto L_Shield_state_1;
+ if (@Q_Forestbow > 1) goto L_Bow_state_2;
+
+ mes "[Jack Lumber]";
+ mes "\"Hello there, my name is Jack Lumber, the enemy of all trees. If you need some firewood just let me know.\"";
+ next;
+ if (Inspector == 1) callsub S_NohMask_Ask;
+ if (@Q_Forestbow < 1) close;
+
+ menu
+ "I heard you aren't delivering any more living wood. Why that?", -;
+
+ mes "[Jack Lumber]";
+ mes "\"Why not?! I value my life, that's why!.\"";
+
+ next;
+ menu
+ "What do you mean?", -;
+
+ mes "[Jack Lumber]";
+ mes "\"A week ago I was going to chop down one of those twigleaf trees in the forest to the southwest. These twigleafs are the trees that give me the living wood you speak of. I was just chopping away with my axe and what happened? One of its branches hit me! I thought it fell down or the wind blew it. It hurt! I shook it off and struck it again with my axe and another branch hit me! I got angry and started to chop off all the branches near the ground so this couldn't happen anymore. But I still can't believe what happened next.\"";
+
+ next;
+ menu
+ "What happened? ", -;
+
+ mes "[Jack Lumber]";
+ mes "\"You'll think I am insane when I tell you.\"";
+
+ next;
+ menu
+ "I won't. I promise.", -;
+
+ mes "[Jack Lumber]";
+ mes "\"OK. After I chopped off a few branches the whole tree started to move. Its roots tore out of the earth, all the branches started to wave around and a face appeared on the trunk. The whole tree CAME TO LIFE! It was mad!\"";
+ next;
+ menu
+ "Did you run away?", -,
+ "Did you fight it?", -;
+
+ mes "[Jack Lumber]";
+ mes "\"I fought, of course! I took my axe and attacked the beast! It hit me here *points at a bruise at his shoulder*, here *lifts his trouser leg to show another bruise* and here *lifts his shirt and reveals some even worse bruises*. But i didn't give up. I chopped away at it, branch after branch, and in the end I chopped off its roots and it fell to the ground motionless.\"";
+
+ next;
+ menu
+ "So you beat the monster? Then why are you so scared?", -;
+
+ mes "[Jack Lumber]";
+ mes "\"Well, I was exhausted and had to rest. A few minutes passed and suddenly I was surrounded by a dozen or more of these living trees!\"";
+
+ next;
+ menu
+ "Did you fight them, too? ", -;
+
+ mes "[Jack Lumber]";
+ mes "\"Are you crazy? I barely destroyed one of those beasts. I was in no shape to fight again. I ran away as fast as i could. Lucky for me the monsters aren't that fast on their tiny root legs. Ha!\"";
+
+ next;
+ menu
+ "So you aren't chopping down trees anymore?", -;
+
+ mes "[Jack Lumber]";
+ mes "\"I still do. It's my job. But I no longer chop those twigleafs, I'll tell you that. I know the bowyer master wants some wood from them, but I don't care. I won't risk my life for a few gold pieces. If you want to, just go to the southwest. But i won't go there ever again.\"";
+
+ next;
+ menu
+ "Southwest you say? OK, thank you.", -;
+
+ set @Q_Forestbow, 2;
+ callsub S_Update_Mask;
+
+ close;
+
+L_Bow_state_2:
+ // Bow state 4: The player has found a perfect piece of wood.
+ if (@Q_Forestbow > 3) goto L_Bow_state_4;
+
+ mes "\"Good luck hunting those tree monsters - you will need it.\"";
+ if (Inspector == 1) goto L_NohMask_Ask;
+ close;
+
+L_Bow_state_4:
+ mes "[Jack Lumber]";
+ mes "\"You've finally found that perfect piece of living wood Alan needs to make a Forest bow, haven't you?\"";
+
+ next;
+ menu
+ "I couldn't afford the bow, though...", L_Shield_state_0,
+ "No, I'm still looking.", L_Bow_state_4_reaffirm,
+ "Yes, I've got the Forest bow now.", -,
+ "I'm a melee warrior, I don't need bows.", L_Shield_state_0;
+
+ // Check if the player tells the truth (continue on in any case)
+ if (@Q_Forestbow > 4) goto L_Shield_state_0;
+
+ mes "[Jack Lumber]";
+ mes "\"Hrmph. I'm someone who respects those speaking the truth.\"";
+
+ next;
+ goto L_Shield_state_0;
+
+L_Bow_state_4_reaffirm:
+ mes "[Jack Lumber]";
+ mes "\"You should go talk to Alan again.\"";
+ close;
+
+L_Shield_state_0:
+ set @Q_Woodenshield, 1;
+ callsub S_Update_Mask;
+
+ if (Sex == 0) set @child_of_jack$, "daughter";
+ if (Sex == 1) set @child_of_jack$, "son";
+
+ mes "[Jack Lumber]";
+ mes "\"You no doubt remember how I struggled with those beasts, fighting for my life. Scared me, those seven-branched little stumps did! Never since that day have I strayed near them. And here comes you, cutting them down one by one. I'm proud of you, to dare those trunks a fight. You're strong as if you were my own " + @child_of_jack$ + "!\"";
+ next;
+ goto L_Shield_state_1;
+
+L_Shield_state_1:
+ mes "[Jack Lumber]";
+ mes "\"I have an idea. What would you say about a new shield?\"";
+ next;
+
+ if (Inspector == 1)
+ menu
+ "No thanks.", L_End,
+ "Yes, please!", -,
+ "Actually, I'd like to know if you've seen any strange happenings in town.", L_NohMask_Answer;
+ if (Inspector != 1)
+ menu
+ "No thanks.", L_End,
+ "Yes, please!", -;
+
+ mes "[Jack Lumber]";
+ mes "\"All I need is " + @RAWLOGS_AMOUNT + " raw logs. This needn't be highest-quality wood; pretty much any log you can find should work. Oh, and I'll also need " + @SHIELD_COST + " GP for other materials.\"";
+ next;
+
+ set @Q_Woodenshield, 2;
+ callsub S_Update_Mask;
+ close;
+
+L_End:
+ close;
+
+L_Shield_state_2:
+ mes "[Jack Lumber]";
+ mes "\"Let's see if you have enough of everything.\"";
+ next;
+
+ if (countitem(@RAWLOG) < @RAWLOGS_AMOUNT) goto L_Not_enough_logs;
+ if (zeny < @SHIELD_COST) goto L_Not_enough_money;
+
+ delitem @RAWLOG, @RAWLOGS_AMOUNT;
+ set zeny, zeny - @SHIELD_COST;
+ getexp @QUEST_SHIELD_EXP, 0;
+ getitem @WOODENSHIELD, 1;
+
+ set @Q_Woodenshield, 3;
+ callsub S_Update_Mask;
+ mes "[Jack Lumber]";
+ mes "\"Have a seat.\"";
+ mes "Jack saws the logs into pieces, then shaves them until they are smooth to the touch.";
+ mes "Applying some strong-smelling liquid, he tans them in darker hues.";
+ next;
+
+ mes "[Jack Lumber]";
+ mes "Grabbing one of two leftover pieces, he begins to carve it into a round shape, then repeats this with the second piece-- shield handles, from what you can tell.";
+ next;
+
+ mes "[Jack Lumber]";
+ mes "Meanwhile, the sun has dried the other pieces. Jack places them next to each other, adds a frame, and nails everything together.";
+ mes "The resulting shield looks usable already, but Jack applies another liquid to it and leaves it to dry for a few moments.";
+ next;
+
+ mes "[Jack Lumber]";
+ mes "Finally, he hands the shield to you.";
+ mes "\"Enjoy your new shield!\"";
+ mes "[" + @QUEST_SHIELD_EXP + " experience points]";
+ next;
+ goto L_End;
+
+L_Not_enough_logs:
+ mes "[Jack Lumber]";
+ mes "\"You don't have enough wood for me to craft this shield; I need a total of " + @RAWLOGS_AMOUNT + " raw logs.\"";
+ close;
+
+L_Not_enough_money:
+ mes "[Jack Lumber]";
+ mes "\"You don't have enough gold, I'm afraid. I need " + @SHIELD_COST + " GP to finish your shield.\"";
+ close;
+
+L_Shield_state_3:
+ mes "[Jack Lumber]";
+ mes "\"I hope that my shield will serve you well!\"";
+ if (Inspector == 1)
+ menu
+ "Me too.", -,
+ "Have you seen anything that might be connected to the recent robberies in town?", L_NohMask_Answer;
+ close;
+
+L_NohMask_Ask:
+ menu
+ "I'll keep that in mind.", -,
+ "Have you seen anything that might be connected to the recent robberies in town?", L_NohMask_Answer;
+ return;
+
+L_NohMask_Answer:
+ mes "[Jack Lumber]";
+ mes "\"Sorry, no.\"";
+ close;
+
+S_Update_Mask:
+ set QUEST_Forestbow_state,
+ (QUEST_Forestbow_state & ~(@Q_Forestbow_MASK | @Q_Woodenshield_MASK))
+ | (@Q_Forestbow << @Q_Forestbow_SHIFT)
+ | (@Q_Woodenshield << @Q_Woodenshield_SHIFT);
+ return;
+}
diff --git a/npc/new_19-1-woodland-village/milly.txt b/npc/new_19-1-woodland-village/milly.txt
index 35f5fda6..b8bf7460 100644
--- a/npc/new_19-1-woodland-village/milly.txt
+++ b/npc/new_19-1-woodland-village/milly.txt
@@ -1,25 +1,25 @@
-new_19-1.gat,81,41,0 script Milly 114, {
- mes "[Milly]";
- mes "\"Hello.\"";
- next;
- if (Inspector == 1) goto L_NohMask;
- close;
-
-L_NohMask:
- menu
- "Have you seen anything strange lately?", L_NohMask_Strange,
- "Do you know anything about the recent robberies?", L_NohMask_Robbery,
- "Yes, it is.", -;
- close;
-
-L_NohMask_Strange:
- mes "[Milly]";
- mes "\"I haven't seen anything strange.\"";
- close;
-
-L_NohMask_Robbery:
- mes "[Milly]";
- mes "\"No, sorry.\"";
- close;
-}
-
+new_19-1.gat,81,41,0 script Milly 114, {
+ mes "[Milly]";
+ mes "\"Hello.\"";
+ next;
+ if (Inspector == 1) goto L_NohMask;
+ close;
+
+L_NohMask:
+ menu
+ "Have you seen anything strange lately?", L_NohMask_Strange,
+ "Do you know anything about the recent robberies?", L_NohMask_Robbery,
+ "Yes, it is.", -;
+ close;
+
+L_NohMask_Strange:
+ mes "[Milly]";
+ mes "\"I haven't seen anything strange.\"";
+ close;
+
+L_NohMask_Robbery:
+ mes "[Milly]";
+ mes "\"No, sorry.\"";
+ close;
+}
+
diff --git a/npc/new_19-1-woodland-village/old_man.txt b/npc/new_19-1-woodland-village/old_man.txt
index 0d6d1562..55812260 100644
--- a/npc/new_19-1-woodland-village/old_man.txt
+++ b/npc/new_19-1-woodland-village/old_man.txt
@@ -1,34 +1,34 @@
-// Old man
-
-new_19-1.gat,85,51,0 script Old Man 159,{
- mes "[Old Man]";
- mes "\"Don't let those monsters get to you.\"";
- next;
- if (Inspector == 1) goto L_NohMask_Ask;
- if (Inspector == 6) goto L_NohMask_Accuse;
- close;
-
-L_NohMask_Ask:
- menu
- "Have you seen anything strange lately?", L_NohMask_Ask_Nothing,
- "Do you know anything about the recent robberies?", L_NohMask_Ask_Nothing,
- "I won't, thank you.", -;
- close;
-
-L_NohMask_Ask_Nothing:
- mes "[Old Man]";
- mes "\"I'm sorry, but I didn't see anything. You should ask my old woman.\"";
- close;
-
-L_NohMask_Accuse:
- menu
- "The leader of the troupe said you hung around them a lot while they were in town.", L_NohMask_Accuse_Respond,
- "I won't, thank you.", -;
- close;
-
-L_NohMask_Accuse_Respond:
- mes "[Old Man]";
- mes "\"Yes, I hung around the theater a lot. I was an actor when I was younger. But I wasn't there that night. Me and the wife were at home all night.\"";
- set Inspector, 7;
- close;
-}
+// Old man
+
+new_19-1.gat,85,51,0 script Old Man 159,{
+ mes "[Old Man]";
+ mes "\"Don't let those monsters get to you.\"";
+ next;
+ if (Inspector == 1) goto L_NohMask_Ask;
+ if (Inspector == 6) goto L_NohMask_Accuse;
+ close;
+
+L_NohMask_Ask:
+ menu
+ "Have you seen anything strange lately?", L_NohMask_Ask_Nothing,
+ "Do you know anything about the recent robberies?", L_NohMask_Ask_Nothing,
+ "I won't, thank you.", -;
+ close;
+
+L_NohMask_Ask_Nothing:
+ mes "[Old Man]";
+ mes "\"I'm sorry, but I didn't see anything. You should ask my old woman.\"";
+ close;
+
+L_NohMask_Accuse:
+ menu
+ "The leader of the troupe said you hung around them a lot while they were in town.", L_NohMask_Accuse_Respond,
+ "I won't, thank you.", -;
+ close;
+
+L_NohMask_Accuse_Respond:
+ mes "[Old Man]";
+ mes "\"Yes, I hung around the theater a lot. I was an actor when I was younger. But I wasn't there that night. Me and the wife were at home all night.\"";
+ set Inspector, 7;
+ close;
+}
diff --git a/npc/new_19-1-woodland-village/old_woman.txt b/npc/new_19-1-woodland-village/old_woman.txt
index b4879340..c94fe63f 100644
--- a/npc/new_19-1-woodland-village/old_woman.txt
+++ b/npc/new_19-1-woodland-village/old_woman.txt
@@ -1,56 +1,56 @@
-// Old woman
-
-new_19-1.gat,29,43,0 script Old Woman 154,{
- mes "[Old Woman]";
- mes "\"Hello deary.\"";
- next;
- if ((Inspector >= 1 && Inspector <= 7) || Inspector == 9) goto L_NohMask;
- close;
-
-L_NohMask:
- if (Inspector == 7) goto L_NohMask_Alibi;
- callfunc "ProcessEquip";
- if (@torsoC == cDarkBlue && @legsC == cDarkBlue) goto L_NohMask_Fake;
- if (Inspector >= 3 && Inspector <= 6) close;
-
- menu
- "Have you seen anything strange lately?", L_NohMask_FirstAsk,
- "Do you know anything about the recent robberies?", L_NohMask_FirstAsk,
- "Hello", -;
- close;
-
-L_NohMask_FirstAsk:
- mes "[Old Woman]";
- mes "\"Yes, but I'm only talking to the inspector himself!\"";
- if (Inspector == 1) set Inspector, 2;
- close;
-
-L_NohMask_Alibi:
- menu
- "Was your husband with you at home all night the last night that the troupe was in town?", -;
-
- mes "[Old Woman]";
- mes "\"Yes, we were both at home all night.\"";
- set Inspector, 8;
- close;
-
-L_NohMask_Fake:
- if (Inspector == 9) goto L_NohMask_Fake_Satchel;
- if (Inspector >= 3 && Inspector <= 6) got L_NohMask_Filler;
-
- mes "[Old Woman]";
- mes "\"I saw someone sneaking around town wearing a theater mask. It looked like one of the masks used by the troupe that was in town recently.\"";
- set Inspector, 3;
- close;
-
-L_NohMask_Filler:
- mes "[Old Woman]";
- mes "\"I hope you castch that naughty person!\"";
- close;
-
-L_NohMask_Fake_Satchel:
- mes "[Old Woman]";
- mes "\"I've remembered something else. The night the troupe left, I saw someone with a theater mask take a large satchel out of town. He was heading north.\"";
- set Inspector, 10;
- close;
-}
+// Old woman
+
+new_19-1.gat,29,43,0 script Old Woman 154,{
+ mes "[Old Woman]";
+ mes "\"Hello deary.\"";
+ next;
+ if ((Inspector >= 1 && Inspector <= 7) || Inspector == 9) goto L_NohMask;
+ close;
+
+L_NohMask:
+ if (Inspector == 7) goto L_NohMask_Alibi;
+ callfunc "ProcessEquip";
+ if (@torsoC == cDarkBlue && @legsC == cDarkBlue) goto L_NohMask_Fake;
+ if (Inspector >= 3 && Inspector <= 6) close;
+
+ menu
+ "Have you seen anything strange lately?", L_NohMask_FirstAsk,
+ "Do you know anything about the recent robberies?", L_NohMask_FirstAsk,
+ "Hello", -;
+ close;
+
+L_NohMask_FirstAsk:
+ mes "[Old Woman]";
+ mes "\"Yes, but I'm only talking to the inspector himself!\"";
+ if (Inspector == 1) set Inspector, 2;
+ close;
+
+L_NohMask_Alibi:
+ menu
+ "Was your husband with you at home all night the last night that the troupe was in town?", -;
+
+ mes "[Old Woman]";
+ mes "\"Yes, we were both at home all night.\"";
+ set Inspector, 8;
+ close;
+
+L_NohMask_Fake:
+ if (Inspector == 9) goto L_NohMask_Fake_Satchel;
+ if (Inspector >= 3 && Inspector <= 6) got L_NohMask_Filler;
+
+ mes "[Old Woman]";
+ mes "\"I saw someone sneaking around town wearing a theater mask. It looked like one of the masks used by the troupe that was in town recently.\"";
+ set Inspector, 3;
+ close;
+
+L_NohMask_Filler:
+ mes "[Old Woman]";
+ mes "\"I hope you castch that naughty person!\"";
+ close;
+
+L_NohMask_Fake_Satchel:
+ mes "[Old Woman]";
+ mes "\"I've remembered something else. The night the troupe left, I saw someone with a theater mask take a large satchel out of town. He was heading north.\"";
+ set Inspector, 10;
+ close;
+}
diff --git a/npc/new_19-1-woodland-village/sabine.txt b/npc/new_19-1-woodland-village/sabine.txt
index f30bded2..e45ae7a8 100644
--- a/npc/new_19-1-woodland-village/sabine.txt
+++ b/npc/new_19-1-woodland-village/sabine.txt
@@ -1,26 +1,26 @@
-// Girl sitting on bench
-
-new_19-1.gat,89,27,0 script Sabine 106,{
- mes "[Sabine]";
- mes "\"Isn't this place pretty? I love hanging out here!\"";
- next;
- if (Inspector == 1) goto L_NohMask;
- close;
-
-L_NohMask:
- menu
- "Have you seen anything strange lately?", L_NohMask_Strange,
- "Do you know anything about the recent robberies?", L_NohMask_Robbery,
- "Yes, it is.", -;
- close;
-
-L_NohMask_Strange:
- mes "[Sabine]";
- mes "\"I haven't seen anything strange.\"";
- close;
-
-L_NohMask_Robbery:
- mes "[Sabine]";
- mes "\"No, sorry.\"";
- close;
-}
+// Girl sitting on bench
+
+new_19-1.gat,89,27,0 script Sabine 106,{
+ mes "[Sabine]";
+ mes "\"Isn't this place pretty? I love hanging out here!\"";
+ next;
+ if (Inspector == 1) goto L_NohMask;
+ close;
+
+L_NohMask:
+ menu
+ "Have you seen anything strange lately?", L_NohMask_Strange,
+ "Do you know anything about the recent robberies?", L_NohMask_Robbery,
+ "Yes, it is.", -;
+ close;
+
+L_NohMask_Strange:
+ mes "[Sabine]";
+ mes "\"I haven't seen anything strange.\"";
+ close;
+
+L_NohMask_Robbery:
+ mes "[Sabine]";
+ mes "\"No, sorry.\"";
+ close;
+}
diff --git a/npc/new_19-1-woodland-village/soul-menhir.txt b/npc/new_19-1-woodland-village/soul-menhir.txt
index 1943cae4..152f05be 100644
--- a/npc/new_19-1-woodland-village/soul-menhir.txt
+++ b/npc/new_19-1-woodland-village/soul-menhir.txt
@@ -1,8 +1,8 @@
-new_19-1.gat,53,40,0 script Soul Menhir 144, {
- set @map$, "new_19-1.gat";
- set @x, 53;
- set @y, 41;
- callfunc "SoulMenhir";
-}
-
-
+new_19-1.gat,53,40,0 script Soul Menhir 144, {
+ set @map$, "new_19-1.gat";
+ set @x, 53;
+ set @y, 41;
+ callfunc "SoulMenhir";
+}
+
+
diff --git a/npc/new_20-1-woodland-village/alan.txt b/npc/new_20-1-woodland-village/alan.txt
index d8c2f51e..fc779676 100644
--- a/npc/new_20-1-woodland-village/alan.txt
+++ b/npc/new_20-1-woodland-village/alan.txt
@@ -1,211 +1,211 @@
-//#################################################################################
-//# #
-//# This script file contains the npc scripts for the quest to obtain a forestbow #
-//# #
-//# Needed: 10 Raw Logs, 5000gp, some chatting and running. #
-//# #
-//# Reward: Forest Bow #
-//#################################################################################
-
-// Archer Shop Master
-new_20-1.gat,99,23,0 script Alan 125, {
- set @Q_MASK, NIBBLE_0_MASK;
- set @Q_SHIFT, NIBBLE_0_SHIFT;
-
- set @Q_status, ((QUEST_Forestbow_state) & @Q_MASK) >> @Q_SHIFT;
-
- if (@Q_status == 1) goto L_State_1;
- if (@Q_status == 2) goto L_State_2;
- if (@Q_status == 3) goto L_State_3;
- if (@Q_status == 4) goto L_State_4;
- if (@Q_status == 5) goto L_State_5;
-
- mes "[Alan]";
- mes "\"When you want to buy something then please speak to my apprentice. I am only doing special requests.\"";
- next;
- if (Inspector == 1)
- menu
- "OK, thanks", -,
- "Can you make me a really good bow?", L_State_0_1,
- "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
- if (Inspector != 1)
- menu
- "OK, thanks", -,
- "Can you make me a really good bow?", L_State_0_1;
- close;
-
-L_State_0_1:
- mes "[Alan]";
- mes "\"You mean like one of my legendary forest bows?\"";
- next;
- menu
- "Yes, that would be nice.", -;
- mes "[Alan]";
- mes "\"Sorry, I am not making these anymore.\"";
- next;
- menu
- "Oh, too bad.", -,
- "What? Why that?", L_State_0_2;
- close;
-
-L_State_0_2:
- mes "[Alan]";
- mes "\"The problem is that I am short of material. My forestbows are not made of regular wood, you know.";
- mes "They are made of special living wood. And only the best logs of living wood are good enough for them.";
- mes "I used to get these logs from Jack, the lumberjack. But the last time I asked him for a new delivery he said that he would never again get any for me.\"";
-
- set @Q_status, 1;
- callsub S_Update_Var;
-
- next;
- menu
- "Too bad.", -,
- "Did you ask him why?", L_State_0_3;
- close;
-
-L_State_0_3:
- mes "[Alan]";
- mes "\"Sure I did. But he just told me to leave him alone. Maybe you could ask him what's wrong?\"";
- next;
- menu
- "OK, I'll ask him.", -,
- "I am sure he got his reasons.", -;
- close;
-
-L_State_1:
- mes "[Alan]";
- mes "\"Did you already ask Jack why he won't deliver me any more living wood?\"";
- next;
- if (Inspector == 1)
- menu
- "No, I haven't had the time yet", -,
- "No, I didn't find him yet.", L_State_1_1,
- "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
- if (Inspector != 1)
- menu
- "No, I haven't had the time yet", -,
- "No, I didn't find him yet.", L_State_1_1;
- close;
-
-L_State_1_1:
- mes "[Alan]";
- mes "\"When you leave my shop just go southwest over the village plaza. You can't miss it.\"";
- close;
-
-L_State_2:
- mes "[Alan]";
- mes "\"Did you already ask Jack why he won't deliver me any more living wood?\"";
- next;
- if (Inspector == 1)
- menu
- "Yes, I did. He said that the trees turned into dangerous monsters.", -,
- "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
- if (Inspector != 1)
- menu
- "Yes, I did. He said that the trees turned into dangerous monsters.", -;
- mes "[Alan]";
- mes "\"Oh, that's really bad news. Maybe you can do his job?";
- mes "When you kill some of these tree monsters and bring me their wood I can take a look at them.";
- mes "Maybe you will find a piece of wood that is strong enough to become one of my forest bows.\"";
-
- set @Q_status, 3;
- callsub S_Update_Var;
-
- close;
-
-L_State_3:
- mes "[Alan]";
- mes "\"How is the hunt going? Did you bring me any wood?\"";
- if (countitem(569) < 1) close;
- next;
- if (Inspector == 1)
- menu
- "Here, take a look!", L_State_3_try,
- "Yes, but I need it for something else.", -,
- "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
- if (Inspector != 1)
- menu
- "Here, take a look!", L_State_3_try,
- "Yes, but I need it for something else.", -;
- close;
-
-L_State_3_try:
- mes "[Alan]";
- mes "\"Hmmm... looks ok, but is it strong enough?\"";
- mes "Alan bends the log over his knee.";
- next;
- delitem 569, 1;
- set @Temp1, rand(20);
- if (@Temp1 == 0) goto L_State_3_success;
- mes "The log breaks with a loud crack";
- next;
- mes "[Alan]";
- mes "\"Sorry, this log was too weak for one of my forest bows. Now it is junk. Give me another.\"";
- if (countitem(569) < 1) close;
- next;
- menu
- "Sure, here you go.", L_State_3_try,
- "Hey! Stop breaking my stuff!", -;
- close;
-
-L_State_3_success:
- mes "Alan tries as hard as he can but the log won't bend.";
- next;
- mes "[Alan]";
- mes "\"Aaah! Yes! That is a really fine piece of wood you bought me. It will make an excelent bow!\"";
- next;
- set @Q_status, 4;
- callsub S_Update_Var;
-
-L_State_4:
- mes "[Alan]";
- mes "\"I can make you a really nice forest bow out of this. I just need 10,000 GP for material and work time.\"";
- next;
- if (Inspector == 1)
- menu
- "10,000??? What a ripoff!", -,
- "Sure, here you go!", L_State_4_pay,
- "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
- if (Inspector != 1)
- menu
- "10,000??? What a ripoff!", -,
- "Sure, here you go!", L_State_4_pay;
- close;
-
-L_State_4_pay:
- if (zeny < 10000) goto L_State_4_nocash;
- set zeny, zeny - 10000;
- getitem 545, 1;
- set @Q_status, 5;
- callsub S_Update_Var;
- mes "[Alan]";
- mes "\"Here you go - have fun with it.\"";
- close;
-
-L_State_4_nocash:
- mes "[Alan]";
- mes "\"Seems like you are out of cash.\"";
- close;
-
-L_State_5:
- mes "[Alan]";
- mes "\"I hope you are statisfied with your forest bow. It is one of my best works.\"";
- next;
-
- if (Inspector == 1)
- menu
- "I am!", -,
- "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
- close;
-
-L_NohMask_Answer:
- mes "[Alan]";
- mes "\"No.\"";
- close;
-
-S_Update_Var:
- set QUEST_Forestbow_state,
- (QUEST_Forestbow_state & ~(@Q_MASK)
- | (@Q_status << @Q_SHIFT));
- return;
-}
+//#################################################################################
+//# #
+//# This script file contains the npc scripts for the quest to obtain a forestbow #
+//# #
+//# Needed: 10 Raw Logs, 5000gp, some chatting and running. #
+//# #
+//# Reward: Forest Bow #
+//#################################################################################
+
+// Archer Shop Master
+new_20-1.gat,99,23,0 script Alan 125, {
+ set @Q_MASK, NIBBLE_0_MASK;
+ set @Q_SHIFT, NIBBLE_0_SHIFT;
+
+ set @Q_status, ((QUEST_Forestbow_state) & @Q_MASK) >> @Q_SHIFT;
+
+ if (@Q_status == 1) goto L_State_1;
+ if (@Q_status == 2) goto L_State_2;
+ if (@Q_status == 3) goto L_State_3;
+ if (@Q_status == 4) goto L_State_4;
+ if (@Q_status == 5) goto L_State_5;
+
+ mes "[Alan]";
+ mes "\"When you want to buy something then please speak to my apprentice. I am only doing special requests.\"";
+ next;
+ if (Inspector == 1)
+ menu
+ "OK, thanks", -,
+ "Can you make me a really good bow?", L_State_0_1,
+ "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
+ if (Inspector != 1)
+ menu
+ "OK, thanks", -,
+ "Can you make me a really good bow?", L_State_0_1;
+ close;
+
+L_State_0_1:
+ mes "[Alan]";
+ mes "\"You mean like one of my legendary forest bows?\"";
+ next;
+ menu
+ "Yes, that would be nice.", -;
+ mes "[Alan]";
+ mes "\"Sorry, I am not making these anymore.\"";
+ next;
+ menu
+ "Oh, too bad.", -,
+ "What? Why that?", L_State_0_2;
+ close;
+
+L_State_0_2:
+ mes "[Alan]";
+ mes "\"The problem is that I am short of material. My forestbows are not made of regular wood, you know.";
+ mes "They are made of special living wood. And only the best logs of living wood are good enough for them.";
+ mes "I used to get these logs from Jack, the lumberjack. But the last time I asked him for a new delivery he said that he would never again get any for me.\"";
+
+ set @Q_status, 1;
+ callsub S_Update_Var;
+
+ next;
+ menu
+ "Too bad.", -,
+ "Did you ask him why?", L_State_0_3;
+ close;
+
+L_State_0_3:
+ mes "[Alan]";
+ mes "\"Sure I did. But he just told me to leave him alone. Maybe you could ask him what's wrong?\"";
+ next;
+ menu
+ "OK, I'll ask him.", -,
+ "I am sure he got his reasons.", -;
+ close;
+
+L_State_1:
+ mes "[Alan]";
+ mes "\"Did you already ask Jack why he won't deliver me any more living wood?\"";
+ next;
+ if (Inspector == 1)
+ menu
+ "No, I haven't had the time yet", -,
+ "No, I didn't find him yet.", L_State_1_1,
+ "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
+ if (Inspector != 1)
+ menu
+ "No, I haven't had the time yet", -,
+ "No, I didn't find him yet.", L_State_1_1;
+ close;
+
+L_State_1_1:
+ mes "[Alan]";
+ mes "\"When you leave my shop just go southwest over the village plaza. You can't miss it.\"";
+ close;
+
+L_State_2:
+ mes "[Alan]";
+ mes "\"Did you already ask Jack why he won't deliver me any more living wood?\"";
+ next;
+ if (Inspector == 1)
+ menu
+ "Yes, I did. He said that the trees turned into dangerous monsters.", -,
+ "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
+ if (Inspector != 1)
+ menu
+ "Yes, I did. He said that the trees turned into dangerous monsters.", -;
+ mes "[Alan]";
+ mes "\"Oh, that's really bad news. Maybe you can do his job?";
+ mes "When you kill some of these tree monsters and bring me their wood I can take a look at them.";
+ mes "Maybe you will find a piece of wood that is strong enough to become one of my forest bows.\"";
+
+ set @Q_status, 3;
+ callsub S_Update_Var;
+
+ close;
+
+L_State_3:
+ mes "[Alan]";
+ mes "\"How is the hunt going? Did you bring me any wood?\"";
+ if (countitem(569) < 1) close;
+ next;
+ if (Inspector == 1)
+ menu
+ "Here, take a look!", L_State_3_try,
+ "Yes, but I need it for something else.", -,
+ "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
+ if (Inspector != 1)
+ menu
+ "Here, take a look!", L_State_3_try,
+ "Yes, but I need it for something else.", -;
+ close;
+
+L_State_3_try:
+ mes "[Alan]";
+ mes "\"Hmmm... looks ok, but is it strong enough?\"";
+ mes "Alan bends the log over his knee.";
+ next;
+ delitem 569, 1;
+ set @Temp1, rand(20);
+ if (@Temp1 == 0) goto L_State_3_success;
+ mes "The log breaks with a loud crack";
+ next;
+ mes "[Alan]";
+ mes "\"Sorry, this log was too weak for one of my forest bows. Now it is junk. Give me another.\"";
+ if (countitem(569) < 1) close;
+ next;
+ menu
+ "Sure, here you go.", L_State_3_try,
+ "Hey! Stop breaking my stuff!", -;
+ close;
+
+L_State_3_success:
+ mes "Alan tries as hard as he can but the log won't bend.";
+ next;
+ mes "[Alan]";
+ mes "\"Aaah! Yes! That is a really fine piece of wood you bought me. It will make an excelent bow!\"";
+ next;
+ set @Q_status, 4;
+ callsub S_Update_Var;
+
+L_State_4:
+ mes "[Alan]";
+ mes "\"I can make you a really nice forest bow out of this. I just need 10,000 GP for material and work time.\"";
+ next;
+ if (Inspector == 1)
+ menu
+ "10,000??? What a ripoff!", -,
+ "Sure, here you go!", L_State_4_pay,
+ "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
+ if (Inspector != 1)
+ menu
+ "10,000??? What a ripoff!", -,
+ "Sure, here you go!", L_State_4_pay;
+ close;
+
+L_State_4_pay:
+ if (zeny < 10000) goto L_State_4_nocash;
+ set zeny, zeny - 10000;
+ getitem 545, 1;
+ set @Q_status, 5;
+ callsub S_Update_Var;
+ mes "[Alan]";
+ mes "\"Here you go - have fun with it.\"";
+ close;
+
+L_State_4_nocash:
+ mes "[Alan]";
+ mes "\"Seems like you are out of cash.\"";
+ close;
+
+L_State_5:
+ mes "[Alan]";
+ mes "\"I hope you are statisfied with your forest bow. It is one of my best works.\"";
+ next;
+
+ if (Inspector == 1)
+ menu
+ "I am!", -,
+ "Have you seen anything strange recently that might be connected to the robberies?", L_NohMask_Answer;
+ close;
+
+L_NohMask_Answer:
+ mes "[Alan]";
+ mes "\"No.\"";
+ close;
+
+S_Update_Var:
+ set QUEST_Forestbow_state,
+ (QUEST_Forestbow_state & ~(@Q_MASK)
+ | (@Q_status << @Q_SHIFT));
+ return;
+}
diff --git a/npc/new_20-1-woodland-village/drunks.txt b/npc/new_20-1-woodland-village/drunks.txt
index 10a47b41..e3e2d31c 100644
--- a/npc/new_20-1-woodland-village/drunks.txt
+++ b/npc/new_20-1-woodland-village/drunks.txt
@@ -1,16 +1,16 @@
-//Left drinking contest guy
-
-new_20-1.gat,65,55,0 script Drinker 121, {
- mes "[Binge Drinker]";
- mes "\"Ha! I'll drink muuuch mo.. more than you! Im not ooone biiit dr...dr..unk!\"";
- close;
-}
-
-//Right drinking contest guy
-
-new_20-1.gat,68,55,0 script Drinker 121, {
- mes "[Binge Drinker]";
- mes "\"I can still drink more! Better give up you... you... teelotaler! MORE BEER MELINDA!\"";
- //I know it's called "teetotaler". That error is on purpose.
- close;
-}
+//Left drinking contest guy
+
+new_20-1.gat,65,55,0 script Drinker 121, {
+ mes "[Binge Drinker]";
+ mes "\"Ha! I'll drink muuuch mo.. more than you! Im not ooone biiit dr...dr..unk!\"";
+ close;
+}
+
+//Right drinking contest guy
+
+new_20-1.gat,68,55,0 script Drinker 121, {
+ mes "[Binge Drinker]";
+ mes "\"I can still drink more! Better give up you... you... teelotaler! MORE BEER MELINDA!\"";
+ //I know it's called "teetotaler". That error is on purpose.
+ close;
+}
diff --git a/npc/new_20-1-woodland-village/misc.txt b/npc/new_20-1-woodland-village/misc.txt
index bf3a6046..b2cfe9da 100644
--- a/npc/new_20-1-woodland-village/misc.txt
+++ b/npc/new_20-1-woodland-village/misc.txt
@@ -1,11 +1,11 @@
-//Note in bar
-
-new_20-1.gat,54,49,0 script Note 127, {
- mes "[Note]";
- mes "\"We refuse service to anyone who:\"";
- mes "\"-Has a bubblehead\"";
- mes "\"-Is not properly shaded\"";
- mes "\"-Can't walk without stopping after every step\"";
- close;
- // In case you don't get the joke - it's a parody on Illutia.
-}
+//Note in bar
+
+new_20-1.gat,54,49,0 script Note 127, {
+ mes "[Note]";
+ mes "\"We refuse service to anyone who:\"";
+ mes "\"-Has a bubblehead\"";
+ mes "\"-Is not properly shaded\"";
+ mes "\"-Can't walk without stopping after every step\"";
+ close;
+ // In case you don't get the joke - it's a parody on Illutia.
+}
diff --git a/npc/new_20-1-woodland-village/nicholas.txt b/npc/new_20-1-woodland-village/nicholas.txt
index 4efa9200..7d21ab0f 100644
--- a/npc/new_20-1-woodland-village/nicholas.txt
+++ b/npc/new_20-1-woodland-village/nicholas.txt
@@ -1,404 +1,404 @@
-//#################################################################################
-//#
-//# Nicholas the Smith.
-//# Participates in iron ore smithery and the following quests:
-//# - Together with Pachua: Iron Shield quest (repeatable)
-//# (10 iron ores, 2 infantry helmets, 20000 GP, leather patch) -> iron shield
-//# - Primary participant in the Setzer quest (monster oil/golden stinger subquests)
-//#
-//# Variables used: @QUEST_Forestbow_state, nibble 3 (setzer quest)
-//# @QUEST_Forestbow_state, nibble 4 (iron shield quest)
-//#
-//#################################################################################
-
-new_20-1.gat,185,55,0 script Nicholas 135,{
-
- set @IRON_ORE, 640;
- set @INFANTRY, 638;
- set @LEATHER_PATCH, 708;
- set @SHORT_SWORD, 536;
- set @MONSTER_OIL, 707;
- set @SETZER, 571;
- set @STEEL_SHIELD, 601;
-
- set @SETZER_XP, 100000;
- set @SHIELD_XP, 20000;
-
- set @SHIELD_INITIAL, 0;
- set @SHIELD_KNOWS_PATCH, 1; // knows that a leather patch is needed
- set @SHIELD_COMPLETED, 2; // shield completed once
-
- set @SETZER_INITIAL, 0;
- set @SETZER_KNOWS_OIL, 1;
- set @SETZER_KNOWS_STINGER, 2;
- set @SETZER_FLAG_MADE_OIL, 4;
- set @SETZER_FLAG_MADE_SETZER, 8;
-
- set @Q_SETZER_MASK, NIBBLE_3_MASK;
- set @Q_SETZER_SHIFT, NIBBLE_3_SHIFT;
-
- set @Q_SHIELD_MASK, NIBBLE_4_MASK;
- set @Q_SHIELD_SHIFT, NIBBLE_4_SHIFT;
-
- set @Q_SETZER_status, (QUEST_Forestbow_state & @Q_SETZER_MASK) >> @Q_SETZER_SHIFT;
- set @Q_SHIELD_status, (QUEST_Forestbow_state & @Q_SHIELD_MASK) >> @Q_SHIELD_SHIFT;
-
- mes "[Nicholas]";
- mes "\"Hello there,";
- mes "I'm an expert blacksmith.";
- mes "If you get me some Iron Ore";
- mes "I could make you a very valuable shield";
- mes "or helmet.\"";
- next;
- menu
- "I have some Iron Ore!", L_Check,
- "Where can I get this Iron Ore?", L_Info,
- "I'm okay, thanks.", L_Pass;
-
-L_Check:
- mes "[Nicholas]";
- mes "\"Let me take at look at how much you have...\"";
- next;
- if(countitem(@IRON_ORE)<5) goto L_NoItem;
- if(countitem(@IRON_ORE)<10) goto L_StageA;
- if(countitem(@IRON_ORE)<15) goto L_StageB;
- goto L_StageC;
-
-L_Info:
- mes "[Nicholas]";
- mes "\"You can find Iron Ore in mines.";
- mes "It is quite hard to come by though.\"";
- close;
-
-L_Pass:
- mes "[Nicholas]";
- mes "\"Oh, okay";
- mes "Come back any time.\"";
- close;
-
-L_StageA:
- mes "[Nicholas]";
- mes "\"That's just enough for me to make you";
- mes "a winged Knight's Helmet.";
- mes "But it'll cost you 10,000GP";
- mes "and 5 lumps of Iron Ore.\"";
- next;
- goto L_main_menu;
-
-L_StageB:
- mes "[Nicholas]";
- mes "\"Ahh, with that much Iron Ore I can";
- mes "make you one of two helmets,";
- mes "for only 10,000GP, or I can";
- mes "make you a shield, for 20,000GP.\"";
- mes "";
- mes "\"What would you like?\"";
- next;
- goto L_main_menu;
-
-L_StageC:
- mes "[Nicholas]";
- mes "\"Excellent, that's enough to make";
- mes "three different types of helmet.";
- mes "My fee is 10,000GP.";
- mes "I can also make a shield, but that";
- mes "that will cost you 20,000 GP.\"";
- mes "";
- mes "\"Which helmet or shield will it be?\"";
- next;
- goto L_main_menu;
-
-L_main_menu:
-
- set @CHOICE_KNIGHT, 1;
- set @CHOICE_CRUSADE, 2;
- set @CHOICE_WARLORD, 3;
- set @CHOICE_SHIELD, 4;
- set @CHOICE_SETZER, 5;
-
- setarray @choice$, "", "", "", "", "";
- set @choices_nr, 0;
- setarray @choice_idx, 0, 0, 0, 0, 0;
-
- if (countitem(@SHORT_SWORD) < 1) goto L_main_menu_post_setzer;
- set @choice$[@choices_nr], "Can you make my short sword better?";
- set @choice_idx[@choices_nr], @CHOICE_SETZER;
- set @choices_nr, 1 + @choices_nr;
-
-L_main_menu_post_setzer:
-
- if (countitem(@IRON_ORE)<5) goto L_no_more_helmets;
- set @choice$[@choices_nr], "Knight's Helmet. (5 Iron Ores)";
- set @choice_idx[@choices_nr], @CHOICE_KNIGHT;
- set @choices_nr, 1 + @choices_nr;
-
- if (countitem(@IRON_ORE)<10) goto L_no_more_helmets;
-
- set @choice$[@choices_nr], "Crusade Helmet. (10 Iron Ores)";
- set @choice_idx[@choices_nr], @CHOICE_CRUSADE;
- set @choices_nr, 1 + @choices_nr;
-
- set @choice$[@choices_nr], "Steel Shield. (10 Iron Ores)";
- set @choice_idx[@choices_nr], @CHOICE_SHIELD;
- set @choices_nr, 1 + @choices_nr;
-
- if (countitem(@IRON_ORE)<15) goto L_no_more_helmets;
-
- set @choice$[@choices_nr], "Warlord Helmet. (15 Iron Ores)";
- set @choice_idx[@choices_nr], @CHOICE_WARLORD;
- set @choices_nr, 1 + @choices_nr;
-L_no_more_helmets:
-
- menu @choice$[0], -,
- @choice$[1], -,
- @choice$[2], -,
- @choice$[3], -,
- @choice$[4], -;
-
- set @menu, @menu - 1;
-
- if (@menu >= @choices_nr)
- close;
-
- set @choice, @choice_idx[@menu];
-
- if (@choice == @CHOICE_KNIGHT) goto L_YesKnight;
- if (@choice == @CHOICE_CRUSADE) goto L_YesCrusade;
- if (@choice == @CHOICE_WARLORD) goto L_YesWarlord;
- if (@choice == @CHOICE_SHIELD) goto L_YesShield;
- if (@choice == @CHOICE_SETZER) goto L_SetzerQuest;
-
- close;
-
-
-L_NoItem:
- mes "[Nicholas]";
- mes "\"It appears you don't have enough Iron Ore for me to work with.";
- mes "Please do come back when you have more though.\"";
- close;
-
-L_ComeBack:
- mes "[Nicholas]";
- mes "\"Come back any time.\"";
- close;
-
-L_NoMoney:
- mes "[Nicholas]";
- mes "\"Oh dear, it seems you don't have enough money.\"";
- close;
-
-L_YesKnight:
- if (zeny < 10000) goto L_NoMoney;
- set zeny, zeny-10000;
- delitem @IRON_ORE,5;
- getitem 637,1;
- goto L_Done;
-
-L_YesCrusade:
- if (zeny < 10000) goto L_NoMoney;
- set zeny, zeny-10000;
- delitem @IRON_ORE,10;
- getitem 639,1;
- goto L_Done;
-
-L_YesWarlord:
- if (zeny < 10000) goto L_NoMoney;
- set zeny, zeny-10000;
- delitem @IRON_ORE,15;
- getitem 636,1;
- goto L_Done;
-
-L_YesShield:
- mes "[Nicholas]";
- mes "Nicholas examines your iron ore.";
- mes "\"No, this iron is too brittle; for something as large as a shield I need to mix in softer iron. Can I see if you have anything suitable?\"";
- next;
-
- menu "Sure, have a look!", -,
- "No.", L_Pass;
-
- if (countitem(@INFANTRY) == 1) goto L_MoreInfantry;
- if (countitem(@INFANTRY) == 0) goto L_NoInfantry;
-
- mes "[Nicholas]";
- mes "Nicholas pulls out two of your infantry helmets.";
- mes "\"I can use those... yes, that should work. Now all I need is a leather patch for the handle, and 20,000 GP.\"";
-
- if (@Q_SHIELD_status < @SHIELD_KNOWS_PATCH)
- set @Q_SHIELD_status, @SHIELD_KNOWS_PATCH;
- callsub L_Update_Var;
-
- next;
-
- menu "Here you are.", -,
- "Where can I get a leather patch?", L_WhereLeather,
- "No way.", L_Pass;
-
- if (zeny < 20000) goto L_ShieldNoZeny;
- if (countitem(@INFANTRY) < 2) goto L_ShieldNoInfantry;
- if (countitem(@IRON_ORE) < 10) goto L_ShieldNoOre;
- if (countitem(@LEATHER_PATCH) < 1) goto L_ShieldNoLeatherPatch;
-
- mes "[Nicholas]";
- mes "\"Yes, it looks as if you have all that is needed!\"";
- mes "You watch Nicholas melt the ore and helmets and form a shield out of the resulting iron. He then cuts your leather patch apart and adds it to the handles.";
- mes "\"Here is your shield!\"";
-
- delitem @INFANTRY, 1;
- delitem @INFANTRY, 1;
- delitem @LEATHER_PATCH, 1;
- delitem @IRON_ORE, 10;
- set zeny, zeny - 20000;
-
- if (@Q_SHIELD_status < @SHIELD_COMPLETED)
- getexp @SHIELD_XP, 0;
- if (@Q_SHIELD_status < @SHIELD_COMPLETED)
- mes "[" + @SHIELD_XP + " experience points]";
-
- set @Q_SHIELD_status, @SHIELD_COMPLETED; // get XP only once
- callsub L_Update_Var;
-
- getitem @STEEL_SHIELD, 1;
- next;
- close;
-
-L_ShieldNoZeny:
- mes "[Nicholas]";
- mes "\"I am sorry, but I must ask that you pay 20,000 GP; this is qualty work.\"";
- next;
- close;
-
-L_ShieldNoInfantry:
- mes "[Nicholas]";
- mes "\"Now this is strange... I could have sworn that you had two infantry helmets right here. Well, come back if you have some more!\"";
- next;
- close;
-
-L_ShieldNoOre:
- mes "[Nicholas]";
- mes "\"How odd... didn't I put your iron ore on the table right here? Well, I will need it back to make the shield.\"";
- next;
- close;
-
-L_ShieldNoLeatherPatch:
- mes "[Nicholas]";
- mes "\"You don't have a suitable leather patch. I'm sorry, but a shield without one would chafe terribly.\"";
- next;
- close;
-
-L_MoreInfantry:
- mes "[Nicholas]";
- mes "Nicholas takes your infantry helmet and examines it.";
- mes "\"Yes, this is perfect! If you can bring me another one of those, I can make your shield.\"";
- next;
- close;
-
-L_NoInfantry:
- mes "[Nicholas]";
- mes "Nicholas shakes his head.";
- mes "\"No, none of these items are suitable. Try looking for somewhat large metal things.\"";
- next;
- close;
-
-L_WhereLeather:
- mes "[Nicholas]";
- mes "\"Hmm. You should look for someone who can work with some kind of leather. Rumor has it that there is someone in the eastern desert who can, but I haven't been there.\"";
- next;
- close;
-
-
-L_SetzerQuest:
- mes "[Nicholas]";
- if (@Q_SETZER_status & @SETZER_FLAG_MADE_SETZER)
- mes "\"Another one? Sure, why not.\"";
- mes "Nicholas examines your short sword, then nods.";
- mes "\"This is good quality. I can make something special out of it, for five chunks of iron ore and 50,000 GP-- but I will also need a potion of monster oil.\"";
- if (@Q_SETZER_status < @SETZER_KNOWS_OIL)
- set @Q_SETZER_status, @SETZER_KNOWS_OIL;
- callsub L_Update_Var;
- next;
-
- menu "Here you are.", -,
- "Monster oil? What's that?", L_ExplainMonsterOil,
- "HOW much? Never mind.", L_Pass;
-
- if (zeny < 50000) goto L_SetzerNoZeny;
- if (countitem(@IRON_ORE) < 5) goto L_SetzerNoOre;
- if (countitem(@MONSTER_OIL) < 1) goto L_SetzerNoMonsterOil;
- if (countitem(@SHORT_SWORD) < 1) goto L_SetzerNoSword;
-
- mes "[Nicholas]";
- mes "Nicholas takes the items, heats up your sword and pounds it with a heavy hammer. Before your eyes it turns thinner and flatter. Finally he pours the monster oil over it, heats it up again and douses it in water.";
-
- set zeny, zeny - 50000;
- delitem @IRON_ORE, 5;
- delitem @MONSTER_OIL, 1;
- delitem @SHORT_SWORD, 1;
-
- getitem @SETZER, 1;
- if (!(@Q_SETZER_status & @SETZER_FLAG_MADE_SETZER))
- mes "[" + @SETZER_XP + " experience points]";
- if (!(@Q_SETZER_status & @SETZER_FLAG_MADE_SETZER))
- getexp @SETZER_XP, 1;
- set @Q_SETZER_status, @Q_SETZER_status | @SETZER_FLAG_MADE_SETZER;
- callsub L_Update_Var;
- next;
-
- mes "[Nicholas]";
- mes "Nicholas hands you the completed sword. It feels strangely light in your hands.";
- mes "\"I made it lighter and faster, it should also cut a little better now. This kind of sword is called a Setzer, after a famous gambler who invented it as a weapon in between a knife and a sword.\"";
- next;
-
- mes "[Nicholas]";
- mes "\"I'm quite happy with this one. Be careful around the edge, though, it is quite sharp.\"";
- next;
-
- close;
-
-L_ExplainMonsterOil:
- mes "[Nicholas]";
- mes "\"Monster oil is a special oil that can be used to harden thin sheets of metal, if used properly. Unfortunately it is very hard to get. Perhaps one of our local alchemists can help you with it?\"";
- next;
- close;
-
-L_SetzerNoZeny:
- mes "[Nicholas]";
- mes "\"I am sorry, but I must ask that you pay 50,000 GP; the kind of weapon I am thinking of is not easy to make.\"";
- next;
- close;
-
-L_SetzerNoOre:
- mes "[Nicholas]";
- mes "\"Without five chunks of iron ore I can't improve your sword.\"";
- next;
- close;
-
-L_SetzerNoMonsterOil:
- mes "[Nicholas]";
- mes "\"I know that monster oil is hard to come by, but I can't do much without it. Ask an alchemist if you need help making it.\"";
- next;
- close;
-
-L_SetzerNoSword:
- mes "[Nicholas]";
- mes "\"I will need your old short sword as a basis. Please bring it to me first.\"";
- next;
- close;
-
-L_end:
- close;
-
-L_Done:
- mes "[Nicholas]";
- mes "\"Here you go!\"";
- mes "";
- mes "\"Come back any time.\"";
- close;
-
-L_Update_Var:
- set QUEST_Forestbow_state,
- (QUEST_Forestbow_state & ~(@Q_SHIELD_MASK | Q_SETZER_MASK)
- | (@Q_SHIELD_status << @Q_SHIELD_SHIFT)
- | (@Q_SETZER_status << @Q_SETZER_SHIFT));
- return;
-}
+//#################################################################################
+//#
+//# Nicholas the Smith.
+//# Participates in iron ore smithery and the following quests:
+//# - Together with Pachua: Iron Shield quest (repeatable)
+//# (10 iron ores, 2 infantry helmets, 20000 GP, leather patch) -> iron shield
+//# - Primary participant in the Setzer quest (monster oil/golden stinger subquests)
+//#
+//# Variables used: @QUEST_Forestbow_state, nibble 3 (setzer quest)
+//# @QUEST_Forestbow_state, nibble 4 (iron shield quest)
+//#
+//#################################################################################
+
+new_20-1.gat,185,55,0 script Nicholas 135,{
+
+ set @IRON_ORE, 640;
+ set @INFANTRY, 638;
+ set @LEATHER_PATCH, 708;
+ set @SHORT_SWORD, 536;
+ set @MONSTER_OIL, 707;
+ set @SETZER, 571;
+ set @STEEL_SHIELD, 601;
+
+ set @SETZER_XP, 100000;
+ set @SHIELD_XP, 20000;
+
+ set @SHIELD_INITIAL, 0;
+ set @SHIELD_KNOWS_PATCH, 1; // knows that a leather patch is needed
+ set @SHIELD_COMPLETED, 2; // shield completed once
+
+ set @SETZER_INITIAL, 0;
+ set @SETZER_KNOWS_OIL, 1;
+ set @SETZER_KNOWS_STINGER, 2;
+ set @SETZER_FLAG_MADE_OIL, 4;
+ set @SETZER_FLAG_MADE_SETZER, 8;
+
+ set @Q_SETZER_MASK, NIBBLE_3_MASK;
+ set @Q_SETZER_SHIFT, NIBBLE_3_SHIFT;
+
+ set @Q_SHIELD_MASK, NIBBLE_4_MASK;
+ set @Q_SHIELD_SHIFT, NIBBLE_4_SHIFT;
+
+ set @Q_SETZER_status, (QUEST_Forestbow_state & @Q_SETZER_MASK) >> @Q_SETZER_SHIFT;
+ set @Q_SHIELD_status, (QUEST_Forestbow_state & @Q_SHIELD_MASK) >> @Q_SHIELD_SHIFT;
+
+ mes "[Nicholas]";
+ mes "\"Hello there,";
+ mes "I'm an expert blacksmith.";
+ mes "If you get me some Iron Ore";
+ mes "I could make you a very valuable shield";
+ mes "or helmet.\"";
+ next;
+ menu
+ "I have some Iron Ore!", L_Check,
+ "Where can I get this Iron Ore?", L_Info,
+ "I'm okay, thanks.", L_Pass;
+
+L_Check:
+ mes "[Nicholas]";
+ mes "\"Let me take at look at how much you have...\"";
+ next;
+ if(countitem(@IRON_ORE)<5) goto L_NoItem;
+ if(countitem(@IRON_ORE)<10) goto L_StageA;
+ if(countitem(@IRON_ORE)<15) goto L_StageB;
+ goto L_StageC;
+
+L_Info:
+ mes "[Nicholas]";
+ mes "\"You can find Iron Ore in mines.";
+ mes "It is quite hard to come by though.\"";
+ close;
+
+L_Pass:
+ mes "[Nicholas]";
+ mes "\"Oh, okay";
+ mes "Come back any time.\"";
+ close;
+
+L_StageA:
+ mes "[Nicholas]";
+ mes "\"That's just enough for me to make you";
+ mes "a winged Knight's Helmet.";
+ mes "But it'll cost you 10,000GP";
+ mes "and 5 lumps of Iron Ore.\"";
+ next;
+ goto L_main_menu;
+
+L_StageB:
+ mes "[Nicholas]";
+ mes "\"Ahh, with that much Iron Ore I can";
+ mes "make you one of two helmets,";
+ mes "for only 10,000GP, or I can";
+ mes "make you a shield, for 20,000GP.\"";
+ mes "";
+ mes "\"What would you like?\"";
+ next;
+ goto L_main_menu;
+
+L_StageC:
+ mes "[Nicholas]";
+ mes "\"Excellent, that's enough to make";
+ mes "three different types of helmet.";
+ mes "My fee is 10,000GP.";
+ mes "I can also make a shield, but that";
+ mes "that will cost you 20,000 GP.\"";
+ mes "";
+ mes "\"Which helmet or shield will it be?\"";
+ next;
+ goto L_main_menu;
+
+L_main_menu:
+
+ set @CHOICE_KNIGHT, 1;
+ set @CHOICE_CRUSADE, 2;
+ set @CHOICE_WARLORD, 3;
+ set @CHOICE_SHIELD, 4;
+ set @CHOICE_SETZER, 5;
+
+ setarray @choice$, "", "", "", "", "";
+ set @choices_nr, 0;
+ setarray @choice_idx, 0, 0, 0, 0, 0;
+
+ if (countitem(@SHORT_SWORD) < 1) goto L_main_menu_post_setzer;
+ set @choice$[@choices_nr], "Can you make my short sword better?";
+ set @choice_idx[@choices_nr], @CHOICE_SETZER;
+ set @choices_nr, 1 + @choices_nr;
+
+L_main_menu_post_setzer:
+
+ if (countitem(@IRON_ORE)<5) goto L_no_more_helmets;
+ set @choice$[@choices_nr], "Knight's Helmet. (5 Iron Ores)";
+ set @choice_idx[@choices_nr], @CHOICE_KNIGHT;
+ set @choices_nr, 1 + @choices_nr;
+
+ if (countitem(@IRON_ORE)<10) goto L_no_more_helmets;
+
+ set @choice$[@choices_nr], "Crusade Helmet. (10 Iron Ores)";
+ set @choice_idx[@choices_nr], @CHOICE_CRUSADE;
+ set @choices_nr, 1 + @choices_nr;
+
+ set @choice$[@choices_nr], "Steel Shield. (10 Iron Ores)";
+ set @choice_idx[@choices_nr], @CHOICE_SHIELD;
+ set @choices_nr, 1 + @choices_nr;
+
+ if (countitem(@IRON_ORE)<15) goto L_no_more_helmets;
+
+ set @choice$[@choices_nr], "Warlord Helmet. (15 Iron Ores)";
+ set @choice_idx[@choices_nr], @CHOICE_WARLORD;
+ set @choices_nr, 1 + @choices_nr;
+L_no_more_helmets:
+
+ menu @choice$[0], -,
+ @choice$[1], -,
+ @choice$[2], -,
+ @choice$[3], -,
+ @choice$[4], -;
+
+ set @menu, @menu - 1;
+
+ if (@menu >= @choices_nr)
+ close;
+
+ set @choice, @choice_idx[@menu];
+
+ if (@choice == @CHOICE_KNIGHT) goto L_YesKnight;
+ if (@choice == @CHOICE_CRUSADE) goto L_YesCrusade;
+ if (@choice == @CHOICE_WARLORD) goto L_YesWarlord;
+ if (@choice == @CHOICE_SHIELD) goto L_YesShield;
+ if (@choice == @CHOICE_SETZER) goto L_SetzerQuest;
+
+ close;
+
+
+L_NoItem:
+ mes "[Nicholas]";
+ mes "\"It appears you don't have enough Iron Ore for me to work with.";
+ mes "Please do come back when you have more though.\"";
+ close;
+
+L_ComeBack:
+ mes "[Nicholas]";
+ mes "\"Come back any time.\"";
+ close;
+
+L_NoMoney:
+ mes "[Nicholas]";
+ mes "\"Oh dear, it seems you don't have enough money.\"";
+ close;
+
+L_YesKnight:
+ if (zeny < 10000) goto L_NoMoney;
+ set zeny, zeny-10000;
+ delitem @IRON_ORE,5;
+ getitem 637,1;
+ goto L_Done;
+
+L_YesCrusade:
+ if (zeny < 10000) goto L_NoMoney;
+ set zeny, zeny-10000;
+ delitem @IRON_ORE,10;
+ getitem 639,1;
+ goto L_Done;
+
+L_YesWarlord:
+ if (zeny < 10000) goto L_NoMoney;
+ set zeny, zeny-10000;
+ delitem @IRON_ORE,15;
+ getitem 636,1;
+ goto L_Done;
+
+L_YesShield:
+ mes "[Nicholas]";
+ mes "Nicholas examines your iron ore.";
+ mes "\"No, this iron is too brittle; for something as large as a shield I need to mix in softer iron. Can I see if you have anything suitable?\"";
+ next;
+
+ menu "Sure, have a look!", -,
+ "No.", L_Pass;
+
+ if (countitem(@INFANTRY) == 1) goto L_MoreInfantry;
+ if (countitem(@INFANTRY) == 0) goto L_NoInfantry;
+
+ mes "[Nicholas]";
+ mes "Nicholas pulls out two of your infantry helmets.";
+ mes "\"I can use those... yes, that should work. Now all I need is a leather patch for the handle, and 20,000 GP.\"";
+
+ if (@Q_SHIELD_status < @SHIELD_KNOWS_PATCH)
+ set @Q_SHIELD_status, @SHIELD_KNOWS_PATCH;
+ callsub L_Update_Var;
+
+ next;
+
+ menu "Here you are.", -,
+ "Where can I get a leather patch?", L_WhereLeather,
+ "No way.", L_Pass;
+
+ if (zeny < 20000) goto L_ShieldNoZeny;
+ if (countitem(@INFANTRY) < 2) goto L_ShieldNoInfantry;
+ if (countitem(@IRON_ORE) < 10) goto L_ShieldNoOre;
+ if (countitem(@LEATHER_PATCH) < 1) goto L_ShieldNoLeatherPatch;
+
+ mes "[Nicholas]";
+ mes "\"Yes, it looks as if you have all that is needed!\"";
+ mes "You watch Nicholas melt the ore and helmets and form a shield out of the resulting iron. He then cuts your leather patch apart and adds it to the handles.";
+ mes "\"Here is your shield!\"";
+
+ delitem @INFANTRY, 1;
+ delitem @INFANTRY, 1;
+ delitem @LEATHER_PATCH, 1;
+ delitem @IRON_ORE, 10;
+ set zeny, zeny - 20000;
+
+ if (@Q_SHIELD_status < @SHIELD_COMPLETED)
+ getexp @SHIELD_XP, 0;
+ if (@Q_SHIELD_status < @SHIELD_COMPLETED)
+ mes "[" + @SHIELD_XP + " experience points]";
+
+ set @Q_SHIELD_status, @SHIELD_COMPLETED; // get XP only once
+ callsub L_Update_Var;
+
+ getitem @STEEL_SHIELD, 1;
+ next;
+ close;
+
+L_ShieldNoZeny:
+ mes "[Nicholas]";
+ mes "\"I am sorry, but I must ask that you pay 20,000 GP; this is qualty work.\"";
+ next;
+ close;
+
+L_ShieldNoInfantry:
+ mes "[Nicholas]";
+ mes "\"Now this is strange... I could have sworn that you had two infantry helmets right here. Well, come back if you have some more!\"";
+ next;
+ close;
+
+L_ShieldNoOre:
+ mes "[Nicholas]";
+ mes "\"How odd... didn't I put your iron ore on the table right here? Well, I will need it back to make the shield.\"";
+ next;
+ close;
+
+L_ShieldNoLeatherPatch:
+ mes "[Nicholas]";
+ mes "\"You don't have a suitable leather patch. I'm sorry, but a shield without one would chafe terribly.\"";
+ next;
+ close;
+
+L_MoreInfantry:
+ mes "[Nicholas]";
+ mes "Nicholas takes your infantry helmet and examines it.";
+ mes "\"Yes, this is perfect! If you can bring me another one of those, I can make your shield.\"";
+ next;
+ close;
+
+L_NoInfantry:
+ mes "[Nicholas]";
+ mes "Nicholas shakes his head.";
+ mes "\"No, none of these items are suitable. Try looking for somewhat large metal things.\"";
+ next;
+ close;
+
+L_WhereLeather:
+ mes "[Nicholas]";
+ mes "\"Hmm. You should look for someone who can work with some kind of leather. Rumor has it that there is someone in the eastern desert who can, but I haven't been there.\"";
+ next;
+ close;
+
+
+L_SetzerQuest:
+ mes "[Nicholas]";
+ if (@Q_SETZER_status & @SETZER_FLAG_MADE_SETZER)
+ mes "\"Another one? Sure, why not.\"";
+ mes "Nicholas examines your short sword, then nods.";
+ mes "\"This is good quality. I can make something special out of it, for five chunks of iron ore and 50,000 GP-- but I will also need a potion of monster oil.\"";
+ if (@Q_SETZER_status < @SETZER_KNOWS_OIL)
+ set @Q_SETZER_status, @SETZER_KNOWS_OIL;
+ callsub L_Update_Var;
+ next;
+
+ menu "Here you are.", -,
+ "Monster oil? What's that?", L_ExplainMonsterOil,
+ "HOW much? Never mind.", L_Pass;
+
+ if (zeny < 50000) goto L_SetzerNoZeny;
+ if (countitem(@IRON_ORE) < 5) goto L_SetzerNoOre;
+ if (countitem(@MONSTER_OIL) < 1) goto L_SetzerNoMonsterOil;
+ if (countitem(@SHORT_SWORD) < 1) goto L_SetzerNoSword;
+
+ mes "[Nicholas]";
+ mes "Nicholas takes the items, heats up your sword and pounds it with a heavy hammer. Before your eyes it turns thinner and flatter. Finally he pours the monster oil over it, heats it up again and douses it in water.";
+
+ set zeny, zeny - 50000;
+ delitem @IRON_ORE, 5;
+ delitem @MONSTER_OIL, 1;
+ delitem @SHORT_SWORD, 1;
+
+ getitem @SETZER, 1;
+ if (!(@Q_SETZER_status & @SETZER_FLAG_MADE_SETZER))
+ mes "[" + @SETZER_XP + " experience points]";
+ if (!(@Q_SETZER_status & @SETZER_FLAG_MADE_SETZER))
+ getexp @SETZER_XP, 1;
+ set @Q_SETZER_status, @Q_SETZER_status | @SETZER_FLAG_MADE_SETZER;
+ callsub L_Update_Var;
+ next;
+
+ mes "[Nicholas]";
+ mes "Nicholas hands you the completed sword. It feels strangely light in your hands.";
+ mes "\"I made it lighter and faster, it should also cut a little better now. This kind of sword is called a Setzer, after a famous gambler who invented it as a weapon in between a knife and a sword.\"";
+ next;
+
+ mes "[Nicholas]";
+ mes "\"I'm quite happy with this one. Be careful around the edge, though, it is quite sharp.\"";
+ next;
+
+ close;
+
+L_ExplainMonsterOil:
+ mes "[Nicholas]";
+ mes "\"Monster oil is a special oil that can be used to harden thin sheets of metal, if used properly. Unfortunately it is very hard to get. Perhaps one of our local alchemists can help you with it?\"";
+ next;
+ close;
+
+L_SetzerNoZeny:
+ mes "[Nicholas]";
+ mes "\"I am sorry, but I must ask that you pay 50,000 GP; the kind of weapon I am thinking of is not easy to make.\"";
+ next;
+ close;
+
+L_SetzerNoOre:
+ mes "[Nicholas]";
+ mes "\"Without five chunks of iron ore I can't improve your sword.\"";
+ next;
+ close;
+
+L_SetzerNoMonsterOil:
+ mes "[Nicholas]";
+ mes "\"I know that monster oil is hard to come by, but I can't do much without it. Ask an alchemist if you need help making it.\"";
+ next;
+ close;
+
+L_SetzerNoSword:
+ mes "[Nicholas]";
+ mes "\"I will need your old short sword as a basis. Please bring it to me first.\"";
+ next;
+ close;
+
+L_end:
+ close;
+
+L_Done:
+ mes "[Nicholas]";
+ mes "\"Here you go!\"";
+ mes "";
+ mes "\"Come back any time.\"";
+ close;
+
+L_Update_Var:
+ set QUEST_Forestbow_state,
+ (QUEST_Forestbow_state & ~(@Q_SHIELD_MASK | Q_SETZER_MASK)
+ | (@Q_SHIELD_status << @Q_SHIELD_SHIFT)
+ | (@Q_SETZER_status << @Q_SETZER_SHIFT));
+ return;
+}
diff --git a/npc/new_20-1-woodland-village/richard.txt b/npc/new_20-1-woodland-village/richard.txt
index a3f47378..17336ee7 100644
--- a/npc/new_20-1-woodland-village/richard.txt
+++ b/npc/new_20-1-woodland-village/richard.txt
@@ -1,6 +1,6 @@
-//
-
-new_20-1.gat,20, 99,0 script Richard 161,{
- set @npcName$, "Richard";
- callfunc "Banker";
-}
+//
+
+new_20-1.gat,20, 99,0 script Richard 161,{
+ set @npcName$, "Richard";
+ callfunc "Banker";
+}
diff --git a/npc/new_20-1-woodland-village/selim.txt b/npc/new_20-1-woodland-village/selim.txt
index 2f5981ea..952bac9e 100644
--- a/npc/new_20-1-woodland-village/selim.txt
+++ b/npc/new_20-1-woodland-village/selim.txt
@@ -1,139 +1,139 @@
-//#################################################################################
-//# #
-//# This script file contains the script for the cloth dyer. It has been #
-//# revised to require dye items; collaborating NPCs are Selim and Angus. #
-//# #
-//#################################################################################
-
-new_20-1.gat,32,104,0 script Selim 142,{
- setarray @all_colours$, "red", "green", "dark blue", "yellow", "light blue", "pink", "black", "orange", "purple", "dark green";
- setarray @all_colours_cap$, "Red", "Green", "Dark Blue", "Yellow", "Light Blue", "Pink", "Black", "Orange", "Purple", "Dark Green";
-
- mes "[Selim]";
- mes "\"What can I dye for you today?\"";
- set QUEST_clothdyer_state, 3;
- next;
-
-L_clothes_choice:
- set @pronoun$, "it";
- set @is_verb$, "is";
- menu
- "Cotton shirt", L_cottonshirt,
- "V-Neck sweater", L_vneck,
- "Turtleneck sweater", L_tneck,
- "Cotton shorts", L_shorts,
- "Cotton skirt", L_skirt,
- "Tank top ", L_tanktop,
- "Short tank top", L_tanktop_short,
- "Silk robe", L_robe,
- "I'm fine for now, thanks.", -;
- close;
-
-L_cottonshirt:
- set @del, 1202;
- set @new, 2050;
- set @name$, "cotton shirt";
- goto L_picked_item;
-
-L_vneck:
- set @del, 624;
- set @new, 2060;
- set @name$, "V-neck sweater";
- goto L_picked_item;
-
-L_tneck:
- set @del, 564;
- set @new, 2070;
- set @name$, "turtleneck sweater";
- goto L_picked_item;
-
-L_shorts:
- set @del, 586;
- set @new, 2110;
- set @name$, "cotton shorts";
- set @pronoun$, "them";
- set @is_verb$, "are";
- goto L_picked_item;
-
-L_skirt:
- set @del, 632;
- set @new, 2100;
- set @name$, "cotton skirt";
- goto L_picked_item;
-
-L_tanktop:
- set @del, 688;
- set @new, 2090;
- set @name$, "tanktop";
- goto L_picked_item;
-
-L_tanktop_short:
- set @del, 689;
- set @new, 2120;
- set @name$, "short tanktop";
- goto L_picked_item;
-
-L_robe:
- set @del, 720;
- set @new, 2080;
- set @name$, "silk robe";
- goto L_picked_item;
-
-L_picked_item:
- if (countitem(@del) == 0) goto L_havenone;
-L_colour:
- mes "[Selim]";
- mes "\"Excellent. Now, what color do you want?\"";
- next;
- menu
- @all_colours_cap$[0], -,
- @all_colours_cap$[1], -,
- @all_colours_cap$[2], -,
- @all_colours_cap$[3], -,
- @all_colours_cap$[4], -,
- @all_colours_cap$[5], -,
- @all_colours_cap$[6], -,
- @all_colours_cap$[7], -,
- @all_colours_cap$[8], -,
- @all_colours_cap$[9], -;
- set @colour, @menu - 1;
- set @vial, 690 + @colour;
- if (countitem(@vial) == 0) goto L_no_dye;
- goto L_finish;
-
-L_no_dye:
- mes "[Selim]";
- mes "\"I would love to dye your " + @name$ + " for you, but you will have to bring me some " + @all_colours$[@colour] + " dye first.\"";
- next;
- menu
- "Sorry, I meant a different color.", L_colour,
- "I wanted to dye a different item anyway.", L_clothes_choice,
- "What do you mean, `bring you dye'?", L_explain_dye,
- "Where would I get dye?", L_explain_dye,
- "Never mind.", -;
- close;
-
-L_explain_dye:
- if (QUEST_clothdyer_knowsdye < 1) set QUEST_clothdyer_knowsdye, 1;
- mes "[Selim]";
- mes "\"Well, dye is very expensive, and since I don't charge adventurers anything, I can't give you any for free.";
- mes "But most alchemists can make dye; perhaps you can find one around here.\"";
- next;
- close;
-
-L_finish:
- if (countitem(@del) == 0) goto L_havenone;
- delitem @vial, 1;
- delitem @del, 1;
- getitem @new + @colour, 1;
- mes "[Selim]";
- mes "\"Here " + @is_verb$ + " your " + @all_colours$[@colour] + " " + @name$ + "! Please let " + @pronoun$ + " dry for a minute before you put " + @pronoun$ + " on.\"";
- close;
-
-L_havenone:
- mes "[Selim]";
- mes "\"You don't have any uncolored " + @name$ + "? That's unfortunate.";
- mes "Would you like to dye something else?\"";
- next;
- goto L_clothes_choice;
-}
+//#################################################################################
+//# #
+//# This script file contains the script for the cloth dyer. It has been #
+//# revised to require dye items; collaborating NPCs are Selim and Angus. #
+//# #
+//#################################################################################
+
+new_20-1.gat,32,104,0 script Selim 142,{
+ setarray @all_colours$, "red", "green", "dark blue", "yellow", "light blue", "pink", "black", "orange", "purple", "dark green";
+ setarray @all_colours_cap$, "Red", "Green", "Dark Blue", "Yellow", "Light Blue", "Pink", "Black", "Orange", "Purple", "Dark Green";
+
+ mes "[Selim]";
+ mes "\"What can I dye for you today?\"";
+ set QUEST_clothdyer_state, 3;
+ next;
+
+L_clothes_choice:
+ set @pronoun$, "it";
+ set @is_verb$, "is";
+ menu
+ "Cotton shirt", L_cottonshirt,
+ "V-Neck sweater", L_vneck,
+ "Turtleneck sweater", L_tneck,
+ "Cotton shorts", L_shorts,
+ "Cotton skirt", L_skirt,
+ "Tank top ", L_tanktop,
+ "Short tank top", L_tanktop_short,
+ "Silk robe", L_robe,
+ "I'm fine for now, thanks.", -;
+ close;
+
+L_cottonshirt:
+ set @del, 1202;
+ set @new, 2050;
+ set @name$, "cotton shirt";
+ goto L_picked_item;
+
+L_vneck:
+ set @del, 624;
+ set @new, 2060;
+ set @name$, "V-neck sweater";
+ goto L_picked_item;
+
+L_tneck:
+ set @del, 564;
+ set @new, 2070;
+ set @name$, "turtleneck sweater";
+ goto L_picked_item;
+
+L_shorts:
+ set @del, 586;
+ set @new, 2110;
+ set @name$, "cotton shorts";
+ set @pronoun$, "them";
+ set @is_verb$, "are";
+ goto L_picked_item;
+
+L_skirt:
+ set @del, 632;
+ set @new, 2100;
+ set @name$, "cotton skirt";
+ goto L_picked_item;
+
+L_tanktop:
+ set @del, 688;
+ set @new, 2090;
+ set @name$, "tanktop";
+ goto L_picked_item;
+
+L_tanktop_short:
+ set @del, 689;
+ set @new, 2120;
+ set @name$, "short tanktop";
+ goto L_picked_item;
+
+L_robe:
+ set @del, 720;
+ set @new, 2080;
+ set @name$, "silk robe";
+ goto L_picked_item;
+
+L_picked_item:
+ if (countitem(@del) == 0) goto L_havenone;
+L_colour:
+ mes "[Selim]";
+ mes "\"Excellent. Now, what color do you want?\"";
+ next;
+ menu
+ @all_colours_cap$[0], -,
+ @all_colours_cap$[1], -,
+ @all_colours_cap$[2], -,
+ @all_colours_cap$[3], -,
+ @all_colours_cap$[4], -,
+ @all_colours_cap$[5], -,
+ @all_colours_cap$[6], -,
+ @all_colours_cap$[7], -,
+ @all_colours_cap$[8], -,
+ @all_colours_cap$[9], -;
+ set @colour, @menu - 1;
+ set @vial, 690 + @colour;
+ if (countitem(@vial) == 0) goto L_no_dye;
+ goto L_finish;
+
+L_no_dye:
+ mes "[Selim]";
+ mes "\"I would love to dye your " + @name$ + " for you, but you will have to bring me some " + @all_colours$[@colour] + " dye first.\"";
+ next;
+ menu
+ "Sorry, I meant a different color.", L_colour,
+ "I wanted to dye a different item anyway.", L_clothes_choice,
+ "What do you mean, `bring you dye'?", L_explain_dye,
+ "Where would I get dye?", L_explain_dye,
+ "Never mind.", -;
+ close;
+
+L_explain_dye:
+ if (QUEST_clothdyer_knowsdye < 1) set QUEST_clothdyer_knowsdye, 1;
+ mes "[Selim]";
+ mes "\"Well, dye is very expensive, and since I don't charge adventurers anything, I can't give you any for free.";
+ mes "But most alchemists can make dye; perhaps you can find one around here.\"";
+ next;
+ close;
+
+L_finish:
+ if (countitem(@del) == 0) goto L_havenone;
+ delitem @vial, 1;
+ delitem @del, 1;
+ getitem @new + @colour, 1;
+ mes "[Selim]";
+ mes "\"Here " + @is_verb$ + " your " + @all_colours$[@colour] + " " + @name$ + "! Please let " + @pronoun$ + " dry for a minute before you put " + @pronoun$ + " on.\"";
+ close;
+
+L_havenone:
+ mes "[Selim]";
+ mes "\"You don't have any uncolored " + @name$ + "? That's unfortunate.";
+ mes "Would you like to dye something else?\"";
+ next;
+ goto L_clothes_choice;
+}
diff --git a/npc/new_20-1-woodland-village/shops.txt b/npc/new_20-1-woodland-village/shops.txt
index 6094eb20..d965cf68 100644
--- a/npc/new_20-1-woodland-village/shops.txt
+++ b/npc/new_20-1-woodland-village/shops.txt
@@ -1,34 +1,34 @@
-//#################################################################################
-//# #
-//# This script file contains all shops and other NPCs with important functions. #
-//# #
-//#################################################################################
-
-// Bartender
-// sells beer, cake and steak
-new_20-1.gat,65,49,0 shop Barkeeper 112,539:-1,513:-1,676:-1
-
-// Receptionist
-// Offers the player to rest at the inn for 100gp
-new_20-1.gat,50,48,0 script Receptionist 108,{
- set @npcName$, "Receptionist";
- set @cost, 100;
- callfunc "Inn";
-}
-
-// Archer Shop
-// sells bow, short bow, arrows and iron arrows
-new_20-1.gat,97,24,0 shop Apprentice 120,1199:3,529:5,1200:1000,530:3000
-
-// Potion Shop
-// sells cactus drink, cactus potion, iron potion and concentration potion
-new_20-1.gat,121,26,0 shop Witch 103,501:50,502:70,567:500,568:500
-
-// Blacksmith
-// Sells all knives, chainmail armor, light platemail
-new_20-1.gat,183,57,0 shop Blacksmith 135,625:20000,626:50000,658:100000,1201:25,522:100,521:1000
-
-
-// General Store
-// Sells various things, many not sold elsewhere
-new_20-1.gat,32,99,0 shop General Store 112,527:-1,541:-1,1202:-1,586:-1,528:-1,656:-1
+//#################################################################################
+//# #
+//# This script file contains all shops and other NPCs with important functions. #
+//# #
+//#################################################################################
+
+// Bartender
+// sells beer, cake and steak
+new_20-1.gat,65,49,0 shop Barkeeper 112,539:-1,513:-1,676:-1
+
+// Receptionist
+// Offers the player to rest at the inn for 100gp
+new_20-1.gat,50,48,0 script Receptionist 108,{
+ set @npcName$, "Receptionist";
+ set @cost, 100;
+ callfunc "Inn";
+}
+
+// Archer Shop
+// sells bow, short bow, arrows and iron arrows
+new_20-1.gat,97,24,0 shop Apprentice 120,1199:3,529:5,1200:1000,530:3000
+
+// Potion Shop
+// sells cactus drink, cactus potion, iron potion and concentration potion
+new_20-1.gat,121,26,0 shop Witch 103,501:50,502:70,567:500,568:500
+
+// Blacksmith
+// Sells all knives, chainmail armor, light platemail
+new_20-1.gat,183,57,0 shop Blacksmith 135,625:20000,626:50000,658:100000,1201:25,522:100,521:1000
+
+
+// General Store
+// Sells various things, many not sold elsewhere
+new_20-1.gat,32,99,0 shop General Store 112,527:-1,541:-1,1202:-1,586:-1,528:-1,656:-1
diff --git a/npc/new_20-1-woodland-village/waitress.txt b/npc/new_20-1-woodland-village/waitress.txt
index d5e1ad20..6cf9791b 100644
--- a/npc/new_20-1-woodland-village/waitress.txt
+++ b/npc/new_20-1-woodland-village/waitress.txt
@@ -1,51 +1,51 @@
-// Waitress
-
-new_20-1.gat,60,52,0 script Melinda 140,{
- if (zeny < 180) goto L_NoMoney;
- mes "[Melinda]";
- mes "\"Hi sweety! Want a fresh beer for 170gp?\"";
- next;
-
- menu
- "\"Sure! [don't tip]\"", -,
- "Sure! [tip 5gp]", L_5Tip,
- "Sure! [tip 10gp]", L_10Tip,
- "Nah, maybe later.", L_No;
-
- mes "[Melinda]";
- mes "Pff... nickel nurser!";
- next;
- set zeny,zeny-170;
- getitem 539,1;
- close;
-
-L_5Tip:
- mes "[Melinda]";
- mes "\"Here you go, sweethearth!\"";
- next;
- set zeny,zeny-175;
- getitem 539,1;
- close;
-
-L_10Tip:
- mes "[Melinda]";
- mes "\"Thank you, sweety! Want me to hear a secret?\"";
- next;
- set zeny,zeny-180;
- getitem 539,1;
- menu
- "What's it, darling?", -,
- "Nah, I don't feel like chatting.", L_No;
- mes "[Melinda]";
- mes "\"The bowmaking master in this village used to construct exceptional bows. When you want one you should go and ask him.\"";
- close;
-
-L_No:
- mes "[Melinda]";
- mes "\"Just call me when you've changed your mind.\"";
- close;
-
-L_NoMoney:
- mes "\"You look broke. Don't think that you can dine and dash here!\"";
- close;
-}
+// Waitress
+
+new_20-1.gat,60,52,0 script Melinda 140,{
+ if (zeny < 180) goto L_NoMoney;
+ mes "[Melinda]";
+ mes "\"Hi sweety! Want a fresh beer for 170gp?\"";
+ next;
+
+ menu
+ "\"Sure! [don't tip]\"", -,
+ "Sure! [tip 5gp]", L_5Tip,
+ "Sure! [tip 10gp]", L_10Tip,
+ "Nah, maybe later.", L_No;
+
+ mes "[Melinda]";
+ mes "Pff... nickel nurser!";
+ next;
+ set zeny,zeny-170;
+ getitem 539,1;
+ close;
+
+L_5Tip:
+ mes "[Melinda]";
+ mes "\"Here you go, sweethearth!\"";
+ next;
+ set zeny,zeny-175;
+ getitem 539,1;
+ close;
+
+L_10Tip:
+ mes "[Melinda]";
+ mes "\"Thank you, sweety! Want me to hear a secret?\"";
+ next;
+ set zeny,zeny-180;
+ getitem 539,1;
+ menu
+ "What's it, darling?", -,
+ "Nah, I don't feel like chatting.", L_No;
+ mes "[Melinda]";
+ mes "\"The bowmaking master in this village used to construct exceptional bows. When you want one you should go and ask him.\"";
+ close;
+
+L_No:
+ mes "[Melinda]";
+ mes "\"Just call me when you've changed your mind.\"";
+ close;
+
+L_NoMoney:
+ mes "\"You look broke. Don't think that you can dine and dash here!\"";
+ close;
+}
diff --git a/npc/new_21-1-ice-cave2/monsters.txt b/npc/new_21-1-ice-cave2/monsters.txt
index b0b1c336..b1a238b3 100644
--- a/npc/new_21-1-ice-cave2/monsters.txt
+++ b/npc/new_21-1-ice-cave2/monsters.txt
@@ -1,20 +1,20 @@
-// Map: new_21-1
-// This is the second level of the Ice Cave beneath Snow Town.
-//
-
-new_21-1.gat,0,0,0,0 monster Bat 1017,5,0,0,Mob21::OnBat
-new_21-1.gat,0,0,0,0 monster Fluffy 1020,15,0,0,Mob21::OnFluffy
-
-new_21-1.gat,0,0,0 script Mob21 -1,{
-OnBat:
- set @mobID, 1017;
- callfunc "MobPoints";
- break;
-
-OnFluffy:
- set @mobID, 1020;
- callfunc "MobPoints";
- break;
-
- end;
-}
+// Map: new_21-1
+// This is the second level of the Ice Cave beneath Snow Town.
+//
+
+new_21-1.gat,0,0,0,0 monster Bat 1017,5,0,0,Mob21::OnBat
+new_21-1.gat,0,0,0,0 monster Fluffy 1020,15,0,0,Mob21::OnFluffy
+
+new_21-1.gat,0,0,0 script Mob21 -1,{
+OnBat:
+ set @mobID, 1017;
+ callfunc "MobPoints";
+ break;
+
+OnFluffy:
+ set @mobID, 1020;
+ callfunc "MobPoints";
+ break;
+
+ end;
+}
diff --git a/npc/new_21-1-ice-cave2/passages.txt b/npc/new_21-1-ice-cave2/passages.txt
index c8474a09..6e419384 100644
--- a/npc/new_21-1-ice-cave2/passages.txt
+++ b/npc/new_21-1-ice-cave2/passages.txt
@@ -1 +1 @@
-new_21-1.gat,36,34 warp toice1 1,0,new_12-1.gat,26,25
+new_21-1.gat,36,34 warp toice1 1,0,new_12-1.gat,26,25
diff --git a/npc/new_26-1-hill1/monsters.txt b/npc/new_26-1-hill1/monsters.txt
index 20c2376c..cc95281f 100644
--- a/npc/new_26-1-hill1/monsters.txt
+++ b/npc/new_26-1-hill1/monsters.txt
@@ -1,52 +1,52 @@
-// Map: new_26-1
-// This is North Woodland.
-//
-
-new_26-1.gat,0,0,0,0 monster Mouboo 1028,25,0,0,Mob26::OnMouboo
-new_26-1.gat,0,0,0,0 monster SpikyMushroom 1019,30,0,0,Mob26::OnSpikyMushroom
-
-new_26-1.gat,0,0,0,0 monster Alizarin 1032,1,2700000,1800000,Mob26::OnAlizarin
-new_26-1.gat,0,0,0,0 monster Gamboge 1031,1,2700000,1800000,Mob26::OnGamboge
-new_26-1.gat,0,0,0,0 monster Cobalt 1030,1,2700000,1800000,Mob26::OnCobalt
-new_26-1.gat,0,0,0,0 monster Mauve 1029,1,2700000,1800000,Mob26::OnMauve
-
-new_26-1.gat,0,0,0,0 monster SilkWorm 1035,5,6000,3000,Mob26::OnSilkWorm
-
-new_26-1.gat,0,0,0 script Mob26 -1,{
-OnMouboo:
- set @mobID, 1028;
- callfunc "MobPoints";
- break;
-
-OnSpikyMushroom:
- set @mobID, 1019;
- callfunc "MobPoints";
- break;
-
-OnAlizarin:
- set @mobID, 1032;
- callfunc "MobPoints";
- break;
-
-OnGamboge:
- set @mobID, 1031;
- callfunc "MobPoints";
- break;
-
-OnCobalt:
- set @mobID, 1030;
- callfunc "MobPoints";
- break;
-
-OnMauve:
- set @mobID, 1029;
- callfunc "MobPoints";
- break;
-
-OnSilkWorm:
- set @mobID, 1035;
- callfunc "MobPoints";
- break;
-
- end;
-}
+// Map: new_26-1
+// This is North Woodland.
+//
+
+new_26-1.gat,0,0,0,0 monster Mouboo 1028,25,0,0,Mob26::OnMouboo
+new_26-1.gat,0,0,0,0 monster SpikyMushroom 1019,30,0,0,Mob26::OnSpikyMushroom
+
+new_26-1.gat,0,0,0,0 monster Alizarin 1032,1,2700000,1800000,Mob26::OnAlizarin
+new_26-1.gat,0,0,0,0 monster Gamboge 1031,1,2700000,1800000,Mob26::OnGamboge
+new_26-1.gat,0,0,0,0 monster Cobalt 1030,1,2700000,1800000,Mob26::OnCobalt
+new_26-1.gat,0,0,0,0 monster Mauve 1029,1,2700000,1800000,Mob26::OnMauve
+
+new_26-1.gat,0,0,0,0 monster SilkWorm 1035,5,6000,3000,Mob26::OnSilkWorm
+
+new_26-1.gat,0,0,0 script Mob26 -1,{
+OnMouboo:
+ set @mobID, 1028;
+ callfunc "MobPoints";
+ break;
+
+OnSpikyMushroom:
+ set @mobID, 1019;
+ callfunc "MobPoints";
+ break;
+
+OnAlizarin:
+ set @mobID, 1032;
+ callfunc "MobPoints";
+ break;
+
+OnGamboge:
+ set @mobID, 1031;
+ callfunc "MobPoints";
+ break;
+
+OnCobalt:
+ set @mobID, 1030;
+ callfunc "MobPoints";
+ break;
+
+OnMauve:
+ set @mobID, 1029;
+ callfunc "MobPoints";
+ break;
+
+OnSilkWorm:
+ set @mobID, 1035;
+ callfunc "MobPoints";
+ break;
+
+ end;
+}
diff --git a/npc/new_26-1-hill1/passages.txt b/npc/new_26-1-hill1/passages.txt
index cce370a0..6d5cabe0 100644
--- a/npc/new_26-1-hill1/passages.txt
+++ b/npc/new_26-1-hill1/passages.txt
@@ -1,11 +1,11 @@
-new_26-1.gat,132,164 warp south 2,0,new_9-1.gat,72,16
-new_26-1.gat,98,99 warp lowtunnel1 0,0,new_27-1.gat,36,81
-new_26-1.gat,109,92 warp hightunnel1 0,0,new_27-1.gat,79,73
-new_26-1.gat,123,90 warp npccave 0,0,new_27-1.gat,38,156
-new_26-1.gat,92,104 warp lowtunnel2 0,0,new_27-1.gat,270,111
-new_26-1.gat,65,126 warp hightunnel2 0,0,new_27-1.gat,176,139
-new_26-1.gat,44,88 warp starttunnel3 0,0,new_27-1.gat,354,187
-new_26-1.gat,41,48 warp realhightunnel3 0,0,new_27-1.gat,353,78
-new_26-1.gat,51,39 warp high1tunnel3 0,0,new_27-1.gat,370,45
-new_26-1.gat,148,67 warp high2tunnel3 0,0,new_27-1.gat,475,104
-new_26-1.gat,150,59 warp map26to28 0,4,new_28-1.gat,21,75
+new_26-1.gat,132,164 warp south 2,0,new_9-1.gat,72,16
+new_26-1.gat,98,99 warp lowtunnel1 0,0,new_27-1.gat,36,81
+new_26-1.gat,109,92 warp hightunnel1 0,0,new_27-1.gat,79,73
+new_26-1.gat,123,90 warp npccave 0,0,new_27-1.gat,38,156
+new_26-1.gat,92,104 warp lowtunnel2 0,0,new_27-1.gat,270,111
+new_26-1.gat,65,126 warp hightunnel2 0,0,new_27-1.gat,176,139
+new_26-1.gat,44,88 warp starttunnel3 0,0,new_27-1.gat,354,187
+new_26-1.gat,41,48 warp realhightunnel3 0,0,new_27-1.gat,353,78
+new_26-1.gat,51,39 warp high1tunnel3 0,0,new_27-1.gat,370,45
+new_26-1.gat,148,67 warp high2tunnel3 0,0,new_27-1.gat,475,104
+new_26-1.gat,150,59 warp map26to28 0,4,new_28-1.gat,21,75
diff --git a/npc/new_27-1-hill2/monsters.txt b/npc/new_27-1-hill2/monsters.txt
index 2121f594..bb0799bb 100644
--- a/npc/new_27-1-hill2/monsters.txt
+++ b/npc/new_27-1-hill2/monsters.txt
@@ -1,20 +1,20 @@
-// Map: new_27-1
-// This is the Caves beneath the North Woodland.
-//
-
-new_27-1.gat,0,0,0,0 monster Bat 1017,100,0,0,Mob27::OnBat
-new_27-1.gat,0,0,0,0 monster CaveSnake 1021,75,0,0,Mob27::OnCaveSnake
-
-new_27-1.gat,0,0,0 script Mob27 -1,{
-OnBat:
- set @mobID, 1017;
- callfunc "MobPoints";
- break;
-
-OnCaveSnake:
- set @mobID, 1021;
- callfunc "MobPoints";
- break;
-
- end;
-}
+// Map: new_27-1
+// This is the Caves beneath the North Woodland.
+//
+
+new_27-1.gat,0,0,0,0 monster Bat 1017,100,0,0,Mob27::OnBat
+new_27-1.gat,0,0,0,0 monster CaveSnake 1021,75,0,0,Mob27::OnCaveSnake
+
+new_27-1.gat,0,0,0 script Mob27 -1,{
+OnBat:
+ set @mobID, 1017;
+ callfunc "MobPoints";
+ break;
+
+OnCaveSnake:
+ set @mobID, 1021;
+ callfunc "MobPoints";
+ break;
+
+ end;
+}
diff --git a/npc/new_27-1-hill2/passages.txt b/npc/new_27-1-hill2/passages.txt
index d2b918c8..b85404fb 100644
--- a/npc/new_27-1-hill2/passages.txt
+++ b/npc/new_27-1-hill2/passages.txt
@@ -1,9 +1,9 @@
-new_27-1.gat,36,83 warp lowerexit 1,0,new_26-1.gat,98,100
-new_27-1.gat,79,75 warp higherexit 1,0,new_26-1.gat,109,93
-new_27-1.gat,38,157 warp caveexit 1,0,new_26-1.gat,123,91
-new_27-1.gat,270,112 warp lowerexit 0,1,new_26-1.gat,92,105
-new_27-1.gat,176,138 warp higherexit 0,0,new_26-1.gat,65,127
-new_27-1.gat,354,189 warp startexit 1,0,new_26-1.gat,44,89
-new_27-1.gat,353,80 warp realexit 1,0,new_26-1.gat,41,48
-new_27-1.gat,370,47 warp higher1exit 1,0,new_26-1.gat,51,40
-new_27-1.gat,474,104 warp higher2exit 0,1,new_26-1.gat,146,67
+new_27-1.gat,36,83 warp lowerexit 1,0,new_26-1.gat,98,100
+new_27-1.gat,79,75 warp higherexit 1,0,new_26-1.gat,109,93
+new_27-1.gat,38,157 warp caveexit 1,0,new_26-1.gat,123,91
+new_27-1.gat,270,112 warp lowerexit 0,1,new_26-1.gat,92,105
+new_27-1.gat,176,138 warp higherexit 0,0,new_26-1.gat,65,127
+new_27-1.gat,354,189 warp startexit 1,0,new_26-1.gat,44,89
+new_27-1.gat,353,80 warp realexit 1,0,new_26-1.gat,41,48
+new_27-1.gat,370,47 warp higher1exit 1,0,new_26-1.gat,51,40
+new_27-1.gat,474,104 warp higher2exit 0,1,new_26-1.gat,146,67
diff --git a/npc/new_28-1-hillwest/monsters.txt b/npc/new_28-1-hillwest/monsters.txt
index 98ea2946..fe216eae 100644
--- a/npc/new_28-1-hillwest/monsters.txt
+++ b/npc/new_28-1-hillwest/monsters.txt
@@ -1,63 +1,63 @@
-// Map: new_28-1
-// This is North-East Woodland.
-//
-
-new_28-1.gat,0,0,0,0 monster Mouboo 1028,5,0,0,Mob28::OnMouboo
-new_28-1.gat,0,0,0,0 monster SpikyMushroom 1019,15,0,0,Mob28::OnSpikyMushroom
-new_28-1.gat,0,0,0,0 monster Flower 1014,15,0,0,Mob28::OnFlower
-
-new_28-1.gat,0,0,0,0 monster Alizarin 1032,1,0,0,Mob28::OnAlizarin
-new_28-1.gat,0,0,0,0 monster Gamboge 1031,1,0,0,Mob28::OnGamboge
-new_28-1.gat,0,0,0,0 monster Cobalt 1030,1,0,0,Mob28::OnCobalt
-new_28-1.gat,0,0,0,0 monster Mauve 1029,1,0,0,Mob28::OnMauve
-
-new_28-1.gat,0,0,0,0 monster Alizarin 1032,2,2700000,1800000,Mob28::OnAlizarin
-new_28-1.gat,0,0,0,0 monster Gamboge 1031,2,2700000,1800000,Mob28::OnGamboge
-new_28-1.gat,0,0,0,0 monster Cobalt 1030,2,2700000,1800000,Mob28::OnCobalt
-new_28-1.gat,0,0,0,0 monster Mauve 1029,2,2700000,1800000,Mob28::OnMauve
-
-new_28-1.gat,0,0,0,0 monster SilkWorm 1035,4,6000,3000,Mob28::OnSilkWorm
-
-new_28-1.gat,0,0,0 script Mob28 -1,{
-OnMouboo:
- set @mobID, 1028;
- callfunc "MobPoints";
- break;
-
-OnSpikyMushroom:
- set @mobID, 1019;
- callfunc "MobPoints";
- break;
-
-OnFlower:
- set @mobID, 1014;
- callfunc "MobPoints";
- break;
-
-OnAlizarin:
- set @mobID, 1032;
- callfunc "MobPoints";
- break;
-
-OnGamboge:
- set @mobID, 1031;
- callfunc "MobPoints";
- break;
-
-OnCobalt:
- set @mobID, 1030;
- callfunc "MobPoints";
- break;
-
-OnMauve:
- set @mobID, 1029;
- callfunc "MobPoints";
- break;
-
-OnSilkWorm:
- set @mobID, 1035;
- callfunc "MobPoints";
- break;
-
- end;
-}
+// Map: new_28-1
+// This is North-East Woodland.
+//
+
+new_28-1.gat,0,0,0,0 monster Mouboo 1028,5,0,0,Mob28::OnMouboo
+new_28-1.gat,0,0,0,0 monster SpikyMushroom 1019,15,0,0,Mob28::OnSpikyMushroom
+new_28-1.gat,0,0,0,0 monster Flower 1014,15,0,0,Mob28::OnFlower
+
+new_28-1.gat,0,0,0,0 monster Alizarin 1032,1,0,0,Mob28::OnAlizarin
+new_28-1.gat,0,0,0,0 monster Gamboge 1031,1,0,0,Mob28::OnGamboge
+new_28-1.gat,0,0,0,0 monster Cobalt 1030,1,0,0,Mob28::OnCobalt
+new_28-1.gat,0,0,0,0 monster Mauve 1029,1,0,0,Mob28::OnMauve
+
+new_28-1.gat,0,0,0,0 monster Alizarin 1032,2,2700000,1800000,Mob28::OnAlizarin
+new_28-1.gat,0,0,0,0 monster Gamboge 1031,2,2700000,1800000,Mob28::OnGamboge
+new_28-1.gat,0,0,0,0 monster Cobalt 1030,2,2700000,1800000,Mob28::OnCobalt
+new_28-1.gat,0,0,0,0 monster Mauve 1029,2,2700000,1800000,Mob28::OnMauve
+
+new_28-1.gat,0,0,0,0 monster SilkWorm 1035,4,6000,3000,Mob28::OnSilkWorm
+
+new_28-1.gat,0,0,0 script Mob28 -1,{
+OnMouboo:
+ set @mobID, 1028;
+ callfunc "MobPoints";
+ break;
+
+OnSpikyMushroom:
+ set @mobID, 1019;
+ callfunc "MobPoints";
+ break;
+
+OnFlower:
+ set @mobID, 1014;
+ callfunc "MobPoints";
+ break;
+
+OnAlizarin:
+ set @mobID, 1032;
+ callfunc "MobPoints";
+ break;
+
+OnGamboge:
+ set @mobID, 1031;
+ callfunc "MobPoints";
+ break;
+
+OnCobalt:
+ set @mobID, 1030;
+ callfunc "MobPoints";
+ break;
+
+OnMauve:
+ set @mobID, 1029;
+ callfunc "MobPoints";
+ break;
+
+OnSilkWorm:
+ set @mobID, 1035;
+ callfunc "MobPoints";
+ break;
+
+ end;
+}
diff --git a/npc/new_28-1-hillwest/passages.txt b/npc/new_28-1-hillwest/passages.txt
index 7c1b50cc..ed0ea552 100644
--- a/npc/new_28-1-hillwest/passages.txt
+++ b/npc/new_28-1-hillwest/passages.txt
@@ -1,3 +1,3 @@
-new_28-1.gat,20,74 warp map28to26 0,4,new_26-1.gat,148,60
-new_28-1.gat,45,21 warp map28to33 1,0,new_33-1.gat,46,104
-new_28-1.gat,43,90 warp map28to36 0,0,new_36-1.gat,63,41
+new_28-1.gat,20,74 warp map28to26 0,4,new_26-1.gat,148,60
+new_28-1.gat,45,21 warp map28to33 1,0,new_33-1.gat,46,104
+new_28-1.gat,43,90 warp map28to36 0,0,new_36-1.gat,63,41
diff --git a/npc/new_29-1-west-woodland/monsters.txt b/npc/new_29-1-west-woodland/monsters.txt
index cf82eefb..cbb9e182 100644
--- a/npc/new_29-1-west-woodland/monsters.txt
+++ b/npc/new_29-1-west-woodland/monsters.txt
@@ -1,69 +1,69 @@
-// Map: new_29-1
-// This is West Woodland.
-//
-
-new_29-1.gat,0,0,0,0 monster Mouboo 1028,5,0,0,Mob29::OnMouboo
-new_29-1.gat,0,0,0,0 monster EvilMushroom 1013,15,0,0,Mob29::OnEvilMushroom
-new_29-1.gat,0,0,0,0 monster Flower 1014,25,0,0,Mob29::OnFlower
-new_29-1.gat,0,0,0,0 monster FireGoblin 1011,20,0,0,Mob29::OnFireGoblin
-
-new_29-1.gat,0,0,0,0 monster Alizarin 1032,1,0,0,Mob29::OnAlizarin
-new_29-1.gat,0,0,0,0 monster Gamboge 1031,1,0,0,Mob29::OnGamboge
-new_29-1.gat,0,0,0,0 monster Cobalt 1030,1,0,0,Mob29::OnCobalt
-new_29-1.gat,0,0,0,0 monster Mauve 1029,1,0,0,Mob29::OnMauve
-
-new_29-1.gat,0,0,0,0 monster Alizarin 1032,1,2700000,1800000,Mob29::OnAlizarin
-new_29-1.gat,0,0,0,0 monster Gamboge 1031,1,2700000,1800000,Mob29::OnGamboge
-new_29-1.gat,0,0,0,0 monster Cobalt 1030,1,2700000,1800000,Mob29::OnCobalt
-new_29-1.gat,0,0,0,0 monster Mauve 1029,1,2700000,1800000,Mob29::OnMauve
-
-new_29-1.gat,0,0,0,0 monster SilkWorm 1035,4,6000,3000,Mob29::OnSilkWorm
-
-new_29-1.gat,0,0,0 script Mob29 -1,{
-OnMouboo:
- set @mobID, 1028;
- callfunc "MobPoints";
- break;
-
-OnEvilMushroom:
- set @mobID, 1013;
- callfunc "MobPoints";
- break;
-
-OnFlower:
- set @mobID, 1014;
- callfunc "MobPoints";
- break;
-
-OnFireGoblin:
- set @mobID, 1011;
- callfunc "MobPoints";
- break;
-
-OnAlizarin:
- set @mobID, 1032;
- callfunc "MobPoints";
- break;
-
-OnGamboge:
- set @mobID, 1031;
- callfunc "MobPoints";
- break;
-
-OnCobalt:
- set @mobID, 1030;
- callfunc "MobPoints";
- break;
-
-OnMauve:
- set @mobID, 1029;
- callfunc "MobPoints";
- break;
-
-OnSilkWorm:
- set @mobID, 1035;
- callfunc "MobPoints";
- break;
-
- end;
-}
+// Map: new_29-1
+// This is West Woodland.
+//
+
+new_29-1.gat,0,0,0,0 monster Mouboo 1028,5,0,0,Mob29::OnMouboo
+new_29-1.gat,0,0,0,0 monster EvilMushroom 1013,15,0,0,Mob29::OnEvilMushroom
+new_29-1.gat,0,0,0,0 monster Flower 1014,25,0,0,Mob29::OnFlower
+new_29-1.gat,0,0,0,0 monster FireGoblin 1011,20,0,0,Mob29::OnFireGoblin
+
+new_29-1.gat,0,0,0,0 monster Alizarin 1032,1,0,0,Mob29::OnAlizarin
+new_29-1.gat,0,0,0,0 monster Gamboge 1031,1,0,0,Mob29::OnGamboge
+new_29-1.gat,0,0,0,0 monster Cobalt 1030,1,0,0,Mob29::OnCobalt
+new_29-1.gat,0,0,0,0 monster Mauve 1029,1,0,0,Mob29::OnMauve
+
+new_29-1.gat,0,0,0,0 monster Alizarin 1032,1,2700000,1800000,Mob29::OnAlizarin
+new_29-1.gat,0,0,0,0 monster Gamboge 1031,1,2700000,1800000,Mob29::OnGamboge
+new_29-1.gat,0,0,0,0 monster Cobalt 1030,1,2700000,1800000,Mob29::OnCobalt
+new_29-1.gat,0,0,0,0 monster Mauve 1029,1,2700000,1800000,Mob29::OnMauve
+
+new_29-1.gat,0,0,0,0 monster SilkWorm 1035,4,6000,3000,Mob29::OnSilkWorm
+
+new_29-1.gat,0,0,0 script Mob29 -1,{
+OnMouboo:
+ set @mobID, 1028;
+ callfunc "MobPoints";
+ break;
+
+OnEvilMushroom:
+ set @mobID, 1013;
+ callfunc "MobPoints";
+ break;
+
+OnFlower:
+ set @mobID, 1014;
+ callfunc "MobPoints";
+ break;
+
+OnFireGoblin:
+ set @mobID, 1011;
+ callfunc "MobPoints";
+ break;
+
+OnAlizarin:
+ set @mobID, 1032;
+ callfunc "MobPoints";
+ break;
+
+OnGamboge:
+ set @mobID, 1031;
+ callfunc "MobPoints";
+ break;
+
+OnCobalt:
+ set @mobID, 1030;
+ callfunc "MobPoints";
+ break;
+
+OnMauve:
+ set @mobID, 1029;
+ callfunc "MobPoints";
+ break;
+
+OnSilkWorm:
+ set @mobID, 1035;
+ callfunc "MobPoints";
+ break;
+
+ end;
+}
diff --git a/npc/new_29-1-west-woodland/passages.txt b/npc/new_29-1-west-woodland/passages.txt
index 8c8c68ed..1bfb67a7 100644
--- a/npc/new_29-1-west-woodland/passages.txt
+++ b/npc/new_29-1-west-woodland/passages.txt
@@ -1,3 +1,3 @@
-new_29-1.gat,109,90 warp map29to9 0,3,new_9-1.gat,31,60
-new_29-1.gat,93,58 warp map29to30low 0,0,new_30-1.gat,56,172
+new_29-1.gat,109,90 warp map29to9 0,3,new_9-1.gat,31,60
+new_29-1.gat,93,58 warp map29to30low 0,0,new_30-1.gat,56,172
new_29-1.gat,76,38 warp map29to30high 0,0,new_30-1.gat,35,33 \ No newline at end of file
diff --git a/npc/new_3-1-tulimshar/soul-menhir.txt b/npc/new_3-1-tulimshar/soul-menhir.txt
index fab1e9f2..147ed63d 100644
--- a/npc/new_3-1-tulimshar/soul-menhir.txt
+++ b/npc/new_3-1-tulimshar/soul-menhir.txt
@@ -1,6 +1,6 @@
-new_3-1.gat,38,69,0 script Soul Menhir 144, {
- set @map$, "new_3-1.gat";
- set @x, 38;
- set @y, 70;
- callfunc "SoulMenhir";
-}
+new_3-1.gat,38,69,0 script Soul Menhir 144, {
+ set @map$, "new_3-1.gat";
+ set @x, 38;
+ set @y, 70;
+ callfunc "SoulMenhir";
+}
diff --git a/npc/new_3-1-tulimshar/workers.txt b/npc/new_3-1-tulimshar/workers.txt
index 6aa89103..31c6afa3 100644
--- a/npc/new_3-1-tulimshar/workers.txt
+++ b/npc/new_3-1-tulimshar/workers.txt
@@ -1,13 +1,13 @@
-//
-
-new_3-1.gat,45,21,0 script Construction Worker 155,{
- mes "[Construction worker]";
- mes "\"I can't let you beyond this gate. The area is closed for renovation; most of it was destroyed during the earthquake.\"";
- close;
-}
-
-new_3-1.gat,124,21,0 script Construction Worker 155,{
- mes "[Construction worker]";
- mes "\"Move along.\"";
- close;
-}
+//
+
+new_3-1.gat,45,21,0 script Construction Worker 155,{
+ mes "[Construction worker]";
+ mes "\"I can't let you beyond this gate. The area is closed for renovation; most of it was destroyed during the earthquake.\"";
+ close;
+}
+
+new_3-1.gat,124,21,0 script Construction Worker 155,{
+ mes "[Construction worker]";
+ mes "\"Move along.\"";
+ close;
+}
diff --git a/npc/new_30-1-west-woodland-cave/passages.txt b/npc/new_30-1-west-woodland-cave/passages.txt
index 55e27713..9ef108a2 100644
--- a/npc/new_30-1-west-woodland-cave/passages.txt
+++ b/npc/new_30-1-west-woodland-cave/passages.txt
@@ -1,4 +1,4 @@
-new_30-1.gat,91,108 warp lowtohigh 0,0,new_30-1.gat,103,52
-new_30-1.gat,101,54 warp hightolow 5,0,new_30-1.gat,91,109
-new_30-1.gat,56,174 warp tomap29low 2,0,new_29-1.gat,93,59
+new_30-1.gat,91,108 warp lowtohigh 0,0,new_30-1.gat,103,52
+new_30-1.gat,101,54 warp hightolow 5,0,new_30-1.gat,91,109
+new_30-1.gat,56,174 warp tomap29low 2,0,new_29-1.gat,93,59
new_30-1.gat,35,32 warp tomap29high 0,0,new_29-1.gat,76,39 \ No newline at end of file
diff --git a/npc/new_31-1-southwest-woodland/alice.txt b/npc/new_31-1-southwest-woodland/alice.txt
index b17e7c9c..e35f4802 100644
--- a/npc/new_31-1-southwest-woodland/alice.txt
+++ b/npc/new_31-1-southwest-woodland/alice.txt
@@ -1,46 +1,46 @@
-//#################################################################################
-//# #
-//# A herb collector giving the players some hints about finding and brewing #
-//# herbs #
-//# #
-//#################################################################################
-
-
-new_31-1.gat,52,53,0 script Alice 106, {
- mes "[Alice]";
- mes "\"Greeting, fellow wanderer.";
- mes "Are you collecting herbs, too?\"";
- next;
- menu
- "Yes, sure.", L_findmany,
- "Herbs?", L_herbs,
- "Nope, just enjoying the scenery.", close;
-
-L_findmany:
- mes "[Alice]";
- mes "\"And? Did you already find a lot?\"";
- next;
- menu
- "Yes, I already got plenty of them.", L_plenty,
- "No, I am out of luck.", -;
- mes "[Alice]";
- mes "\"Oooh, how sad. Let me give you a little tip:";
- mes "Herbs are often growing in places where they can't be spotted that easily. Don't forget to look behind the trees, too.\"";
- close;
-
-L_plenty:
- mes "[Alice]";
- mes "\"That's great.";
- mes "When you are not that good at brewing you should consider letting someone else brew them for you.";
- mes "Good brewers get much better healing potions from them.";
- mes "The most important characteristic of a good brewer is intelligence.\"";
- close;
-
-
-L_herbs:
- mes "[Alice]";
- mes "\"Yes, some powerful magic herbs started to grow around here and a mile to the southeast.";
- mes "Caul in Hurnscald found a way to brew magical healing potions from them, and I have heard a rumor that they may also be good for making colors.";
- mes "Now everyone is running around in the woods to harvest the herbs.\"";
- close;
-}
+//#################################################################################
+//# #
+//# A herb collector giving the players some hints about finding and brewing #
+//# herbs #
+//# #
+//#################################################################################
+
+
+new_31-1.gat,52,53,0 script Alice 106, {
+ mes "[Alice]";
+ mes "\"Greeting, fellow wanderer.";
+ mes "Are you collecting herbs, too?\"";
+ next;
+ menu
+ "Yes, sure.", L_findmany,
+ "Herbs?", L_herbs,
+ "Nope, just enjoying the scenery.", close;
+
+L_findmany:
+ mes "[Alice]";
+ mes "\"And? Did you already find a lot?\"";
+ next;
+ menu
+ "Yes, I already got plenty of them.", L_plenty,
+ "No, I am out of luck.", -;
+ mes "[Alice]";
+ mes "\"Oooh, how sad. Let me give you a little tip:";
+ mes "Herbs are often growing in places where they can't be spotted that easily. Don't forget to look behind the trees, too.\"";
+ close;
+
+L_plenty:
+ mes "[Alice]";
+ mes "\"That's great.";
+ mes "When you are not that good at brewing you should consider letting someone else brew them for you.";
+ mes "Good brewers get much better healing potions from them.";
+ mes "The most important characteristic of a good brewer is intelligence.\"";
+ close;
+
+
+L_herbs:
+ mes "[Alice]";
+ mes "\"Yes, some powerful magic herbs started to grow around here and a mile to the southeast.";
+ mes "Caul in Hurnscald found a way to brew magical healing potions from them, and I have heard a rumor that they may also be good for making colors.";
+ mes "Now everyone is running around in the woods to harvest the herbs.\"";
+ close;
+}
diff --git a/npc/new_31-1-southwest-woodland/monsters.txt b/npc/new_31-1-southwest-woodland/monsters.txt
index ba9d7c2e..0ce818c1 100644
--- a/npc/new_31-1-southwest-woodland/monsters.txt
+++ b/npc/new_31-1-southwest-woodland/monsters.txt
@@ -1,46 +1,46 @@
-// Map: new_31-1
-// This is South-West Woodland.
-//
-
-new_31-1.gat,0,0,0,0 monster LogHead 1025,40,0,0,Mob31::OnLogHead
-new_31-1.gat,0,0,0,0 monster SpikyMushroom 1019,20,0,0,Mob31::OnSpikyMushroom
-new_31-1.gat,0,0,0,0 monster Flower 1014,20,0,0,Mob31::OnFlower
-
-new_31-1.gat,0,0,0,0 monster Gamboge 1031,3,0,0,Mob31::OnGamboge
-new_31-1.gat,0,0,0,0 monster Alizarin 1032,3,0,0,Mob31::OnAlizarin
-
-new_31-1.gat,0,0,0,0 monster SilkWorm 1035,7,15000,7000,Mob31::onSilkWorm
-
-new_31-1.gat,0,0,0 script Mob31 -1,{
-OnLogHead:
- set @mobID, 1025;
- callfunc "MobPoints";
- break;
-
-OnSpikyMushroom:
- set @mobID, 1019;
- callfunc "MobPoints";
- break;
-
-OnFlower:
- set @mobID, 1014;
- callfunc "MobPoints";
- break;
-
-OnGamboge:
- set @mobID, 1031;
- callfunc "MobPoints";
- break;
-
-OnAlizarin:
- set @mobID, 1032;
- callfunc "MobPoints";
- break;
-
-OnSilkWorm:
- set @mobID, 1035;
- callfunc "MobPoints";
- break;
-
- end;
-}
+// Map: new_31-1
+// This is South-West Woodland.
+//
+
+new_31-1.gat,0,0,0,0 monster LogHead 1025,40,0,0,Mob31::OnLogHead
+new_31-1.gat,0,0,0,0 monster SpikyMushroom 1019,20,0,0,Mob31::OnSpikyMushroom
+new_31-1.gat,0,0,0,0 monster Flower 1014,20,0,0,Mob31::OnFlower
+
+new_31-1.gat,0,0,0,0 monster Gamboge 1031,3,0,0,Mob31::OnGamboge
+new_31-1.gat,0,0,0,0 monster Alizarin 1032,3,0,0,Mob31::OnAlizarin
+
+new_31-1.gat,0,0,0,0 monster SilkWorm 1035,7,15000,7000,Mob31::onSilkWorm
+
+new_31-1.gat,0,0,0 script Mob31 -1,{
+OnLogHead:
+ set @mobID, 1025;
+ callfunc "MobPoints";
+ break;
+
+OnSpikyMushroom:
+ set @mobID, 1019;
+ callfunc "MobPoints";
+ break;
+
+OnFlower:
+ set @mobID, 1014;
+ callfunc "MobPoints";
+ break;
+
+OnGamboge:
+ set @mobID, 1031;
+ callfunc "MobPoints";
+ break;
+
+OnAlizarin:
+ set @mobID, 1032;
+ callfunc "MobPoints";
+ break;
+
+OnSilkWorm:
+ set @mobID, 1035;
+ callfunc "MobPoints";
+ break;
+
+ end;
+}
diff --git a/npc/new_32-1-south-woodland-2/monsters.txt b/npc/new_32-1-south-woodland-2/monsters.txt
index d59bec06..8075550c 100644
--- a/npc/new_32-1-south-woodland-2/monsters.txt
+++ b/npc/new_32-1-south-woodland-2/monsters.txt
@@ -1,40 +1,40 @@
-// Map: new_32-1
-// This is Southernmost Woodlands.
-//
-
-new_32-1.gat,0,0,0,0 monster Mouboo 1028,5,0,0,Mob32::OnMouboo
-new_32-1.gat,0,0,0,0 monster Scorpion 1003,15,0,0,Mob32::OnScorpion
-
-new_32-1.gat,0,0,0,0 monster Mauve 1029,3,0,0,Mob32::OnMauve
-new_32-1.gat,0,0,0,0 monster Cobalt 1030,3,0,0,Mob32::OnCobalt
-
-new_32-1.gat,0,0,0,0 monster SilkWorm 1035,7,15000,7000,Mob32::onSilkWorm
-
-new_32-1.gat,0,0,0 script Mob32 -1,{
-OnMouboo:
- set @mobID, 1028;
- callfunc "MobPoints";
- break;
-
-OnScorpion:
- set @mobID, 1003;
- callfunc "MobPoints";
- break;
-
-OnMauve:
- set @mobID, 1029;
- callfunc "MobPoints";
- break;
-
-OnCobalt:
- set @mobID, 1030;
- callfunc "MobPoints";
- break;
-
-OnSilkWorm:
- set @mobID, 1035;
- callfunc "MobPoints";
- break;
-
- end;
-}
+// Map: new_32-1
+// This is Southernmost Woodlands.
+//
+
+new_32-1.gat,0,0,0,0 monster Mouboo 1028,5,0,0,Mob32::OnMouboo
+new_32-1.gat,0,0,0,0 monster Scorpion 1003,15,0,0,Mob32::OnScorpion
+
+new_32-1.gat,0,0,0,0 monster Mauve 1029,3,0,0,Mob32::OnMauve
+new_32-1.gat,0,0,0,0 monster Cobalt 1030,3,0,0,Mob32::OnCobalt
+
+new_32-1.gat,0,0,0,0 monster SilkWorm 1035,7,15000,7000,Mob32::onSilkWorm
+
+new_32-1.gat,0,0,0 script Mob32 -1,{
+OnMouboo:
+ set @mobID, 1028;
+ callfunc "MobPoints";
+ break;
+
+OnScorpion:
+ set @mobID, 1003;
+ callfunc "MobPoints";
+ break;
+
+OnMauve:
+ set @mobID, 1029;
+ callfunc "MobPoints";
+ break;
+
+OnCobalt:
+ set @mobID, 1030;
+ callfunc "MobPoints";
+ break;
+
+OnSilkWorm:
+ set @mobID, 1035;
+ callfunc "MobPoints";
+ break;
+
+ end;
+}
diff --git a/npc/new_32-1-south-woodland-2/passages.txt b/npc/new_32-1-south-woodland-2/passages.txt
index dbefcf9c..06fba664 100644
--- a/npc/new_32-1-south-woodland-2/passages.txt
+++ b/npc/new_32-1-south-woodland-2/passages.txt
@@ -1 +1 @@
-new_32-1.gat,55,20 warp map32to14 3,0,new_14-1.gat,56,103
+new_32-1.gat,55,20 warp map32to14 3,0,new_14-1.gat,56,103
diff --git a/npc/new_33-1-hill-northwest/monsters.txt b/npc/new_33-1-hill-northwest/monsters.txt
index 89332f1d..8ec54d78 100644
--- a/npc/new_33-1-hill-northwest/monsters.txt
+++ b/npc/new_33-1-hill-northwest/monsters.txt
@@ -1,76 +1,76 @@
-// Map: new_33-1
-// This is North Woodlands Mountains.
-//
-
-new_33-1.gat,0,0,0,0 monster Bat 1017,5,0,0,Mob33::OnBat
-new_33-1.gat,0,0,0,0 monster FireGoblin 1011,5,0,0,Mob33::OnFireGoblin
-new_33-1.gat,0,0,0,0 monster Mouboo 1028,5,0,0,Mob33::OnMouboo
-new_33-1.gat,0,0,0,0 monster Flower 1014,5,0,0,Mob33::OnFlower
-new_33-1.gat,0,0,0,0 monster SpikyMushroom 1019,5,0,0,Mob33::OnSpikyMushroom
-new_33-1.gat,0,0,0,0 monster EvilMushshroom 1013,10,0,0,Mob33::OnEvilMushroom
-
-new_33-1.gat,0,0,0,0 monster Alizarin 1032,2,0,0,Mob33::OnAlizarin
-new_33-1.gat,0,0,0,0 monster Gamboge 1031,2,0,0,Mob33::OnGamboge
-new_33-1.gat,0,0,0,0 monster Cobalt 1030,2,0,0,Mob33::OnCobalt
-new_33-1.gat,0,0,0,0 monster Mauve 1029,2,0,0,Mob33::OnMauve
-
-new_33-1.gat,0,0,0,0 monster SilkWorm 1035,10,0,0,Mob33::OnSilkWorm
-
-new_33-1.gat,0,0,0 script Mob33 -1,{
-OnBat:
- set @mobID, 1017;
- callfunc "MobPoints";
- break;
-
-OnFireGoblin:
- set @mobID, 1011;
- callfunc "MobPoints";
- break;
-
-OnMouboo:
- set @mobID, 1028;
- callfunc "MobPoints";
- break;
-
-OnFlower:
- set @mobID, 1014;
- callfunc "MobPoints";
- break;
-
-OnSpikyMushroom:
- set @mobID, 1019;
- callfunc "MobPoints";
- break;
-
-OnEvilMushroom:
- set @mobID, 1013;
- callfunc "MobPoints";
- break;
-
-OnAlizarin:
- set @mobID, 1032;
- callfunc "MobPoints";
- break;
-
-OnGamboge:
- set @mobID, 1031;
- callfunc "MobPoints";
- break;
-
-OnCobalt:
- set @mobID, 1030;
- callfunc "MobPoints";
- break;
-
-OnMauve:
- set @mobID, 1029;
- callfunc "MobPoints";
- break;
-
-OnSilkWorm:
- set @mobID, 1035;
- callfunc "MobPoints";
- break;
-
- end;
-}
+// Map: new_33-1
+// This is North Woodlands Mountains.
+//
+
+new_33-1.gat,0,0,0,0 monster Bat 1017,5,0,0,Mob33::OnBat
+new_33-1.gat,0,0,0,0 monster FireGoblin 1011,5,0,0,Mob33::OnFireGoblin
+new_33-1.gat,0,0,0,0 monster Mouboo 1028,5,0,0,Mob33::OnMouboo
+new_33-1.gat,0,0,0,0 monster Flower 1014,5,0,0,Mob33::OnFlower
+new_33-1.gat,0,0,0,0 monster SpikyMushroom 1019,5,0,0,Mob33::OnSpikyMushroom
+new_33-1.gat,0,0,0,0 monster EvilMushshroom 1013,10,0,0,Mob33::OnEvilMushroom
+
+new_33-1.gat,0,0,0,0 monster Alizarin 1032,2,0,0,Mob33::OnAlizarin
+new_33-1.gat,0,0,0,0 monster Gamboge 1031,2,0,0,Mob33::OnGamboge
+new_33-1.gat,0,0,0,0 monster Cobalt 1030,2,0,0,Mob33::OnCobalt
+new_33-1.gat,0,0,0,0 monster Mauve 1029,2,0,0,Mob33::OnMauve
+
+new_33-1.gat,0,0,0,0 monster SilkWorm 1035,10,0,0,Mob33::OnSilkWorm
+
+new_33-1.gat,0,0,0 script Mob33 -1,{
+OnBat:
+ set @mobID, 1017;
+ callfunc "MobPoints";
+ break;
+
+OnFireGoblin:
+ set @mobID, 1011;
+ callfunc "MobPoints";
+ break;
+
+OnMouboo:
+ set @mobID, 1028;
+ callfunc "MobPoints";
+ break;
+
+OnFlower:
+ set @mobID, 1014;
+ callfunc "MobPoints";
+ break;
+
+OnSpikyMushroom:
+ set @mobID, 1019;
+ callfunc "MobPoints";
+ break;
+
+OnEvilMushroom:
+ set @mobID, 1013;
+ callfunc "MobPoints";
+ break;
+
+OnAlizarin:
+ set @mobID, 1032;
+ callfunc "MobPoints";
+ break;
+
+OnGamboge:
+ set @mobID, 1031;
+ callfunc "MobPoints";
+ break;
+
+OnCobalt:
+ set @mobID, 1030;
+ callfunc "MobPoints";
+ break;
+
+OnMauve:
+ set @mobID, 1029;
+ callfunc "MobPoints";
+ break;
+
+OnSilkWorm:
+ set @mobID, 1035;
+ callfunc "MobPoints";
+ break;
+
+ end;
+}
diff --git a/npc/new_33-1-hill-northwest/passages.txt b/npc/new_33-1-hill-northwest/passages.txt
index 69a2cba2..f026428c 100644
--- a/npc/new_33-1-hill-northwest/passages.txt
+++ b/npc/new_33-1-hill-northwest/passages.txt
@@ -1 +1 @@
-new_33-1.gat,46,105 warp map33to28 2,-1,new_28-1.gat,45,22
+new_33-1.gat,46,105 warp map33to28 2,-1,new_28-1.gat,45,22
diff --git a/npc/new_34-1-north-beach/passages.txt b/npc/new_34-1-north-beach/passages.txt
index 4da6231d..198c55b4 100644
--- a/npc/new_34-1-north-beach/passages.txt
+++ b/npc/new_34-1-north-beach/passages.txt
@@ -1,2 +1,2 @@
-new_34-1.gat,83,113 warp todesert 3,1,new_1-1.gat,29,15
-new_34-1.gat,36,111 warp tobeach 3,1,new_15-1.gat,141,21
+new_34-1.gat,83,113 warp todesert 3,1,new_1-1.gat,29,15
+new_34-1.gat,36,111 warp tobeach 3,1,new_15-1.gat,141,21
diff --git a/npc/new_35-1-woodland-village/passages.txt b/npc/new_35-1-woodland-village/passages.txt
index 799f3bb8..c72af585 100644
--- a/npc/new_35-1-woodland-village/passages.txt
+++ b/npc/new_35-1-woodland-village/passages.txt
@@ -1,5 +1,5 @@
-// To village
-new_35-1.gat,173,20 warp cv-1b 0,0,new_20-1.gat,147,88
-
-// To cave snake cave
-new_35-1.gat,20,57 warp cave 0,1,new_17-1.gat,129,88
+// To village
+new_35-1.gat,173,20 warp cv-1b 0,0,new_20-1.gat,147,88
+
+// To cave snake cave
+new_35-1.gat,20,57 warp cave 0,1,new_17-1.gat,129,88
diff --git a/npc/new_36-1-magic-house/passages.txt b/npc/new_36-1-magic-house/passages.txt
index 44d66724..d5376f5b 100644
--- a/npc/new_36-1-magic-house/passages.txt
+++ b/npc/new_36-1-magic-house/passages.txt
@@ -1,3 +1,3 @@
-new_36-1.gat,63,43 warp map36to28 0,1,new_28-1.gat,42,91
-new_36-1.gat,67,35 warp tobigroom 0,0,new_36-1.gat,21,40
-new_36-1.gat,21,42 warp tosmallroom 0,1,new_36-1.gat,67,37
+new_36-1.gat,63,43 warp map36to28 0,1,new_28-1.gat,42,91
+new_36-1.gat,67,35 warp tobigroom 0,0,new_36-1.gat,21,40
+new_36-1.gat,21,42 warp tosmallroom 0,1,new_36-1.gat,67,37
diff --git a/npc/new_37-1-woodland-mine/passages.txt b/npc/new_37-1-woodland-mine/passages.txt
index 937406ee..be98b28c 100644
--- a/npc/new_37-1-woodland-mine/passages.txt
+++ b/npc/new_37-1-woodland-mine/passages.txt
@@ -1,5 +1,5 @@
-// To village
-new_37-1.gat,79,97 warp woodland 2,-1,new_18-1.gat,78,18
-
-// To camp building
-new_37-1.gat,65,73 warp inside -1,-1,new_38-1.gat,50,27
+// To village
+new_37-1.gat,79,97 warp woodland 2,-1,new_18-1.gat,78,18
+
+// To camp building
+new_37-1.gat,65,73 warp inside -1,-1,new_38-1.gat,50,27
diff --git a/npc/new_38-1-woodland-mine/caul.txt b/npc/new_38-1-woodland-mine/caul.txt
index 99e316a1..e84b507d 100644
--- a/npc/new_38-1-woodland-mine/caul.txt
+++ b/npc/new_38-1-woodland-mine/caul.txt
@@ -1,479 +1,479 @@
-//#################################################################################
-//#
-//# this script file contains the script for the NPC which allows the
-//# PCs to create potions from herbs.
-//#
-//# Participates in the monster oil subquest (cf. Nicholas' Setzer quest)
-//#
-//#################################################################################
-
-new_38-1.gat,37,22,0 script Caul 107,{
- set @SETZER_INITIAL, 0;
- set @SETZER_KNOWS_OIL, 1;
- set @SETZER_KNOWS_STINGER, 2;
- set @SETZER_FLAG_MADE_OIL, 4;
-
- set @PEARL, 700;
- set @SNAKE_SKIN, 641;
- set @BLACK_STINGER, 709;
- set @ASH_PILE, 701;
- set @GOLDEN_STINGER, 706;
- set @MONSTER_OIL, 707;
- set @MONSTER_OIL_XP, 100000;
-
- set @Q_MASK, NIBBLE_3_MASK;
- set @Q_SHIFT, NIBBLE_3_SHIFT;
-
- set @MAUVE, 680;
- set @COBALT, 681;
- set @GAMBOGE, 682;
- set @ALIZARIN, 683;
-
- set @Q_status, (QUEST_Forestbow_state & @Q_MASK) >> @Q_SHIFT;
-
- mes "[Caul]";
- mes "\"I can help you to brew healing potions out of mauve, cobalt, gamboge and alizarin herbs.";
- mes "How many potions do you want to brew?\"";
- next;
-
-
- if (@Q_status && Inspector == 10)
- menu
- "One", L_1,
- "Five", L_5,
- "Ten", L_10,
- "Fifty", L_50,
- "I would like to brew monster oil.", L_monster_oil_start,
- "Actually...", L_NohMask,
- "Never mind", L_close;
- if (@Q_status && Inspector != 10)
- menu
- "One", L_1,
- "Five", L_5,
- "Ten", L_10,
- "Fifty", L_50,
- "I would like to brew monster oil.", L_monster_oil_start,
- "Never mind", L_close;
- if (!@Q_status && Inspector == 10)
- menu
- "One", L_1,
- "Five", L_5,
- "Ten", L_10,
- "Fifty", L_50,
- "Actually...", L_NohMask,
- "Never mind", L_close;
- if (!@Q_status && Inspector != 10)
- menu
- "One", L_1,
- "Five", L_5,
- "Ten", L_10,
- "Fifty", L_50,
- "Never mind", L_close;
-
-L_1:
- set @num, 1;
- goto L_brew;
-
-L_5:
- set @num, 5;
- goto L_brew;
-
-L_10:
- set @num, 10;
- goto L_brew;
-
-L_50:
- set @num, 50;
- goto L_brew;
-
-
-L_brew:
- mes "[Caul]";
- mes "\"Now put " + @num + " herbs of each kind into the cauldron, stir, and concentrate all your mental energy on it.\"";
- next;
-
- if (countitem(@MAUVE) < @num) goto L_NotEnough;
- if (countitem(@COBALT) < @num) goto L_NotEnough;
- if (countitem(@GAMBOGE) < @num) goto L_NotEnough;
- if (countitem(@ALIZARIN) < @num) goto L_NotEnough;
-
- set @a, @num;
- set @result1, 0;
- set @result2, 0;
- set @result3, 0;
- set @result4, 0;
-
-L_CraftLoop:
- set @throw, rand(readparam(bInt));
- set @result, 1;
- if (@throw >= 5) set @result, 2;
- if (@throw >= 15) set @result, 3;
- if (@throw >= 35) set @result, 4;
-
- if (@result == 1) set @result1, @result1 + 1;
- if (@result == 2) set @result2, @result2 + 1;
- if (@result == 3) set @result3, @result3 + 1;
- if (@result == 4) set @result4, @result4 + 1;
-
- set @a, @a - 1;
- if (@a > 0) goto L_CraftLoop;
-
- delitem @MAUVE, @num;
- delitem @COBALT, @num;
- delitem @GAMBOGE, @num;
- delitem @ALIZARIN, @num;
-
- getitem 684, @result1;
- getitem 685, @result2;
- getitem 686, @result3;
- getitem 687, @result4;
-
- mes "[Caul]";
- mes "\"Well done! You made:";
- if (@result1 > 0) mes @result1 + " tiny potions";
- if (@result2 > 0) mes @result2 + " small potions";
- if (@result3 > 0) mes @result3 + " medium potions";
- if (@result4 > 0) mes @result4 + " large potions";
- mes "Come again.\"";
- close;
-
-L_NotEnough:
- mes "[Caul]";
- mes "\"Oh, it seems like you don't have enough herbs. You can find herbs in deep forests.\"";
- close;
-
-L_monster_oil_start:
- mes "[Caul]";
- mes "\"Monster oil? Hmm, I have heard of it, but I don't remember the precise recipe to make it...\"";
- next;
- if (@Q_status == @SETZER_KNOWS_OIL)
- menu "OK, I'll ask around, perhaps someone else knows.", L_close;
- if (@Q_status > @SETZER_KNOWS_OIL)
- menu "Rauk told me the recipe.", L_monster_oil_knows_recipe;
- close;
-
-L_monster_oil_knows_recipe:
- mes "[Caul]";
- mes "\"Ah, but of course! Yes, we should be able to brew that here. Except that... hmm. Pearl and three black scorpion stingers? This sounds very dangerous;";
- mes "I fear that I will have to ask you to do this yourself.\"";
- next;
-
-L_monster_oil_main_menu:
- set @main_menu, 1;
- menu
- "What do you mean by 'dangerous'?", L_monster_oil_why_dangerous,
- "What do I need, again?", L_monster_oil_ingredients,
- "How does this work?", L_monster_oil_explain,
- "Let's start!", L_monster_oil_start_brew,
- "Where can I get a golden scorpion stinger?", L_monster_oil_where_gold,
- "I've changed my mind.", L_close;
- close;
-
-L_monster_oil_why_dangerous:
- mes "[Caul]";
- mes "\"Well, with those two reagents in there at that ratio, you risk an explosion-- quite possibly a fatal one. So be prepared to duck if the brew gets too bubbly-- it's better to lose the ingredients than your head!\"";
- next;
- goto L_monster_oil_main_menu;
-
-L_monster_oil_ingredients:
- mes "[Caul]";
- mes "\"You will need one pearl, two snake skins, three black scorpion stingers, two piles of ash, and a golden scorpion stinger. The golden stinger goes in last, after the dangerous part, so you won't lose if if your brew blows up.\"";
- next;
- mes "[Caul]";
- mes "\"You should also bring gamboge, mauve, alizarin and cobalt leaves. You will have to stabilize the brew, and they will help with that.\"";
- next;
- goto L_monster_oil_main_menu;
-
-L_monster_oil_explain:
- mes "[Caul]";
- mes "\"After you have put in the monster parts-- except for the golden stinger-- the brew will take on some random color; this can be a light, dark, or medium color. You have to stabilize this color by adding leaves to it.\"";
- next;
- mes "[Caul]";
- mes "\"Of course, with such a violent brew the mixture will change color by itself, too, probably faster than your leaves can affect it. It will randomly add or remove colors, and might even get lighter.\"";
- next;
- mes "[Caul]";
- mes "\"From what I have seen, it seems to go through phases-- for each alternate leaf it adds a colour, then removes a color, then adds again and so on. Of course, if the color is there already it can't add any more.\"";
- next;
- mes "[Caul]";
- mes "\"I haven't figured out yet precisely when it gets lighter, though.\"";
- next;
- mes "[Caul]";
- mes "\"By adding Mauve, you can make it darker. Alizarin adds red, Gamboge yellow, Cobalt blue. To make it a proper black, you have to get it to be dark gray, then add one Mauve leaf.\"";
- next;
- mes "[Caul]";
- mes "\"Unfortunately the brew changes randomly before your leaves dissolve, so sometimes you can't help but add the wrong color...\"";
- next;
- mes "[Caul]";
- mes "\"Since the brew changes its color first, you might want to add the Mauve when your color is a dark purple or dark green or dark orange and hope for the best.\"";
- next;
- mes "[Caul]";
- mes "\"But don't add too much! If you add a color that is already there, or try to make it darker at the wrong spot, it may backfire.\"";
- next;
- if (@main_menu)
- goto L_monster_oil_main_menu;
- goto L_monster_oil_loop;
-
-L_monster_oil_where_gold:
- mes "[Caul]";
- mes "\"Good question. There aren't any golden scorpions nearby. Perhaps you can find a trader or an adventurer who have travelled further south and ask them to help?\"";
- next;
- goto L_monster_oil_main_menu;
-
-L_monster_oil_start_brew:
- set @main_menu, 0;
- if (countitem (@PEARL) < 1) goto L_monster_oil_missing;
- if (countitem (@SNAKE_SKIN) < 2) goto L_monster_oil_missing;
- if (countitem (@BLACK_STINGER) < 3) goto L_monster_oil_missing;
- if (countitem (@ASH_PILE) < 2) goto L_monster_oil_missing;
- if (countitem (@GOLDEN_STINGER) < 1) goto L_monster_oil_missing_gold;
-
- delitem @PEARL, 1;
- delitem @SNAKE_SKIN, 2;
- delitem @BLACK_STINGER, 3;
- delitem @ASH_PILE, 2;
-
- set @bubble_mode, 0;
- setarray @bubble_modes$,
- "The brew is calm.",
- "The brew is bubbling.",
- "The brew is bubbling violently.";
-
- set @color, 1 << (rand(3));
- setarray @colors$,
- "white",
- "red",
- "yellow",
- "orange",
- "blue",
- "purple",
- "green",
- "gray";
-
- set @intensity, 1;
- setarray @intensities$,
- "light",
- "medium",
- "dark";
-
- set @auto_mode, 0; // Start by adding a colour or going lighter
-
- goto L_monster_oil_loop;
-
-L_monster_oil_missing:
- mes "[Caul]";
- mes "\"You don't seem to have all of the ingredients. You need one pearl, two snake skins, three black stingers, two piles of ash, and one golden stinger.\"";
- next;
- close;
-
-L_monster_oil_missing_gold:
- mes "[Caul]";
- mes "\"You seem to have everything except for the golden stinger. I understand that this one is hard to get, but I'm sure that you can find one somewhere.\"";
- next;
- close;
-
-L_monster_oil_loop:
- mes "[Brewing monster oil]";
- mes @bubble_modes$[@bubble_mode];
- mes "It is currently a " + @intensities$[@intensity] + " " + @colors$[@color] + ".";
- next;
-
- menu
- "Add alizarin leaf", L_monster_oil_alizarin,
- "Add gamboge leaf", L_monster_oil_gamboge,
- "Add cobalt leaf", L_monster_oil_cobalt,
- "Add mauve leaf", L_monster_oil_mauve,
- "Ask Caul for advice", L_monster_oil_explain,
- "Duck!", -;
-
- mes "[Brewing monster oil]";
- mes "You throw yourself onto the ground. Seconds later, the cauldron shakes, and your entire mixture explodes upwards.";
- mes "Caul crawls out from underneath a char.";
- next;
- mes "[Caul]";
- mes "\"I'm glad to see that you chose to brew another day... perhaps it might be best if you give up on this dangerous concoction, though!\"";
- next;
- close;
-
-L_monster_oil_out_of_leaves:
- mes "[Brewing monster oil]";
- mes "You don't have any of these leaves left!";
- next;
- goto L_monster_oil_loop;
-
-L_monster_oil_alizarin:
- set @use_leaf, @ALIZARIN;
- set @use_color, 1;
- goto L_monster_oil_leaf_color;
-
-L_monster_oil_gamboge:
- set @use_leaf, @GAMBOGE;
- set @use_color, 2;
- goto L_monster_oil_leaf_color;
-
-L_monster_oil_cobalt:
- set @use_leaf, @COBALT;
- set @use_color, 4;
- goto L_monster_oil_leaf_color;
-
-L_monster_oil_leaf_color:
- if (countitem (@use_leaf) < 1) goto L_monster_oil_out_of_leaves;
-
- callsub S_monster_oil_random_move;
- if (@color & @use_color) goto L_monster_oil_pc_bad;
- set @color, @color | @use_color;
- delitem @use_leaf, 1;
-
- mes "The brew changes its hue as your leaf dissolves.";
- next;
- goto L_monster_oil_loop;
-
-L_monster_oil_mauve:
- if (countitem(@MAUVE) < 1) goto L_monster_oil_out_of_leaves;
- delitem @MAUVE, 1;
-
- callsub S_monster_oil_random_move;
- if (@intensity == 2 && @color == 7) goto L_monster_oil_done;
- if (@intensity == 2) goto L_monster_oil_pc_bad;
-
- set @intensity, @intensity + 1;
- mes "The brew darkens as your mauve leaf dissolves.";
- next;
- goto L_monster_oil_loop;
-
-S_monster_oil_random_move:
- mes "[Brewing monster oil]";
- mes "You throw in a leaf and stir.";
-
- if (@auto_mode == 1)
- goto L_monster_oil_random_1;
-
-L_monster_oil_random_0: // mode 0: add colour or lighten up
- set @auto_mode, 1;
- if (rand(3) == 0)
- goto L_monster_oil_random_0_lighten;
-
- set @choice, 1 << (rand(3));
- if (@color & @choice)
- goto L_monster_oil_auto_bad;
- set @color, @color | @choice;
-
- mes "Before your leaf has a chance to dissolve, the brew changes to a " + @colors$[@color] + " hue.";
- return;
-
-L_monster_oil_random_0_lighten:
- if (@intensity == 0)
- goto L_monster_oil_auto_bad;
- set @intensity, @intensity - 1;
- mes "Before your leaf has a chance to dissolve, the brew takes on a lighter shade of " + @colors$[@color] + ".";
- return;
-
-L_monster_oil_random_1: // mode 1: remove colour
- set @auto_mode, 0;
- set @choice, 1 << (rand(3));
- if (!(@color & @choice))
- goto L_monster_oil_auto_bad;
- set @color, @color & (~@choice);
- mes "Before your leaf has a chance to dissolve, the brew changes to a " + @colors$[@color] + " hue.";
- return;
-
-L_monster_oil_pc_bad:
- if (rand(readparam(bInt) + 100) > 60) goto L_monster_oil_pc_bad_ok;
- if (@bubble_mode)
- mes "As your leaf dissolves, the intensity of the bubbling increases.";
- if (!@bubble_mode)
- mes "As your leaf dissolves, the brew begins to bubble.";
- next;
- set @bubble_mode, @bubble_mode + 1;
- if (@bubble_mode > 2)
- goto L_monster_oil_explode;
- goto L_monster_oil_loop;
-
-L_monster_oil_pc_bad_ok:
- mes "Your leaf dissolves but seems to have no effect.";
- next;
- goto L_monster_oil_loop;
-
-L_monster_oil_auto_bad:
- if (rand(3) == 0)
- return;
- if (rand(readparam(bInt) + 100) > 70)
- return;
- mes "The brew begins to bubble more violently.";
- set @bubble_mode, @bubble_mode + 1;
- if (@bubble_mode > 2)
- next;
- if (@bubble_mode > 2)
- goto L_monster_oil_explode;
- return;
-
-L_monster_oil_explode:
- mes "[Exploding monster oil]";
- mes "Your brew explodes!";
- if (rand(readparam(bAgi)) > 40)
- goto L_monster_oil_explode_dodge;
- mes "The burst of boiling monster brew hits you.";
- next;
- itemheal (15 * rand(readparam(bVit))) - 1500, 0;
- close;
-
-L_monster_oil_explode_dodge:
- mes "You throw yourself to the ground at the very last moment, barely avoiding the burst of boiling monster brew.";
- next;
- mes "[Caul]";
- mes "Caul nods at you from underneath a chair.";
- mes "\"I told you, it's dangerous!!\"";
- next;
- close;
-
-L_monster_oil_done:
- mes "As you throw in another mauve leaf, the brew takes on a deep black color and calms down.";
- next;
-
- mes "[Brewing monster oil]";
- mes "As instructed, you toss in your golden scorpion stinger.";
-
- if (countitem (@GOLDEN_STINGER) < 1) goto L_monster_oil_no_gold_end;
-
- mes "The brew bubbles once more, then calms completely.";
-
- delitem @GOLDEN_STINGER, 1;
- getitem @MONSTER_OIL, 1;
-
- if (!(@Q_status & @SETZER_FLAG_MADE_OIL))
- getexp @MONSTER_OIL_XP, 0;
- if (!(@Q_status & @SETZER_FLAG_MADE_OIL))
- mes "[" + @MONSTER_OIL_XP + " experience points]";
-
- set @Q_status, @Q_status | @SETZER_FLAG_MADE_OIL;
- callsub S_Update_Var;
- next;
-
- mes "[Caul]";
- mes "Caul gets up from underneath the cover he was taking and looks at your brew. He is visibly impressed.";
- mes "\"Well done! This should be just enough for one potion of monster oil. Let me get you a bottle.\"";
- mes "He hands you the monster oil.";
- next;
- close;
-
-L_monster_oil_no_gold_end:
- mes "But where is your golden stinger? Didn't you have one earlier?";
- mes "Frustrated, you give up.";
- next;
- close;
-
-L_close:
- close;
-
-S_Update_Var:
- set QUEST_Forestbow_state,
- (QUEST_Forestbow_state & ~(@Q_MASK)
- | (@Q_status << @Q_SHIFT));
- return;
-
-L_NohMask:
- mes "[Caul]";
- mes "\"I'm sorry, but I didn't. I'm staying in town. Try asking one of the miners.\"";
- close;
-}
-
-
+//#################################################################################
+//#
+//# this script file contains the script for the NPC which allows the
+//# PCs to create potions from herbs.
+//#
+//# Participates in the monster oil subquest (cf. Nicholas' Setzer quest)
+//#
+//#################################################################################
+
+new_38-1.gat,37,22,0 script Caul 107,{
+ set @SETZER_INITIAL, 0;
+ set @SETZER_KNOWS_OIL, 1;
+ set @SETZER_KNOWS_STINGER, 2;
+ set @SETZER_FLAG_MADE_OIL, 4;
+
+ set @PEARL, 700;
+ set @SNAKE_SKIN, 641;
+ set @BLACK_STINGER, 709;
+ set @ASH_PILE, 701;
+ set @GOLDEN_STINGER, 706;
+ set @MONSTER_OIL, 707;
+ set @MONSTER_OIL_XP, 100000;
+
+ set @Q_MASK, NIBBLE_3_MASK;
+ set @Q_SHIFT, NIBBLE_3_SHIFT;
+
+ set @MAUVE, 680;
+ set @COBALT, 681;
+ set @GAMBOGE, 682;
+ set @ALIZARIN, 683;
+
+ set @Q_status, (QUEST_Forestbow_state & @Q_MASK) >> @Q_SHIFT;
+
+ mes "[Caul]";
+ mes "\"I can help you to brew healing potions out of mauve, cobalt, gamboge and alizarin herbs.";
+ mes "How many potions do you want to brew?\"";
+ next;
+
+
+ if (@Q_status && Inspector == 10)
+ menu
+ "One", L_1,
+ "Five", L_5,
+ "Ten", L_10,
+ "Fifty", L_50,
+ "I would like to brew monster oil.", L_monster_oil_start,
+ "Actually...", L_NohMask,
+ "Never mind", L_close;
+ if (@Q_status && Inspector != 10)
+ menu
+ "One", L_1,
+ "Five", L_5,
+ "Ten", L_10,
+ "Fifty", L_50,
+ "I would like to brew monster oil.", L_monster_oil_start,
+ "Never mind", L_close;
+ if (!@Q_status && Inspector == 10)
+ menu
+ "One", L_1,
+ "Five", L_5,
+ "Ten", L_10,
+ "Fifty", L_50,
+ "Actually...", L_NohMask,
+ "Never mind", L_close;
+ if (!@Q_status && Inspector != 10)
+ menu
+ "One", L_1,
+ "Five", L_5,
+ "Ten", L_10,
+ "Fifty", L_50,
+ "Never mind", L_close;
+
+L_1:
+ set @num, 1;
+ goto L_brew;
+
+L_5:
+ set @num, 5;
+ goto L_brew;
+
+L_10:
+ set @num, 10;
+ goto L_brew;
+
+L_50:
+ set @num, 50;
+ goto L_brew;
+
+
+L_brew:
+ mes "[Caul]";
+ mes "\"Now put " + @num + " herbs of each kind into the cauldron, stir, and concentrate all your mental energy on it.\"";
+ next;
+
+ if (countitem(@MAUVE) < @num) goto L_NotEnough;
+ if (countitem(@COBALT) < @num) goto L_NotEnough;
+ if (countitem(@GAMBOGE) < @num) goto L_NotEnough;
+ if (countitem(@ALIZARIN) < @num) goto L_NotEnough;
+
+ set @a, @num;
+ set @result1, 0;
+ set @result2, 0;
+ set @result3, 0;
+ set @result4, 0;
+
+L_CraftLoop:
+ set @throw, rand(readparam(bInt));
+ set @result, 1;
+ if (@throw >= 5) set @result, 2;
+ if (@throw >= 15) set @result, 3;
+ if (@throw >= 35) set @result, 4;
+
+ if (@result == 1) set @result1, @result1 + 1;
+ if (@result == 2) set @result2, @result2 + 1;
+ if (@result == 3) set @result3, @result3 + 1;
+ if (@result == 4) set @result4, @result4 + 1;
+
+ set @a, @a - 1;
+ if (@a > 0) goto L_CraftLoop;
+
+ delitem @MAUVE, @num;
+ delitem @COBALT, @num;
+ delitem @GAMBOGE, @num;
+ delitem @ALIZARIN, @num;
+
+ getitem 684, @result1;
+ getitem 685, @result2;
+ getitem 686, @result3;
+ getitem 687, @result4;
+
+ mes "[Caul]";
+ mes "\"Well done! You made:";
+ if (@result1 > 0) mes @result1 + " tiny potions";
+ if (@result2 > 0) mes @result2 + " small potions";
+ if (@result3 > 0) mes @result3 + " medium potions";
+ if (@result4 > 0) mes @result4 + " large potions";
+ mes "Come again.\"";
+ close;
+
+L_NotEnough:
+ mes "[Caul]";
+ mes "\"Oh, it seems like you don't have enough herbs. You can find herbs in deep forests.\"";
+ close;
+
+L_monster_oil_start:
+ mes "[Caul]";
+ mes "\"Monster oil? Hmm, I have heard of it, but I don't remember the precise recipe to make it...\"";
+ next;
+ if (@Q_status == @SETZER_KNOWS_OIL)
+ menu "OK, I'll ask around, perhaps someone else knows.", L_close;
+ if (@Q_status > @SETZER_KNOWS_OIL)
+ menu "Rauk told me the recipe.", L_monster_oil_knows_recipe;
+ close;
+
+L_monster_oil_knows_recipe:
+ mes "[Caul]";
+ mes "\"Ah, but of course! Yes, we should be able to brew that here. Except that... hmm. Pearl and three black scorpion stingers? This sounds very dangerous;";
+ mes "I fear that I will have to ask you to do this yourself.\"";
+ next;
+
+L_monster_oil_main_menu:
+ set @main_menu, 1;
+ menu
+ "What do you mean by 'dangerous'?", L_monster_oil_why_dangerous,
+ "What do I need, again?", L_monster_oil_ingredients,
+ "How does this work?", L_monster_oil_explain,
+ "Let's start!", L_monster_oil_start_brew,
+ "Where can I get a golden scorpion stinger?", L_monster_oil_where_gold,
+ "I've changed my mind.", L_close;
+ close;
+
+L_monster_oil_why_dangerous:
+ mes "[Caul]";
+ mes "\"Well, with those two reagents in there at that ratio, you risk an explosion-- quite possibly a fatal one. So be prepared to duck if the brew gets too bubbly-- it's better to lose the ingredients than your head!\"";
+ next;
+ goto L_monster_oil_main_menu;
+
+L_monster_oil_ingredients:
+ mes "[Caul]";
+ mes "\"You will need one pearl, two snake skins, three black scorpion stingers, two piles of ash, and a golden scorpion stinger. The golden stinger goes in last, after the dangerous part, so you won't lose if if your brew blows up.\"";
+ next;
+ mes "[Caul]";
+ mes "\"You should also bring gamboge, mauve, alizarin and cobalt leaves. You will have to stabilize the brew, and they will help with that.\"";
+ next;
+ goto L_monster_oil_main_menu;
+
+L_monster_oil_explain:
+ mes "[Caul]";
+ mes "\"After you have put in the monster parts-- except for the golden stinger-- the brew will take on some random color; this can be a light, dark, or medium color. You have to stabilize this color by adding leaves to it.\"";
+ next;
+ mes "[Caul]";
+ mes "\"Of course, with such a violent brew the mixture will change color by itself, too, probably faster than your leaves can affect it. It will randomly add or remove colors, and might even get lighter.\"";
+ next;
+ mes "[Caul]";
+ mes "\"From what I have seen, it seems to go through phases-- for each alternate leaf it adds a colour, then removes a color, then adds again and so on. Of course, if the color is there already it can't add any more.\"";
+ next;
+ mes "[Caul]";
+ mes "\"I haven't figured out yet precisely when it gets lighter, though.\"";
+ next;
+ mes "[Caul]";
+ mes "\"By adding Mauve, you can make it darker. Alizarin adds red, Gamboge yellow, Cobalt blue. To make it a proper black, you have to get it to be dark gray, then add one Mauve leaf.\"";
+ next;
+ mes "[Caul]";
+ mes "\"Unfortunately the brew changes randomly before your leaves dissolve, so sometimes you can't help but add the wrong color...\"";
+ next;
+ mes "[Caul]";
+ mes "\"Since the brew changes its color first, you might want to add the Mauve when your color is a dark purple or dark green or dark orange and hope for the best.\"";
+ next;
+ mes "[Caul]";
+ mes "\"But don't add too much! If you add a color that is already there, or try to make it darker at the wrong spot, it may backfire.\"";
+ next;
+ if (@main_menu)
+ goto L_monster_oil_main_menu;
+ goto L_monster_oil_loop;
+
+L_monster_oil_where_gold:
+ mes "[Caul]";
+ mes "\"Good question. There aren't any golden scorpions nearby. Perhaps you can find a trader or an adventurer who have travelled further south and ask them to help?\"";
+ next;
+ goto L_monster_oil_main_menu;
+
+L_monster_oil_start_brew:
+ set @main_menu, 0;
+ if (countitem (@PEARL) < 1) goto L_monster_oil_missing;
+ if (countitem (@SNAKE_SKIN) < 2) goto L_monster_oil_missing;
+ if (countitem (@BLACK_STINGER) < 3) goto L_monster_oil_missing;
+ if (countitem (@ASH_PILE) < 2) goto L_monster_oil_missing;
+ if (countitem (@GOLDEN_STINGER) < 1) goto L_monster_oil_missing_gold;
+
+ delitem @PEARL, 1;
+ delitem @SNAKE_SKIN, 2;
+ delitem @BLACK_STINGER, 3;
+ delitem @ASH_PILE, 2;
+
+ set @bubble_mode, 0;
+ setarray @bubble_modes$,
+ "The brew is calm.",
+ "The brew is bubbling.",
+ "The brew is bubbling violently.";
+
+ set @color, 1 << (rand(3));
+ setarray @colors$,
+ "white",
+ "red",
+ "yellow",
+ "orange",
+ "blue",
+ "purple",
+ "green",
+ "gray";
+
+ set @intensity, 1;
+ setarray @intensities$,
+ "light",
+ "medium",
+ "dark";
+
+ set @auto_mode, 0; // Start by adding a colour or going lighter
+
+ goto L_monster_oil_loop;
+
+L_monster_oil_missing:
+ mes "[Caul]";
+ mes "\"You don't seem to have all of the ingredients. You need one pearl, two snake skins, three black stingers, two piles of ash, and one golden stinger.\"";
+ next;
+ close;
+
+L_monster_oil_missing_gold:
+ mes "[Caul]";
+ mes "\"You seem to have everything except for the golden stinger. I understand that this one is hard to get, but I'm sure that you can find one somewhere.\"";
+ next;
+ close;
+
+L_monster_oil_loop:
+ mes "[Brewing monster oil]";
+ mes @bubble_modes$[@bubble_mode];
+ mes "It is currently a " + @intensities$[@intensity] + " " + @colors$[@color] + ".";
+ next;
+
+ menu
+ "Add alizarin leaf", L_monster_oil_alizarin,
+ "Add gamboge leaf", L_monster_oil_gamboge,
+ "Add cobalt leaf", L_monster_oil_cobalt,
+ "Add mauve leaf", L_monster_oil_mauve,
+ "Ask Caul for advice", L_monster_oil_explain,
+ "Duck!", -;
+
+ mes "[Brewing monster oil]";
+ mes "You throw yourself onto the ground. Seconds later, the cauldron shakes, and your entire mixture explodes upwards.";
+ mes "Caul crawls out from underneath a char.";
+ next;
+ mes "[Caul]";
+ mes "\"I'm glad to see that you chose to brew another day... perhaps it might be best if you give up on this dangerous concoction, though!\"";
+ next;
+ close;
+
+L_monster_oil_out_of_leaves:
+ mes "[Brewing monster oil]";
+ mes "You don't have any of these leaves left!";
+ next;
+ goto L_monster_oil_loop;
+
+L_monster_oil_alizarin:
+ set @use_leaf, @ALIZARIN;
+ set @use_color, 1;
+ goto L_monster_oil_leaf_color;
+
+L_monster_oil_gamboge:
+ set @use_leaf, @GAMBOGE;
+ set @use_color, 2;
+ goto L_monster_oil_leaf_color;
+
+L_monster_oil_cobalt:
+ set @use_leaf, @COBALT;
+ set @use_color, 4;
+ goto L_monster_oil_leaf_color;
+
+L_monster_oil_leaf_color:
+ if (countitem (@use_leaf) < 1) goto L_monster_oil_out_of_leaves;
+
+ callsub S_monster_oil_random_move;
+ if (@color & @use_color) goto L_monster_oil_pc_bad;
+ set @color, @color | @use_color;
+ delitem @use_leaf, 1;
+
+ mes "The brew changes its hue as your leaf dissolves.";
+ next;
+ goto L_monster_oil_loop;
+
+L_monster_oil_mauve:
+ if (countitem(@MAUVE) < 1) goto L_monster_oil_out_of_leaves;
+ delitem @MAUVE, 1;
+
+ callsub S_monster_oil_random_move;
+ if (@intensity == 2 && @color == 7) goto L_monster_oil_done;
+ if (@intensity == 2) goto L_monster_oil_pc_bad;
+
+ set @intensity, @intensity + 1;
+ mes "The brew darkens as your mauve leaf dissolves.";
+ next;
+ goto L_monster_oil_loop;
+
+S_monster_oil_random_move:
+ mes "[Brewing monster oil]";
+ mes "You throw in a leaf and stir.";
+
+ if (@auto_mode == 1)
+ goto L_monster_oil_random_1;
+
+L_monster_oil_random_0: // mode 0: add colour or lighten up
+ set @auto_mode, 1;
+ if (rand(3) == 0)
+ goto L_monster_oil_random_0_lighten;
+
+ set @choice, 1 << (rand(3));
+ if (@color & @choice)
+ goto L_monster_oil_auto_bad;
+ set @color, @color | @choice;
+
+ mes "Before your leaf has a chance to dissolve, the brew changes to a " + @colors$[@color] + " hue.";
+ return;
+
+L_monster_oil_random_0_lighten:
+ if (@intensity == 0)
+ goto L_monster_oil_auto_bad;
+ set @intensity, @intensity - 1;
+ mes "Before your leaf has a chance to dissolve, the brew takes on a lighter shade of " + @colors$[@color] + ".";
+ return;
+
+L_monster_oil_random_1: // mode 1: remove colour
+ set @auto_mode, 0;
+ set @choice, 1 << (rand(3));
+ if (!(@color & @choice))
+ goto L_monster_oil_auto_bad;
+ set @color, @color & (~@choice);
+ mes "Before your leaf has a chance to dissolve, the brew changes to a " + @colors$[@color] + " hue.";
+ return;
+
+L_monster_oil_pc_bad:
+ if (rand(readparam(bInt) + 100) > 60) goto L_monster_oil_pc_bad_ok;
+ if (@bubble_mode)
+ mes "As your leaf dissolves, the intensity of the bubbling increases.";
+ if (!@bubble_mode)
+ mes "As your leaf dissolves, the brew begins to bubble.";
+ next;
+ set @bubble_mode, @bubble_mode + 1;
+ if (@bubble_mode > 2)
+ goto L_monster_oil_explode;
+ goto L_monster_oil_loop;
+
+L_monster_oil_pc_bad_ok:
+ mes "Your leaf dissolves but seems to have no effect.";
+ next;
+ goto L_monster_oil_loop;
+
+L_monster_oil_auto_bad:
+ if (rand(3) == 0)
+ return;
+ if (rand(readparam(bInt) + 100) > 70)
+ return;
+ mes "The brew begins to bubble more violently.";
+ set @bubble_mode, @bubble_mode + 1;
+ if (@bubble_mode > 2)
+ next;
+ if (@bubble_mode > 2)
+ goto L_monster_oil_explode;
+ return;
+
+L_monster_oil_explode:
+ mes "[Exploding monster oil]";
+ mes "Your brew explodes!";
+ if (rand(readparam(bAgi)) > 40)
+ goto L_monster_oil_explode_dodge;
+ mes "The burst of boiling monster brew hits you.";
+ next;
+ itemheal (15 * rand(readparam(bVit))) - 1500, 0;
+ close;
+
+L_monster_oil_explode_dodge:
+ mes "You throw yourself to the ground at the very last moment, barely avoiding the burst of boiling monster brew.";
+ next;
+ mes "[Caul]";
+ mes "Caul nods at you from underneath a chair.";
+ mes "\"I told you, it's dangerous!!\"";
+ next;
+ close;
+
+L_monster_oil_done:
+ mes "As you throw in another mauve leaf, the brew takes on a deep black color and calms down.";
+ next;
+
+ mes "[Brewing monster oil]";
+ mes "As instructed, you toss in your golden scorpion stinger.";
+
+ if (countitem (@GOLDEN_STINGER) < 1) goto L_monster_oil_no_gold_end;
+
+ mes "The brew bubbles once more, then calms completely.";
+
+ delitem @GOLDEN_STINGER, 1;
+ getitem @MONSTER_OIL, 1;
+
+ if (!(@Q_status & @SETZER_FLAG_MADE_OIL))
+ getexp @MONSTER_OIL_XP, 0;
+ if (!(@Q_status & @SETZER_FLAG_MADE_OIL))
+ mes "[" + @MONSTER_OIL_XP + " experience points]";
+
+ set @Q_status, @Q_status | @SETZER_FLAG_MADE_OIL;
+ callsub S_Update_Var;
+ next;
+
+ mes "[Caul]";
+ mes "Caul gets up from underneath the cover he was taking and looks at your brew. He is visibly impressed.";
+ mes "\"Well done! This should be just enough for one potion of monster oil. Let me get you a bottle.\"";
+ mes "He hands you the monster oil.";
+ next;
+ close;
+
+L_monster_oil_no_gold_end:
+ mes "But where is your golden stinger? Didn't you have one earlier?";
+ mes "Frustrated, you give up.";
+ next;
+ close;
+
+L_close:
+ close;
+
+S_Update_Var:
+ set QUEST_Forestbow_state,
+ (QUEST_Forestbow_state & ~(@Q_MASK)
+ | (@Q_status << @Q_SHIFT));
+ return;
+
+L_NohMask:
+ mes "[Caul]";
+ mes "\"I'm sorry, but I didn't. I'm staying in town. Try asking one of the miners.\"";
+ close;
+}
+
+
diff --git a/npc/new_38-1-woodland-mine/passages.txt b/npc/new_38-1-woodland-mine/passages.txt
index f406f47c..8ab42aa4 100644
--- a/npc/new_38-1-woodland-mine/passages.txt
+++ b/npc/new_38-1-woodland-mine/passages.txt
@@ -1,12 +1,12 @@
-// Outside
-new_38-1.gat,50,28 warp outside -1,-1,new_37-1.gat,65,74
-new_38-1.gat,41,21 warp outside -1,-1,new_37-1.gat,64,69
-
-// Basement
-new_38-1.gat,20,24 warp 1b -1,-1,new_38-1.gat,112,27
-new_38-1.gat,112,26 warp 1f -1,-1,new_38-1.gat,20,23
-
-// Second floor
-new_38-1.gat,21,28 warp 2f 0,-1,new_38-1.gat,79,25
-new_38-1.gat,79,26 warp 1f 0,-1,new_38-1.gat,21,29
+// Outside
+new_38-1.gat,50,28 warp outside -1,-1,new_37-1.gat,65,74
+new_38-1.gat,41,21 warp outside -1,-1,new_37-1.gat,64,69
+
+// Basement
+new_38-1.gat,20,24 warp 1b -1,-1,new_38-1.gat,112,27
+new_38-1.gat,112,26 warp 1f -1,-1,new_38-1.gat,20,23
+
+// Second floor
+new_38-1.gat,21,28 warp 2f 0,-1,new_38-1.gat,79,25
+new_38-1.gat,79,26 warp 1f 0,-1,new_38-1.gat,21,29
\ No newline at end of file
diff --git a/npc/xmas2007/after-xmas.txt b/npc/xmas2007/after-xmas.txt
index d849635c..0d39f858 100644
--- a/npc/xmas2007/after-xmas.txt
+++ b/npc/xmas2007/after-xmas.txt
@@ -1,140 +1,140 @@
-new_11-1.gat,78,85,0 script Santa 105,{
- if (QUEST_xmas07_state == 2) goto L_State2;
- mes "[Santa Clause]";
- mes "Ho! Ho! Ho!";
- mes "You people from The Mana World";
- mes "were very nice to me. So many";
- mes "milk and cookies for me...";
- next;
-
- if (QUEST_xmas07_milk + QUEST_xmas07_cookies == 0) goto L_Nothing;
- if (QUEST_xmas07_milk + QUEST_xmas07_cookies < 10) goto L_Notenough;
-
- set @leastItems, $QUEST_xmas07_milk;
- if ($QUEST_xmas07_milk > $QUEST_xmas07_cookies) set @leastItems, $QUEST_xmas07_cookies;
- if (@leastItems >= 100) set @presents, 1;
- if (@leastItems >= 200) set @presents, 2;
- if (@leastItems >= 400) set @presents, 3;
- if (@leastItems >= 800) set @presents, 4;
- if (@leastItems >= 1600) set @presents, 5;
- if (@leastItems >= 3200) set @presents, 6;
- if (@leastItems >= 6400) set @presents, 7;
- if (@leastItems >= 12800) set @presents, 8;
- if (@leastItems >= 25600) set @presents, 9;
- if (@leastItems >= 51200) set @presents, 10;
- if (@leastItems >= 102400) set @presents, 11;
- if (@leastItems >= 204800) set @presents, 12;
- if (@leastItems >= 409600) set @presents, 13;
- if (@leastItems >= 819200) set @presents, 14;
-
-
- mes "[Santa Clause]";
- mes "Now you deserve your presents. I got";
- mes @presents + " presents for you. Do you";
- mes "want them now?";
- next;
- menu "Yes! Presents! Presents! Presents!", -, "No, maybe later.", L_Close;
-
-
- L_Givepresent:
- if (@presents == QUEST_xmas07_presents) goto L_Enoughpresents;
-
- mes "[Santa Clause]";
- mes "Let's see what I got for you in my sack....";
- next;
-
- set QUEST_xmas07_presents, QUEST_xmas07_presents + 1;
- set @TEMP,rand(7);
- if(@TEMP == 0) goto L_present_0;
- if(@TEMP == 1) goto L_present_1;
- if(@TEMP == 2) goto L_present_2;
- if(@TEMP == 3) goto L_present_3;
- if(@TEMP == 4) goto L_present_4;
- if(@TEMP == 5) goto L_present_5;
- if(@TEMP == 6) goto L_present_6;
-
-
- L_Enoughpresents:
- mes "[Santa Clause]";
- mes "That's all I got for you.";
- mes "Merry Christmas!";
- set QUEST_xmas07_state, 2;
- close;
-
- L_present_0:
- mes "[Santa Clause]";
- mes "Here you got a new funky hat!";
- getitem 628, 1;
- next;
- goto L_Givepresent;
-
- L_present_1:
- mes "[Santa Clause]";
- mes "Here you got a pompouse top hat!";
- getitem 627, 1;
- next;
- goto L_Givepresent;
-
- L_present_2:
- mes "[Santa Clause]";
- mes "Here you got a funny elven hat!";
- getitem 633, 1;
- next;
- goto L_Givepresent;
-
- L_present_3:
- mes "[Santa Clause]";
- mes "Here you got a creepy face mask!";
- getitem 634, 1;
- next;
- goto L_Givepresent;
-
- L_present_4:
- mes "[Santa Clause]";
- mes "Here you got a stylish mushroom hat!";
- getitem 629, 1;
- next;
- goto L_Givepresent;
-
- L_present_5:
- mes "[Santa Clause]";
- mes "Here you got an evil mushroom hat!";
- getitem 630, 1;
- next;
- goto L_Givepresent;
-
- L_present_6:
- mes "[Santa Clause]";
- mes "Here you got a beautiful skirt!";
- getitem 632, 1;
- next;
- goto L_Givepresent;
-
- L_State2:
- mes "[Santa Clause]";
- mes "Ho! Ho! Ho!";
- mes "I hope you like your presents.";
- mes "See you next year.";
- close;
-
- L_Notenough:
- mes "[Santa Clause]";
- mes "But you did nothing to help. You";
- mes "only donated " + (QUEST_xmas07_milk + QUEST_xmas07_cookies) + " items and now you";
- mes "want a present while others did";
- mes "all the work? get lost!";
- close;
-
- L_Nothing:
- mes "[Santa Clause]";
- mes "But you did nothing to help. You";
- mes "did not donate one item while";
- mes "others did all the work.";
- mes "Get lost!";
- close;
-
- L_Close:
- close;
-
-
+new_11-1.gat,78,85,0 script Santa 105,{
+ if (QUEST_xmas07_state == 2) goto L_State2;
+ mes "[Santa Clause]";
+ mes "Ho! Ho! Ho!";
+ mes "You people from The Mana World";
+ mes "were very nice to me. So many";
+ mes "milk and cookies for me...";
+ next;
+
+ if (QUEST_xmas07_milk + QUEST_xmas07_cookies == 0) goto L_Nothing;
+ if (QUEST_xmas07_milk + QUEST_xmas07_cookies < 10) goto L_Notenough;
+
+ set @leastItems, $QUEST_xmas07_milk;
+ if ($QUEST_xmas07_milk > $QUEST_xmas07_cookies) set @leastItems, $QUEST_xmas07_cookies;
+ if (@leastItems >= 100) set @presents, 1;
+ if (@leastItems >= 200) set @presents, 2;
+ if (@leastItems >= 400) set @presents, 3;
+ if (@leastItems >= 800) set @presents, 4;
+ if (@leastItems >= 1600) set @presents, 5;
+ if (@leastItems >= 3200) set @presents, 6;
+ if (@leastItems >= 6400) set @presents, 7;
+ if (@leastItems >= 12800) set @presents, 8;
+ if (@leastItems >= 25600) set @presents, 9;
+ if (@leastItems >= 51200) set @presents, 10;
+ if (@leastItems >= 102400) set @presents, 11;
+ if (@leastItems >= 204800) set @presents, 12;
+ if (@leastItems >= 409600) set @presents, 13;
+ if (@leastItems >= 819200) set @presents, 14;
+
+
+ mes "[Santa Clause]";
+ mes "Now you deserve your presents. I got";
+ mes @presents + " presents for you. Do you";
+ mes "want them now?";
+ next;
+ menu "Yes! Presents! Presents! Presents!", -, "No, maybe later.", L_Close;
+
+
+ L_Givepresent:
+ if (@presents == QUEST_xmas07_presents) goto L_Enoughpresents;
+
+ mes "[Santa Clause]";
+ mes "Let's see what I got for you in my sack....";
+ next;
+
+ set QUEST_xmas07_presents, QUEST_xmas07_presents + 1;
+ set @TEMP,rand(7);
+ if(@TEMP == 0) goto L_present_0;
+ if(@TEMP == 1) goto L_present_1;
+ if(@TEMP == 2) goto L_present_2;
+ if(@TEMP == 3) goto L_present_3;
+ if(@TEMP == 4) goto L_present_4;
+ if(@TEMP == 5) goto L_present_5;
+ if(@TEMP == 6) goto L_present_6;
+
+
+ L_Enoughpresents:
+ mes "[Santa Clause]";
+ mes "That's all I got for you.";
+ mes "Merry Christmas!";
+ set QUEST_xmas07_state, 2;
+ close;
+
+ L_present_0:
+ mes "[Santa Clause]";
+ mes "Here you got a new funky hat!";
+ getitem 628, 1;
+ next;
+ goto L_Givepresent;
+
+ L_present_1:
+ mes "[Santa Clause]";
+ mes "Here you got a pompouse top hat!";
+ getitem 627, 1;
+ next;
+ goto L_Givepresent;
+
+ L_present_2:
+ mes "[Santa Clause]";
+ mes "Here you got a funny elven hat!";
+ getitem 633, 1;
+ next;
+ goto L_Givepresent;
+
+ L_present_3:
+ mes "[Santa Clause]";
+ mes "Here you got a creepy face mask!";
+ getitem 634, 1;
+ next;
+ goto L_Givepresent;
+
+ L_present_4:
+ mes "[Santa Clause]";
+ mes "Here you got a stylish mushroom hat!";
+ getitem 629, 1;
+ next;
+ goto L_Givepresent;
+
+ L_present_5:
+ mes "[Santa Clause]";
+ mes "Here you got an evil mushroom hat!";
+ getitem 630, 1;
+ next;
+ goto L_Givepresent;
+
+ L_present_6:
+ mes "[Santa Clause]";
+ mes "Here you got a beautiful skirt!";
+ getitem 632, 1;
+ next;
+ goto L_Givepresent;
+
+ L_State2:
+ mes "[Santa Clause]";
+ mes "Ho! Ho! Ho!";
+ mes "I hope you like your presents.";
+ mes "See you next year.";
+ close;
+
+ L_Notenough:
+ mes "[Santa Clause]";
+ mes "But you did nothing to help. You";
+ mes "only donated " + (QUEST_xmas07_milk + QUEST_xmas07_cookies) + " items and now you";
+ mes "want a present while others did";
+ mes "all the work? get lost!";
+ close;
+
+ L_Nothing:
+ mes "[Santa Clause]";
+ mes "But you did nothing to help. You";
+ mes "did not donate one item while";
+ mes "others did all the work.";
+ mes "Get lost!";
+ close;
+
+ L_Close:
+ close;
+
+
} \ No newline at end of file
diff --git a/npc/xmas2007/pre-xmas.txt b/npc/xmas2007/pre-xmas.txt
index 86a92251..8516f7e7 100644
--- a/npc/xmas2007/pre-xmas.txt
+++ b/npc/xmas2007/pre-xmas.txt
@@ -1,224 +1,224 @@
-new_11-1.gat,76,85,0 script Assistant 105,{
- if (QUEST_xmas07_state == 1) goto L_State1;
-
- mes "[Santas Assistant]";
- mes "I got really bad news.";
- mes "Santa Clause won't come to";
- mes "The Mana World this year.";
- next;
- menu "Who cares? I don't want any presents.", L_Close, "Why not?", -;
- mes "[Santas Assistant]";
- mes "Well, he is in some kind of";
- mes "depression. He says people";
- mes "love him only for his presents";
- mes "and don't really care about";
- mes "him as a person.";
- next;
- menu "Well, not my problem.", L_Close, "Can't we do something for him?", -;
- mes "[Santas Assistant]";
- mes "Well, he really loves milk";
- mes "and cookies. When we would";
- mes "collect a really large pile";
- mes "of milk and cookies he will";
- mes "maybe come and pay us a visit.";
- next;
- menu "Sorry, I got no time for that.", L_Close, "Great idea! Let's begin.", -;
- set QUEST_xmas07_state, 1;
-
- L_State1:
- menu "I got some milk.", L_Exchange_Milk, "I got some cookies.", L_Exchange_Cookies, "How is the collecting going?", L_Status, "Where can I find milk and cookies?", L_Help;
-
- L_Exchange_Milk:
- if (countitem(527) == 0) goto L_Exchange_Gotnothing;
- mes "[Santas Assistant]";
- mes "Aaaaah, " + countitem(527) + " milk.";
- mes "Thanks for your contribution.";
- set QUEST_xmas07_milk, QUEST_xmas07_milk + countitem(527);
- set $QUEST_xmas07_milk, $QUEST_xmas07_milk + countitem(527);
- delitem(527), countitem(527);
- close;
-
- L_Exchange_Cookies:
- if (countitem(635) == 0) goto L_Exchange_Gotnothing;
- mes "[Santas Assistant]";
- mes "Aaaaah, " + countitem(635) + " cookies.";
- mes "Thanks for your contribution.";
- set QUEST_xmas07_cookies, QUEST_xmas07_cookies + countitem(635);
- set $QUEST_xmas07_cookies, $QUEST_xmas07_cookies + countitem(635);
- delitem(635), countitem(635);
- close;
-
- L_Help:
- mes "[Santas Assistant]";
- mes "Milk is dropped by santa slimes and fluffies.";
- mes "You can find Santa slimes on the";
- mes "snow field to the south and fluffies";
- mes "at the coast south of Hurnscald.";
- next;
- mes "[Santas Assistant]";
- mes "Rudolph and Santa slimes";
- mes "always bring some cookies with them.";
- close;
-
- L_Exchange_Gotnothing:
- mes "[Santas Assistant]";
- mes "Actually, you don't seem to have any.";
- close;
-
- L_Status:
- mes "[Santas Assistant]";
- mes "OK, thus far you brought me";
- mes QUEST_xmas07_milk + " packets of milk and";
- mes QUEST_xmas07_cookies + " christmas cookies.";
- mes "All people together brought";
- mes $QUEST_xmas07_milk + " packets of milk and";
- mes $QUEST_xmas07_cookies + " christmas cookies.";
- next;
- mes "[Santas Assistant]";
- set @leastItems, $QUEST_xmas07_milk;
- if ($QUEST_xmas07_milk > $QUEST_xmas07_cookies) set @leastItems, $QUEST_xmas07_cookies;
- if (@leastItems >= 819200) goto L_Present14;
- if (@leastItems >= 409600) goto L_Present13;
- if (@leastItems >= 204800) goto L_Present12;
- if (@leastItems >= 102400) goto L_Present11;
- if (@leastItems >= 51200) goto L_Present10;
- if (@leastItems >= 25600) goto L_Present9;
- if (@leastItems >= 12800) goto L_Present8;
- if (@leastItems >= 6400) goto L_Present7;
- if (@leastItems >= 3200) goto L_Present6;
- if (@leastItems >= 1600) goto L_Present5;
- if (@leastItems >= 800) goto L_Present4;
- if (@leastItems >= 400) goto L_Present3;
- if (@leastItems >= 200) goto L_Present2;
- if (@leastItems >= 100) goto L_Present1;
- mes "I guess that won't impress santa";
- mes "much. We need at least 100 of";
- mes "both to make him come to us.";
- close;
-
- L_Present1:
- mes "This means santa will bring";
- mes "everyone a present. When we";
- mes "can collect 200 of each he";
- mes "will maybe give everyone two";
- mes "presents.";
- close;
-
- L_Present2:
- mes "This means santa will bring";
- mes "everyone two presents. When we";
- mes "can collect 400 of each he";
- mes "will maybe give everyone three";
- mes "presents.";
- close;
-
- L_Present3:
- mes "This means santa will bring";
- mes "everyone three presents. When we";
- mes "can collect 800 of each he";
- mes "will maybe give everyone four";
- mes "presents.";
- close;
-
- L_Present4:
- mes "This means santa will bring";
- mes "everyone four presents. When we";
- mes "can collect 1600 of each he";
- mes "will maybe give everyone five";
- mes "presents.";
- close;
-
- L_Present5:
- mes "This means santa will bring";
- mes "everyone five presents. When we";
- mes "can collect 3200 of each he";
- mes "will maybe give everyone six";
- mes "presents.";
- close;
-
- L_Present6:
- mes "This means santa will bring";
- mes "everyone six presents. When we";
- mes "can collect 6400 of each he";
- mes "will maybe give everyone seven";
- mes "presents.";
- close;
-
- L_Present7:
- mes "This means santa will bring";
- mes "everyone seven presents. When we";
- mes "can collect 12800 of each he";
- mes "will maybe give everyone eight";
- mes "presents.";
- close;
-
- L_Present8:
- mes "This means santa will bring";
- mes "everyone eight presents. When we";
- mes "can collect 25600 of each he";
- mes "will maybe give everyone nine";
- mes "presents.";
- close;
-
- L_Present9:
- mes "This means santa will bring";
- mes "everyone nine presents. When we";
- mes "can collect 51200 of each he";
- mes "will maybe give everyone ten";
- mes "presents.";
- close;
-
- L_Present10:
- mes "Over fiftythousand of both?";
- mes "Did you guys hire some chinese";
- mes "gold farmers?";
- mes "This means santa will bring";
- mes "everyone ten presents. When we";
- mes "can collect 102400 of each he";
- mes "will maybe give everyone eleven";
- mes "presents.";
- close;
-
- L_Present11:
- mes "What? You guys broke the";
- mes "hundredthousand item limit??";
- mes "This means santa will bring";
- mes "everyone eleven presents. When we";
- mes "can collect 204800 of each he";
- mes "will maybe give everyone twelve";
- mes "presents.";
- close;
-
- L_Present12:
- mes "Another hundredthousand of each?";
- mes "You guys really have no live!";
- mes "This means santa will bring";
- mes "everyone twelfe presents. When we";
- mes "can collect 404800 of each he";
- mes "will maybe give everyone thirteen";
- mes "presents.";
- close;
-
- L_Present13:
- mes "What the f...? Four Hundred Thousand???";
- mes "There is no way people collected";
- mes "that many stuff in just a week.";
- mes "This means santa will bring";
- mes "everyone thirteen presents. When we";
- mes "can collect 819200 of each he";
- mes "will maybe give everyone fourteen";
- mes "presents.";
- close;
-
- L_Present14:
- mes "OK, OK, you guys found a bug";
- mes "to cheat the christmas event";
- mes "this year. You will each get";
- mes "fourteen presents.";
- mes "But this is really enough.";
- mes "Are you happy now?";
- close;
-
- L_Close:
- close;
-}
+new_11-1.gat,76,85,0 script Assistant 105,{
+ if (QUEST_xmas07_state == 1) goto L_State1;
+
+ mes "[Santas Assistant]";
+ mes "I got really bad news.";
+ mes "Santa Clause won't come to";
+ mes "The Mana World this year.";
+ next;
+ menu "Who cares? I don't want any presents.", L_Close, "Why not?", -;
+ mes "[Santas Assistant]";
+ mes "Well, he is in some kind of";
+ mes "depression. He says people";
+ mes "love him only for his presents";
+ mes "and don't really care about";
+ mes "him as a person.";
+ next;
+ menu "Well, not my problem.", L_Close, "Can't we do something for him?", -;
+ mes "[Santas Assistant]";
+ mes "Well, he really loves milk";
+ mes "and cookies. When we would";
+ mes "collect a really large pile";
+ mes "of milk and cookies he will";
+ mes "maybe come and pay us a visit.";
+ next;
+ menu "Sorry, I got no time for that.", L_Close, "Great idea! Let's begin.", -;
+ set QUEST_xmas07_state, 1;
+
+ L_State1:
+ menu "I got some milk.", L_Exchange_Milk, "I got some cookies.", L_Exchange_Cookies, "How is the collecting going?", L_Status, "Where can I find milk and cookies?", L_Help;
+
+ L_Exchange_Milk:
+ if (countitem(527) == 0) goto L_Exchange_Gotnothing;
+ mes "[Santas Assistant]";
+ mes "Aaaaah, " + countitem(527) + " milk.";
+ mes "Thanks for your contribution.";
+ set QUEST_xmas07_milk, QUEST_xmas07_milk + countitem(527);
+ set $QUEST_xmas07_milk, $QUEST_xmas07_milk + countitem(527);
+ delitem(527), countitem(527);
+ close;
+
+ L_Exchange_Cookies:
+ if (countitem(635) == 0) goto L_Exchange_Gotnothing;
+ mes "[Santas Assistant]";
+ mes "Aaaaah, " + countitem(635) + " cookies.";
+ mes "Thanks for your contribution.";
+ set QUEST_xmas07_cookies, QUEST_xmas07_cookies + countitem(635);
+ set $QUEST_xmas07_cookies, $QUEST_xmas07_cookies + countitem(635);
+ delitem(635), countitem(635);
+ close;
+
+ L_Help:
+ mes "[Santas Assistant]";
+ mes "Milk is dropped by santa slimes and fluffies.";
+ mes "You can find Santa slimes on the";
+ mes "snow field to the south and fluffies";
+ mes "at the coast south of Hurnscald.";
+ next;
+ mes "[Santas Assistant]";
+ mes "Rudolph and Santa slimes";
+ mes "always bring some cookies with them.";
+ close;
+
+ L_Exchange_Gotnothing:
+ mes "[Santas Assistant]";
+ mes "Actually, you don't seem to have any.";
+ close;
+
+ L_Status:
+ mes "[Santas Assistant]";
+ mes "OK, thus far you brought me";
+ mes QUEST_xmas07_milk + " packets of milk and";
+ mes QUEST_xmas07_cookies + " christmas cookies.";
+ mes "All people together brought";
+ mes $QUEST_xmas07_milk + " packets of milk and";
+ mes $QUEST_xmas07_cookies + " christmas cookies.";
+ next;
+ mes "[Santas Assistant]";
+ set @leastItems, $QUEST_xmas07_milk;
+ if ($QUEST_xmas07_milk > $QUEST_xmas07_cookies) set @leastItems, $QUEST_xmas07_cookies;
+ if (@leastItems >= 819200) goto L_Present14;
+ if (@leastItems >= 409600) goto L_Present13;
+ if (@leastItems >= 204800) goto L_Present12;
+ if (@leastItems >= 102400) goto L_Present11;
+ if (@leastItems >= 51200) goto L_Present10;
+ if (@leastItems >= 25600) goto L_Present9;
+ if (@leastItems >= 12800) goto L_Present8;
+ if (@leastItems >= 6400) goto L_Present7;
+ if (@leastItems >= 3200) goto L_Present6;
+ if (@leastItems >= 1600) goto L_Present5;
+ if (@leastItems >= 800) goto L_Present4;
+ if (@leastItems >= 400) goto L_Present3;
+ if (@leastItems >= 200) goto L_Present2;
+ if (@leastItems >= 100) goto L_Present1;
+ mes "I guess that won't impress santa";
+ mes "much. We need at least 100 of";
+ mes "both to make him come to us.";
+ close;
+
+ L_Present1:
+ mes "This means santa will bring";
+ mes "everyone a present. When we";
+ mes "can collect 200 of each he";
+ mes "will maybe give everyone two";
+ mes "presents.";
+ close;
+
+ L_Present2:
+ mes "This means santa will bring";
+ mes "everyone two presents. When we";
+ mes "can collect 400 of each he";
+ mes "will maybe give everyone three";
+ mes "presents.";
+ close;
+
+ L_Present3:
+ mes "This means santa will bring";
+ mes "everyone three presents. When we";
+ mes "can collect 800 of each he";
+ mes "will maybe give everyone four";
+ mes "presents.";
+ close;
+
+ L_Present4:
+ mes "This means santa will bring";
+ mes "everyone four presents. When we";
+ mes "can collect 1600 of each he";
+ mes "will maybe give everyone five";
+ mes "presents.";
+ close;
+
+ L_Present5:
+ mes "This means santa will bring";
+ mes "everyone five presents. When we";
+ mes "can collect 3200 of each he";
+ mes "will maybe give everyone six";
+ mes "presents.";
+ close;
+
+ L_Present6:
+ mes "This means santa will bring";
+ mes "everyone six presents. When we";
+ mes "can collect 6400 of each he";
+ mes "will maybe give everyone seven";
+ mes "presents.";
+ close;
+
+ L_Present7:
+ mes "This means santa will bring";
+ mes "everyone seven presents. When we";
+ mes "can collect 12800 of each he";
+ mes "will maybe give everyone eight";
+ mes "presents.";
+ close;
+
+ L_Present8:
+ mes "This means santa will bring";
+ mes "everyone eight presents. When we";
+ mes "can collect 25600 of each he";
+ mes "will maybe give everyone nine";
+ mes "presents.";
+ close;
+
+ L_Present9:
+ mes "This means santa will bring";
+ mes "everyone nine presents. When we";
+ mes "can collect 51200 of each he";
+ mes "will maybe give everyone ten";
+ mes "presents.";
+ close;
+
+ L_Present10:
+ mes "Over fiftythousand of both?";
+ mes "Did you guys hire some chinese";
+ mes "gold farmers?";
+ mes "This means santa will bring";
+ mes "everyone ten presents. When we";
+ mes "can collect 102400 of each he";
+ mes "will maybe give everyone eleven";
+ mes "presents.";
+ close;
+
+ L_Present11:
+ mes "What? You guys broke the";
+ mes "hundredthousand item limit??";
+ mes "This means santa will bring";
+ mes "everyone eleven presents. When we";
+ mes "can collect 204800 of each he";
+ mes "will maybe give everyone twelve";
+ mes "presents.";
+ close;
+
+ L_Present12:
+ mes "Another hundredthousand of each?";
+ mes "You guys really have no live!";
+ mes "This means santa will bring";
+ mes "everyone twelfe presents. When we";
+ mes "can collect 404800 of each he";
+ mes "will maybe give everyone thirteen";
+ mes "presents.";
+ close;
+
+ L_Present13:
+ mes "What the f...? Four Hundred Thousand???";
+ mes "There is no way people collected";
+ mes "that many stuff in just a week.";
+ mes "This means santa will bring";
+ mes "everyone thirteen presents. When we";
+ mes "can collect 819200 of each he";
+ mes "will maybe give everyone fourteen";
+ mes "presents.";
+ close;
+
+ L_Present14:
+ mes "OK, OK, you guys found a bug";
+ mes "to cheat the christmas event";
+ mes "this year. You will each get";
+ mes "fourteen presents.";
+ mes "But this is really enough.";
+ mes "Are you happy now?";
+ close;
+
+ L_Close:
+ close;
+}
diff --git a/tools/Purger.java b/tools/Purger.java
index 3a4a9a7b..1bb6a1bd 100644
--- a/tools/Purger.java
+++ b/tools/Purger.java
@@ -1,180 +1,180 @@
-/*
- * Purger (c) 2006 Eugenio Favalli
- * License: GPL, v2 or later
- */
-
-import java.io.*;
-import java.text.*;
-import java.util.*;
-
- public class Purger {
-
- public static void main(String[] args) {
- if (args.length != 2) {
- System.out.println(
- "Usage: java Purger <folder> <date>\n" +
- " - folder: is the path to account.txt and athena.txt files.\n" +
- " - date: accounts created before this date will be purged (dd/mm/yy or yyyy-mm-dd).");
- return;
- }
-
- int accounts = 0;
- int characters = 0;
- int deletedCharacters = 0;
- Vector activeAccounts = new Vector();
-
- File folder = new File(args[0]);
- // Do some sanity checking
- if (!folder.exists()) {
- System.out.println("Folder does not exist!");
- return;
- }
- if (!folder.isDirectory()) {
- System.out.println("Folder is not a folder!");
- return;
- }
-
- File oldAccount = new File(folder, "account.txt");
- File oldAthena = new File(folder, "athena.txt");
- File newAccount = new File(folder, "account.txt.new");
- File newAthena = new File(folder, "athena.txt.new");
-
- DateFormat dateFormat;
- Date purgeDate = null;
-
- for (String format : new String[] {"dd/MM/yy", "yyyy-MM-dd"}) {
- dateFormat = new SimpleDateFormat(format);
-
- try {
- purgeDate = dateFormat.parse(args[1]);
- break;
- } catch (ParseException e) {}
- }
-
- if (purgeDate == null) {
- System.out.println("ERROR: Date format not recognized.");
- return;
- }
-
- String line;
-
- // Remove accounts
- try {
- FileInputStream fin = new FileInputStream(oldAccount);
- BufferedReader input = new BufferedReader(
- new InputStreamReader(fin));
- FileOutputStream fout = new FileOutputStream(newAccount);
- PrintStream output = new PrintStream(fout);
-
- while ((line = input.readLine()) != null) {
- boolean copy = false;
- String[] fields = line.split("\t");
- // Check if we're reading a comment or the last line
- if (line.substring(0, 2).equals("//") || fields[1].charAt(0) == '%') {
- copy = true;
- }
- else {
- // Server accounts should not be purged
- if (!fields[4].equals("S")) {
- accounts++;
- dateFormat = new SimpleDateFormat("yyyy-MM-dd");
- try {
- Date date = dateFormat.parse(fields[3]);
- if (date.after(purgeDate)) {
- activeAccounts.add(fields[0]);
- copy = true;
- }
- }
- catch (ParseException e) {
- System.out.println(
- "ERROR: Wrong date format in account.txt. ("
- + accounts + ": " + line + ")");
- //return;
- }
- catch (Exception e) {
- e.printStackTrace();
- return;
- }
- }
- else {
- copy = true;
- }
- }
- if (copy) {
- try {
- output.println(line);
- }
- catch (Exception e) {
- System.err.println("ERROR: Unable to write file.");
- }
- }
- }
- input.close();
- output.close();
- }
- catch (FileNotFoundException e ) {
- System.out.println(
- "ERROR: file " + oldAccount.getAbsolutePath() + " not found.");
- return;
- }
- catch (Exception e) {
- System.out.println("ERROR: unable to process account.txt");
- e.printStackTrace();
- return;
- }
-
- System.out.println(
- "Removed " + (accounts - activeAccounts.size()) + "/" +
- accounts + " accounts.");
-
- // Remove characters
- try {
- FileInputStream fin = new FileInputStream(oldAthena);
- BufferedReader input = new BufferedReader(
- new InputStreamReader(fin));
- FileOutputStream fout = new FileOutputStream(newAthena);
- PrintStream output = new PrintStream(fout);
-
- while ((line = input.readLine()) != null) {
- boolean copy = false;
- String[] fields = line.split("\t");
- // Check if we're reading a comment or the last line
- if (line.substring(0, 2).equals("//")
- || fields[1].charAt(0) == '%') {
- copy = true;
- }
- else {
- characters++;
- String id = fields[1].substring(0, fields[1].indexOf(','));
- if (activeAccounts.contains(id)) {
- copy = true;
- }
- else {
- deletedCharacters++;
- }
- }
- if (copy) {
- output.println(line);
- }
- }
- input.close();
- output.close();
- }
- catch (FileNotFoundException e ) {
- System.out.println(
- "ERROR: file " + oldAthena.getAbsolutePath() + " not found.");
- return;
- }
- catch (Exception e) {
- System.out.println("ERROR: unable to process athena.txt");
- e.printStackTrace();
- return;
- }
-
- System.out.println(
- "Removed " + deletedCharacters + "/"
- + characters + " characters.");
- }
-
-}
-
+/*
+ * Purger (c) 2006 Eugenio Favalli
+ * License: GPL, v2 or later
+ */
+
+import java.io.*;
+import java.text.*;
+import java.util.*;
+
+ public class Purger {
+
+ public static void main(String[] args) {
+ if (args.length != 2) {
+ System.out.println(
+ "Usage: java Purger <folder> <date>\n" +
+ " - folder: is the path to account.txt and athena.txt files.\n" +
+ " - date: accounts created before this date will be purged (dd/mm/yy or yyyy-mm-dd).");
+ return;
+ }
+
+ int accounts = 0;
+ int characters = 0;
+ int deletedCharacters = 0;
+ Vector activeAccounts = new Vector();
+
+ File folder = new File(args[0]);
+ // Do some sanity checking
+ if (!folder.exists()) {
+ System.out.println("Folder does not exist!");
+ return;
+ }
+ if (!folder.isDirectory()) {
+ System.out.println("Folder is not a folder!");
+ return;
+ }
+
+ File oldAccount = new File(folder, "account.txt");
+ File oldAthena = new File(folder, "athena.txt");
+ File newAccount = new File(folder, "account.txt.new");
+ File newAthena = new File(folder, "athena.txt.new");
+
+ DateFormat dateFormat;
+ Date purgeDate = null;
+
+ for (String format : new String[] {"dd/MM/yy", "yyyy-MM-dd"}) {
+ dateFormat = new SimpleDateFormat(format);
+
+ try {
+ purgeDate = dateFormat.parse(args[1]);
+ break;
+ } catch (ParseException e) {}
+ }
+
+ if (purgeDate == null) {
+ System.out.println("ERROR: Date format not recognized.");
+ return;
+ }
+
+ String line;
+
+ // Remove accounts
+ try {
+ FileInputStream fin = new FileInputStream(oldAccount);
+ BufferedReader input = new BufferedReader(
+ new InputStreamReader(fin));
+ FileOutputStream fout = new FileOutputStream(newAccount);
+ PrintStream output = new PrintStream(fout);
+
+ while ((line = input.readLine()) != null) {
+ boolean copy = false;
+ String[] fields = line.split("\t");
+ // Check if we're reading a comment or the last line
+ if (line.substring(0, 2).equals("//") || fields[1].charAt(0) == '%') {
+ copy = true;
+ }
+ else {
+ // Server accounts should not be purged
+ if (!fields[4].equals("S")) {
+ accounts++;
+ dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+ try {
+ Date date = dateFormat.parse(fields[3]);
+ if (date.after(purgeDate)) {
+ activeAccounts.add(fields[0]);
+ copy = true;
+ }
+ }
+ catch (ParseException e) {
+ System.out.println(
+ "ERROR: Wrong date format in account.txt. ("
+ + accounts + ": " + line + ")");
+ //return;
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ return;
+ }
+ }
+ else {
+ copy = true;
+ }
+ }
+ if (copy) {
+ try {
+ output.println(line);
+ }
+ catch (Exception e) {
+ System.err.println("ERROR: Unable to write file.");
+ }
+ }
+ }
+ input.close();
+ output.close();
+ }
+ catch (FileNotFoundException e ) {
+ System.out.println(
+ "ERROR: file " + oldAccount.getAbsolutePath() + " not found.");
+ return;
+ }
+ catch (Exception e) {
+ System.out.println("ERROR: unable to process account.txt");
+ e.printStackTrace();
+ return;
+ }
+
+ System.out.println(
+ "Removed " + (accounts - activeAccounts.size()) + "/" +
+ accounts + " accounts.");
+
+ // Remove characters
+ try {
+ FileInputStream fin = new FileInputStream(oldAthena);
+ BufferedReader input = new BufferedReader(
+ new InputStreamReader(fin));
+ FileOutputStream fout = new FileOutputStream(newAthena);
+ PrintStream output = new PrintStream(fout);
+
+ while ((line = input.readLine()) != null) {
+ boolean copy = false;
+ String[] fields = line.split("\t");
+ // Check if we're reading a comment or the last line
+ if (line.substring(0, 2).equals("//")
+ || fields[1].charAt(0) == '%') {
+ copy = true;
+ }
+ else {
+ characters++;
+ String id = fields[1].substring(0, fields[1].indexOf(','));
+ if (activeAccounts.contains(id)) {
+ copy = true;
+ }
+ else {
+ deletedCharacters++;
+ }
+ }
+ if (copy) {
+ output.println(line);
+ }
+ }
+ input.close();
+ output.close();
+ }
+ catch (FileNotFoundException e ) {
+ System.out.println(
+ "ERROR: file " + oldAthena.getAbsolutePath() + " not found.");
+ return;
+ }
+ catch (Exception e) {
+ System.out.println("ERROR: unable to process athena.txt");
+ e.printStackTrace();
+ return;
+ }
+
+ System.out.println(
+ "Removed " + deletedCharacters + "/"
+ + characters + " characters.");
+ }
+
+}
+