;;;QQ:67762207
[@LottoSystem_Result]
{
#ACT
ReadValueSql "TBL_LottoServer" "FLD_Name='Current'" "FLD_Sequence" @LottoSystem_WinnerNum

[@LottoSystem_WinnerNum()]
#ACT
Mov N90 %ARG(1)		;当前彩票期数
Inc N90 1
FormatStr "FLD_Sequence=%s" %N90
UpdateValueSql "TBL_LottoServer" "FLD_NAME='Current'" %A9
Dec N90 1
FormatStr "FLD_Name ='Lotto' and FLD_Sequence=%s" %N90
ReadValueSql "TBL_LottoServer" %A9 "FLD_Num1,FLD_Num2,FLD_Num3,FLD_HumanCount,FLD_TotalPrice" @LottoSystem_ResultBroadCast

[@LottoSystem_ResultBroadCast()]
#ACT
Mov N91 %ARG(1)		;中奖的第一个号码
Mov N92 %ARG(2)		;2
Mov N93 %ARG(3)		;3
Mov N94 %ARG(4)		;中奖的人数
Mov N95 %ARG(5)		;奖池的金币数量
LineMsg [Grobal] "< 新闻快递>：现在宣布第'<$OUTPUT(N90)>'期彩票中奖号码。"
Delaygoto [Grobal] 30 @LottoSystem_ResultNum1 1001

[@LottoSystem_ResultNum1]
#ACT
LineMsg [Grobal] "< 新闻快递>：现在宣布第'<$OUTPUT(N90)>'期彩票第1个中奖号码为'<$OUTPUT(N91)>'。"
Delaygoto [Grobal] 10 @LottoSystem_ResultNum2 1001

[@LottoSystem_ResultNum2]
#ACT
LineMsg [Grobal] "< 新闻快递>：现在宣布第'<$OUTPUT(N90)>'期彩票第2个中奖号码'<$OUTPUT(N92)>'。"
Delaygoto [Grobal] 10 @LottoSystem_ResultNum3 1001

[@LottoSystem_ResultNum3]
#ACT
LineMsg [Grobal] "现在宣布第'<$OUTPUT(N90)>'期彩票第3个中奖号码'<$OUTPUT(N93)>'。"
Delaygoto [Grobal] 10 @LottoSystem_ResultFinal 1001

[@LottoSystem_ResultFinal]
#ACT
LineMsg [Grobal] "< 新闻快递>：第'<$OUTPUT(N90)>'期彩票中奖号码为'<$OUTPUT(N91)>'，'<$OUTPUT(N92)>'，'<$OUTPUT(N93)>'。"
goto @LottoSystem_WinnerReword

[@LottoSystem_WinnerReword]
#IF
Equal N94 0
#ACT
LineMsg [Grobal] "< 新闻快递>：第'<$OUTPUT(N90)>'期彩票中奖人数为零。'<$OUTPUT(N95)>'积分卷奖金将累积到下一期。"
Inc N90 1
FormatStr "FLD_Name='Lotto' and FLD_Sequence=%s" %N90
Mov A8 %A9
FormatStr "FLD_TotalPrice=%s" %N95
UpdateValueSql "TBL_LottoServer" %A8 %A9
#ELSEACT
Div N95 N94
mov D0 %P9
LineMsg [Grobal] "< 新闻快递>：第<$OUTPUT(N90)>期彩票中奖人数为'<$OUTPUT(N94)>'名，每人积分卷为'<$OUTPUT(D0)>个'。"
FormatStr "FLD_UserPrice=%s" %D0
mov A8 %A9
FormatStr "FLD_Name='Lotto' and FLD_Sequence=%s" %N90
UpdateValueSql "TBL_LottoServer" %A9 %A8
Inc N90 1
}
;;;QQ:67762207