;;;QQ:67762207==
[@jfcz]
{
#if
#say
___{FCOLOR/10}您好！欢迎使用积分系统，您目前还有{FCOLOR/1}<$USERJF>{FCOLOR/10}点积分{FCOLOR/12}\
{FCOLOR/12}您已经购买了{FCOLOR/10} <$@USERCARDVAL>{FCOLOR/12} 个积分点卷。随时可以领取.{FCOLOR/12}\
{FCOLOR/2}┏━━━━━━━━━━━━━━━━━━━━━━━┓{FCOLOR/12}\
{FCOLOR/2}┃ {FCOLOR/12}您好,如果您购买我们提供的在线冲值卡,可以在这{FCOLOR/2} ┃{FCOLOR/12}\
{FCOLOR/2}┃ {FCOLOR/12}里进行冲值,冲值成功以后即可领取您的积分卷.  {FCOLOR/2} ┃{FCOLOR/12}\
{FCOLOR/2}┃ {FCOLOR/12}点击在线点卡冲值后，请按照下面格式输入:      {FCOLOR/2}┃{FCOLOR/12}\
{FCOLOR/2}┃ {FCOLOR/12}点卡账号[空格]密码                           {FCOLOR/2}┃{FCOLOR/12}\
{FCOLOR/2}┃  例如：{FCOLOR/1}12345678 12345                        {FCOLOR/2}┃{FCOLOR/12}\
{FCOLOR/2}┃  <[在线点卡冲值]/@@InputCardName>                              {FCOLOR/2}┃{FCOLOR/12}\
{FCOLOR/2}┃  <[返回]/@youxijifen>                                      {FCOLOR/2}┃{FCOLOR/12}\
{FCOLOR/2}┗━━━━━━━━━━━━━━━━━━━━━━━┛{FCOLOR/12}\

[@@InputCardName]
#ACT
actcmd CHECKCARDPASS
close

}

[@TakeYouJiFenCard]
{
#IF
#ACT
MOV D0 0
MOV D8 0
loadvalue D0 "系统设置.INI" 开区后 开启点卷领取时间
loadvalue D8 "系统设置.INI" 开区后 点卷优惠活动
#if
large D0 %CURHOUR
#ACT
BREAK
#SAY
此功能将在开区<$OUTPUT(D0)>小时后开放!\
<离开/@exit>

#IF
#SAY
您目前有 {FCOLOR/10}<$@USERCARDVAL>{FCOLOR/12} 积分卷可以领取.\\
#ACT
mov A4 %USERNAME

#IF
EQUAL A4 <$代理商角色名1>
or EQUAL A4 <$代理商角色名2>
#SAY
您好,亲爱的代理商<$USERNAME>.\
您不能自己领取点卷,只能通过转帐的方式,将点卷转移到别的玩家的账户中.\
<输入角色名/@@InputPlayerName>\
#ACT
break


#IF
checkbaggage
EQUAL D8 1  ;;优惠活动
#say
{FCOLOR/10}购买200元以上点卷者将获得宝箱赠送\\

<领取240个点卷/@take110jf(240,4)>  赠送4个珠宝盒\
<领取360个点卷/@take110jf(360,7)>  赠送7个珠宝盒\
<领取620个点卷/@take110jf(620,15)>  赠送15个珠宝盒\
<领取1300个点卷/@take110jf(1300,40)>  赠送40个珠宝盒\\

请注意，{FCOLOR/1}自由输入领取点卷无奖励物品{FCOLOR/12}，活动期间内，满足条件的玩家请点上面直接领取，因自身原因而没有领到奖励物品的玩家，GM概不负责。
本活动解释权归<$BrandName>\


#IF
checkbaggage
#say
<输入需要领取点卷的数量/@@InputJifenCardNumber>\\

<返回/@back>
#ELSESAY
背囊里没有位置了，整理出位置后，请再来！\\  
<结束/@exit>



[@@InputPlayerName]
#ACT
mov A0 %INPUTSTR
mov 冲卡名字 ""
formatstr "where fld_character = '%s'" %A0
actcmd READSQL "KING_HUMPLUS" "fld_character" "冲卡名字" %A9

#IF
!EQUAL 冲卡名字 ""
#SAY
您输入的角色名为:<$OUTPUT(A0)>\
<请输入转账的数量/@@InputSellNum>\\

如果发生错误请关闭重来\
#ELSESAY
不存在该角色名.\\
<重新输入角色名/@@InputPlayerName>\


[@@InputSellNum]
#ACT
mov D0 %INPUTNUM
#SAY
您输入的角色名为:<$OUTPUT(A0)>\
输入转账的数量为:<$OUTPUT(D0)>\\
<请点击确认/@SellSure>\

[@SellSure]
#IF
checkcmd CHECKCARDVALUE %D0
#ACT
formatstr "where fld_character = '%s'" %A0
actcmd READSQL "KING_HUMPLUS" "UserJfCard" "用户积分卡" %A9

mov 积分卡数 0
actcmd READSQL "KING_HUMPLUS" "UserJfCard" "积分卡数"
DEC 积分卡数 %D0
actcmd WRITESQL "KING_HUMPLUS" "UserJfCard" %积分卡数

inc 用户积分卡 %D0
formatstr "where fld_character = '%s'" %A0
actcmd WRITESQL "KING_HUMPLUS" "UserJfCard" %用户积分卡 %A9
#SAY
已经向用户'<$OUTPUT(A0)>'转账积分卷<$OUTPUT(D0)>个.\
您可以对本画面进行截图以留作依据.\\
<关闭/@exit>\


#ELSEACT
break
#ELSESAY
对不起,你没有足够的积分卷用于转账.\\
<关闭/@exit>\







[@take110jf()]
#IF
#ACT
mov D0 %ARG(1)
mov D1 %ARG(2)
#IF
checkcmd CHECKWEIGHT 积分卷 %D0
#elsesay
您的剩余负重为{FCOLOR/10} <$OUTPUT(P9)> {FCOLOR/12},不足于装载您所领取的点卷.请清理好包裹再来或者调整您领取的点卷数量.\\
<[离 开]/@exit>
#ELSEACT
BREAK

;;================================给点卷=============================
#IF
checkcmd CHECKCARDVALUE %D0
#ACT
mov 推广员CDKEY ""
formatstr "where fld_USERID = '%s' and IntroCDKEY IS NOT NULL" %USERID
actcmd READSQL "TBL_Promoters" "IntroCDKEY" "推广员CDKEY" %A9


#IF
checkcmd CHECKCARDVALUE %D0
!EQUAL 推广员CDKEY ""
#ACT
formatstr "where selfCDKEY = '%s'" %推广员CDKEY
actcmd READSQL "TBL_Promoters" "CDKEYPoint" "推广员积分" %A9
inc 推广员积分 %D0
formatstr "where selfCDKEY = '%s'" %推广员CDKEY
actcmd WRITESQL "TBL_Promoters" "CDKEYPoint" %推广员积分 %A9



#IF
checkcmd CHECKCARDVALUE %D0
#ACT
give 积分卷 %D0
mov 积分卡数 0
actcmd READSQL "KING_HUMPLUS" "UserJfCard" "积分卡数"
DEC 积分卡数 %D0
actcmd WRITESQL "KING_HUMPLUS" "UserJfCard" %积分卡数
give 珠宝盒 %D1


#SAY
您已经领取了<$OUTPUT(D0)>个积分卷!，同时获赠[珠宝盒]<$OUTPUT(D1)>个。祝您游戏愉快！\
<返回/@back>
#ELSEACT
break
#elseSAY
您输入的数量超出了您拥有的积分卷数目!\
<返回/@back>





[@@InputJifenCardNumber]
#IF
#ACT
MOV D2 0
MOV D0 0
mov D1 0
#IF
#ACT
mov  D0  %INPUTSTR
loadvalue D8 "系统设置.INI" 开区后 点卷优惠活动

#IF
Small D0 1
Or Large D0 50000
#SAY
请输入1-50000范围内的数字.\
#ACT
break

#IF
EQUAL D8 1 
#SAY
现在自由输入领取点卷视为你{FCOLOR/1}主动放弃领宝箱活动{FCOLOR/12} \
你确定要领取,并且在领取之后{FCOLOR/1}不会找管理员找回宝箱{FCOLOR/12} 吗?\\
___<我确定/@InputJifenCardNumber_2>  <返回/@back>\
#ELSEACT
goto @InputJifenCardNumber_2



[@InputJifenCardNumber_2]
#if
checkcmd CHECKWEIGHT 积分卷 %D0
#elsesay
您的剩余负重为{FCOLOR/10} <$OUTPUT(P9)> {FCOLOR/12},不足于装载您所领取的点卷.请清理好包裹再来或者调整您领取的点卷数量.\\
<[离 开]/@exit>
#ELSEACT
BREAK

;;================================给点卷=============================
#IF
ELARGE  D0  1
checkcmd CHECKCARDVALUE %D0
#ACT
mov 推广员CDKEY ""
formatstr "where fld_USERID = '%s' and IntroCDKEY IS NOT NULL" %USERID
actcmd READSQL "TBL_Promoters" "IntroCDKEY" "推广员CDKEY" %A9


#IF
ELARGE  D0  1
checkcmd CHECKCARDVALUE %D0
!EQUAL 推广员CDKEY ""
#ACT
formatstr "where selfCDKEY = '%s'" %推广员CDKEY
actcmd READSQL "TBL_Promoters" "CDKEYPoint" "推广员积分" %A9
inc 推广员积分 %D0
formatstr "where selfCDKEY = '%s'" %推广员CDKEY
actcmd WRITESQL "TBL_Promoters" "CDKEYPoint" %推广员积分 %A9


#IF
ELARGE  D0  1
checkcmd CHECKCARDVALUE %D0
#ACT
mov 积分卡数 0
give 积分卷 %D0
actcmd READSQL "KING_HUMPLUS" "UserJfCard" "积分卡数"
DEC 积分卡数 %D0
actcmd WRITESQL "KING_HUMPLUS" "UserJfCard" %积分卡数


#SAY
您已经领取了<$OUTPUT(D0)>个积分卷!\\
<返回/@back>
#ELSEACT
break
#elseSAY
您输入的数量超出了您拥有的积分卷数目!\\
<返回/@back>



[@USERCARDVAL]
#ACT
actcmd READSQL "KING_HUMPLUS" "UserJfCard" "积分卡数"
#SAY
<$OUTPUT(积分卡数)>


}
;;;QQ:67762207
