GowLom2战神引擎传奇手游NPC商店配置脚本
所有商店中必须有OnInitialize方法,用于程序初始化时加载
该方法中This_Npc.AddStdMode(X);X为该商店可买卖、修理的物品对应DB表中StdMode的值
This_Npc.FillGoods(物品名,数量,时间);
如:This_Npc.FillGoods('布衣(男)',50,1);表示该商店每分钟会刷新50件布衣(男),
注:刷新时只补齐到50件
本帖隐藏的内容
比如衣服店
procedure_DoExit;
begin
This_Npc.CloseDialog(This_Player);
end;
proceduredomain;
begin
This_Npc.NpcDialog(This_Player,
+'感谢光临。请问有什么事情帮忙吗?\\'
+'|{cmd}<买衣服/@buy>'+addSpace('',24)+'|{cmd}<修复衣服/@repair>\'
+'|{cmd}<卖衣服/@sell>'+addSpace('',24)+'|{cmd}<特殊修理/@s_repair>\'
+'|{cmd}<退出/@doexit>');
end;
procedure_buy;
begin
This_Npc.NpcDialog(This_Player,
'要购买什么吗?\\\|{cmd}<返回/@main>'
);
This_Npc.Click_Buy(This_Player);
end;
procedure_Sell;
begin
This_Npc.NpcDialog(This_Player,
'请放上去要卖的衣服,我给估价。\头盔和帽子也收购,\最好在这儿一起卖吧。\\|{cmd}<返回/@main>'
);
This_Npc.Click_Sell(This_Player);
end;
procedure_Repair;
begin
This_Npc.NpcDialog(This_Player,
'可以修复衣服,头盔,帽子。\\\|{cmd}<返回/@main>'
);
This_Npc.Click_Repair(This_Player);
end;
procedureRepairDone;
begin
This_Npc.NpcDialog(This_Player,
'修得还算不错。\\\|{cmd}<返回/@main>'
);
end;
procedure_S_Repair;
begin
This_Npc.NpcDialog(This_Player,
'你这家伙,你可太幸运了,我正好有材料做特殊修补,\但费用是普通的3倍!'
);
This_Npc.Click_SRepair(This_Player);
end;
procedureSRepairDone;
begin
This_Npc.NpcDialog(This_Player,
'看上去它已经修好了……\请好好的使用它。\\|{cmd}<返回/@main>'
);
end;
//初始化操作
procedureOnInitialize;
begin
This_Npc.AddStdMode(10);//
This_Npc.AddStdMode(11);
This_Npc.AddStdMode(15);
This_Npc.AddStdMode(27);
This_Npc.AddStdMode(28);
This_Npc.FillGoods('布衣(男)',50,1);
This_Npc.FillGoods('布衣(女)',50,1);
This_Npc.FillGoods('轻型盔甲(男)',50,1);
This_Npc.FillGoods('轻型盔甲(女)',50,1);
This_Npc.FillGoods('中型盔甲(男)',50,1);
This_Npc.FillGoods('中型盔甲(女)',50,1);
This_Npc.FillGoods('重盔甲(男)',30,1);
This_Npc.FillGoods('重盔甲(女)',30,1);
This_Npc.FillGoods('魔法长袍(男)',50,1);
This_Npc.FillGoods('魔法长袍(女)',50,1);
This_Npc.FillGoods('灵魂战衣(男)',50,1);
This_Npc.FillGoods('灵魂战衣(女)',50,1);
This_Npc.FillGoods('幽灵战衣(男)',50,1);
This_Npc.FillGoods('幽灵战衣(女)',50,1);
This_Npc.FillGoods('恶魔长袍(男)',30,1);
This_Npc.FillGoods('恶魔长袍(女)',30,1);
This_Npc.FillGoods('战神盔甲(男)',30,1);
This_Npc.FillGoods('战神盔甲(女)',30,1);
This_Npc.SetRebate(100);
end;
//脚本执行的入口
begin
domain;
end.