战神引擎-沙巴克奖池充值捐献
这是一段战神引擎沙巴克充值金额捐献的脚本,捐献金额一部分用来作为沙巴克奖励,这样可以刺激玩家消费,我觉得这个NPC 功能挺不错的,领取奖励需要自己再弄一个沙巴克奖励领取NPC 。
program Mir2; var GetNum:integer; procedure _DoExit; begin This_Npc.CloseDialog(This_Player); end; Procedure _jiancechongzhi; begin This_DB.ExecuteQuery('SELECT AwardCodeType FROM gamedata.awardcodes WHERE '+ 'AwardCodeType = 48000 and ActiveParam = 1 and AwardCode = "' + This_Player.Name + '";'); if This_DB.PsEof() then begin This_Npc.NpcDialog(This_Player,'你都没充值(只有充值正好48元才可以捐献),瞎捐献个鸡毛!|\请充值好再试!'); // end else begin This_Npc.CloseDialog(This_Player); SetG(45,15,GetG(45,15)+48); This_Player.SetV(187,187,1); This_DB.ExecuteScript('update gamedata.awardcodes set' + ' ActiveParam = -1,OwnerChrName = "' + This_Player.Name + '", ModifyDate=NOW() '+ ' where AwardCode = "' + This_Player.Name + '";'); ServerSay('土豪<' + This_Player.Name + '>成功给为沙巴克捐献,本服累计沙巴克捐献:' + inttostr(getG(45,15))+'元', 3); This_Player.PlayerNotice('捐献成功!',0); This_Npc.NpcDialog(This_Player,'成功为沙巴克捐献了48块人民币.!'); end; end; procedure _resetSubmit; begin SetG(45,15,0); This_NPC.NpcDialog(This_Player,'清零成功'); end; procedure _lqsx; begin GetNum := This_Player.GetV(187,187); if GetNum >= 1 then begin //================ 这里添加赠送属性 This_Player.AddPlayerAbil(24,30,65535); This_Player.AddHeroAbil(24,30,65535); //This_Player.AddPlayerAbil(24,30,65535);// 100 攻击力 //============= ServerSay('玩家【' + This_Player.Name + '】开启了嗜血杀戮属性!',3); This_Npc.NpcDialog(This_Player,'属性开启成功.!'); end else This_Npc.NpcDialog(This_Player,'没捐献你点个几把啊.!'); end; procedure _lqsx5; begin GetNum := This_Player.GetV(187,187); if GetNum >= 1 then begin This_Player.RandomFlyTo('h010~1'); //This_Player.CallOut(This_Npc, 1, 'MFBG24'); ServerSay('捐献玩家【' + This_Player.Name + '】进入了捐献专署地图!!',3); end else This_NPC.NpcDialog(This_Player, '你沙捐不够48元!'); end;
procedure MFBG24; begin if CompareText(This_Player.MapName,'hd1~1') = 0 then begin // This_Player.CallOut(This_Npc, 1, 'MFBG24'); This_Player.Give('经验',20000); end; end; Begin if getg(45,15) < 0 then setg(45,15,0); if(This_Player.GMLevel>=5)then begin This_Npc.NpcDialog(This_Player, +'<捐献说明/c=red>'+'为沙巴克攻城所捐献金额<获胜方获得50%RMB/fcolor=250>. <失败方获得20%RMB/fcolor=242>.另外30%为服务器运营费.|<攻沙人民币奖励,绝不跑路, 合区后必须重新开启!/fcolor=242>|\'+ +'<捐献属性/c=red>'+'一次捐献<48元>充值,可享受:30攻击,魔法,道术加强属性丶进沙捐专属地图|\'+ +'<捐献方式/c=red>'+'单次充值正好<48元>后点击此处捐献.<切勿领取成充值元宝,若无激情奖励累计 下次发放!/fcolor=250>|\'+ +'<本区总捐献金额/c=red><['+inttostr(getG(45,15))+']/fcolor=250>元.|\'+ +'<沙城胜利方/c=red><['+inttostr(getG(45,15) div 2)+']/fcolor=242>元.|\'+ +'<沙城失败方/c=red><['+inttostr(getG(45,15) div 5)+']/fcolor=242>元.|\'+ +'<服务器维护/c=red><['+inttostr(getG(45,15) div 3)+']/fcolor=242>元.\'+ +'|{cmd}<捐献48元充值/@jiancechongzhi>^<领取捐献属性/@lqsx>\'+ +'|{cmd}<沙捐地图/@lqsx5>^<清除数据/@resetSubmit>\' ); end else This_Npc.NpcDialog(This_Player, +'<捐献说明/c=red>'+'为沙巴克攻城所捐献金额|<获胜方获得50%RMB/fcolor=250>. <失败方获得20%RMB/fcolor=242>.另外30%为服务器运营费.|<攻沙人民币奖励,绝不跑路, 合区后必须重新开启!/fcolor=242>|\'+ +'<捐献属性/c=red>'+'一次捐献<48元>充值,可享受:30攻击,魔法,道术加强属性丶进沙捐专属地图|\'+ +'<捐献方式/c=red>'+'单次充值正好<48元>后点击此处捐献.<切勿领取成充值元宝, 若无激情奖励累计下次发放!/fcolor=250>|\'+ +'<本区总捐献金额/c=red><['+inttostr(getG(45,15))+']/fcolor=250>元.|\'+ +'<沙城胜利方/c=red><['+inttostr(getG(45,15) div 2)+']/fcolor=242>元.|\'+ +'<沙城失败方/c=red><['+inttostr(getG(45,15) div 5)+']/fcolor=242>元.|\'+ +'<服务器维护/c=red><['+inttostr(getG(45,15) div 3)+']/fcolor=242>元.\'+ +'|{cmd}<沙捐地图/@lqsx5>\'+ +'|{cmd}<捐献48元充值/@jiancechongzhi>^<领取捐献属性/@lqsx>\' ); end. |