端游有通区捐献,手游目前还没有,暂时也不需要,主要是玩家没有端游那么多,捐献以后,玩家可以得到攻魔道属性,属性的多少,都可以在脚本里面任意修改,非常的方便,你们修改之前,记得备份一下文件。
脚本如下:
program mir2;
var
s1,s2,s3,s4,s5 : integer;
l1,l2,l3,l4,l5 : integer; //次数限制-变量
n1,n2,n3,n4,n5 : string;
num,num1,num2,today :integer;
procedure _DoExit;
begin
This_Npc.CloseDialog(This_Player);
end;
procedure _Exit;
begin
This_Npc.CloseDialog(This_Player);
end;
procedure domain;
begin
today := GetDateNum(GetNow); //定义today为当前日期值
if This_Player.GetV(78,10) <> today then //查询个人变量78,10 不等于当前日期则清理其他数据
begin
This_Player.SetV(78,10,today);
This_Player.SetV(78,1,0);
This_Player.SetV(78,2,0);
end;
if getg(78,10) <> today then //查询个人变量78,10 不等于当前日期则清理其他数据
begin
SetG(78,10,today);
SetG(78,1,0);
SetG(78,2,0);
SetG(78,3,0);
SetG(78,4,0);
SetG(78,5,0);
end;
if This_Player.getV(78,1) < 0 then This_Player.SetV(78,1,0); //初始化个人变量
if This_Player.getV(78,2) < 0 then This_Player.SetV(78,2,0); //初始化个人变量
num := StrToIntDef(This_NPC.InputStr,-1);
if getg(78,1) < 0 then //初始化全局变量
SetG(78,1,0);
if getg(78,2) < 0 then
SetG(78,2,0);
if getg(78,3) < 0 then
SetG(78,3,0);
if getg(78,4) < 0 then
SetG(78,4,0);
if getg(78,5) < 0 then
SetG(78,5,0);
s1 := getg(78,1); //定义变量
s2 := getg(78,2);
s3 := getg(78,3);
s4 := getg(78,4);
s5 := getg(78,5);
This_NPC.NpcDialog(This_Player,
'┏━━━━━━━━━━━━━━━━━━━┓\'+
'|<你元宝献数为 c="254"><'+inttostr(this_player.getv(78,1))+' c="249"> \'
+'|<每日0点更新捐献 c="254">\'
+'|<捐献系统主号和英雄会同时得到属性加成 c="254">\'
+'|<【第一名】 c="249"><神秘玩家: c="245">'+n1+' <捐献【 c="245"><'+ inttostr(s1)+'/c=249><】元宝 c="245"> \'
+'|<【第二名】 c="243"><神秘玩家: c="245">'+n2+' <捐献【 c="245"><'+ inttostr(s2)+'/c=249><】元宝 c="245"> \'
+'|<【第三名】 c="253"><神秘玩家: c="245">'+n3+' <捐献【 c="245"><'+ inttostr(s3)+'/c=249><】元宝 c="245"> \'
+'|<【第四名】 c="252"><神秘玩家: c="245">'+n4+' <捐献【 c="245"><'+ inttostr(s4)+'/c=249><】元宝 c="245"> \'
+'|<【第五名】 c="254"><神秘玩家: c="245">'+n5+' <捐献【 c="245"><'+ inttostr(s5)+'/c=249><】元宝 c="245"> \'
+'|<【第六名】 c="250"><后所有人: c="245"> \'
+'|┗━━━━━━━━━━━━━━━━━━━┛\'
+'|{cmd}<我要捐献 jxyb=""> ^<查询属性 shuxing=""> '
+'|{cmd}<刷新 main="">^<领取属性 lqsx11=""> '
);
end;
procedure _shuxing;
begin
This_NPC.NpcDialog(This_Player,
'┏━━━━━━━━━━━━━━━━━━━┓\'+
'|<你元宝捐献数为 c="254"><'+inttostr(this_player.getv(78,1))+' c="red"> \'
+'|<【第一名】 c="249">:攻魔道30-30 <捐献【 c="245"><'+ inttostr(s1)+'/c=249><】元宝 c="245"> \'
+'|<【第二名】 c="243">:攻魔道20-20 <捐献【 c="245"><'+ inttostr(s2)+'/c=249><】元宝 c="245"> \'
+'|<【第三名】 c="253">:攻魔道15-15 <捐献【 c="245"><'+ inttostr(s3)+'/c=249><】元宝 c="245"> \'
+'|<【第四名】 c="252">:攻魔道10-10 <捐献【 c="245"><'+ inttostr(s4)+'/c=249><】元宝 c="245"> \'
+'|<【第五名】 c="254">:攻魔道加5-5 <捐献【 c="245"><'+ inttostr(s5)+'/c=249><】元宝 c="245"> \'
+'|<【第六名】 c="250">:<后所有人: c="245"> \'
+'|┗━━━━━━━━━━━━━━━━━━━┛\'
+'|{cmd}<返回 main="">');
end;
procedure _lqsx;
begin
This_Player.CallOut(This_NPC,1,'lqsx1');
end;
procedure _lqsx11;
begin
if This_Player.GetV(78,1) > 0 then
begin
if This_Player.GetV(78,1) = s1 then
begin
This_Player.AddPlayerAbil(0,30,3600);
This_Player.AddPlayerAbil(1,30,3600);
This_Player.AddPlayerAbil(2,30,3600);
This_Player.AddHeroAbil(0,30,3600); //英雄一起增加属性,可以删除
This_Player.AddHeroAbil(1,30,3600);
This_Player.AddHeroAbil(2,30,3600);
This_Player.SetV(78,2,2);
This_Player.PlayerNotice('捐献属性领取成功:全属性增加50,时效1小时,过时请手动领取',2);
end
else
if This_Player.GetV(78,1) = s2 then
begin
This_Player.AddPlayerAbil(0,20,3600);
This_Player.AddPlayerAbil(1,20,3600);
This_Player.AddPlayerAbil(2,20,3600);
This_Player.AddHeroAbil(0,20,3600);
This_Player.AddHeroAbil(1,20,3600);
This_Player.AddHeroAbil(2,20,3600);
This_Player.SetV(78,2,2);
This_Player.PlayerNotice('捐献属性领取成功:全属性增加40,时效1小时,过时请手动领取',2);
end
else
if This_Player.GetV(78,1) = s3 then
begin
This_Player.AddPlayerAbil(0,15,3600);
This_Player.AddPlayerAbil(1,15,3600);
This_Player.AddPlayerAbil(2,15,3600);
This_Player.AddHeroAbil(0,15,3600);
This_Player.AddHeroAbil(1,15,3600);
This_Player.AddHeroAbil(2,15,3600);
This_Player.SetV(78,2,2);
This_Player.PlayerNotice('捐献属性领取成功:全属性增加30,时效1小时,过时请手动领取',2);
end
else
if This_Player.GetV(78,1) = s4 then
begin
This_Player.AddPlayerAbil(0,10,3600);
This_Player.AddPlayerAbil(1,10,3600);
This_Player.AddPlayerAbil(2,10,3600);
This_Player.AddHeroAbil(0,10,3600);
This_Player.AddHeroAbil(1,10,3600);
This_Player.AddHeroAbil(2,10,3600);
This_Player.SetV(78,2,2);
This_Player.PlayerNotice('捐献属性领取成功:全属性增加20,时效1小时,过时请手动领取',2);
end
else
if This_Player.GetV(78,1) = s5 then
begin
This_Player.AddPlayerAbil(0,5,3600);
This_Player.AddPlayerAbil(1,5,3600);
This_Player.AddPlayerAbil(2,5,3600);
This_Player.AddHeroAbil(0,5,3600);
This_Player.AddHeroAbil(1,5,3600);
This_Player.AddHeroAbil(2,5,3600);
This_Player.SetV(78,2,2);
This_Player.PlayerNotice('捐献属性领取成功:全属性增加10,时效1小时,过时请手动领取',2);
end
else
if This_Player.GetV(78,1) < s5 then
begin
This_Player.AddPlayerAbil(0,2,3600);
This_Player.AddPlayerAbil(1,2,3600);
This_Player.AddPlayerAbil(2,2,3600);
This_Player.AddHeroAbil(0,2,3600);
This_Player.AddHeroAbil(1,2,3600);
This_Player.AddHeroAbil(2,2,3600);
This_Player.SetV(78,2,2);
This_Player.PlayerNotice('捐献属性领取成功:全属性增加5,时效1小时,过时请手动领取',2);
end;
end
else
begin
This_Player.PlayerNotice('你还没有捐献记录,无法领取',2);
end;
end;
procedure _jxyb;
begin
This_NPC.InputDialog(This_Player,'请输入捐献元宝数',0,111) ;
end;
procedure p111;
begin
num := StrToIntDef(This_NPC.InputStr,-1);//输入非阿拉伯数字的字符都返回-1
if This_NPC.InputOK then
begin
if (num < 1) or (num > 65534) then
begin
This_NPC.NpcDialog(This_Player,'捐献一次至少1元宝,总额不能大于65534,只能使用阿拉伯数字!') ;
end
else if (num >= 1) and (num < 65535) then
begin
if This_Player.YBNum >= num then
begin
This_Player.PsYBConsum(This_NPC,'xin',20001,num,1);
This_Player.CallOut(This_NPC,1,'jxyb');
This_NPC.NpcDialog(This_Player,'捐献成功!' +'{cmd}<返回 main="">') ;
end else
This_NPC.NpcDialog(This_Player,'你没有足够的元宝捐献!' +'{cmd}<返回 main="">') ;
end;
end;
end;
procedure jxyb;
begin
num := StrToIntDef(This_NPC.InputStr,-1);//现在捐献元宝数,输入非阿拉伯数字的字符都返回-1
num1 := This_Player.getV(78,1); //已捐献元宝数
num2 :=num + num1; //总捐献元宝
s1 := getg(78,1); //全局第1
s2:= getg(78,2); //全局第2
s3 := getg(78,3); //全局第3
s4 := getg(78,4); //全局第4
s5 := getg(78,5); //全局第5
if num2 > s1 then //如果总捐献大于第一名
begin
SetG(78,5,s4);
SetG(78,4,s3);
SetG(78,3,s2);
SetG(78,2,s1);
SetG(78,1,num2); //第一名 写入你的捐献元宝数
This_Player.SetV(78,1,num2); //个人变量标记
This_Player.SetV(78,2,1); //个人变量标记
//n1 := This_Player.Name; //第一名写入你的名字
end
else
if (num2 > s2) and (num2 < s1) then
begin
SetG(78,5,s4);
SetG(78,4,s3);
SetG(78,3,s2);
SetG(78,1,s1);
SetG(78,2,num2);
This_Player.SetV(78,1,num2);
This_Player.SetV(78,2,1); //个人变量标记
//n2 := This_Player.Name;
end
else
if (num2 > s3) and (num2 < s2) then
begin
SetG(78,5,s4);
SetG(78,4,s3);
SetG(78,2,s2);
SetG(78,1,s1);
SetG(78,3,num2);
This_Player.SetV(78,1,num2);
This_Player.SetV(78,2,1); //个人变量标记
//n3 := This_Player.Name;
end
else
if (num2 > s4) and (num2 < s3) then
begin
SetG(78,5,s4);
SetG(78,3,s3);
SetG(78,2,s2);
SetG(78,1,s1);
SetG(78,4,num2);
This_Player.SetV(78,1,num2);
This_Player.SetV(78,2,1); //个人变量标记
//n4 := This_Player.Name;
end
else
if (num2 > s5) and (num2 < s4) then
begin
SetG(78,4,s4);
SetG(78,3,s3);
SetG(78,2,s2);
SetG(78,1,s1);
SetG(78,5,num2);
This_Player.SetV(78,1,num2);
This_Player.SetV(78,2,1); //个人变量标记
//n5 := This_Player.Name;
end
else
if num2 < s5 then
begin
This_Player.SetV(78,1,num2);
This_Player.SetV(78,2,1); //个人变量标记
end;
end;
function xin(price, num: Integer):boolean;
begin
result := true;
end;
begin
domain;
end.