--地图位置已使用:1 function NPC6040163_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) local m = map.GetMapScriptData(MapID,InstanceID,1,1) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207153) --法阵大师:你确定要召唤那可怕的深渊怪物吗?如果确定的话请给我1百万战场金币作为材料损耗费 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 20) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) --取消 msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 20 then if m == nil or m == 0 then if role.GetWarGold(MapID, InstanceID,RoleID) >= 100 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207154) --法阵大师:好吧,既然你都这么确定了我也就不说什么了,那我开始召唤了。 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 21) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.DispatchRoleMsgEvent(RoleID, MsgID) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207155) --法阵大师:你的钱不够,我无法进行召唤 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.DispatchRoleMsgEvent(RoleID, MsgID) end else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207156) --你已经召唤过一次了,不能再招了。 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.DispatchRoleMsgEvent(RoleID, MsgID) end elseif TalkIndex == 21 then role.SetWarGold(MapID, InstanceID, RoleID, -100) --召唤手续费 local a = math.random(3) if a == 1 then for i = 0, 19 do local deg = math.random(360) local disc = math.random(1,20) map.MapCreateCreature(MapID, InstanceID, 4020105, math.floor(12544/50+ math.sin(deg) * disc), 3001, math.floor(29829/50 + math.cos(deg) * disc)) --召唤精英 end elseif a == 2 then map.MapCreateCreature(MapID, InstanceID, 4020106, 12544/50, 3001, 29829/50) --召唤boss elseif a == 3 then map.MapCreateCreature(MapID, InstanceID, 4020103, 12544/50, 3001, 29829/50) --召唤裂隙之魂 else dmap2_zhenshouzhe1 = map.MapCreateCreature(MapID, InstanceID, 4020099, 10829/50, 3192, 27984/50) --召唤镇守者 dmap2_zhenshouzhe2 = map.MapCreateCreature(MapID, InstanceID, 4020100, 8517/50, 3222, 30662/50) dmap2_zhenshouzhe3 = map.MapCreateCreature(MapID, InstanceID, 4020101, 13370/50, 3222, 33259/50) dmap2_zhenshouzhe4 = map.MapCreateCreature(MapID, InstanceID, 4020102, 14177/50, 2981, 30458/50) end map.SetMapScriptData(MapID,InstanceID,1,1,1) end end aux.RegisterCreatureEvent(6040163, 7, "NPC6040163_OnTalk") function c4020106_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) map.MapCreateCreature(MapID, InstanceID, 6040304, 12544/50, 3001, 29829/50) --召唤暗金宝箱 end aux.RegisterCreatureEvent(4020106, 4, "c4020106_OnDie") function c4020103_OnDie(MapID, InstanceID, TargetID, TargetTypeID, RoleID) map.MapCreateCreature(MapID, InstanceID, 6040304, 12544/50, 3001, 29829/50) --召唤暗金宝箱 end aux.RegisterCreatureEvent(4020103, 4, "c4020103_OnDie")