【完整实现】月卡、季卡、年卡脚本
以下是我实现的思路,如果你有更好的思路和解决方案,请做出辩解,兄弟们一起完善它。
NPC部分
#if
#act
mov P1 <$STR(U1)>
mov P2 <$UTCNow>
#if
LARGE P1 P2
#act
dec P1 P2
inc P1 2592000
mov P2 <$UTCNow>
inc P2 P1
#elseact
inc P2 2592000
#if
#act
mov U1 <$STR(P2)>
#if
#act
GameGold - 50
ADDNAMELIST ..\MapQuest_Def\Vip.txt
ADDNAMELIST ..\MapQuest_Def\Vip月名单.txt
SendMsg 0 恭喜 <$USERNAME> 成为月卡会员!
QM部分
[@会员处理]
{
#IF
CHECKNAMELIST ..\MapQuest_Def\Vip月名单.txt
#ACT
GOTO @处理月卡
BREAK
#IF
CHECKNAMELIST ..\MapQuest_Def\Vip季名单.txt
#ACT
GOTO @处理季卡
BREAK
#IF
CHECKNAMELIST ..\MapQuest_Def\Vip年名单.txt
#ACT
GOTO @处理年卡
BREAK
#IF
NOT CHECKNAMELIST ..\MapQuest_Def\Vip.txt
#ACT
MOV U1 0
BREAK
[@处理月卡]
#if
#act
MOV P1 <$UTCNow>
MOV P2 <$STR(U1)>
#if
LARGE P2 P1
#act
UnixToStr <$STR(P2)> S1 0
DEC P2 <$STR(P1)>
DIV P2 60
DIV P2 60
DIV P2 24
SendMsg 7 会员到期时间: <$STR(S1)> 剩余<$STR(P2)>天!!!
#elseact
DelNameList ..\MapQuest_Def\Vip.txt
DelNameList ..\MapQuest_Def\Vip月名单.txt
SendMsg 5 你的月会员已过期!!!
[@处理季卡]
#if
#act
MOV P1 <$UTCNow>
MOV P2 <$STR(U1)>
#if
LARGE P2 P1
#act
UnixToStr <$STR(P2)> S1 0
DEC P2 <$STR(P1)>
DIV P2 60
DIV P2 60
DIV P2 24
SendMsg 7 会员到期时间: <$STR(S1)> 剩余<$STR(P2)>天!!!
#elseact
DelNameList ..\MapQuest_Def\Vip.txt
DelNameList ..\MapQuest_Def\Vip季名单.txt
SendMsg 5 你的季会员已过期!!!
[@处理年卡]
#if
#act
MOV P1 <$UTCNow>
MOV P2 <$STR(U1)>
#if
LARGE P2 P1
#act
UnixToStr <$STR(P2)> S1 0
DEC P2 <$STR(P1)>
DIV P2 60
DIV P2 60
DIV P2 24
SendMsg 7 会员到期时间: <$STR(S1)> 剩余<$STR(P2)>天!!!
#elseact
DelNameList ..\MapQuest_Def\Vip.txt
DelNameList ..\MapQuest_Def\Vip年名单.txt
SendMsg 5 你的年会员已过期!!!
}
跨不了区和版本。
指定区不如用引擎自带的会员系统。 传奇千秋 发表于 2024-6-13 10:05
跨不了区和版本。
指定区不如用引擎自带的会员系统。
好像是的,对于有跨区的需求,这个不行。 又学习了 感谢分享,又学习了,谢谢楼主 引擎自带的会员系统就很方便~!!你这个整麻烦了~!!:lol 感觉没啥用,还是要感谢你的付出 感觉没啥用,还是要感谢你的付出 我是小白,不懂:lol
非常不错,支持一下 小手一抖金币到手!!
页:
[1]
2