本帖最后由 星光 于 2025-5-17 15:07 编辑
之前的回答过于果断,不过之前打卡也确实是好用的,今天做卡时测试时,发现佣兵根本没有卡时的独立函数,这个佣兵打卡也不会按照原游戏模式每天增加1小时,可以说根本就没写佣兵打卡系统,但是我们可以利用玩家自身的打卡时间来实现佣兵打卡系统的闭环,按照这个逻辑只看玩家卡时,佣兵的卡时显示也就没必要存在了~
还可以添加调用条件,利用原游戏打卡NPC来实现佣兵打卡
复制代码
- function module:partyFeverControl(charIndex,command)
- -- 如果是开启打卡,先检查玩家卡时
- if command == 1 then
- local playerFeverTime = Char.GetData(charIndex, CONST.对象_卡时)
- if playerFeverTime <= 0 then
- NLG.SystemMessage(charIndex, "无法打卡,您已经没有卡时剩余。")
- return
- end
- end
-
- for slot = 0,4 do
- local p = Char.GetPartyMember(charIndex,slot)
- if(p>=0) then
- if Char.IsDummy(p) then
- Char.SetData(p, CONST.对象_卡时, 24 * 3600);
- end
- local name = Char.GetData(p,CONST.对象_名字);
- if(command ==1) then
- Char.FeverStart(p);
- NLG.UpChar(p);
- NLG.SystemMessage(charIndex, name.."打卡成功。");
- elseif(command ==0) then
- Char.FeverStop(p);
- NLG.UpChar(p);
- NLG.SystemMessage(charIndex, name.."关闭了打卡。");
- end
- end
- end
- end
复制代码
|