用于战神引擎的玩家输入激活码获得元宝+铜钱+充值点Npc脚本,脚本是明文版的,可以任意修改里面的获得货币的类型和比例,如果需要用到充值点,需要在RunQuest.pas里面添加对应的充值点变量判断,否则无法记录,脚本方面自行研究。
部分脚本
program mir2; procedure _youjian; begin This_NPC.InputDialog(This_Player,'请输入充值码',0,123) ; end; procedure p123; begin if This_NPC.InputOK then begin if This_Player.FreeBagNum >= 5 then //检测该玩家背包是否有3个及以上空格 begin if This_Npc.ChkStrInFile('\龙少\充值码.txt', This_NPC.InputStr) = true then //防刷,再次检测文档是否有该推广码 true=是 begin This_Npc.DelStrFromFile('\龙少\充值码.txt', This_NPC.InputStr); //删除 推广码.txt 内推广码 //This_Npc.AddStrToFile('\龙少\推广人员.txt', This_Player.Name); //写入该玩家名字到 推广人员.txt//给绑定物品 This_Player.ScriptRequestAddYBNum(1000000); This_Player.AddLF(0,1000); This_Player.setV(88,88,This_Player.GetV(88,88)+30); //充值点///// This_Player.setV(99,99,This_Player.GetV(99,99)+30); //充值点///// This_Player.SetV(14,5,This_Player.GetV(14,5)+1); This_NPC.AddStrToFile('\龙少\充值记录.txt',This_Player.Name+'-领取充值10元'+inttostr(This_Player.getV(14,5))+'次-时间:'+inttostr(GetYear)+'年'+inttostr(GetMonth)+'月'+inttostr(GetDay)+'日'+inttostr(GetHour)+'时'+inttostr(GetMin)+'分'); This_NPC.NpcNotice('玩家【'+This_Player.Name+'】领取了10元礼包!'); This_NPC.NpcDialog(This_Player, '恭喜:充值成功!' ); end else This_NPC.NpcDialog(This_Player,'充值码有误,请重新输入。'); end else This_NPC.NpcDialog(This_Player,'背包请留出5个空格'); end; end; procedure _youjian2; var today , num: integer; begin num := This_Player.GetV(14,4); if num <1 then begin if This_Player.level >= 45 then begin This_Player.ScriptRequestAddYBNum(1000000); This_Player.AddLF(0,100); This_Player.SetV(14,4,2); This_NPC.NpcNotice('玩家【'+This_Player.Name+'】领取了新手路费100W元宝+100灵符!'); end else This_Player.PlayerDialog( '<等级不够45级不能领取/c=red>' ); end else This_NPC.NpcDialog(This_Player, '<今天已领取了新手路费/c=red>'); end; begin