;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@ConvertBootyMain]
{
#SAY
Exchange 50 or 250?\
<[ 50 ]/@Change50>\
<[ 250 ]/@Change250>\
<[ Exit ]/@exit>\\\

[@Change50]
#SAY
You get 5 Point for 50 Items of Booty\
Which Booty Type do you have?\\
<[ SpiderTooth ]/@ConvertBooty(SpiderTooth)>\
<[ CannibalPlantFruit ]/@ConvertBooty(CannibalPlantFruit)>\
<[ ScorpionTail ]/@ConvertBooty(ScorpionTail)>\
<[ MaggotPill ]/@ConvertBooty(MaggotPill)>\
<[ MissingPearl ]/@ConvertBooty(MissingPearl)>\
<[ PreciousJade ]/@ConvertBooty(PreciousJade)>\
<[ AntEgg ]/@ConvertBooty(AntEgg)>\
<[ SnakeBile ]/@ConvertBooty(SnakeBile)>\
<[ IndiaSpirit ]/@ConvertBooty(IndiaSpirit)>\
<[ SkeletonBone ]/@ConvertBooty(SkeletonBone)>\
<[ Tooth ]/@ConvertBooty(Tooth)>\
<[ SpiderLine ]/@ConvertBooty(SpiderLine)>\
<[ Skin ]/@ConvertBooty(Skin)>\
<[ Nail ]/@ConvertBooty(Nail)>\
<[ GodStatue ]/@ConvertBooty(GodStatue)>\
<[ CorpseBones ]/@ConvertBooty(CorpseBones)>\
<[ PrajnaTear ]/@ConvertBooty(PrajnaTear)>\
<[ LuminousPearl ]/@ConvertBooty(LuminousPearl)>\
<[ FrogSkin ]/@ConvertBooty(FrogSkin)>\
<[ Bugle ]/@ConvertBooty(Bugle)>\
<[ Relic ]/@ConvertBooty(Relic)>\
<[ Scale ]/@ConvertBooty(Scale)>\
<[ ForbiddenFruit]/@ConvertBooty(ForbiddenFruit)>\
<[ AncientSkull ]/@ConvertBooty(AncientSkull)>\
<[ SabukDust ]/@ConvertBooty(SabukDust)>\
<[ Crystal ]/@ConvertBooty(Crystal)>\
<[ NecroHeart ]/@ConvertBooty(NecroHeart)>\
<[ JungleRelic ]/@ConvertBooty(JungleRelic)>\\
<[ Exit ]/@exit>\\\

[@ConvertBooty()]
#ACT
Mov   A0   %ARG(1)
#IF
CheckItem  %A0  50
#ACT
   FormatStr "FLD_CHARACTER='%s'" %USERNAME
   ReadValueSql  "TBL_INTEGRAL"  %A9  "FLD_CHARACTER,FLD_INTEGRAL"  [@CheckConvertBooty1]
#ELSESAY
You do not have enough <$OUTPUT(A0)>\
<[ Back ]/@IntegralMainMenu>\

[@CheckConvertBooty1()]
#IF
CheckItem  %A0  50
#ACT
   mov    D2      %ARG(2)
   Mov    D3      5
   FormatStr "FLD_CHARACTER='%s'" %USERNAME
   mov   A8     %A9
   Inc   D2     %D3
   mov   D1     %D2
   FormatStr "FLD_INTEGRAL='%s'" %D1
   UPDATEVALUESQL "TBL_INTEGRAL" %A8 %A9
   Take %A0  50
   mov     A7  ""
   AddStr  A7 %USERNAME
   AddStr  A7 ",-"
   AddStr  A7 %D3
   AddStr  A7 ",BootyTransfer,"
   AddStr  A7 %A0
   Savelog "QuestDiary\IntegralSystem\IntegralLog.txt" %A7
#SAY
You have transfered your <$OUTPUT(A0)> to Integral\\
Your current Integral is {FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12}\
<[ Back ]/@IntegralMainMenu>\
#ELSESAY
You do not have enough <$OUTPUT(A0)>\
<[ Back ]/@IntegralMainMenu>\


[@Change250]
#SAY
You get 25 Point for 250 Items of Booty\
Which Booty Type do you have?\\
<[ SpiderTooth ]/@ConvertBooty250(SpiderTooth)>\
<[ CannibalPlantFruit ]/@ConvertBooty250(CannibalPlantFruit)>\
<[ ScorpionTail ]/@ConvertBooty250(ScorpionTail)>\
<[ MaggotPill ]/@ConvertBooty250(MaggotPill)>\
<[ MissingPearl ]/@ConvertBooty250(MissingPearl)>\
<[ PreciousJade ]/@ConvertBooty250(PreciousJade)>\
<[ AntEgg ]/@ConvertBooty250(AntEgg)>\
<[ SnakeBile ]/@ConvertBooty250(SnakeBile)>\
<[ IndiaSpirit ]/@ConvertBooty250(IndiaSpirit)>\
<[ SkeletonBone ]/@ConvertBooty250(SkeletonBone)>\
<[ Tooth ]/@ConvertBooty250(Tooth)>\
<[ SpiderLine ]/@ConvertBooty250(SpiderLine)>\
<[ Skin ]/@ConvertBooty250(Skin)>\
<[ Nail ]/@ConvertBooty250(Nail)>\
<[ GodStatue ]/@ConvertBooty250(GodStatue)>\
<[ CorpseBones ]/@ConvertBooty250(CorpseBones)>\
<[ PrajnaTear ]/@ConvertBooty250(PrajnaTear)>\
<[ LuminousPearl ]/@ConvertBooty250(LuminousPearl)>\
<[ FrogSkin ]/@ConvertBooty250(FrogSkin)>\
<[ Bugle ]/@ConvertBooty250(Bugle)>\
<[ Relic ]/@ConvertBooty250(Relic)>\
<[ Scale ]/@ConvertBooty250(Scale)>\
<[ ForbiddenFruit]/@ConvertBooty250(ForbiddenFruit)>\
<[ AncientSkull ]/@ConvertBooty250(AncientSkull)>\
<[ SabukDust ]/@ConvertBooty250(SabukDust)>\
<[ NecroHeart ]/@ConvertBooty250(NecroHeart)>\
<[ Crystal ]/@ConvertBooty250(Crystal)>\
<[ JungleRelic ]/@ConvertBooty250(JungleRelic)>\\
<[ Exit ]/@exit>\\\

[@ConvertBooty250()]
#ACT
Mov   A0   %ARG(1)
#IF
CheckItem  %A0  250
#ACT
   FormatStr "FLD_CHARACTER='%s'" %USERNAME
   ReadValueSql  "TBL_INTEGRAL"  %A9  "FLD_CHARACTER,FLD_INTEGRAL"  [@CheckConvertBooty2501]
#ELSESAY
You do not have enough <$OUTPUT(A0)>\
<[ Back ]/@IntegralMainMenu>\

[@CheckConvertBooty2501()]
#IF
CheckItem  %A0  250
#ACT
   mov    D2      %ARG(2)
   Mov    D3      25
   FormatStr "FLD_CHARACTER='%s'" %USERNAME
   mov   A8     %A9
   Inc   D2     %D3
   mov   D1     %D2
   FormatStr "FLD_INTEGRAL='%s'" %D1
   UPDATEVALUESQL "TBL_INTEGRAL" %A8 %A9
   Take %A0  250
   mov     A7  ""
   AddStr  A7 %USERNAME
   AddStr  A7 ",-"
   AddStr  A7 %D3
   AddStr  A7 ",BootyTransfer,"
   AddStr  A7 %A0
   Savelog "QuestDiary\IntegralSystem\IntegralLog.txt" %A7
#SAY
You have transfered your <$OUTPUT(A0)> to Integral\\
Your current Integral is {FCOLOR/10}<$OUTPUT(D1)>{FCOLOR/12}\
<[ Back ]/@IntegralMainMenu>\
#ELSESAY
You do not have enough <$OUTPUT(A0)>\
<[ Back ]/@IntegralMainMenu>\

}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
