用于战神引擎的金币商城Npc脚本,玩家通过金币购买NPC上的装备物品,脚本是明文版,可以任意修改里面的价格和商品内容,脚本是单文件的,直接添加就可以使用了,没有牵扯到其他的文件和变量。

部分脚本
program mir2;
procedure _yibao;
begin
if This_Player.FreeBagNum > 1 then
begin
if This_Player.GoldNum >= 30000 then
begin
This_Player.Give('疗伤药包',1);
This_Player.DecGold(30000);
end else
This_Npc.NpcDialog(This_Player,
'对不起,你金币不足3W,不能购买疗伤药包!'
);
end else
This_Npc.NpcDialog(This_Player,
'对不起,你背包已满!'
);
end;
procedure _wubao;
begin
if This_Player.FreeBagNum > 5 then
begin
if This_Player.GoldNum >= 140000 then
begin
This_Player.Give('疗伤药包',5);
This_Player.DecGold(140000);
end else
This_Npc.NpcDialog(This_Player,
'对不起,你金币不足14W,不能购买疗伤药包!'
);
end else
This_Npc.NpcDialog(This_Player,
'对不起,你背包已满!'
);
end;
procedure _shibao;
begin
if This_Player.FreeBagNum > 10 then
begin
if This_Player.GoldNum >= 280000 then
begin
This_Player.Give('疗伤药包',10);
This_Player.DecGold(280000);
end else
This_Npc.NpcDialog(This_Player,
'对不起,你金币不足28W,不能购买疗伤药包!'
);
end else
This_Npc.NpcDialog(This_Player,
'对不起,你背包已满!'
);
end;
procedure _M5;
begin
This_Npc.NpcDialog(This_Player,
'|< /c=red>\'+
'|<疗伤药一包:/c=red>需要3W金币<购买/@yibao>\'+
'|<疗伤药五包:/c=red>需要14w金币<购买/@wubao>\'+
'|<疗伤药十包:/c=red>需要28W金币<购买/@shibao>\'+
'|< /c=red>\'
);
end;








