用于战神引擎服务端的捐献脚本,脚本是仿制端游的捐献界面,捐献以后可以领取属性和进入指定的捐献地图,帮主把脚本+文件+自定义NPC对话框素材全部提取出来了,客户端必须要使用了裤衩或者登录器插件才行。否则不支持自定义对话框。行会捐献.txt这个文件放到D:\mud2.0\Mir200\Share\config这个文件夹下面。

部分脚本
procedure _DonaAbil;
begin
if ReadIniSectionStr('行会捐献.txt','捐献排名','1') = This_Player.Name then
begin
This_Player.AddPlayerAbil(0,30,3600);
This_Player.AddPlayerAbil(1,30,3600);
This_Player.AddPlayerAbil(2,30,3600);
This_Player.PlayerNotice('捐献排名:[第一名]攻魔道属性已生效!',2);
end else
begin
if ReadIniSectionStr('行会捐献.txt','捐献排名','2') = This_Player.Name then
begin
This_Player.AddPlayerAbil(0,20,3600);
This_Player.AddPlayerAbil(1,20,3600);
This_Player.AddPlayerAbil(2,20,3600);
This_Player.PlayerNotice('捐献排名:[第二名]攻魔道属性已生效!',2);
end else
begin
if ReadIniSectionStr('行会捐献.txt','捐献排名','3') = This_Player.Name then
begin
This_Player.AddPlayerAbil(0,15,3600);
This_Player.AddPlayerAbil(1,15,3600);
This_Player.AddPlayerAbil(2,15,3600);
This_Player.PlayerNotice('捐献排名:[第三名]攻魔道属性已生效!',2);
end else
begin
if ReadIniSectionStr('行会捐献.txt','捐献排名','4') = This_Player.Name then
begin
This_Player.AddPlayerAbil(0,10,3600);
This_Player.AddPlayerAbil(1,10,3600);
This_Player.AddPlayerAbil(2,10,3600);
This_Player.PlayerNotice('捐献排名:[第四名]攻魔道属性已生效!',2);
end else
begin
if ReadIniSectionStr('行会捐献.txt','捐献排名','5') = This_Player.Name then
begin
This_Player.AddPlayerAbil(0,5,3600);
This_Player.AddPlayerAbil(1,5,3600);
This_Player.AddPlayerAbil(2,5,3600);
This_Player.PlayerNotice('捐献排名:[第五名]攻魔道属性已生效!',2);
end else
begin
This_Player.AddPlayerAbil(0,100,0);
This_Player.AddPlayerAbil(1,100,0);
This_Player.AddPlayerAbil(2,100,0);
This_Player.PlayerNotice('捐献提示:您的当前无捐献排名!!',2);
end;
end;
end;
end;
end;
end;
procedure _StarDona;
begin
if ReadIniSectionStr('行会捐献.txt','捐献排名','1') = This_Player.Name then
begin
This_Player.playerNotice('你当前是捐献排名第一,无需重复捐献了!', 0);
end else
This_NPC.InputDialog(This_Player,'请输入你想为行会捐献的元宝数量:',0,111);
end;
procedure P111;
var i, index, temp_yb,DonaYBnum : integer;
begin
DonaYBnum:=StrToIntDef(This_Npc.InputStr ,-1);
if This_Player.YBNum < DonaYBnum then
begin
This_Player.playerNotice('你的元宝不足无法捐献!', 0);
Exit
end
if (DonaYBnum < 2000) or (DonaYBnum > 100000) then
begin
This_Npc.NpcDialog(This_Player,'请输入2000-100000之间的数字~'); exit
end
index:=0;
for i:=1 to 100 do
begin
if ReadIniSectionStr('行会捐献.txt','捐献列表',inttostr(i)) = This_Player.Name then
begin
index:=i;
break;
end
end
if index > 0 then
begin
WriteIniSectionStr('行会捐献.txt','捐献列表',inttostr(index),This_Player.Name);
end
else
begin
SetG(98,29,GetG(98,29)+1);
WriteIniSectionStr('行会捐献.txt','捐献列表',inttostr(GetG(98,29)),This_Player.Name);
end
if ReadIniSectionStr('行会捐献.txt','行会捐献',This_Player.Name) <> '' then
begin
temp_yb:=DonaYBnum + strtoint(ReadIniSectionStr('行会捐献.txt','行会捐献',This_Player.Name));
WriteIniSectionStr('行会捐献.txt','行会捐献',This_Player.Name,inttostr(temp_yb));
end else
begin
WriteIniSectionStr('行会捐献.txt','行会捐献',This_Player.Name,inttostr(DonaYBnum));
end;
//This_Player.DecLF(0, DonaYBnum, false); //扣除充值点
This_Player.ScriptRequestSubYBNum(DonaYBnum);
This_Player.PlayerNotice('捐献成功!',2);
ServerSay('【'+This_Player.Name+'】捐献了'+inttostr(DonaYBnum)+'个元宝!',0);
domain;
end;
//procedure _GMPage;
procedure Execute;
var i:integer;Clear_str:string;
begin
if ((GetHour = 23) and (GetMin > 56)) or ((GetHour = 0) and (GetMin < 2)) then
begin
for i:=1 to 100 do
begin
Clear_str:=ReadIniSectionStr('行会捐献.txt','捐献列表',inttostr(i));
if Clear_str <> '' then
begin
WriteIniSectionStr('行会捐献.txt','捐献列表',inttostr(i),'');
WriteIniSectionStr('行会捐献.txt','行会捐献',Clear_str,'');
end;
end;
SetG(98,29,0);
WriteIniSectionStr('行会捐献.txt','捐献排名','1','');
WriteIniSectionStr('行会捐献.txt','捐献排名','2','');
WriteIniSectionStr('行会捐献.txt','捐献排名','3','');
WriteIniSectionStr('行会捐献.txt','捐献排名','4','');
WriteIniSectionStr('行会捐献.txt','捐献排名','5','');
ServerSay('捐献排行榜已重置!', 2);
// _domain; 不在活动时间!',1,100);
end;








