S66_1_Point = {} S66_1_Point[1] = {x=736,y=6887,z=326} S66_1_Point[2] = {x=600,y=6634,z=620} S66_1_Point[3] = {x=985,y=6188,z=690} S66_1_Point[4] = {x=1000,y=7018,z=1075} S66_1_Point[5] = {x=608,y=8192,z=1059} S66_1_Point[6] = {x=237,y=7842,z=1045} S66_1_Point[7] = {x=196,y=6592,z=635} S66_1_Point[8] = {x=224,y=7296,z=225} S66_1_Point[9] = {x=1103,y=8974,z=185} S66_1_MapID = 2974623812 S66_1_ExitMapID = 3424073512 S66_1_ExitPoint = {x=610,y=23094,z=669} Poboishe_TXZ = {} function s66_1_GetOnePerfectMap(MapID, InstanceID, RoleID) return Poboishe_Role[RoleID].InstanceID end aux.RegisterMapEvent("s66_1", 14, "s66_1_GetOnePerfectMap") function s66_1_CanTakeOverWhenOnline(MapID, RoleID) return S66_1_ExitMapID,S66_1_ExitPoint.x, S66_1_ExitPoint.y*51,S66_1_ExitPoint.z end aux.RegisterMapEvent("s66_1", 12, "s66_1_CanTakeOverWhenOnline") function s66_1_GetExporMapAndCoord(MapID, InstanceID, RoleID) return 1, S66_1_ExitMapID, S66_1_ExitPoint.x, S66_1_ExitPoint.y*51,S66_1_ExitPoint.z end aux.RegisterMapEvent("s66_1", 13, "s66_1_GetExporMapAndCoord") function s66_1_CanEnter(MapID, InstanceID, RoleID) if Poboishe_TXZ[RoleID] == 1 or (Poboishe_Role[RoleID] ~= nil and Poboishe_Role[RoleID] ~= 0) then return 1 else return 0 end end aux.RegisterMapEvent("s66_1", 15, "s66_1_CanEnter") function s66_1_OnRoleEnterArea(MapID, InstanceID, RoleID, ObjAreaID) local RoleObj = Poboishe_Role[RoleID] if ObjAreaID == 2236 then if role.IsRoleHaveBuff(MapID, InstanceID, RoleID, 99958) then point = 20 role.RemoveFromRole(MapID, InstanceID, RoleID, 6601731, 1, 101) unit.CancelBuff(MapID, InstanceID, RoleID, 9995801) if RoleObj.Side == "Red" then Poboishe_Battle[RoleObj.InstanceID].RedPlayer.Point = Poboishe_Battle[RoleObj.InstanceID].RedPlayer.Point + point role.SetRoleScriptData(RoleObj.RoleID, 1, RoleDataType["Poboishe_Point"], role.GetRoleScriptData(RoleObj.RoleID, 1, RoleDataType["Poboishe_Point"])+2) elseif RoleObj.Side == "Blue" then Poboishe_Battle[RoleObj.InstanceID].BluePlayer.Point = Poboishe_Battle[RoleObj.InstanceID].BluePlayer.Point + point role.SetRoleScriptData(RoleObj.RoleID, 1, RoleDataType["Poboishe_Point"], role.GetRoleScriptData(RoleObj.RoleID, 1, RoleDataType["Poboishe_Point"])+2) end local BattleObj = Poboishe_Battle[InstanceID] BattleObj:SendAllInfo_Poboishe() end end if ObjAreaID == 2114 then if role.IsRoleHaveBuff(MapID, InstanceID, RoleID, 99958) then role.RemoveFromRole(MapID, InstanceID, RoleID, 6601731, 1, 101) unit.CancelBuff(MapID, InstanceID, RoleID, 9995801) map.MapCreateCreature(MapID, InstanceID, 9010354, 181, 7239, 208, 1, "") local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 101, 951035) --Флаг крови появился на просторах Снежного пика в координатах 181 208. Отнесите его к Кристальному источнику, чтобы заработать дополнительные очки для своей команды. msg.DispatchMapMsgEvent(MsgID, S66_1_MapID,InstanceID) end end end aux.RegisterMapEvent("s66_1", 7, "s66_1_OnRoleEnterArea") function c9010354_OnCheck(MapID, InstanceID, TargetID, TargetTypeID, RoleID) local FreeSize = role.GetBagFreeSize(RoleID) if(FreeSize < 2) then map.MapCreateCreature(MapID, InstanceID, 9010354, 181, 7239, 208, 1, "") else role.AddRoleItem(MapID, InstanceID, RoleID, 6600607, 1, -1, 8, 420) unit.AddBuff(MapID, InstanceID, RoleID,9995801,RoleID) local x,y,z = unit.GetPosition(MapID,InstanceID,RoleID) local MsgID = msg.BeginMsgEvent() msg.AddMsgEvent(MsgID, 101, 951029) --Флаг крови был замечен в руках <p1> в координатах <p2>:<p3>. msg.AddMsgEvent(MsgID, 2, RoleID) msg.AddMsgEvent(MsgID, 9, x) msg.AddMsgEvent(MsgID, 9, z) msg.DispatchWorldMsgEvent(MsgID,MapID,InstanceID) end end aux.RegisterCreatureEvent(9010354, 6, "c9010354_OnCheck")