summaryrefslogtreecommitdiff
path: root/world/map/npc/029-2
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/029-2')
-rw-r--r--world/map/npc/029-2/barrels_config.txt18
-rw-r--r--world/map/npc/029-2/morgan.txt33
-rw-r--r--world/map/npc/029-2/sorfina.txt43
-rw-r--r--world/map/npc/029-2/tanisha.txt35
4 files changed, 40 insertions, 89 deletions
diff --git a/world/map/npc/029-2/barrels_config.txt b/world/map/npc/029-2/barrels_config.txt
index 665903fb..1b83d25b 100644
--- a/world/map/npc/029-2/barrels_config.txt
+++ b/world/map/npc/029-2/barrels_config.txt
@@ -14,18 +14,6 @@ OnInit:
set $@BarrelMax, getarraysize($@BarrelBits);
end;
}
-function|script|SetBarrelMask
-{
- set STARTAREA, (STARTAREA & ~(NIBBLE_4_MASK) | (@barrel_tmp << NIBBLE_4_SHIFT));
- set @barrel_tmp, 0;
- return;
-}
-function|script|CheckBarrelQuest
-{
- callfunc "CountBarrels";
- set @barrel_quest, ((STARTAREA & NIBBLE_4_MASK) >> NIBBLE_4_SHIFT);
- return;
-}
function|script|CountBarrels
{
set @barrel_count, 0;
@@ -55,8 +43,7 @@ function|script|CheckBarrel
callfunc "PCtoNPCRange";
if (@npc_check)
goto L_Range;
- callfunc "CheckBarrelQuest";
- if (!(@barrel_quest == 2))
+ if (!(QL_ZEGAS == 2))
goto L_NoI;
if (STARTAREA & $@BarrelBits[@barrel])
goto L_Empty;
@@ -86,8 +73,7 @@ L_Empty:
L_QuestReward:
message strcharinfo(0), "You found the bug bomb.";
misceffect 33;
- set @barrel_tmp, 3;
- callfunc "SetBarrelMask";
+ set QL_ZEGAS, 3;
killmonster getmap() + "", "Barrel#0::OnMaggotDeath";
goto L_Return;
diff --git a/world/map/npc/029-2/morgan.txt b/world/map/npc/029-2/morgan.txt
index f6679f67..605169ab 100644
--- a/world/map/npc/029-2/morgan.txt
+++ b/world/map/npc/029-2/morgan.txt
@@ -3,18 +3,6 @@
// Gains Access to Magic School
// See 024-2 clean that shit up
// Morgan, liana
-function|script|MorganState
-{
- callfunc "ClearVariables";
- set @morgan, ((STARTAREA & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
- return;
-}
-function|script|SetMorganMask
-{
- set STARTAREA, (STARTAREA & ~(NIBBLE_3_MASK) | (@morgan_tmp << NIBBLE_3_SHIFT));
- set @morgan_tmp, 0;
- return;
-}
029-2,105,57,0|script|MorganDebug|355
{
mes "[Morgan Debug]";
@@ -23,7 +11,7 @@ function|script|SetMorganMask
"Yes.", L_Reset,
"No.", L_End;
L_Reset:
- set STARTAREA, (STARTAREA & ~(NIBBLE_3_MASK) | (0 << NIBBLE_3_SHIFT));
+ set QL_MORGAN, 0;
mes "Reset!";
goto L_End;
@@ -37,6 +25,7 @@ OnInit:
}
029-2,101,57,0|script|Morgan#_M|355
{
+ callfunc "ClearVariables";
setarray @npc_loc, 101, 57, 4;
callfunc "PCtoNPCRange";
if (@npc_check)
@@ -47,21 +36,20 @@ OnInit:
goto L_NotMagic;
L_Learn:
- if (@morgan == 0)
+ if (QL_MORGAN == 0)
goto L_NotSeen;
- if (@morgan == 1)
+ if (QL_MORGAN == 1)
goto L_Seen;
- if (@morgan == 2)
+ if (QL_MORGAN == 2)
goto L_Started;
- if (@morgan == 3)
+ if (QL_MORGAN == 3)
goto L_CastOnce;
- if (@morgan == 4)
+ if (QL_MORGAN == 4)
goto L_LearningDone;
goto L_Close;
L_NotSeen:
- set @morgan_tmp, 1;
- callfunc "SetMorganMask";
+ set QL_MORGAN, 1;
mes "[Morgan]";
mes "\"Welcome to the magic school of Candor\"";
mes "\"My name is Morgan, I'm Head of Wizardry.\"";
@@ -86,8 +74,7 @@ L_NotMagic:
goto L_Close;
L_Start:
- set @morgan_tmp, 2;
- callfunc "SetMorganMask";
+ set QL_MORGAN, 2;
mes "\"Great, lets begin your first lesson.\"";
getitem 1171, 1;
mes "\"This is a wand, there are many like it but this one is now yours.\"";
@@ -115,8 +102,6 @@ L_CastOnce:
mes "\"Each time you attack the wand will convert a bit of you mana into a magic bolt.\"";
mes "\"After so many attacks, you will need to recast the invocation to stay attuned to the wand.\"";
mes "\"(Logging out will also cancel any spell effects currently active in-game.).\"";
- set @morgan_tmp, 4;
- callfunc "SetMorganMask";
goto L_Close;
L_LearningDone:
diff --git a/world/map/npc/029-2/sorfina.txt b/world/map/npc/029-2/sorfina.txt
index 8becafd3..a7da1b31 100644
--- a/world/map/npc/029-2/sorfina.txt
+++ b/world/map/npc/029-2/sorfina.txt
@@ -9,12 +9,11 @@
goto L_Main;
L_Main:
- callfunc "TutorialState";
- if (@tutorial == 10) goto L_Hasan;
- if (@tutorial >= 4) goto L_Again;
- if (@tutorial == 3) goto L_Clothes;
- if (@tutorial == 2) goto L_Dresser;
- if (@tutorial == 1) goto L_Carpet;
+ if (QL_BEGIN == 10) goto L_Hasan;
+ if (QL_BEGIN >= 4) goto L_Again;
+ if (QL_BEGIN == 3) goto L_Clothes;
+ if (QL_BEGIN == 2) goto L_Dresser;
+ if (QL_BEGIN == 1) goto L_Carpet;
goto L_Start;
L_Start:
@@ -60,8 +59,7 @@ L_Carpet:
mes "Press [###keyMoveUp;] to move up, press [###keyMoveDown;] to move down, ";
mes "press [###keyMoveLeft;] to move left, press [###keyMoveRight;] to move right ";
mes " or click on the place you want to go to.\"";
- set @tutorial_tmp, 1;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 1;
goto L_Close;
L_Dresser:
@@ -98,8 +96,7 @@ L_Clothes:
mes "\"And here is some money for you. Don't spend it all in one place.";
mes "Now go help Tanisha downstairs.\"";
set Zeny, Zeny + 30;
- set @tutorial_tmp, 4;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 4;
goto L_Close;
L_Again:
@@ -225,8 +222,7 @@ L_Next:
mes "\"If Valon hadn't have come along that moment, Hasan would have died that day.\"";
mes "\"However, the scorpions poison caused a bad fever and once Hasan had recovered from that, he was even more malicious than before.\"";
mes "She sighs.";
- set @tutorial_tmp, 11;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 11;
goto L_Close;
L_SkipTut:
@@ -246,16 +242,14 @@ L_Bye:
getitem "CottonShirt", 1;
getitem "RaggedShorts", 1;
set Zeny, Zeny + 35; // tanisha gives 5 zeny
- set @tutorial_tmp, 8;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 8;
goto L_Close;
L_Close:
close;
OnTouch:
- callfunc "TutorialState";
- if (@tutorial > 0)
+ if (QL_BEGIN > 0)
end;
goto L_Start;
}
@@ -265,8 +259,7 @@ OnTouch:
end;
OnTouch:
- callfunc "TutorialState";
- if (@tutorial != 1)
+ if (QL_BEGIN != 1)
end;
mes "[Sorfina]";
mes "\"You should get dressed now.\"";
@@ -274,8 +267,7 @@ OnTouch:
mes "\"To interact with things in your environment or talk to NPCs you can either click on it or press N to focus and T to talk/activate.\"";
next;
mes "\"Now get the clothes out of the dresser.\"";
- set @tutorial_tmp, 2;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 2;
close;
}
@@ -285,9 +277,8 @@ OnTouch:
callfunc "PCtoNPCRange";
if (@npc_check)
goto L_CloseDis;
- callfunc "TutorialState";
- if (@tutorial > 2) goto L_Empty;
- if (@tutorial == 2) goto L_Shirt;
+ if (QL_BEGIN > 2) goto L_Empty;
+ if (QL_BEGIN == 2) goto L_Shirt;
goto L_Walk;
L_Walk:
@@ -304,8 +295,7 @@ L_Shirt:
mes "\"You can open your inventory by pressing F3 or clicking on the 'Inventory' button in the bar at the upper right corner.\"";
next;
mes "\"After we finish talking, click on the clothes and press the equip button.\"";
- set @tutorial_tmp, 3;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 3;
close;
L_Empty:
@@ -322,8 +312,7 @@ L_CloseDis:
end;
OnTouch:
- callfunc "TutorialState";
- if (@tutorial < 4)
+ if (QL_BEGIN < 4)
goto L_Block;
warp "029-2", 112, 85;
end;
diff --git a/world/map/npc/029-2/tanisha.txt b/world/map/npc/029-2/tanisha.txt
index 450bc77c..f2c2d652 100644
--- a/world/map/npc/029-2/tanisha.txt
+++ b/world/map/npc/029-2/tanisha.txt
@@ -12,11 +12,10 @@
if (isin("029-2", 98, 84, 106, 89))
goto L_Fighting;
- callfunc "TutorialState";
- if (@tutorial >= 8) goto L_Tut_Done;
- if (@tutorial == 7) goto L_Stats;
- if (@tutorial == 6) goto L_Fail;
- if (@tutorial == 5) goto L_Maggots;
+ if (QL_BEGIN >= 8) goto L_Tut_Done;
+ if (QL_BEGIN == 7) goto L_Stats;
+ if (QL_BEGIN == 6) goto L_Fail;
+ if (QL_BEGIN == 5) goto L_Maggots;
mes "[Tanisha]";
mes "\"Hey! You're up again!\"";
@@ -30,8 +29,7 @@ L_Next:
mes "[Tanisha]";
mes "\"I'm glad you're feeling better. It was really bad luck what happened to you.";
mes "Hey, I have an idea.\"";
- set @tutorial_tmp, 5;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 5;
goto L_Maggots;
L_Maggots:
@@ -67,24 +65,21 @@ L_Fight_Again:
next;
mes "\"Sometimes dead monsters leave some useful things. You can pick them up by pressing [###keyPickup;] or clicking on the items with your mouse.\"";
close2;
- // The getitem must be in the same place as set @tutorial, 2;
+ // The getitem must be in the same place as set QL_BEGIN, 2;
// since it was moved to after L_Fight_Again, add it conditionally
- callfunc "TutorialState";
- if (@tutorial == 5)
+ if (QL_BEGIN == 5)
goto L_GetFightItems;
goto L_ContinueFight;
L_GetFightItems:
- set @tutorial_tmp, 6;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 6;
getitem "Knife", 1;
getitem "SlingShot", 1;
getitem "SlingBullet", 500;
goto L_ContinueFight;
L_ContinueFight:
- set @tutorial_tmp, 6;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 6;
set @Maggot_Kills, 0;
set @time, 0;
if (getareausers("029-2", 98, 84, 106, 89) == 0)
@@ -118,8 +113,7 @@ L_StatsRe:
mes "\"My Uncle sitting at the counter knows a spell to help the younglings reset their stats.\"";
mes "\"He also knows of mages with even more powerful reset spells.\"";
next;
- callfunc "TutorialState";
- if (@tutorial == 7)
+ if (QL_BEGIN == 7)
goto L_Money;
goto L_Advice;
@@ -128,8 +122,7 @@ L_Money:
mes "[Tanisha]";
mes "\"Hey, you are so smart taking out all that yucky maggots for me.";
mes "You can have my pocket money. Here.\"";
- set @tutorial_tmp, 8;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 8;
set Zeny, Zeny + 5;
next;
goto L_Advice;
@@ -263,8 +256,7 @@ OnMaggotDeath:
goto L_Summon;
// else, complete
warp "029-2", 110, 88;
- set @tutorial_tmp, 7;
- callfunc "SetTutorialMask";
+ set QL_BEGIN, 7;
set @Maggot_Kills, 0;
set @time, 0;
if (getareausers("029-2", 98, 84, 106, 89) == 0)
@@ -284,8 +276,7 @@ OnInit:
end;
OnTouch:
- callfunc "TutorialState";
- if (@tutorial >= 8)
+ if (QL_BEGIN >= 8)
goto L_Warp;
goto L_Block;