function s57_9_CanTakeOverWhenOnline(MapID, RoleID) return 52649462, 621, 40, 135 end aux.RegisterMapEvent("s57_9", 12, "s57_9_CanTakeOverWhenOnline") function s57_9_GetExporMapAndCoord(MapID, InstanceID, RoleID) return 1, 3424073512, 610 + math.random(5), 23094, 669 + math.random(5) end aux.RegisterMapEvent("s57_9", 13, "s57_9_GetExporMapAndCoord") function s57_9GetOnePerfectMap(MapID, InstanceID, RoleID) return 1 end aux.RegisterMapEvent("s57_9", 14, "s57_9GetOnePerfectMap") function s57_9_CanEnter(MapID, InstanceID, RoleID) if role.GetRoleLevel(MapID, InstanceID, RoleID) >= 80 then return 1 else return 0 end end aux.RegisterMapEvent("s57_9", 15, "s57_9_CanEnter") -- Cathedral 4/5 floor change: NPC only (5610070 / 5610071) function s57_9_PlayerEnter(MapID, InstanceID, RoleID) if s57_ApplyCrystalBuff ~= nil then s57_ApplyCrystalBuff(MapID, InstanceID, RoleID) end end aux.RegisterMapEvent("s57_9", 2, "s57_9_PlayerEnter") function c5610070_On_Talk(MapID, InstanceID, TargetID, TargetTypeID, RoleID, TalkIndex) if TalkIndex == -1 then local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 20, 444300) msg.AddMsgEvent(MsgID, 24, TargetID) 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, 52646902, 180, 5, 40) end end aux.RegisterCreatureEvent(5610070, 7, "c5610070_On_Talk")