summaryrefslogtreecommitdiff
path: root/world/map/npc/002-1
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/002-1')
-rw-r--r--world/map/npc/002-1/_mobs.txt2
-rw-r--r--world/map/npc/002-1/elanore.txt37
-rw-r--r--world/map/npc/002-1/lieutenant_dausen.txt3
-rw-r--r--world/map/npc/002-1/mine_debug.txt10
-rw-r--r--world/map/npc/002-1/nickos.txt3
-rw-r--r--world/map/npc/002-1/sarah.txt13
-rw-r--r--world/map/npc/002-1/soul-menhir.txt1
-rw-r--r--world/map/npc/002-1/stewen.txt3
-rw-r--r--world/map/npc/002-1/traveler.txt2
9 files changed, 34 insertions, 40 deletions
diff --git a/world/map/npc/002-1/_mobs.txt b/world/map/npc/002-1/_mobs.txt
index 96070290..19933fab 100644
--- a/world/map/npc/002-1/_mobs.txt
+++ b/world/map/npc/002-1/_mobs.txt
@@ -16,7 +16,7 @@
002-1,73,105,20,21|monster|FireGoblin|1011,6,100000ms,30000ms,Mob002-1::On1011
-002-1,0,0,0|script|Mob002-1|-1
+002-1,0,0,0|script|Mob002-1|32767
{
end;
diff --git a/world/map/npc/002-1/elanore.txt b/world/map/npc/002-1/elanore.txt
index be14c8bc..ea3b78bf 100644
--- a/world/map/npc/002-1/elanore.txt
+++ b/world/map/npc/002-1/elanore.txt
@@ -17,6 +17,27 @@ function|script|ElanoreFix
return;
}
+function|script|elanore_decrease_exp
+{
+ if (attachrid(@killerrid) == 0)
+ goto L_Return;
+ set @Q_heal_exp, MAGIC_EXPERIENCE >> 24;
+ if (@Q_heal_exp < 8) goto L_OnPcKillWipe;
+ set @Q_heal_exp, @Q_heal_exp - 8;
+ goto L_OnPcKillFinish;
+
+L_OnPcKillWipe:
+ set @Q_heal_exp, 0;
+ goto L_OnPcKillFinish;
+
+L_OnPcKillFinish:
+ set MAGIC_EXPERIENCE, (MAGIC_EXPERIENCE & ~(255 << 24)) | (@Q_heal_exp << 24);
+ goto L_Return;
+
+L_Return:
+ return;
+}
+
002-1,75,62,0|script|Elanore#_M|108
{
set @has_magic, getskilllv(SKILL_MAGIC);
@@ -155,22 +176,6 @@ L_Main:
"Goodbye!", L_bye;
goto L_Close;
-OnPCKillEvent:
- if (attachrid(@killerrid) == 0)
- end;
- set @Q_heal_exp, MAGIC_EXPERIENCE >> 24;
- if (@Q_heal_exp < 8) goto L_OnPcKillWipe;
- set @Q_heal_exp, @Q_heal_exp - 8;
- goto L_OnPcKillFinish;
-
-L_OnPcKillWipe:
- set @Q_heal_exp, 0;
- goto L_OnPcKillFinish;
-
-L_OnPcKillFinish:
- set MAGIC_EXPERIENCE, (MAGIC_EXPERIENCE & ~(255 << 24)) | (@Q_heal_exp << 24);
- goto L_Close;
-
L_Lifestones:
mes "[Elanore the Healer]";
mes "\"I always need components for my own healing spells. If you bring me ten gamboge leaves, ten alizarin leaves, ten mauve leaves and ten cobalt leaves, I can make ten lifestones; I will give you half of them.\"";
diff --git a/world/map/npc/002-1/lieutenant_dausen.txt b/world/map/npc/002-1/lieutenant_dausen.txt
index 38ac6b08..2751d49a 100644
--- a/world/map/npc/002-1/lieutenant_dausen.txt
+++ b/world/map/npc/002-1/lieutenant_dausen.txt
@@ -3,9 +3,6 @@
002-1,63,67,0|script|Lieutenant Dausen|122
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (@state == 21) goto L_LD_Key;
diff --git a/world/map/npc/002-1/mine_debug.txt b/world/map/npc/002-1/mine_debug.txt
index 0fdcb9b3..eb01dc81 100644
--- a/world/map/npc/002-1/mine_debug.txt
+++ b/world/map/npc/002-1/mine_debug.txt
@@ -33,7 +33,7 @@ L_Show:
L_Close:
set @state, 0;
- close;
+ return;
S_Update_Var:
set QUEST_SouthTulimshar, (QUEST_SouthTulimshar & ~(BYTE_2_MASK) | (@state << BYTE_2_SHIFT));
@@ -42,7 +42,7 @@ S_Update_Var:
002-1,61,69,0|script|Mine Debug#1|122
{
callfunc "DesertMineDebug";
- end;
+ close;
OnInit:
if (!debug)
@@ -52,7 +52,7 @@ OnInit:
002-3,45,49,6|script|Mine Debug#2|109
{
callfunc "DesertMineDebug";
- end;
+ close;
OnInit:
if (!debug)
@@ -62,7 +62,7 @@ OnInit:
002-4,88,99,6|script|Mine Debug#3|109
{
callfunc "DesertMineDebug";
- end;
+ close;
OnInit:
if (!debug)
@@ -72,7 +72,7 @@ OnInit:
002-5,43,96,6|script|Mine Debug#4|340
{
callfunc "DesertMineDebug";
- end;
+ close;
OnInit:
if (!debug)
diff --git a/world/map/npc/002-1/nickos.txt b/world/map/npc/002-1/nickos.txt
index 91abe6db..99f17b5c 100644
--- a/world/map/npc/002-1/nickos.txt
+++ b/world/map/npc/002-1/nickos.txt
@@ -3,9 +3,6 @@
002-1,46,108,0|script|Nickos|123
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (@state == 20) goto L_UGQ;
diff --git a/world/map/npc/002-1/sarah.txt b/world/map/npc/002-1/sarah.txt
index 83fc6558..3b7a7232 100644
--- a/world/map/npc/002-1/sarah.txt
+++ b/world/map/npc/002-1/sarah.txt
@@ -2,9 +2,6 @@
002-1,93,43,0|script|Sarah|106
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & NIBBLE_1_MASK) >> NIBBLE_1_SHIFT);
if (@state >= 2) goto L_Done;
@@ -51,14 +48,15 @@ L_Progress:
mes "\"Whee!\"";
next;
mes "You brought me Cherry Cake! Here is your new hat, as promised.\"";
- emotion EMOTE_TONGUE;
getinventorylist;
if ((@inventorylist_count - (countitem("CherryCake") == 1)) > 99) goto L_TooMany;
delitem "CherryCake", 1;
getitem "SerfHat", 1;
set @state, 2;
callsub S_Update_Var;
- goto L_Close;
+ close2;
+ emotion EMOTE_TONGUE, strcharinfo(0);
+ end;
L_NotEnough:
mes "[Sarah]";
@@ -68,8 +66,9 @@ L_NotEnough:
L_Done:
mes "[Sarah]";
mes "\"It was so tasty, I can't eat anything more... Thank you!\"";
- emotion EMOTE_TONGUE;
- goto L_Close;
+ close2;
+ emotion EMOTE_TONGUE, strcharinfo(0);
+ end;
L_Close:
set @TEMP, 0;
diff --git a/world/map/npc/002-1/soul-menhir.txt b/world/map/npc/002-1/soul-menhir.txt
index 3260e511..fa2a4508 100644
--- a/world/map/npc/002-1/soul-menhir.txt
+++ b/world/map/npc/002-1/soul-menhir.txt
@@ -2,7 +2,6 @@
002-1,58,60,0|script|Soul Menhir#tulimshar|345
{
- callfunc "ClearVariables";
set @map$, "001-1";
setarray @Xs, 57, 58, 59, 57, 59, 57, 59;
setarray @Ys, 59, 59, 59, 60, 60, 61, 61;
diff --git a/world/map/npc/002-1/stewen.txt b/world/map/npc/002-1/stewen.txt
index 4368f590..63808935 100644
--- a/world/map/npc/002-1/stewen.txt
+++ b/world/map/npc/002-1/stewen.txt
@@ -3,9 +3,6 @@
002-1,116,93,0|script|Stewen|123
{
- // This NPC previously used the variable TMW_Quest
- callfunc "ClearVarTMW_Quest";
-
set @state, ((QUEST_SouthTulimshar & BYTE_2_MASK) >> BYTE_2_SHIFT);
if (@state == 4) goto L_TMW_Quest_Received;
diff --git a/world/map/npc/002-1/traveler.txt b/world/map/npc/002-1/traveler.txt
index 0645cce2..975786ae 100644
--- a/world/map/npc/002-1/traveler.txt
+++ b/world/map/npc/002-1/traveler.txt
@@ -4,7 +4,7 @@
002-1,60,41,0|script|Nina the Traveler|103
{
- set @NpcName$, "Nina";
+ set @npcname$, "Nina";
set @NpcTravelBit, $@tulimshar_bit;
callfunc "Traveler";
end;