每日签到Npc脚本(签到后领取奖品)

每日签到NPC脚本文件,用于战神手游引擎,玩家每天签到一次,可以领取对应的奖励,签到次数越多,奖品越丰厚,当然,关键是看GM的设置,因为每一个版本不一样,奖品肯定也不一样,脚本是明文版的,gm可以根据自己的要求,任意修改里面的内容。

每日签到Npc脚本(签到后领取奖品)

部分脚本

program Mir2;
{$I TaoZhuang.pas}
var
shuru : string;
BYB: integer;
GameTime,q1,q2,today,today1: integer;
procedure _exit;
begin
  This_Npc.CloseDialog(This_Player);
end;
procedure _doexit;
begin
  This_Npc.CloseDialog(This_Player);
end;
procedure loadPlayer;
var count:integer; Uname:string;
begin	
	count:=0;
	This_DB.ExecuteQuery('select ChrName from mir3.user_index where level >= 0 order by level desc;');	
	while not(This_DB.PsEof()) do
	begin	
		Uname:=This_DB.PsFieldByName('ChrName');
		if This_Player.FindPlayer(Uname) then	
		begin
			count:=count+1;
			WriteIniSectionStr('loadPlayer.txt','PlayerList',inttostr(count),Uname);	
			WriteIniSectionStr('loadPlayer.txt','PlayerList','reloadtime',inttostr(GetMin));	
		end				
		This_DB.PsNext();
	end;
end;
procedure reloadplayer;
var settime:integer;
begin
	settime:=strtointdef(ReadIniSectionStr('loadPlayer.txt','PlayerList','reloadtime'),-1);	
	settime:=settime;
	if GetMin <> settime then
	loadPlayer;
end;
function addSpace( s : string; needLen : Integer ) : string;
var
  i, j : Integer;
begin
  i := Length(s);
  if i < needLen then
  begin
    j := needLen - i;
    for i:=0 to j do
    begin
      s := s + ' ';
    end;
  end;
  Result := s;
end;
function xColor:String;
var temp_str : string; i : integer;
begin	
	for i:=1 to 2 do
	begin
		temp_str := temp_str + '<☆/fcolor='+inttostr(random(255)+1)+'>';			
	end
	temp_str := temp_str+ addSpace('', 2) + '<180热血版. 精心打造,值得体验/fcolor='+inttostr(random(14)+242)+'>'+temp_str;	
	Result := temp_str;		
end;
procedure xianshi;
var
GameTime,q1,q2,q10,today,today1: integer;
 begin
	GameTime := (GetDateNum(GetNow) - GetDateNum(GetOpenGameTime)) + 1
today := GetDateNum(GetNow);// 获取当前日期
if This_Player.GetV(158,1) <> today1 then     
    begin
       This_Player.SetV(158,1,today1);
       This_Player.SetV(158,2,0);
    end;
if This_Player.GetV(150,1) <> today1 then     
    begin
       This_Player.SetV(150,1,today1);
       This_Player.SetV(150,2,0);
    end;
	if This_Player.GetV(151,1) <> today then     
    begin
       This_Player.SetV(151,1,today);
       This_Player.SetV(151,2,0);
    end;
      q10 := This_Player.GetV(158,2); 
	      q1 := This_Player.GetV(150,2);  
		  q2 := This_Player.GetV(151,2);  
  if  q1 < 7 then
 if    GetDayOfWeek = 1 then
 begin
    This_Npc.NpcDialog(This_Player,
		  	   xColor+	
	'|<连续签到7天赠送100声望+2000元宝/fcolor='+inttostr(random(14)+242)+'>'+
	'|<【当前开服第】:/c=103><'+inttostr(GameTime)+' /SCOLOR=254>天\'+
    '|<【您当前灵符】:/c=103><'+inttostr(This_Player.MyLFnum)+' /SCOLOR=254>\'+
    '|<【您当前声望】:/c=103><'+inttostr(This_Player.MyShengwan)+' /SCOLOR=254>\'+
	'|<【您连续签到】:/c=103><'+inttostr(q1)+' /SCOLOR=254>天\'
   +'|{cmd}<点击签到/@Libaoma1>\'   
   +'|{cmd}<灵符商城/@bangdin>\'   
   );
end;  
 if    GetDayOfWeek = 2 then
 begin
    This_Npc.NpcDialog(This_Player,
		  	   xColor+	
	'|<连续签到7天赠送100声望+2000元宝/fcolor='+inttostr(random(14)+242)+'>'+
	'|<【当前开服第】:/c=103><'+inttostr(GameTime)+' /SCOLOR=254>天\'+
    '|<【您当前灵符】:/c=103><'+inttostr(This_Player.MyLFnum)+' /SCOLOR=254>\'+
    '|<【您当前声望】:/c=103><'+inttostr(This_Player.MyShengwan)+' /SCOLOR=254>\'+
	'|<【您连续签到】:/c=103><'+inttostr(q1)+' /SCOLOR=254>天\'
      +'|{cmd}<点击签到/@Libaoma2>\'
      +'|{cmd}<灵符商城/@bangdin>\'   
   );
end;  
 if    GetDayOfWeek = 3 then
 begin
    This_Npc.NpcDialog(This_Player,
		  	   xColor+	
	'|<连续签到7天赠送100声望+2000元宝/fcolor='+inttostr(random(14)+242)+'>'+
	'|<【当前开服第】:/c=103><'+inttostr(GameTime)+' /SCOLOR=254>天\'+
    '|<【您当前灵符】:/c=103><'+inttostr(This_Player.MyLFnum)+' /SCOLOR=254>\'+
    '|<【您当前声望】:/c=103><'+inttostr(This_Player.MyShengwan)+' /SCOLOR=254>\'+
	'|<【您连续签到】:/c=103><'+inttostr(q1)+' /SCOLOR=254>天\'
   +'|{cmd}<点击签到/@Libaoma3>\'
      +'|{cmd}<灵符商城/@bangdin>\'   
   );
end;  
 if    GetDayOfWeek = 4 then
 begin
    This_Npc.NpcDialog(This_Player,
		  	   xColor+	
	'|<连续签到7天赠送100声望+2000元宝/fcolor='+inttostr(random(14)+242)+'>'+
	'|<【当前开服第】:/c=103><'+inttostr(GameTime)+' /SCOLOR=254>天\'+
    '|<【您当前灵符】:/c=103><'+inttostr(This_Player.MyLFnum)+' /SCOLOR=254>\'+
    '|<【您当前声望】:/c=103><'+inttostr(This_Player.MyShengwan)+' /SCOLOR=254>\'+
	'|<【您连续签到】:/c=103><'+inttostr(q1)+' /SCOLOR=254>天\'
   +'|{cmd}<点击签到/@Libaoma4>\'
      +'|{cmd}<灵符商城/@bangdin>\'   
   );
end;   
 if    GetDayOfWeek = 5 then
 begin
    This_Npc.NpcDialog(This_Player,
		  	   xColor+	
	'|<连续签到7天赠送100声望+2000元宝/fcolor='+inttostr(random(14)+242)+'>'+
	'|<【当前开服第】:/c=103><'+inttostr(GameTime)+' /SCOLOR=254>天\'+
    '|<【您当前灵符】:/c=103><'+inttostr(This_Player.MyLFnum)+' /SCOLOR=254>\'+
    '|<【您当前声望】:/c=103><'+inttostr(This_Player.MyShengwan)+' /SCOLOR=254>\'+
	'|<【您连续签到】:/c=103><'+inttostr(q1)+' /SCOLOR=254>天\'
   +'|{cmd}<点击签到/@Libaoma5>\'
      +'|{cmd}<灵符商城/@bangdin>\'   
   );
end;  
 if    GetDayOfWeek = 6 then
 begin
    This_Npc.NpcDialog(This_Player,
		  	   xColor+	
	'|<连续签到7天赠送100声望+2000元宝/fcolor='+inttostr(random(14)+242)+'>'+
	'|<【当前开服第】:/c=103><'+inttostr(GameTime)+' /SCOLOR=254>天\'+
    '|<【您当前灵符】:/c=103><'+inttostr(This_Player.MyLFnum)+' /SCOLOR=254>\'+
    '|<【您当前声望】:/c=103><'+inttostr(This_Player.MyShengwan)+' /SCOLOR=254>\'+
	'|<【您连续签到】:/c=103><'+inttostr(q1)+' /SCOLOR=254>天\'
   +'|{cmd}<点击签到/@Libaoma6>\'
      +'|{cmd}<灵符商城/@bangdin>\'   
   );
end;  
 if    GetDayOfWeek = 7 then
 begin
    This_Npc.NpcDialog(This_Player,
		  	   xColor+	
	'|<连续签到7天赠送100声望+2000元宝/fcolor='+inttostr(random(14)+242)+'>'+
	'|<【当前开服第】:/c=103><'+inttostr(GameTime)+' /SCOLOR=254>天\'+
    '|<【您当前灵符】:/c=103><'+inttostr(This_Player.MyLFnum)+' /SCOLOR=254>\'+
    '|<【您当前声望】:/c=103><'+inttostr(This_Player.MyShengwan)+' /SCOLOR=254>\'+
	'|<【您连续签到】:/c=103><'+inttostr(q1)+' /SCOLOR=254>天\'
   +'|{cmd}<点击签到/@Libaoma7>\'
      +'|{cmd}<灵符商城/@bangdin>\'   
   );
end;
if q1 >=7 then 
begin
    This_Npc.NpcDialog(This_Player,
		  	   xColor+	
	'|<连续签到7天赠送100声望+2000元宝/fcolor='+inttostr(random(14)+242)+'>'+
	'|<【当前开服第】:/c=103><'+inttostr(GameTime)+' /SCOLOR=254>天\'+
    '|<【您当前灵符】:/c=103><'+inttostr(This_Player.MyLFnum)+' /SCOLOR=254>\'+
    '|<【您当前声望】:/c=103><'+inttostr(This_Player.MyShengwan)+' /SCOLOR=254>\'+
	'|<【您连续签到】:/c=103><'+inttostr(q1)+' /SCOLOR=254>天\'
   +'|{cmd}<连续签到7天领取奖励/@Libaoma9>\'   
   +'|{cmd}<点击签到/@Libaoma8>\'   
   +'|{cmd}<灵符商城/@bangdin>\'   
   );
  end ;
end;
procedure _bangdin;
begin
 This_Npc.NpcDialog(This_Player,
  '您的当前灵符:<'+inttostr(This_Player.MyLFnum)+' /SCOLOR=254>\'
   +'|您可以使用灵符购买下列物品'
   +'|{cmd}<50灵符购买烟花/@b1> \'
   +'|{cmd}<100灵符购买千里传音(大)/@b2>\'
   +'|{cmd}<100灵符购买两倍卷轴/@b3>\'
   +'|{cmd}<50灵符购买太阳水捆药绳/@b4>\'
   +'|{cmd}<50灵符购买召唤强化卷/@b5>\'
      +'|{cmd}<返回/@main>\'   
   );
end;
分享到:
赞(1)