--function s10_OnRoleEnterArea(MapID, InstanceID, RoleID, ObjAreaID) -- Envt_GonkaGetVagonStart(MapID, InstanceID, RoleID, ObjAreaID) -- Envt_GonkaGetVagonEnd(MapID, InstanceID, RoleID, ObjAreaID) -- if ObjAreaID == 1784 then -- local FamilyID = role.GetRoleFamilyID(MapID, InstanceID, RoleID) -- if FamilyID ~= nil and FamilyID ~= 4294967295 then -- local DragoLevel = family_dragon_sql(FamilyID,0,0) -- if tonumber(DragoLevel) < 1 then -- family_dragon_sql(FamilyID,1,1) -- end -- map.CreateInstance(901878291, FamilyID) -- role.RoleGotoNewMap(MapID, InstanceID, RoleID, 901878291, 110, 0, 118) -- else -- local MsgID = msg.BeginMsgEvent() -- msg.AddMsgEvent(MsgID, 26, 950663) -- msg.DispatchRoleMsgEvent(RoleID, MsgID) -- end -- end --end --aux.RegisterMapEvent("s10", 7, "s10_OnRoleEnterArea") function ld1_OnRoleEnterArea(MapID, InstanceID, RoleID, ObjAreaID) local FamilyID = role.GetRoleFamilyID(MapID, InstanceID, RoleID) map.DeleteInstance(901878291, FamilyID) ---map.SetMapScriptData(901878291, FamilyID, 1, 4, 0) map.SetMapScriptData(901878291,FamilyID,1,2,0) end aux.RegisterMapEvent("ld1", 7, "ld1_OnRoleEnterArea") function ld1_GetOnePerfectMap(MapID, InstanceID, RoleID) local FamilyID = role.GetRoleFamilyID(MapID, InstanceID, RoleID) return FamilyID end aux.RegisterMapEvent("ld1", 14, "ld1_GetOnePerfectMap") function ld1_CanEnterWhenOnline(MapID, RoleID) return 3424073512,734, 23510, 602 end aux.RegisterMapEvent("ld1", 12, "ld1_CanEnterWhenOnline") function ld1_GetExporMapAndCoord(MapID, InstanceID, RoleID) return 1, 3424073512,734, 23510, 602 end aux.RegisterMapEvent("ld1", 13, "ld1_GetExporMapAndCoord") function ld1_CanEnter(MapID, InstanceID, RoleID) return 1 end aux.RegisterMapEvent("ld1", 15, "ld1_CanEnter") function ld1_OnPlayerLeave(MapID, InstanceID,RoleID) local FamilyID = role.GetRoleFamilyID(MapID, InstanceID, RoleID) map.DeleteInstance(MapID, RoleID) end aux.RegisterMapEvent("ld1", 3, "ld1_OnPlayerLeave") function ld1_OnPlayerEnter(MapID, InstanceID,RoleID) local Day = tonumber(os.date("%j")) local drago_goto = role.GetRoleScriptData(RoleID, 1, RoleDataType["drago_goto"]) local FamilyID = role.GetRoleFamilyID(MapID, InstanceID, RoleID) local chek = map.GetMapScriptData(901878291,FamilyID,1,2) local RoleTbl = map.GetMapAllRoleID(MapID,InstanceID) if Day ~= drago_goto then --- �������� ��� �� ���� � ���� ���� role.SetRoleScriptData(RoleID, 1, RoleDataType["DragonCount"],0)---��������� ������� role.SetRoleScriptData(RoleID, 1, RoleDataType["drago_goto"],Day)---������ ����� end FamLevel(FamilyID,1,0) if table.maxn(RoleTbl) <= 1 then map.SetMapScriptData(901878291,FamilyID,1,2,1) else map.SetMapScriptData(901878291,FamilyID,1,2,0) end local DragonNpc = map.GetMapScriptData(901878291, FamilyID, 1, 1) map.MapDeleteCreature(901878291, FamilyID, DragonNpc) local dragolev = tonumber(FamLevel(FamilyID,0,0)) local my_rating_point = family_dragon_sql(FamilyID,0,0) if (tonumber(my_rating_point) >= 0 and tonumber(my_rating_point) <= 2999 and table.maxn(RoleTbl) <= 1) and dragolev == 0 then local drago = map.MapCreateCreature(901878291, FamilyID, 6040321+1, 133, 40, 113, 1) map.SetMapScriptData(901878291, FamilyID, 1, 1, drago) FamLevel(FamilyID,1, 1) elseif (tonumber(my_rating_point) >= 3000 and tonumber(my_rating_point) <= 6999 and table.maxn(RoleTbl) <= 1) and dragolev == 0 then local drago = map.MapCreateCreature(901878291, FamilyID, 6040321+2, 133, 40, 113, 1) map.SetMapScriptData(901878291, FamilyID, 1, 1, drago) FamLevel(FamilyID,1, 2) elseif (tonumber(my_rating_point) >= 7000 and tonumber(my_rating_point) <= 11999 and table.maxn(RoleTbl) <= 1) and dragolev == 0 then local drago = map.MapCreateCreature(901878291, FamilyID, 6040321+3, 133, 40, 113, 1) map.SetMapScriptData(901878291, FamilyID, 1, 1, drago) FamLevel(FamilyID,1, 3) elseif (tonumber(my_rating_point) >= 12000 and tonumber(my_rating_point) <= 17999 and table.maxn(RoleTbl) <= 1) and dragolev == 0 then local drago = map.MapCreateCreature(901878291, FamilyID, 6040321+4, 133, 40, 113, 1) map.SetMapScriptData(901878291, FamilyID, 1, 1, drago) FamLevel(FamilyID,1, 4) elseif (tonumber(my_rating_point) >= 18000 and tonumber(my_rating_point) <= 25999 and table.maxn(RoleTbl) <= 1) and dragolev == 0 then local drago = map.MapCreateCreature(901878291, FamilyID, 6040321+5, 133, 40, 113, 1) map.SetMapScriptData(901878291, FamilyID, 1, 1, drago) FamLevel(FamilyID,1, 5) elseif (tonumber(my_rating_point) >= 26000 and table.maxn(RoleTbl) <= 1) and dragolev == 0 then local drago = map.MapCreateCreature(901878291, FamilyID, 6040321+6, 133, 40, 113, 1) map.SetMapScriptData(901878291, FamilyID, 1, 1, drago) FamLevel(FamilyID,1, 6) end end aux.RegisterMapEvent("ld1", 2, "ld1_OnPlayerEnter")