;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@IntExp]
{
#IF
;HLSCRIPTCMD CHECKVIPLEVEL 5
#SAY
;You have already used this service!\
;You can use it again at <$HLVIPDATE>\
;<[ Exit ]/@exit>\\
;#ELSESAY
You can use integral to increase your\
EXP by 50% for 2 days.\\
This will cost you {FCOLOR/10}500{FCOLOR/12} Integral.\\
Please note, your first day ends at midnight\
So if you buy it 1 minute before midnight, then\
your first day lasted 1 minute!\\
<[ Yes Please ]/@Exp48hr1>\\
<[ No Thanks ]/@exit>\\


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

[@Exp48hr2()]
#IF
#ACT
   mov    D3      500
   mov    D2      %ARG(2)
#IF
   Esmall D3 %D2
#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 SETVIPLEVEL 5
HLSCRIPTCMD SETVIPTIME 2
   AddStr  A7 ""
   AddStr  A7 %USERNAME
   AddStr  A7 ","
   AddStr  A7 %D3
   AddStr  A7 ",Shop,"
   AddStr  A7 "48hrExp"
   Savelog "QuestDiary\IntegralSystem\IntegralLog.txt" %A7
#SAY
This will last until at least - <$HLVIPDATE>\
<[ Exit ]/@exit>\\
#ELSESAY
You do not have enough Integral Points\
Your current Integral is {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12}\\
<[ Exit ]/@exit>\\
}
;;;;;;;;;;;