用于战神引擎的屠魔榜Npc脚本,脚本的功能是来记录玩家打怪获得积分和奖励。脚本牵扯到的文件,帮主都提取出来了,但是自定义NPC素材没有,因为素材储存的rs.zip做了二次加密。无法解压,脚本来自1.76狂战传奇。
没有自定义NPC对话框素材的问题,解决方法有2个
一:找类似的自定义NPC对话框素材,代替。
二:换成传统版,不要使用自定义对话框。
脚本牵扯到了很多变量,BOSS积分.ini、昨日BOSS积分.ini这2个文件放到D:\mud2.0\Mir200\Share\config这个文件夹下面,其他的方面自行深度研究。

部分脚本
Program Mir2;
{$I PanguSuit.pas}
var
MbNum:integer;
MbWp:String;
procedure OnInitialize;
begin
MbNum := 120000; //需要的声望值
MbWp := '精华x20 打怪暴率+20%'; //领取的物品,仅作展示用
end;
{
*=========================功能定制方式=========================
* 马克思:QQ1603664923
*=========================尊重原创=========================
}
procedure Execute;
var
btotal,mtotal,i,j,x,temp,undex,index:Integer;
showName,showPoint,temp_str,uname:String;
rankName : Array [1..500] of String;
rankInt : Array [1..500] of integer;
begin
if (GetHour = 0) and (GetMin = 0) then
begin
SetG(133,22,0);//清空狂暴+成
for i:=1 to 10 do
begin
uname:=ReadIniSectionStr('昨日BOSS积分.ini','排名',inttostr(i));
if length(uname) > 0 then
begin
WriteIniSectionStr('昨日BOSS积分.ini','领取情况',uname,'');
WriteIniSectionStr('昨日BOSS积分.ini','排名', inttostr(i), '');
end;
end;
for i:=1 to 500 do
begin
if ReadIniSectionStr('BOSS积分.ini','玩家列表',inttostr(i)) = '' then break;
showName:=ReadIniSectionStr('BOSS积分.ini','玩家列表',inttostr(i));
showPoint:=ReadIniSectionStr('BOSS积分.ini','积分情况',showName);
rankName[i]:=showName;
rankInt[i]:=strtointdef(showPoint,0);
end;
if showName <> '' then
begin
for i:=1 to 500 do
begin
//if rankInt[i] <= 0 then break;
if rankName[i] = '' then break;
for j:=1 to 500 do
begin
x:=j+1;
//if (rankInt[j] <= 0) or (rankInt[x] <= 0) then break;
if (rankName[j] = '') or (rankName[x] = '') then break;
if rankInt[j] < rankInt[x] then
begin
temp := rankInt[j];
rankInt[j] := rankInt[x];
rankInt[x] := temp;
temp_str:=rankName[j];
rankName[j] := rankName[x];
rankName[x] := temp_str;
end;
end;
end;
end;
for i:=1 to 10 Do
begin
if rankName[i] <> '' then
begin
WriteIniSectionStr('昨日BOSS积分.ini','排名',inttostr(i),rankName[i]);
WriteIniSectionStr('昨日BOSS积分.ini','领取情况',rankName[i],'未领取');
end;
end;
mtotal:=30000; //读取当日膜拜总声望;
WriteIniSectionStr('昨日BOSS积分.ini','昨日膜拜总声望','Total',inttostr(mtotal));
for i:=1 to 500 do
begin
uname:=ReadIniSectionStr('BOSS积分.ini','玩家列表',inttostr(i));
if length(uname) > 0 then
begin
//WriteIniSectionStr('BOSS积分.ini','玩家列表', inttostr(i), '');
WriteIniSectionStr('BOSS积分.ini','积分情况',uname,'');
WriteIniSectionStr('BOSS积分.ini','排名', inttostr(i), '');
end;
end;
WriteIniSectionStr('BOSS积分.ini','当日BOSS积分','Total','');
WriteIniSectionStr('BOSS积分.ini','当日膜拜总声望','Total','');
end;
end;








