;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@intBeautyJewel]
{
#IF
#SAY
{FCOLOR/12}Want to add a sparkle to your items?\
{FCOLOR/12}Price: 200 Integral{FCOLOR/12}\
{FCOLOR/12}You must be wearing the item to continue!{FCOLOR/12}\
{FCOLOR/12}Please choose which item:{FCOLOR/12}\\
<[ Necklace ]/@BeautyDesc(3)>{FCOLOR/12}\
<[ Bracelet(L) ]/@BeautyDesc(5)>\
<[ Bracelet(R) ]/@BeautyDesc(6)>{FCOLOR/12}\
<[ Ring(L) ]/@BeautyDesc(7)>\
<[ Ring(R) ]/@BeautyDesc(8)> {FCOLOR/12}\\
<[ Back ]/@IntegralMainMenu>{FCOLOR/12}\\

[@BeautyDesc()]
#ACT
  Mov        D0       %ARG(1)
  Mov        D3       200
  goto @CheckExIntBeautya
[@CheckExIntBeautya]
#SAY
Are you sure?\
<[ Yes ]/@CheckExIntBeauty>
\
<[ Back ]/@IntegralMainMenu>
\
[@CheckExIntBeauty]
#ACT
   FormatStr "FLD_CHARACTER='%s'" %USERNAME
   ReadValueSql  "TBL_INTEGRAL"  %A9  "FLD_CHARACTER,FLD_INTEGRAL"  [@CheckExIntBeauty1]
[@CheckExIntBeauty1()]
#IF
#ACT
   mov    A0      %ARG(1)
   mov    D2      %ARG(2)
#IF
   Esmall D3 %D2
   HLSCRIPTCMD CHECKISTAKEITEM %D0  
#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
   HLSCRIPTCMD ITEMREMAKEEQU %D0 8 1
   mov     A7  ""
   AddStr  A7 %USERNAME
   AddStr  A7 ","
   AddStr  A7 %D3
   AddStr  A7 ",Beauty,"
   AddStr  A7 %D0
   Savelog "QuestDiary\IntegralSystem\IntegralLog.txt" %A7
#SAY
Your chosen item now has a sparkle!\\
Your current Integral is {FCOLOR/10}<$OUTPUT(D4)>{FCOLOR/12}\
<[ Back ]/@IntegralMainMenu>\
#ELSESAY
You do not have enough Integral Points\
Your current Integral is {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12}\
<[ Back ]/@IntegralMainMenu>\
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;