;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@Main]
#IF
Check   [265]  1
#ACT
Goto  @Main1a
Break

#IF
Check   [264]  1
#ACT
Goto  @Ellison3a
Break
#ELSESAY
Ayup, hows things\\
I have been stuck here for ages and seriously\
need a hand, any chance you can help?\\
<[ What ya need? ]/@Ellison1>\
<[ Not at the moment ]/@exit>\\\

[@Main1a]
#SAY
Its looking good so far, thanks to you\\
<[ Exit ]/@exit>\\


[@Ellison1]
#SAY
I have noticed that there are no stores in\
NumaVillage and I want to start to expand\
the town.  I want to open a Booty Shop and\
what I really need is some stock, I have the\
capital, but I just don't have time to get all\
the items I need to get it off the ground\
You reckon you could get them for me?\\
<[ Sure ]/@Ellison2>\
<[ Nah ]/@exit>\\\

[@Ellison2]
#ACT
Set  [264]  1
Mov  A0  %USERNAME
Mov  A1  "Ellison"
Mov  D0  1
FormatStr "'%s','%s',%s" %A0 %A1 %D0
Mov A8 %A9
FormatStr "FLD_CHARACTER='%s' and FLD_QUEST='%s'" %A0 %A1
WriteValueSql "TBL_StingQuests" %A9 "FLD_CHARACTER,FLD_QUEST,FLD_STAGE" %A8
Goto @Ellison2a

[@Ellison2a]
#ACT
FormatStr "FLD_QUEST ='Ellison' and FLD_CHARACTER='%s'" %USERNAME
mov   A8     %A9
FormatStr "FLD_VAR1='%s'" 1
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
FormatStr "FLD_VAR2='%s'" 1
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
FormatStr "FLD_VAR3='%s'" 1
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
FormatStr "FLD_VAR4='%s'" 1
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
FormatStr "FLD_VAR5='%s'" 1
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
FormatStr "FLD_VAR6='%s'" 1
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
FormatStr "FLD_VAR7='%s'" 1
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
FormatStr "FLD_VAR8='%s'" 1
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
Goto @Ellison3a

[@Ellison3a]
#ACT
FormatStr "FLD_QUEST ='Ellison' and FLD_CHARACTER='%s'" %USERNAME
ReadValueSql  "TBL_StingQuests"  %A9 "FLD_VAR1,FLD_VAR2,FLD_VAR3,FLD_VAR4,FLD_VAR5"  [@Ellison3b]


[@Ellison3b()]
#ACT
Mov   D1   %ARG(1)
Mov   D2   %ARG(2)
Mov   D3   %ARG(3)
Mov   D4   %ARG(4)
Mov   D5   %ARG(5)
FormatStr "FLD_QUEST ='Ellison' and FLD_CHARACTER='%s'" %USERNAME
ReadValueSql  "TBL_StingQuests"  %A9 "FLD_VAR6,FLD_VAR7,FLD_VAR8"  [@Ellison3]


[@Ellison3()]
#ACT
Mov   D6   %ARG(1)
Mov   D7   %ARG(2)
Mov   D8   %ARG(3)
#SAY
Excellent, I need the following and pay as stated\\
#IF
Small   D1   2
#SAY
{FCOLOR/10}PrajnaTear {FCOLOR/1}50{FCOLOR/12} - 500 Each <[ Give ]/@Ellison4(PrajnaTear,500)>\
#ELSESAY
{FCOLOR/10}PrajnaTear {FCOLOR/1}50{FCOLOR/12} - Received\
#IF
Small   D2   2
#SAY
{FCOLOR/10}PreciousJade {FCOLOR/1}50{FCOLOR/12} - 2000 Each <[ Give ]/@Ellison4(PreciousJade,2000)>\
#ELSESAY
{FCOLOR/10}PreciousJade {FCOLOR/1}50{FCOLOR/12} - Received\
#IF
Small   D3   2
#SAY
{FCOLOR/10}AntEgg {FCOLOR/1}50{FCOLOR/12} - 500 Each <[ Give ]/@Ellison4(AntEgg,500)>\
#ELSESAY
{FCOLOR/10}AntEgg {FCOLOR/1}50{FCOLOR/12} - Received\
#IF
Small   D4   2
#SAY
{FCOLOR/10}SkeletonBone {FCOLOR/1}50{FCOLOR/12} - 500 Each <[ Give ]/@Ellison4(SkeletonBone,500)>\
#ELSESAY
{FCOLOR/10}SkeletonBone {FCOLOR/1}50{FCOLOR/12} - Received\
#IF
Small   D5   2
#SAY
{FCOLOR/10}MissingPearl {FCOLOR/1}50{FCOLOR/12} - 7000 Each <[ Give ]/@Ellison4(MissingPearl,7000)>\
#ELSESAY
{FCOLOR/10}MissingPearl {FCOLOR/1}50{FCOLOR/12} - Received\
#IF
Small   D6   2
#SAY
{FCOLOR/10}Skin {FCOLOR/1}50{FCOLOR/12} - 2000 Each <[ Give ]/@Ellison4(Skin,2000)>\
#ELSESAY
{FCOLOR/10}Skin {FCOLOR/1}50{FCOLOR/12} - Received\
#IF
Small   D7   2
#SAY
{FCOLOR/10}FrogSkin {FCOLOR/1}50{FCOLOR/12} - 2000 Each <[ Give ]/@Ellison4(FrogSkin,2000)>\
#ELSESAY
{FCOLOR/10}FrogSkin {FCOLOR/1}50{FCOLOR/12} - Received\
#IF
Small   D8   2
#SAY
{FCOLOR/10}CorpseBones {FCOLOR/1}50{FCOLOR/12} - 500 Each <[ Give ]/@Ellison4(CorpseBones,500)>\
#ELSESAY
{FCOLOR/10}CorpseBones {FCOLOR/1}50{FCOLOR/12} - Received\\
#IF
#SAY
<[ Thats all of them ]/@Ellison5>\
<[ Exit ]/@exit>\\\

[@Ellison4()]
#ACT
Mov    A2  %ARG(1)
Mov    D0  %ARG(2)
#IF
CheckItem  %A2 50
#ACT
Take  %A2  50
Mov   P1   %D0
Mov   P2   50
Mul   P1   P2
Give  Gold %P9
#ELSEACT
Goto @Ellison3a
Break

#IF
EQUAL  A2  "PrajnaTear"
#ACT
FormatStr "FLD_QUEST ='Ellison' and FLD_CHARACTER='%s'" %USERNAME
mov   A8     %A9
FormatStr "FLD_VAR1='%s'" 2
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
#IF
EQUAL  A2  "PreciousJade"
#ACT
FormatStr "FLD_QUEST ='Ellison' and FLD_CHARACTER='%s'" %USERNAME
mov   A8     %A9
FormatStr "FLD_VAR2='%s'" 2
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
#IF
EQUAL  A2  "AntEgg"
#ACT
FormatStr "FLD_QUEST ='Ellison' and FLD_CHARACTER='%s'" %USERNAME
mov   A8     %A9
FormatStr "FLD_VAR3='%s'" 2
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
#IF
EQUAL  A2  "SkeletonBone"
#ACT
FormatStr "FLD_QUEST ='Ellison' and FLD_CHARACTER='%s'" %USERNAME
mov   A8     %A9
FormatStr "FLD_VAR4='%s'" 2
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
#IF
EQUAL  A2  "MissingPearl"
#ACT
FormatStr "FLD_QUEST ='Ellison' and FLD_CHARACTER='%s'" %USERNAME
mov   A8     %A9
FormatStr "FLD_VAR5='%s'" 2
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
#IF
EQUAL  A2  "Skin"
#ACT
FormatStr "FLD_QUEST ='Ellison' and FLD_CHARACTER='%s'" %USERNAME
mov   A8     %A9
FormatStr "FLD_VAR6='%s'" 2
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
#IF
EQUAL  A2  "FrogSkin"
#ACT
FormatStr "FLD_QUEST ='Ellison' and FLD_CHARACTER='%s'" %USERNAME
mov   A8     %A9
FormatStr "FLD_VAR7='%s'" 2
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
#IF
EQUAL  A2  "CorpseBones"
#ACT
FormatStr "FLD_QUEST ='Ellison' and FLD_CHARACTER='%s'" %USERNAME
mov   A8     %A9
FormatStr "FLD_VAR8='%s'" 2
UPDATEVALUESQL "TBL_StingQuests" %A8 %A9
#IF
#ACT
Goto @Ellison3a
Break

[@Ellison5]
#IF
Equal   D1   2
Equal   D2   2
Equal   D3   2
Equal   D4   2
Equal   D5   2
Equal   D6   2
Equal   D7   2
Equal   D8   2
#SAY
You have done it all, I cannot ask for more\
Thanks from the bottom of my heart.\
Hopefully this will put NumaVillage on the map!\
Take this as added compensation\\
<[ You ever need a hand, shout up ]/@exit>\\\
#ACT
Set   [265]  1
Give  Gold   1000000
Break

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