战神引擎四合一福利领取Npc脚本

用于战神引擎四合一福利领取Npc脚本,一个脚本支持领取月卡、充值、加群、礼包码等四种方式领取福利,脚本是明文版的,支持任意习惯里面的礼包和领取条件。

战神引擎四合一福利领取Npc脚本

部分脚本

PROGRAM Mir2;
{$I common.pas}
var 
num :integer;
ylq:array[1..300] of integer; 
procedure _qingliquanju1;
begin

	SetG(60,1,0);
	SetG(60,2,0);
	SetG(60,3,0);
	SetG(60,4,0);
	SetG(60,5,0);
	This_NPC.NpcDialog(This_Player,
	'清理成功!\|'
	+'{cmd}<返回/@main>');
end;
procedure OnInitialize;
begin
	ylq[1]:=100;
	ylq[2]:=50;
	ylq[3]:=20;
	ylq[4]:=10;
	ylq[5]:=1;
	if GetG(60,1)<0 then
		_qingliquanju1
end;

Procedure _doexit;
begin
   This_Npc.CloseDialog(This_Player);
end;
procedure _Exit;
begin
  This_Npc.CloseDialog(This_Player);
end;
//主窗口
procedure domain;
begin
	This_NPC.NpcDialog(This_Player,
	+'|{cmd}<领取月卡奖励/@yuekajl> <领取充值奖励/@chongzhijl>'
	+'|{cmd}<领取加群奖励/@jiaqunjl> <领取推广奖励/@tuiguang> \'
//	+'|{cmd}<领取月卡奖励/@yuekajl> \'
	);
end;
//月卡窗口
procedure _yuekajl;
var byNum:integer;
begin
	if This_Player.GetV(70,10)<>GetMonth then
	begin
		This_Player.SetV(70,10,GetMonth);
		This_Player.SetV(70,9,0);
	end;
	if This_Player.GetV(70,9)<0 then
		This_Player.SetV(70,9,0)
	byNum:=This_Player.GetV(70,9);
	This_Npc.NpcDialog( This_Player,
	  '尊敬的  <'+This_Player.Name+'/fcolor=154>  勇士您好!|' +
	  '您本月已累计充值<'+inttostr(byNum)+'/fcolor=243>元!|' +
	  '<月卡福利:/fcolor=215>|'+
	  '1.每日赠送2瓶<祝福油/@@ItemInfo~祝福油>|' +
	  //'2.每日赠送1个传魔令牌|' ++
	  '2.每日赠送<金刚石/@@ItemInfo~金刚石>*5|' +
	  '3.开通远程仓库服务|' +
	  '4.每日赠送声望2点|' +
	  '5.每日赠送十万金币|' +
	  '6.每日赠送三倍经验卷1个|' +
	  '7.每日赠送幻境时间8小时|' +
	  '<开通条件:/fcolor=215> |'+
	  '每月充值满100元免费自动开通。' +
	  '|{cmd}<领取月卡奖励/@lqykjl> '+
	  '|{cmd}<返回/@main>'
		);
end;
//领取月卡奖励函数
procedure _lqykjl;
begin
	
	//This_Player.SetS(1,1,3);
	if (This_Player.GetV(70,9)>=100) and (This_Player.GetV(70,10)=GetMonth) then
		begin
			if This_Player.GetV(70,11) = GetDateNum(GetNow) then
				This_Player.PlayerNotice('event|centerTip|您已领取过今日奖励!',0)
			else
				begin
					if This_Player.FreeBagNum >= 4 then
						begin
							This_Player.SetV(70,11,GetDateNum(GetNow))
							This_Player.Give('祝福油',2);
							//This_Player.Give('传魔令牌',1);
							This_Player.Give('金刚石',5);
							This_Player.Give('三倍经验卷',1);
							This_Player.Give('幻境时间(会员)',1);
							This_Player.AddGold(100000);		
							This_Player.MyShengwan := This_Player.MyShengwan + 2;  //增加信用分1							
							This_NPC.NpcDialog(This_Player,
								'领取成功!'
								+'|{cmd}<返回/@yuekajl>\'
							);
						end
					else
						This_Player.PlayerNotice('event|centerTip|背包空间不足!',0)
				end
		end
	else
		This_Player.PlayerNotice('event|centerTip|您本月充值未达到100元,无法领取月卡每日奖励!',0)
end;
//45级奖励
function GetOtherItem1():string;
var playerJob:integer;
begin
	playerJob:=This_Player.Job;
	case playerJob of
		0:Result:='圣战戒指~圣战手镯~圣战项链~圣战头盔';
		1:Result:='法神戒指~法神手镯~法神项链~法神头盔';		
		2:Result:='天尊戒指~天尊手镯~天尊项链~天尊头盔';
	end	
end;
分享到:
赞(0)