【神奇弹幕】打卡签到系统
in 资料教程 by 开发者
复制下方代码,点击“菜单—构建—粘贴代码片段”,一键添加:[
{
"anchor_key": "神奇弹幕:AutoReply",
"enabled": true,
"key": "^(签到|打卡)\\s*([\\((].*|\\d+)?$",
"reply": "/// 记录每位用户是第几个打卡以及累计天数\n[%{daka_today_%uid%}%]*>您已打过卡\n[%living%+1]>签到成功,您是今天第%[%{daka}%+1]%个,本月%[%{daka_month_%uid%}%+1]%天\\n\\\n\t>setValue(daka, %[%{daka}%+1]%)\\n\\\n\t>setValue(daka_today_%uid%, 1)\\n\\\n\t>setValue(daka_sum_%uid%, %[%{daka_sum_%uid%}%+1]%)\\n\\\n\t>setValue(daka_month_%uid%, %[%{daka_month_%uid%}%+1]%)\\n\\\n\t>setValue(daka_keep_%uid%, %[%{daka_keep_%uid%}%+1]%)\\n\\\n\t>setValue(integral_%uid%, %[%{integral_%uid%}%+1000]%)\\n\\\n\t>triggerEvent(DAKA_MONTH_%[%{daka_month_%uid%}%+1]%)"
},
{
"anchor_key": "神奇弹幕:AutoReply",
"enabled": true,
"key": "^(查询(打卡|签到)|(打卡|签到)查询)$",
"reply": "[%living%+1]>连续%[%{daka_keep_%uid%}%]%天,本月%[%{daka_month_%uid%}%]%天,累计%[%{daka_sum_%uid%}%]%天"
},
{
"anchor_key": "神奇弹幕:AutoReply",
"enabled": true,
"key": "^查询积分|积分查询$",
"reply": "[%living%+1]>您的积分:%[%{integral_%uid%}%+0]%"
},
{
"anchor_key": "神奇弹幕:AutoReply",
"enabled": true,
"key": "开启礼物打卡",
"reply": "[%{daka_today_%uid%}%!=1]>setValue(daka_auto_%uid%, 1)\\n>开启赠送礼物打卡\n[%{daka_today_%uid%}%=1]>您已开启赠送礼物自动打卡"
},
{
"anchor_key": "神奇弹幕:AutoReply",
"enabled": true,
"key": "关闭礼物打卡",
"reply": "[%{daka_auto_%uid%}%=1]>setValue(daka_auto_%uid%, 0)\\n>关闭赠送礼物打卡\n[%{daka_auto_%uid%}%!=1]>您未开启赠送礼物自动打卡"
},
{
"action": "/// 重置每天打卡的人数\n[%living%+1]>setValue(daka, 0)\\n\\ // 重置今日打卡人数\n\t>removeValuesIf(^daka_keep_(\\d+)$, [!_{daka_today__$1_}_])\\n\\ // 未连续签到断开\n\t>removeValues(daka_today_\\d+) // 重置每人是否打卡",
"anchor_key": "神奇弹幕:EventAction",
"enabled": true,
"event": "NEW_DAY"
},
{
"action": "/// 重置每月打卡天数\n[%living%+1]>setValues(daka_month_\\d+, 0)",
"anchor_key": "神奇弹幕:EventAction",
"enabled": true,
"event": "NEW_MONTH"
},
{
"action": "[%living%+1]>setValue(integral_%uid%, %[%{integral_%uid%}%+%gift_gold%]%)",
"anchor_key": "神奇弹幕:EventAction",
"enabled": true,
"event": "SEND_GIFT"
},
{
"action": "[%living%+1]>setValue(integral_%uid%, %[%{integral_%uid%}%+%gift_gold%]%)",
"anchor_key": "神奇弹幕:EventAction",
"enabled": true,
"event": "GUARD_BUY"
},
{
"action": "[%{daka_auto_%uid%}%=1, %{daka_today_%uid%}%!=1, %living%+1]>签到成功,您是今天第%[%{daka}%+1]%个,本月%[%{daka_month_%uid%}%+1]%天\\n\\\n\t>setValue(daka, %[%{daka}%+1]%)\\n\\\n\t>setValue(daka_today_%uid%, 1)\\n\\\n\t>setValue(daka_sum_%uid%, %[%{daka_sum_%uid%}%+1]%)\\n\\\n\t>setValue(daka_month_%uid%, %[%{daka_month_%uid%}%+1]%)\\n\\\n\t>setValue(daka_keep_%uid%, %[%{daka_keep_%uid%}%+1]%)\\n\\\n\t>setValue(integral_%uid%, %[%{integral_%uid%}%+10000]%)\\n\\\n\t>triggerEvent(DAKA_MONTH_%[%{daka_month_%uid%}%+1]%)",
"anchor_key": "神奇弹幕:EventAction",
"enabled": true,
"event": "SEND_GIFT"
}
]发送“签到/打卡”即可签到,发送“签到查询“可查看自己的签到天数。