function NPC1086098_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207401) msg.AddMsgEvent(MsgID, 24, TargetID) msg.AddMsgEvent(MsgID, 21, 4) msg.AddMsgEvent(MsgID, 1, 100001) msg.AddMsgEvent(MsgID, 21, 30) 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, 207403) msg.AddMsgEvent(MsgID, 24, TargetID) msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100001) msg.DispatchRoleMsgEvent(RoleID, MsgID) else if role.GetRoleItemNum(RoleID, 3010157) >= 1 then role.RemoveFromRole(MapID, InstanceID, RoleID, 3010157, 1, 420) role.RoleGotoNewMap(MapID, InstanceID, RoleID, 2818701571, 16516/50, 6193, 29142/50) else local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207404) msg.AddMsgEvent(MsgID, 24, TargetID) msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) msg.DispatchRoleMsgEvent(RoleID, MsgID) end end end end aux.RegisterCreatureEvent(1086098, 7, "NPC1086098_OnTalk") function NPC1086093_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207406) msg.AddMsgEvent(MsgID, 24, TargetID) msg.AddMsgEvent(MsgID, 21, 5) msg.AddMsgEvent(MsgID, 1, 100001) msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 5 then role.RoleGotoNewMap(MapID, InstanceID, RoleID, 3424073512, 606, 23510, 589) end end aux.RegisterCreatureEvent(1086093, 7, "NPC1086093_OnTalk") function NPC1086100_OnTalk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207408) msg.AddMsgEvent(MsgID, 24, TargetID) msg.AddMsgEvent(MsgID, 21, 5) msg.AddMsgEvent(MsgID, 1, 207410) msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 100002) msg.DispatchRoleMsgEvent(RoleID, MsgID) elseif TalkIndex == 5 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 207409) msg.AddMsgEvent(MsgID, 24, TargetID) msg.AddMsgEvent(MsgID, 21, 30) msg.AddMsgEvent(MsgID, 1, 207411) msg.DispatchRoleMsgEvent(RoleID, MsgID) end end aux.RegisterCreatureEvent(1086100, 7, "NPC1086100_OnTalk")