--??? function c9010247_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, 37, 5, 49) end end aux.RegisterCreatureEvent(9010247, 7, "c9010247_On_Talk") --????????????????? function s57_3_CanTakeOverWhenOnline(MapID, RoleID) local randomnum = math.random(4) if randomnum == 1 then return 52648438, 37, 9991, 49 elseif randomnum == 2 then return 52648438, 32, 9991, 470 elseif randomnum == 3 then return 52648438, 478, 9991, 466 elseif randomnum == 4 then return 52648438, 462, 9991, 41 end end aux.RegisterMapEvent("s57_3", 12, "s57_3_CanTakeOverWhenOnline") --??????????????? function s57_3GetOnePerfectMap(MapID, InstanceID, RoleID) return 1 end aux.RegisterMapEvent("s57_3", 14, "s57_3GetOnePerfectMap") --????????????????????? function s57_3_CanEnter(MapID, InstanceID, RoleID) if role.GetRoleLevel(MapID, InstanceID, RoleID) >= 80 then return 1 else return 0 end end aux.RegisterMapEvent("s57_3", 15, "s57_3_CanEnter") --???????????????? function s57_3_GetExporMapAndCoord(MapID, InstanceID, RoleID) return 1, 3424073512, 610+math.random(5), 23094, 669+math.random(5) end aux.RegisterMapEvent("s57_3", 13, "s57_3_GetExporMapAndCoord") --?????? function s57_3_OnEnterTrigger(MapID, InstanceID, RoleID, ObjID) if ObjID == 1165 then --to s57_2 role.RoleGotoNewMap(MapID, InstanceID, RoleID, 52648182, 248, 200, 252) elseif ObjID == 1168 then --to s57_2 role.RoleGotoNewMap(MapID, InstanceID, RoleID, 52648182, 248, 200, 252) elseif ObjID == 1171 then --to s57_2 role.RoleGotoNewMap(MapID, InstanceID, RoleID, 52648182, 248, 200, 252) elseif ObjID == 1174 then --to s57_2 role.RoleGotoNewMap(MapID, InstanceID, RoleID, 52648182, 248, 200, 252) else S57_TryTeleportRole(MapID, InstanceID, RoleID) end end aux.RegisterMapEvent("s57_3",6,"s57_3_OnEnterTrigger") function s57_3_PlayerEnter(MapID, InstanceID, RoleID) if s57_ApplyCrystalBuff ~= nil then s57_ApplyCrystalBuff(MapID, InstanceID, RoleID) end S57_GrantPortalGrace(RoleID) S57_StartPortalTimer(MapID, InstanceID) end aux.RegisterMapEvent("s57_3", 2, "s57_3_PlayerEnter") function s57_3_OnInit(MapID, InstanceID, CreatureID, CreatureTypeID) S57_StartPortalTimer(MapID, InstanceID) end aux.RegisterMapEvent("s57_3", 0, "s57_3_OnInit")