;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

%100
+51
+4

[@main]
#IF
checkpkpoint 2

#SAY
#INCLUDE [..\Market_Def\00BuySell_Std.txt] @Convert_BuySellStd_PK

#ELSESAY
Hi, My name is {FCOLOR/10}<$NPCNAME>{FCOLOR/12}, how can I help you?\
<[ Buy ]/@buy> Books\
<[ Sell ]/@sell> Books\
<[ Translate ]/@BookAnalysisWar> Warrior Skill Books\
<[ Translate ]/@BookAnalysisWiz> Wizard Skill Books\
<[ Translate ]/@BookAnalysisTao> Taoist Skill Books\
#IF
Check  [257]  1
Check  [258]  0
#SAY
<[ Test Quest ]/@TestQuest>\
#IF
#SAY
<[ Exit ]/@exit>\

[@buy]
#SAY
#INCLUDE [..\Market_Def\00BuySell_Std.txt] @Convert_BuySellStd_Buy

[@sell]
#SAY
#INCLUDE [..\Market_Def\00BuySell_Std.txt] @Convert_BuySellStd_Sell

[@TestQuest]
#IF
Check [257] 1
Check [258] 0
#ACT
FormatStr "FLD_QUEST ='Mary' and FLD_CHARACTER='%s'" %USERNAME
ReadValueSql "TBL_StingQuests" %A9 "FLD_Stage" @MaryQuestStage
Break

[@MaryQuestStage()]
#IF
#ACT
Mov    D1  %ARG(1)

#IF
Small  D1  6
#ACT
Goto @MaryQuest0
Break

#IF
Equal  D1  6
#ACT
Goto @MaryQuest6
Break

#IF
Equal  D1  7
#ACT
Goto @MaryQuest7
Break

#IF
Equal  D1  8
#ACT
Goto @MaryQuest8
Break

#IF
Large D1  8
#ACT
Goto @MaryQuest9
Break


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Part 0
[@MaryQuest0]
#SAY
The time for me to play my part in your test\
has not arrived, please call back later when\
the time is right\\
<[ Exit ]/@exit>\\
#ACT
Break

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Part 6
[@MaryQuest6]
#IF
#SAY
In the north of {FCOLOR/10}PhantomForestNorth{FCOLOR/12} there lives a tribe\
of bloodthirsty creatures known as EvilFanatics. \
The most evil and bloodthirsty of them all is their\
leader, the {FCOLOR/10}LightGladiator{FCOLOR/12}. Without him, they \
are much less of a threat. You must seek him out\
and kill him\\
<[ Ill try, and I hope I dont let you down ]/@MaryQuest6_1>\
<[ Cant you people do anything for yourselves? ]/@exit>\\\

#ACT
Mov  A0  %USERNAME
Mov  A1  "Mary"
Mov  D0  7
FormatStr "FLD_STAGE=%s" %D0
Mov A8 %A9
FormatStr "FLD_CHARACTER='%s' and FLD_QUEST='%s'" %A0 %A1
UpdateValueSql "TBL_StingQuests" %A9 %A8
Break

[@MaryQuest6_1]
#SAY
I am sure you won't.. Good Luck\\
<[ Exit ]/@exit>\
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Part 7
[@MaryQuest7]
#SAY
The threat from the {FCOLOR/10}LightGladiator{FCOLOR/12} in\ 
{FCOLOR/10}PhantomForestNorth{FCOLOR/12} is is still over us.. \
please help us.\\
<[ Awww.. please don't make me! ]/@exit>\
#ACT
Break

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Part 8
[@MaryQuest8]

#IF
#SAY
You are growing in strength, and we owe you a debt\
of gratitude. You must however face one more test.\
Visit {FCOLOR/10}Jane(Armour){FCOLOR/12} for further instructions.\\
<[ Good idea, I need new armour anyway ]/@exit>\\\

#ACT
Mov  A0  %USERNAME
Mov  A1  "Mary"
Mov  D0  9
FormatStr "FLD_STAGE=%s" %D0
Mov A8 %A9
FormatStr "FLD_CHARACTER='%s' and FLD_QUEST='%s'" %A0 %A1
UpdateValueSql "TBL_StingQuests" %A9 %A8
Break

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Part 9
[@MaryQuest9]
#SAY
{FCOLOR/10}Jane(Armour){FCOLOR/12} will now be your guide\\
<[ OK, thanks anyway ]/@exit>\
#ACT
Break

[Goods]

SwordmanShip(Manual)	100	1
Slaying(Manual)		100	1
AdvancedSlay(Manual)	100	1
Halfmoon(Manual)	100	1
ShoulderDash(Manual)	100	1
FlamingSword(Manual)	100	1
DragonRise(Manual)	100	1
BladeStorm(Manual)	100	1
FireBall(Manual)	100	1
LightninBall(Manual)	100	1
IceBall(Manual)		100	1
PowerBurst(Manual)	100	1
FlameRepulse(Manual)	100	1
Stunning(Manual)	100	1
Teleport(Manual)	100	1
AdamantineFB(Manual)	100	1
LightninBolt(Manual)	100	1
IceBlades(Manual)	100	1
GtPowerBurst(Manual)	100	1
LightninBeam(Manual)	100	1
FrozenEarth(Manual)	100	1
BlowEarth(Manual)	100	1
FireCloud(Manual)	100	1
TurnUndead(Manual)	100	1
GeoManip(Manual)	100	1
MagicShield(Manual)	100	1
Explosion(Manual)	100	1
LightninFlo(Manual)	100	1
IceStorm(Manual)	100	1
DragonTorn(Manual)	100	1
GtFrozeEarth(Manual)	100	1
Healing(Manual)		100	1
SpiritSword(Manual)	100	1
Poisoning(Manual)	100	1
TaoExplosion(Manual)	100	1
EvilSlayer(Manual)	100	1
SummonShinso(Manual)	100	1
Invisibility(Manual)	100	1
MagicProtect(Manual)	100	1
MassInvis(Manual)	100	1
GtEvilSlayer(Manual)	100	1
Resilience(Manual)	100	1
TrapOctagon(Manual)	100	1
CombatKick(Manual)	100	1
ElementalSup(Manual)	100	1
MassHealing(Manual)	100	1
SummonJin(Manual)	100	1
BloodLust(Manual)	100	1
Resurrection(Manual)	100	1
Purification(Manual)	100	1

[@BookAnalysisWar]
#CALL [System\BookConvert.txt] @Warrior_Book

[@BookAnalysisWiz]
#CALL [System\BookConvert.txt] @Wizard_Book

[@BookAnalysisTao]
#CALL [System\BookConvert.txt] @Taoist_Book

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;