--dmap2圣鱼岛传入人(一下文字说明待修改) function chuansong_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 650330) --“米开诺:\n 圣鱼岛是三界里最美丽的岛屿,现在魔族大军将要抢夺岛上的远古力量,企图占领圣鱼岛!你愿意前去帮助我们抵御他们吗?” msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 4) --取消按钮 msg.AddMsgEvent(MsgID, 1, 100001) --“确定” msg.AddMsgEvent(MsgID, 21, 5) --取消按钮 msg.AddMsgEvent(MsgID, 1, 100002) --“取消” msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 4 then local level = role.GetRoleLevel(MapID, InstanceID, RoleID) if level < 60 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 650331) --米开诺:\n 对不起,只有大于60级的玩家才可以参与战斗 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 5) --取消按钮 msg.AddMsgEvent(MsgID, 1, 100001) --“确定” msg.DispatchRoleMsgEvent(RoleID, MsgID) else if role.GetBagFreeSize(RoleID) < 2 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 444266) --本尼:背包剩余不足警告 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮 msg.AddMsgEvent(MsgID, 1, 100001) -- “确定” msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息 else if role.GetRoleItemNum(RoleID, 3010138) >= 1 then role.RemoveFromRole(MapID, InstanceID, RoleID, 3010138, 1, 420) role.RoleGotoNewMap(MapID, InstanceID, RoleID, 2962677164, 22005/50, 2811, 10518/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 650332) --米开诺:\n 对不起,你身上没有圣鱼令!(圣鱼令可以每日在米开罗那里领取) msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 5) --取消按钮 msg.AddMsgEvent(MsgID, 1, 100002) --“取消” msg.DispatchRoleMsgEvent(RoleID, MsgID) end end end --[[local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 100012) --魏格纳:\n 对不起,只有大于60级的玩家才可以参与战斗 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 30) --取消按钮 msg.AddMsgEvent(MsgID, 1, 100001) --“确定” msg.DispatchRoleMsgEvent(RoleID, MsgID)]] end end aux.RegisterCreatureEvent(4020162, 7, "chuansong_OnTalk") --dmap1 function jinruemoshangu_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207501) --本尼:\n 恶魔山谷是适合众位游历的地方,但是现在却被一股位置的力量所攻占,那么大家尽全力去守卫它吧。 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 4) --取消按钮 msg.AddMsgEvent(MsgID, 1, 100001) --“确定” msg.AddMsgEvent(MsgID, 21, 5) --取消按钮 msg.AddMsgEvent(MsgID, 1, 100002) --“取消” msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 4 then local level = role.GetRoleLevel(MapID, InstanceID, RoleID) if level < 60 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20,207502) --本尼:\n 对不起,只有大于60级的玩家才可以参与战斗 msg.AddMsgEvent(MsgID, 24,TargetID) --npcid msg.AddMsgEvent(MsgID, 21,5) --取消按钮 msg.AddMsgEvent(MsgID, 1,100001) --“确定” msg.DispatchRoleMsgEvent(RoleID, MsgID) else if role.GetBagFreeSize(RoleID) < 5 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207577) --本尼:背包剩余不足警告 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, -1) -- 确定按钮 msg.AddMsgEvent(MsgID, 1, 100001) -- “确定” msg.DispatchRoleMsgEvent(RoleID, MsgID) --发送消息 else if role.GetRoleItemNum(RoleID, 4810172) >= 1 then role.RemoveFromRole(MapID, InstanceID, RoleID, 4810172, 1, 420) role.RoleGotoNewMap(MapID, InstanceID, RoleID, 2962677420, 949,4962,108) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20,207503) --本尼:\n 对不起,你身上没有恶魔山谷探险证!(恶魔山谷探险证可以每日在瑞克欧康纳队长那里领取) msg.AddMsgEvent(MsgID, 24,TargetID) --npcid msg.AddMsgEvent(MsgID, 21,5) --取消按钮 msg.AddMsgEvent(MsgID, 1,100002) --“取消” msg.DispatchRoleMsgEvent(RoleID, MsgID) end end end --[[local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 100012) --魏格纳:\n 对不起,只有大于60级的玩家才可以参与战斗 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 30) --取消按钮 msg.AddMsgEvent(MsgID, 1, 100001) --“确定” msg.DispatchRoleMsgEvent(RoleID, MsgID) ]] end end aux.RegisterCreatureEvent(1086579, 7, "jinruemoshangu_OnTalk") function emoshanguchuanhsong_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) local x = role.GetWarGold(MapID, InstanceID,RoleID) if TalkIndex == -1 then if map.GetMapScriptData(MapID,InstanceID,1,7) ~= 1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207554) --伊芙娜: msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif map.GetMapScriptData(MapID,InstanceID,1,7) == 0 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207556) --伊芙娜: msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.DispatchRoleMsgEvent(RoleID, MsgID) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207511) --伊芙娜:\n 恶魔山谷是一个庞大的地方,走起来是很消耗时间的,那么让我祝你一臂之力吧。传送到每个地方需要花不同的费用的。\n 传送到基地、亚马顿雷谷、科尔森林和里丁沼泽中间免费\n 传送到尼罗贝雪山、哈耳高地和威丁岩地各10战场金币\n 传送到迪威伦峡谷和林河峡谷中间各30战场金币\n 传送到秘密藏宝库60战场金币 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 4) msg.AddMsgEvent(MsgID, 1, 207512) --传送到基地 msg.AddMsgEvent(MsgID, 21, 5) msg.AddMsgEvent(MsgID, 1, 207513) --传送到亚马顿雷谷 msg.AddMsgEvent(MsgID, 21, 6) msg.AddMsgEvent(MsgID, 1, 207514) --传送到科尔森林 msg.AddMsgEvent(MsgID, 21, 7) msg.AddMsgEvent(MsgID, 1, 207515) --传送到尼罗贝雪山 msg.AddMsgEvent(MsgID, 21, 8) msg.AddMsgEvent(MsgID, 1, 207516) --传送到哈耳高地 msg.AddMsgEvent(MsgID, 21, 9) msg.AddMsgEvent(MsgID, 1, 207517) --传送到威丁岩地 msg.AddMsgEvent(MsgID, 21, 10 ) msg.AddMsgEvent(MsgID, 1, 207518) --传送到迪威伦峡谷和林河峡谷中间 msg.AddMsgEvent(MsgID, 21, 11 ) msg.AddMsgEvent(MsgID, 1, 207519) --传送到秘密藏宝库 msg.DispatchRoleMsgEvent(RoleID, MsgID) end elseif TalkIndex == 4 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 45700/50,4212,4400/50) elseif TalkIndex == 5 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 19350/50,4458,13000/50) elseif TalkIndex == 6 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 35531/50,4647,18676/50) elseif TalkIndex == 7 then if x >= 10 then role.SetWarGold(MapID, InstanceID,RoleID,-10) role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 16300/50,5025,31050/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207553) --你身上战场金币不足 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.DispatchRoleMsgEvent(RoleID, MsgID) end elseif TalkIndex == 8 then if x >= 10 then role.SetWarGold(MapID, InstanceID,RoleID,-10) role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 19900/50,5866,35750/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207553) --你身上战场金币不足 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.DispatchRoleMsgEvent(RoleID, MsgID) end elseif TalkIndex == 9 then if x >= 10 then role.SetWarGold(MapID, InstanceID,RoleID,-10) role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 24800/50,7912,33100/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207553) --你身上战场金币不足 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.DispatchRoleMsgEvent(RoleID, MsgID) end elseif TalkIndex == 10 then if x >= 30 then role.SetWarGold(MapID, InstanceID,RoleID,-30) role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 46500/50,5336,32950/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207553) --你身上战场金币不足 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.DispatchRoleMsgEvent(RoleID, MsgID) end elseif TalkIndex == 11 then if x >= 60 then if map.GetMapScriptData(MapID,InstanceID,1,8) == 1 and map.GetMapScriptData(MapID,InstanceID,1,9) == 1 then role.SetWarGold(MapID, InstanceID,RoleID,-60) role.RoleGotoNewMap(MapID, InstanceID, RoleID, MapID, 5600/50,10,50750/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207569) --你身上战场金币不足 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.DispatchRoleMsgEvent(RoleID, MsgID) end else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207553) --你身上战场金币不足 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 12) msg.AddMsgEvent(MsgID, 1, 100001) --确定 msg.DispatchRoleMsgEvent(RoleID, MsgID) end end end aux.RegisterCreatureEvent(1086571, 7, "emoshanguchuanhsong_OnTalk") function likaiemoshangu_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207568) --本尼:\n 恶魔山谷是适合众位游历的地方,但是现在却被一股位置的力量所攻占,那么大家尽全力去守卫它吧。 msg.AddMsgEvent(MsgID, 24, TargetID) --npcid msg.AddMsgEvent(MsgID, 21, 4) --取消按钮 msg.AddMsgEvent(MsgID, 1, 100001) --“确定” msg.AddMsgEvent(MsgID, 21, 5) --取消按钮 msg.AddMsgEvent(MsgID, 1, 100002) --“取消” msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 4 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, 3424073512, 630, 1000, 630) end end aux.RegisterCreatureEvent(1086572, 7, "likaiemoshangu_OnTalk")