;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@JifenShop]
{
#IF
#SAY
{FCOLOR/12}Welcome to the Integral Shop\
Here I supply some items that are hard to find\
What would you like to purchase?\\
<[ Book(Manuals) ]/@IntBooks>\
<[ Other ]/@IntOther>\
<[ Rental Items ]/@IntRental>\\
<[ Integral Main Menu ]/@IntegralMainMenu>\\
{FCOLOR/1}Please Ensure you have Enough Space in your Bag to\
_________ _______________Hold the Item Purchased{FCOLOR/12}\


[@IntBooks]
#SAY
Please select Which Class you would like to buy for\
<[ Warrior ]/@IntBookWar>\
<[ Taoist ]/@IntBookTao>\
<[ Wizard ]/@IntBookWiz>\\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu ]/@IntegralMainMenu>\\

[@IntBookWar]
#SAY
I have the following{FCOLOR/10} Warrior{FCOLOR/12} books for Sale\\
<[ DestructSurge (LV40) ]/@IntPurchase(DestructSurge(Manual),10000)> - 10000 Integral\
<[ Interchange (LV42) ]/@IntPurchase(Interchange(Manual),8400> - 8400 Integral\
<[ Defiance (LV44) ]/@IntPurchase(Defiance(Manual),8800)> - 8800 Integral\
<[ Beacon (LV46) ]/@IntPurchase(Beacon(Manual),9200)> - 9200 Integral\
<[ Might (LV48) ]/@IntPurchase(Might(Manual),9600)> - 9600 Integral\
<[ Assault (LV50) ]/@IntPurchase(Assault(Manual),10000)> - 10000 Integral\\
<[ Back to Book(Manuals) Menu]/@IntBooks>\
<[ Main Shop Menu ]/@JifenShop>\

[@IntBookTao]
#SAY
I have the following {FCOLOR/10}Taoist{FCOLOR/12} books for Sale\\
<[ Strength (LV40) ]/@IntPurchase(Strength(Manual),8000)> - 8000 Integral\
<[ Transparency (LV43) ]/@IntPurchase(Transparency(Manual),10000)> - 10000 Integral\
<[ Celestial (LV46) ]/@IntPurchase(Celestial(Manual),9200)> - 9200 Integral\
<[ SummonTaoLord (LV48) ]/@IntPurchase(SummonTaoLord(Manual),9600)> - 9600 Integral\
<[ GreatTaoExplosion (LV49) ]/@IntPurchase(GtExplosion(Manual),9800)> - 9800 Integral\\
<[ Back to Book(Manuals) Menu ]/@IntBooks>\
<[ Main Shop Menu ]/@JifenShop>\

[@IntBookWiz]
#SAY
I have the following{FCOLOR/10} Wizard{FCOLOR/12} books for Sale\\
<[ ChainLightning (LV40) ]/@IntPurchase(ChainLight(Manual),8000)> - 8000 Integral\
<[ MeteorShower (LV43) ]/@IntPurchase(MeteorShower(Manual),10000)> - 10000 Integral\
<[ Renounce (LV46) ]/@IntPurchase(Renounce(Manual),9200)> - 9200 Integral>\
<[ Tempest (LV49) ]/@IntPurchase(Tempest(Manual),9800)> - 9800 Integral\\
<[ FlameTrail (LV52) ]/@IntPurchase(FlameTrail(Manual),10400)> - 10400 Integral\
<[ Back to Book(Manuals) Menu ]/@IntBooks>\
<[ Main Shop Menu ]/@JifenShop>\\\

[@IntOther]
#SAY
Please select What you would like to purchase\
<[ BlueRose ]/@IntPurchase(BlueRose,20)> - 20 Integral\
<[ WarriorRose ]/@IntPurchase(WarriorRose,20)> - 20 Integral\
<[ TaoistRose ]/@IntPurchase(TaoistRose,20)> - 20 Integral\
<[ WizardRose ]/@IntPurchase(WizardRose,20)> - 20 Integral\
<[ BenedictionOil ]/@IntPurchase(BenedictionOil,25)> - 25 Integral\
<[ 10 * BenedictionOil ]/@IntPurchase10(BenedictionOil,250)> - 250 Integral\
<[ 20 * BenedictionOil ]/@IntPurchase20(BenedictionOil,500)> - 500 Integral\
<[ Benediction ]/@IntPurchase(Benediction,1000)> - 1000 Integral\
<[ RefineStone ]/@IntPurchase(RefineStone,250)> - 250 Integral\
<[ StrengthOil ]/@IntPurchase(StrengthOil,15)> - 15 Integral\
<[ WarGodOil ]/@IntPurchase(WarGodOil,10)> - 10 Integral\
<[ RevivalWater ]/@IntPurchase(RevivalWater,500)> - 500 Integral\
<[ PetToken ]/@IntPurchase(PetToken,7)> - 7 Integral\
<[ 10 * PetToken ]/@IntPurchase10(PetToken,70)> - 70 Integral\
<[ 20 * PetToken ]/@IntPurchase20(PetToken,140)> - 140 Integral\
<[ Medicine(S) ]/@IntPurchase(Medicine(S),7)> - 7 Integral - Reduced 25 PK Points\
<[ ThanksLiquor(S) ]/@IntPurchase(ThanksLiquor(S),150)> - 150 Integral\
<[ BlackIronOre(P10) ]/@IntPurchase(BlackIronOre,5)> - 5 Integral\
<[ BlackIronOre(P10) * 5 ]/@IntPurchase5(BlackIronOre,25)> - 25 Integral\
<[ GamePoint ]/@IntPurchase(GamePoint,20)> - 20 Integral\
<[ GamePoint * 5 ]/@IntPurchase5(GamePoint,100)> - 100 Integral\
<[ GamePoint * 10 ]/@IntPurchase10(GamePoint,200)> - 200 Integral\\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu]/@IntegralMainMenu>\\

[@IntRental]
#SAY
Please select What you would like to purchase\
{FCOLOR/2}These items last for 7 (SEVEN) Days which runs\
From Midnight to Midnight - so if you purchase at\
11:55pm after 5 mins, the first day will be OVER!!!\\
Please NOTE, if I find one of these in ANYONES Mail\
The account will be immediately DELETED!!!!\
YOU HAVE BEEN WARNED!!{FCOLOR/12}\\
<[ StingsTransparentRing(Rental) ]/@IntPurchase(StingsTransparentRing(Rental),1000)> - 1000 Integral\
<[ StingsParalysisRing(Rental) ]/@IntPurchase(StingsParalysisRing(Rental),1000)> - 1000 Integral\
<[ StingsProtectionRing(Rental) ]/@IntPurchase(StingsProtectionRing(Rental),1000)> - 1000 Integral\
<[ StingsMuscularRing(Rental) ]/@IntPurchase(StingsMuscularRing(Rental),500)> - 500 Integral\
<[ StingRing(God) ]/@IntPurchase(StingRing(God),1000)> - 1000 Integral\
<[ StingBracelet(God) ]/@IntPurchase(StingBracelet(God),1000)> - 1000 Integral\
<[ StingNecklace(God) ]/@IntPurchase(StingNecklace(God),1000)> - 1000 Integral\\
#IF
CheckLevel 20
#SAY
Level 45 Weapons - 1000 Integrals\
<[ StingsSuperDuperMace(Rental) - Warrior ]/@IntPurchase(StingsSuperDuperMace(Rental),1000)>\
<[ StingsSuperDuperStaff(Rental) - Wizard ]/@IntPurchase(StingsSuperDuperStaff(Rental),1000)>\
<[ StingsSuperDuperWand(Rental) - Taoist ]/@IntPurchase(StingsSuperDuperWand(Rental),1000)>\\

#IF
CheckLevel 40
#SAY
Level 60 Weapons - 2000 Integrals\
<[ StingsSuperDuperBlade(Rental) - Warrior ]/@IntPurchase(StingsSuperDuperBlade(Rental),2000)>\
<[ StingsSuperSpiral(Rental) - Wizard ]/@IntPurchase(StingsSuperSpiral(Rental),2000)>\
<[ StingsSuperDuperSword(Rental) - Taoist ]/@IntPurchase(StingsSuperDuperSword(Rental),2000)>\\

#IF
CheckLevel 60
#SAY
Level 80 Weapon - 4000 Integrals\
<[ StingsEnmitySword(Rental) ]/@IntPurchase(StingsEnmitySword(Rental),4000)>\\

#IF
#SAY
\{FCOLOR/2}These items last for 2 (TWO) Days{FCOLOR/12}\\
<[ StingsSkillNecklace(Rental) ]/@IntPurchase(StingsSkillNecklace(Rental),200)> - 200 Integral\\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu]/@IntegralMainMenu>\\

[@IntPurchase()]
#ACT
   Mov   A0    %ARG(1)
   Mov   D3    %ARG(2)
#SAY
Your new {FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12} will cost you\
{FCOLOR/10}<$OUTPUT(D3)>{FCOLOR/12} Integral\\
Are you sure?\\
<[ Yes ]/@IntPurchase1>\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu]/@IntegralMainMenu>\\

[@IntPurchase1]
#ACT
   FormatStr "FLD_CHARACTER='%s'" %USERNAME
   ReadValueSql  "TBL_INTEGRAL"  %A9  "FLD_CHARACTER,FLD_INTEGRAL"  [@IntPurchase2]
[@IntPurchase2()]
#IF
#ACT
   mov    D2      %ARG(2)
#IF
   Esmall D3 %D2
   CheckBaggage
#ACT
   FormatStr "FLD_CHARACTER='%s'" %USERNAME
   mov   A8     %A9
   dec   D2     %D3
   mov   D4     %D2
   FormatStr "FLD_INTEGRAL='%s'" %D4
   UPDATEVALUESQL "TBL_INTEGRAL" %A8 %A9 
   Give %A0 1
   Mov  A7 ""
   AddStr  A7 %USERNAME
   AddStr  A7 ","
   AddStr  A7 %D3
   AddStr  A7 ",Shop,"
   AddStr  A7 %A0
   Savelog "QuestDiary\IntegralSystem\IntegralLog.txt" %A7
#SAY
You have purchased a {FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}
\

Your current Integral is {FCOLOR/10}<$OUTPUT(D4)>{FCOLOR/12}\\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu]/@IntegralMainMenu>\\
#ELSESAY
You do not have enough Integral Points\
Your current Integral is {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12}\\
Or your bag was full\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu]/@IntegralMainMenu>\\


[@IntPurchase10()]
#ACT
   Mov   A0    %ARG(1)
   Mov   D3    %ARG(2)
#SAY
10 new {FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12} will cost you\
{FCOLOR/10}<$OUTPUT(D3)>{FCOLOR/12} Integral\\
Are you sure?\\
<[ Yes ]/@IntPurchase110>\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu]/@IntegralMainMenu>\\

[@IntPurchase110]
#ACT
   FormatStr "FLD_CHARACTER='%s'" %USERNAME
   ReadValueSql  "TBL_INTEGRAL"  %A9  "FLD_CHARACTER,FLD_INTEGRAL"  [@IntPurchase210]

[@IntPurchase210()]
#IF
#ACT
   mov    D2      %ARG(2)
#IF
   Esmall D3 %D2
   Checkbaggage
#ACT
   FormatStr "FLD_CHARACTER='%s'" %USERNAME
   mov   A8     %A9
   dec   D2     %D3
   mov   D4     %D2
   FormatStr "FLD_INTEGRAL='%s'" %D4
   UPDATEVALUESQL "TBL_INTEGRAL" %A8 %A9 
   Give %A0 10
   Mov  A7 ""
   AddStr  A7 %USERNAME
   AddStr  A7 ","
   AddStr  A7 %D3
   AddStr  A7 ",Shop,"
   AddStr  A7 %A0
   Savelog "QuestDiary\IntegralSystem\IntegralLog.txt" %A7
#SAY
You have purchased a {FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}
\

Your current Integral is {FCOLOR/10}<$OUTPUT(D4)>{FCOLOR/12}\\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu]/@IntegralMainMenu>\\
#ELSESAY
You do not have enough Integral Points\
Your current Integral is {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12}\\
Or your bag was full\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu]/@IntegralMainMenu>\\


[@IntPurchase5()]
#ACT
   Mov   A0    %ARG(1)
   Mov   D3    %ARG(2)
#SAY
5 new {FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12} will cost you\
{FCOLOR/10}<$OUTPUT(D3)>{FCOLOR/12} Integral\\
Are you sure?\\
<[ Yes ]/@IntPurchase15>\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu]/@IntegralMainMenu>\\

[@IntPurchase15]
#ACT
   FormatStr "FLD_CHARACTER='%s'" %USERNAME
   ReadValueSql  "TBL_INTEGRAL"  %A9  "FLD_CHARACTER,FLD_INTEGRAL"  [@IntPurchase25]

[@IntPurchase25()]
#IF
#ACT
   mov    D2      %ARG(2)
#IF
   Esmall D3 %D2
   Checkbaggage
#ACT
   FormatStr "FLD_CHARACTER='%s'" %USERNAME
   mov   A8     %A9
   dec   D2     %D3
   mov   D4     %D2
   FormatStr "FLD_INTEGRAL='%s'" %D4
   UPDATEVALUESQL "TBL_INTEGRAL" %A8 %A9 
   Give %A0 5
   Mov A7 ""
   AddStr  A7 %USERNAME
   AddStr  A7 ","
   AddStr  A7 %D3
   AddStr  A7 ",Shop,"
   AddStr  A7 %A0
   Savelog "QuestDiary\IntegralSystem\IntegralLog.txt" %A7
#SAY
You have purchased 5 {FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}
\

Your current Integral is {FCOLOR/10}<$OUTPUT(D4)>{FCOLOR/12}\\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu]/@IntegralMainMenu>\\
#ELSESAY
You do not have enough Integral Points\
Or your bag was full\
Your current Integral is {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12}\\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu]/@IntegralMainMenu>\\

[@IntPurchase20()]
#ACT
   Mov   A0    %ARG(1)
   Mov   D3    %ARG(2)
#SAY
10 new {FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12} will cost you\
{FCOLOR/10}<$OUTPUT(D3)>{FCOLOR/12} Integral\\
Are you sure?\\
<[ Yes ]/@IntPurchase120>\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu]/@IntegralMainMenu>\\

[@IntPurchase120]
#ACT
   FormatStr "FLD_CHARACTER='%s'" %USERNAME
   ReadValueSql  "TBL_INTEGRAL"  %A9  "FLD_CHARACTER,FLD_INTEGRAL"  [@IntPurchase220]

[@IntPurchase220()]
#IF
#ACT
   mov    D2      %ARG(2)
#IF
   Esmall D3 %D2
   Checkbaggage
#ACT
   FormatStr "FLD_CHARACTER='%s'" %USERNAME
   mov   A8     %A9
   dec   D2     %D3
   mov   D4     %D2
   FormatStr "FLD_INTEGRAL='%s'" %D4
   UPDATEVALUESQL "TBL_INTEGRAL" %A8 %A9 
   Give %A0 20
   Mov A7 ""
   AddStr  A7 %USERNAME
   AddStr  A7 ","
   AddStr  A7 %D3
   AddStr  A7 ",Shop,"
   AddStr  A7 %A0
   Savelog "QuestDiary\IntegralSystem\IntegralLog.txt" %A7
#SAY
You have purchased a {FCOLOR/10}<$OUTPUT(A0)>{FCOLOR/12}
\

Your current Integral is {FCOLOR/10}<$OUTPUT(D4)>{FCOLOR/12}\\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu]/@IntegralMainMenu>\\
#ELSESAY
You do not have enough Integral Points\
Or your bag was full\
Your current Integral is {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12}\\
<[ Main Shop Menu ]/@JifenShop>\
<[ Integral Main Menu]/@IntegralMainMenu>\\

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