烈焰私服服务端增加快速挖宝NPC脚本
发表时间:2017-12-15 07:04点击人气:责任编辑:admin
function ontalk2216(npc,event,player)
player:echo(0,npc:GetLowGUID(),[[
#&talk_line#&
<font color="#FF0000">快速挖宝:</font>
#&talk_line#&
<font color="#FF0000">挖宝概率和宝藏一样,1000元宝一次</font>
#&talk_line#&
<u><font color="#F4A460"><a href='event:M2402,10'>挖宝十次</a></font></u>
#&talk_line#&
<u><font color="#F4A460"><a href='event:M2402,50'>挖宝五十次</a></font></u>
#&talk_line#&
<u><font color="#F4A460"><a href='event:M2402,100'>挖宝一百次</a></font></u>
#&talk_line#&
<font color="#F4A460">挖宝物品请在挖宝仓库查看</font>
#&talk_line#&
<font color="#FFFF00">注意:使用快速挖宝别点宝藏,不然会卡!</font>
#&talk_line#&
<font color="#FFFF00">注意:使用快速挖宝别点宝藏,不然会卡!</font>
#&talk_line#&
<font color="#FFFF00">注意:使用快速挖宝别点宝藏,不然会卡!</font>
#&talk_line#&
]]);
end
----------------------------------------------------
----------------------------------------------------
Npc2216Funid =
{
[0] = ontalk2216;
}
function CreatureNpcFun(npc,event,player,funid)
if funid <=100 then
flag=OnLuckDraw(player, funid)
if flag == 2 then
player:alert(10,0,0,"元宝不足,无法挖掘宝藏");
end
end
ontalk2216(npc,event,player);
end
RegisterUnitEvent(2216,20,"ontalk2216")
RegisterUnitEvent(2216,29,"CreatureNpcFun")
调用了挖宝的一个方法.根据return的值来判断是否成功