用于战神引擎的元宝回收自定义NPC脚本,脚本自带了七套装备的,通用性非常高,NPC上牵扯到的素材比较多,帮主把牵扯到的都压缩进去了,你们在添加的时候,需要针对性的提取出来,不能直接覆盖到原先的自定义素材文件夹。

部分脚本
procedure _ZUma_True;
var ZMnum , i , j , itemNum : integer;
Iname : string;
begin
ZMnum := 0;
for i := 1 to 13 do
begin
Iname := getZBnameById(100 + i);
if Iname <> '' then
begin
itemNum := This_Player.GetBagItemCount(Iname);
if itemNum > 0 then
begin
ZMnum := ZMnum + itemNum;
This_Player.Take(Iname, itemNum);
for j := 1 to itemNum do
This_Player.Give('经验', ADDLFNum(1) * 1000);
end;
end;
end;
This_NPC.NpcNotice('恭喜“' + This_Player.Name +'回收祖玛装备获得: '+ inttostr(ADDLFNum(1) * 1000 div 10000 * ZMnum) + '万经验!' );
This_NPC.NpcDialog(This_Player,
'恭喜你获得:' + inttostr(ADDLFNum(1) * 1000 div 10000 * ZMnum) + '万经验!\|'
+'|{cmd}<返回/@main>');
end;
procedure _Chiyue_all;
var ZMnum , i : integer;
Iname : string;
begin
ZMnum := 0;
for i := 1 to 12 do
begin
Iname := getZBnameById(200 + i);
if Iname <> '' then
begin
if This_Player.GetBagItemCount(Iname) > 0 then
begin
ZMnum := ZMnum + This_Player.GetBagItemCount(Iname);
end;
end;
end;
This_NPC.NpcDialog(This_Player,
'你的包裹中有' + inttostr(ZMnum) + '件赤月装备,回收可获得:' + inttostr(ADDLFNum(2) div 1 * ZMnum) + '个元宝,你确定回收所有赤月装备吗?\|'
+'|{cmd}<确认回收所有赤月装备/@Chiyue_True>'
+'|{cmd}<返回/@zhuangDlg~2>');
end;
procedure _Chiyue_True;
var ZMnum , i , j , itemNum : integer;
Iname : string;
begin
ZMnum := 0;
for i := 1 to 12 do
begin
Iname := getZBnameById(200 + i);
if Iname <> '' then
begin
itemNum := This_Player.GetBagItemCount(Iname);
if itemNum > 0 then
begin
ZMnum := ZMnum + itemNum;
This_Player.Take(Iname, itemNum);
for j := 1 to itemNum do
This_Player.ScriptRequestAddYBNum(ADDLFNum(2));
end;
end;
end;
This_NPC.NpcNotice('恭喜“' + This_Player.Name +'回收赤月装备获得: '+ inttostr(ADDLFNum(2) div 1 * ZMnum) + '个元宝!' )
This_NPC.NpcDialog(This_Player,
'恭喜你获得:' + inttostr(ADDLFNum(2) div 1 * ZMnum) + '个元宝!\|'
+'|{cmd}<返回/@main>');
// begin
//
// end;
end;
procedure _Chiyue_a22;
var ZMnum , i : integer;
Iname : string;
begin
ZMnum := 0;
for i := 1 to 21 do
begin
Iname := getZBnameById(300 + i);
if Iname <> '' then
begin
if This_Player.GetBagItemCount(Iname) > 0 then
begin
ZMnum := ZMnum + This_Player.GetBagItemCount(Iname);
end;
end;
end;
This_NPC.NpcDialog(This_Player,
'你的包裹中有' + inttostr(ZMnum) + '件魔龙装备,回收可获得:' + inttostr(ADDLFNum(3) div 1 * ZMnum) + '个元宝,你确定回收所有魔龙装备吗?\|'
+'|{cmd}<确认回收所有魔龙装备/@Chiyue_True22>'
+'|{cmd}<返回/@zhuangDlg~3>');
end;
procedure _Chiyue_True22;
var ZMnum , i , j , itemNum : integer;
Iname : string;
begin
ZMnum := 0;
for i := 1 to 21 do
begin
Iname := getZBnameById(300 + i);
if Iname <> '' then
begin
itemNum := This_Player.GetBagItemCount(Iname);
if itemNum > 0 then
begin
ZMnum := ZMnum + itemNum;
This_Player.Take(Iname, itemNum);
for j := 1 to itemNum do
This_Player.ScriptRequestAddYBNum(ADDLFNum(3));
end;
end;
end;
This_NPC.NpcNotice('恭喜“' + This_Player.Name +'回收魔龙装备获得: '+ inttostr(ADDLFNum(3) div 1 * ZMnum) + '个元宝!' )
This_NPC.NpcDialog(This_Player,
'恭喜你获得:' + inttostr(ADDLFNum(3) div 1 * ZMnum) + '个元宝!\|'
+'|{cmd}<返回/@main>');
end;
procedure _ChiYue_a33;
var ZMnum , i : integer;
Iname : string;
begin
ZMnum := 0;
for i := 1 to 9 do
begin
Iname := getZBnameById(400 + i);
if Iname <> '' then
begin
if This_Player.GetBagItemCount(Iname) > 0 then
begin
ZMnum := ZMnum + This_Player.GetBagItemCount(Iname);
end;
end;
end;
This_NPC.NpcDialog(This_Player,
'你的包裹中有' + inttostr(ZMnum) + '件普通装备,回收可获得:' + inttostr(ADDLFNum(4) div 1* ZMnum) + '个元宝,你确定回收所有普通装备吗?\|'
+'|{cmd}<确认回收所有普通装备/@ZUma_True33>'
+'|{cmd}<返回/@zhuangDlg~4>');
end;








