LinkLuaModifier("modifier_charges", "modifiers/modifier_charges", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_shapeshift_speed_lua", "/modifiers/modifier_shapeshift_speed_lua.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_chen_buff1", "/modifiers/modifier_chen_buff1.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_demon_lord_buff", "/modifiers/modifier_demon_lord_buff.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_lich_lord_debuff", "/modifiers/modifier_lich_lord_debuff.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_necro_lord_debuff", "/modifiers/modifier_necro_lord_debuff.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_special_effect_contest", "/modifiers/special/modifier_special_effect_contest.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_special_effect_donator", "/modifiers/special/modifier_special_effect_donator.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_special_effect_legendary", "/modifiers/special/modifier_special_effect_legendary.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_special_effect_divine", "/modifiers/special/modifier_special_effect_divine.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_special_effect_mark", "/modifiers/special/modifier_special_effect_mark.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_turbomode_bonus", "/modifiers/special/modifier_turbomode_bonus.lua", LUA_MODIFIER_MOTION_NONE) LinkLuaModifier("modifier_your_armor", "/modifiers/special/modifier_your_armor.lua", LUA_MODIFIER_MOTION_NONE) if Spawn == nil then _G.Spawn = class({}) end chicken_ticket_drop = false final_boss = false GameRules.DIFFICULTY = 0 GameRules.EndGame = 0 GameRules.DemonMode = 0 GameRules.ZombieMode = 0 GameRules.ChaosMode = 0 GameRules.LichMode = 0 GameRules.NecroMode = 0 GameRules.MegaMode = 0 GameRules.RoshanUpgrade = 0 GameRules.Number_of_cursed = 0 GameRules.Maraphon_Round = 0 GameRules.drop_chance = 50 GameRules.neutral_respawn = 60 GameRules.boss_respawn = 300 GameRules.line_boss_interval = 600 if GetMapName() == "roshdef_turbo" then GameRules.neutral_respawn = GameRules.neutral_respawn/2 GameRules.boss_respawn = GameRules.boss_respawn/2 GameRules.line_boss_interval = GameRules.line_boss_interval/2 end neutral_creeps = { ["item_banana"] = {"npc_dota_spider_1","npc_dota_spider_2","npc_dota_spider_3","npc_dota_spider_4","npc_dota_radiant_forest_1","npc_dota_radiant_forest_2","npc_dota_radiant_forest_3","npc_dota_radiant_forest_4",}, ["item_fish1"] = {"npc_dota_naga_1","npc_dota_naga_2","npc_dota_naga_3","npc_dota_naga_4","npc_dota_naga_5","npc_dota_naga_6","npc_dota_naga_7","npc_dota_naga_8",}, -- ["item_fish2"] = {"npc_dota_slark2","npc_dota_slardar2","npc_dota_naga2","npc_dota_tide2"}, ["item_meat"] = {"npc_dota_alliance_1","npc_dota_alliance_2","npc_dota_alliance_3","npc_dota_alliance_4","npc_dota_alliance_5","npc_dota_alliance_6","npc_dota_alliance_7","npc_dota_alliance_8",}, ["item_life_essence"] = {"npc_dota_dire_forest_1","npc_dota_dire_forest_01","npc_dota_dire_forest_2","npc_dota_dire_forest_3","npc_dota_dire_forest_4","npc_dota_dire_forest_5"}, ["item_fire_essence"] = {"npc_dota_elemental_1","npc_dota_elemental_1_1"}, ["item_water_essence"] = {"npc_dota_elemental_2","npc_dota_elemental_2_1"}, ["item_air_essence"] = {"npc_dota_elemental_3","npc_dota_elemental_3_1"}, ["item_earth_essence"] = {"npc_dota_elemental_4","npc_dota_elemental_4_1"}, } GameRules.upgradedata = {} GameRules.upgradedata["type01"] = {dmg = 2, armor = 0.5 , hp = 40} GameRules.upgradedata["type02"] = {dmg = 5, armor = 0.5 , hp = 60} GameRules.upgradedata["type03"] = {dmg = 5, armor = 1 , hp = 100} GameRules.upgradedata["type04"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type05"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type06"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type07"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type08"] = {dmg = 20, armor = 2 , hp = 200} GameRules.upgradedata["type09"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type10"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type11"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type12"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type13"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type14"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type15"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type16"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type17"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type18"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type19"] = {dmg = 1, armor = 0.1 , hp = 10} GameRules.upgradedata["type20"] = {dmg = 1, armor = 0.1 , hp = 10} function Spawn:Upgrade1(unit,inc) --[[ local upgrade_time=GameRules:GetDOTATime(false,false)/10 unit:SetBaseDamageMin(unit:GetBaseDamageMin() + GameRules.upgradedata[UnitType].dmg*upgrade_time) unit:SetBaseDamageMax(unit:GetBaseDamageMax() + GameRules.upgradedata[UnitType].dmg*upgrade_time) unit:SetPhysicalArmorBaseValue(unit:GetPhysicalArmorBaseValue() + GameRules.upgradedata[UnitType].armor*upgrade_time) unit:SetBaseMaxHealth(unit:GetBaseMaxHealth() + GameRules.upgradedata[UnitType].hp*upgrade_time) ]] local upgrade_mult=1.25 unit:SetBaseDamageMin(unit:GetBaseDamageMin()*upgrade_mult) unit:SetBaseDamageMax(unit:GetBaseDamageMax()*upgrade_mult) unit:SetPhysicalArmorBaseValue(unit:GetPhysicalArmorBaseValue()*upgrade_mult) unit:SetBaseMaxHealth(unit:GetBaseMaxHealth()*upgrade_mult) end function Spawn:Upgrade2(unit, inc) -- Timers:CreateTimer(0.01, function() local upgrade_mult = 1 + 0.25*inc local maxhp = unit:GetMaxHealth()*upgrade_mult unit:SetBaseDamageMin(unit:GetBaseDamageMin()*upgrade_mult) unit:SetBaseDamageMax(unit:GetBaseDamageMax()*upgrade_mult) unit:SetPhysicalArmorBaseValue(unit:GetPhysicalArmorBaseValue()*upgrade_mult) unit:SetBaseMaxHealth(maxhp) unit:SetMaxHealth(maxhp) unit:SetHealth(maxhp) -- end) end function Spawn:Upgrade3(unit, multiplier) Timers:CreateTimer(0.03, function() local upgrade_mult= multiplier local maxhp = unit:GetMaxHealth()*upgrade_mult if maxhp < 1 then maxhp = 1 end unit:SetBaseDamageMin(unit:GetBaseDamageMin()*upgrade_mult) unit:SetBaseDamageMax(unit:GetBaseDamageMax()*upgrade_mult) unit:SetPhysicalArmorBaseValue(unit:GetPhysicalArmorBaseValue()*upgrade_mult) unit:SetBaseMaxHealth(maxhp) unit:SetMaxHealth(maxhp) unit:SetHealth(maxhp) end) end function Spawn:Upgrade4(unit, multiplier, armor) Timers:CreateTimer(0.02, function() local upgrade_mult= multiplier local maxhp = unit:GetMaxHealth()*upgrade_mult if maxhp < 1 then maxhp = 1 end unit:SetBaseDamageMin(unit:GetBaseDamageMin()*upgrade_mult) unit:SetBaseDamageMax(unit:GetBaseDamageMax()*upgrade_mult) unit:SetPhysicalArmorBaseValue(armor) unit:SetBaseMaxHealth(maxhp) unit:SetMaxHealth(maxhp) unit:SetHealth(maxhp) end) end power_mult = 1 power_mult1 = 1 function Respoint (keys ) Timers:CreateTimer(0.01,function() local caster = keys.caster --пробиваем IP усопшего caster.respoint = caster:GetAbsOrigin() -- определяем точку спавна caster.fw = caster:GetForwardVector() end) end function Upgrader(keys) local caster= keys.caster -- local caster_position = caster:GetAbsOrigin() local position = caster.respoint local name = caster:GetUnitName() local team = caster:GetTeam() local unit local respawn_time = GameRules.neutral_respawn local gold Timers:CreateTimer(respawn_time,function() unit = CreateUnitByName(name, position + RandomVector( RandomFloat( 0, 50)), true, nil, nil, team) gold = unit:GetMinimumGoldBounty()*power_mult if gold >= 50000 then gold = 50000 end unit:SetMaximumGoldBounty(gold) unit:SetMinimumGoldBounty(gold) unit:SetForwardVector(caster.fw) unit:SetBaseDamageMin(unit:GetBaseDamageMin()*power_mult) unit:SetBaseDamageMax(unit:GetBaseDamageMax()*power_mult) unit:SetPhysicalArmorBaseValue(unit:GetPhysicalArmorBaseValue()*power_mult1) end) -- unit:SetBaseMaxHealth(unit:GetBaseMaxHealth()*power_mult) power_mult = power_mult * 2 power_mult1 = power_mult1 + 1 end function SetGoldMultiplier(unit , multiplier) unit:SetMaximumGoldBounty(unit:GetMaximumGoldBounty()*multiplier) unit:SetMinimumGoldBounty(unit:GetMinimumGoldBounty()*multiplier) end function respawn_strong(keys) local caster= keys.caster -- local caster_position = caster:GetAbsOrigin() local position = caster.respoint local name = caster:GetUnitName() local team = caster:GetTeam() local respawn_time = GameRules.neutral_respawn if name == "npc_dota_elemental_1" then if RandomInt(1,2)== 1 then name = "npc_dota_elemental_1_1" end elseif name == "npc_dota_elemental_1_1" then name = "npc_dota_elemental_1" elseif name == "npc_dota_elemental_2" then if RandomInt(1,2)== 1 then name = "npc_dota_elemental_2_1" end elseif name == "npc_dota_elemental_2_1" then name = "npc_dota_elemental_2" elseif name == "npc_dota_elemental_3" then if RandomInt(1,2)== 1 then name = "npc_dota_elemental_3_1" end elseif name == "npc_dota_elemental_3_1" then name = "npc_dota_elemental_3" elseif name == "npc_dota_elemental_4" then if RandomInt(1,2)== 1 then name = "npc_dota_elemental_4_1" end elseif name == "npc_dota_elemental_4_1" then name = "npc_dota_elemental_4" end Timers:CreateTimer(respawn_time,function() local unit = CreateUnitByName(name, position + RandomVector( RandomFloat( 0, 50)), true, nil, nil, team) unit:SetForwardVector(caster.fw) if name == "npc_dota_roshan2" and GameRules.MegaMode == 1 then Spawn:Upgrade2(unit,400) unit:SetPhysicalArmorBaseValue(75) end end) end function SpawnGhost( keys ) local caster = keys.caster local caster_position = caster:GetAbsOrigin() local unit = CreateUnitByName( "npc_ghost" , caster_position + RandomVector( RandomFloat( 0, 50 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) -- Destroy trees around the caster and target end function SpawnZombie1( keys ) if not keys.target:IsAlive() then local caster = keys.target local caster_position = caster:GetAbsOrigin() if caster:GetUnitName() == "npc_dota_mad_chicken" or caster:GetUnitName() == "npc_dota_secret_chicken" then return end local unit = CreateUnitByName( "npc_dota_zombie1" , caster_position + RandomVector( RandomFloat( 0, 50 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) if GameRules.ZombieMode == 1 then unit:SetBaseDamageMin(unit:GetBaseDamageMin()*1.5) unit:SetBaseDamageMax(unit:GetBaseDamageMax()*1.5) unit:SetPhysicalArmorBaseValue(unit:GetPhysicalArmorBaseValue()*1.5) unit:SetMaxHealth(unit:GetMaxHealth()*1.5) unit:SetHealth(unit:GetMaxHealth()) end -- Destroy trees around the caster and target end end function SpawnZombie2( keys ) if not keys.target:IsAlive() then local caster = keys.target local caster_position = caster:GetAbsOrigin() if caster:GetUnitName() == "npc_dota_mad_chicken" or caster:GetUnitName() == "npc_dota_secret_chicken" then return end local unit = CreateUnitByName( "npc_dota_zombie2" , caster_position + RandomVector( RandomFloat( 0, 50 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) if GameRules.ZombieMode == 1 then unit:SetBaseDamageMin(unit:GetBaseDamageMin()*1.5) unit:SetBaseDamageMax(unit:GetBaseDamageMax()*1.5) unit:SetPhysicalArmorBaseValue(unit:GetPhysicalArmorBaseValue()*1.5) unit:SetMaxHealth(unit:GetMaxHealth()*1.5) unit:SetHealth(unit:GetMaxHealth()) end -- Destroy trees around the caster and target end end function SpawnZombie3( keys ) if not keys.target:IsAlive() then local caster = keys.target local caster_position = caster:GetAbsOrigin() if caster:GetUnitName() == "npc_dota_mad_chicken" or caster:GetUnitName() == "npc_dota_secret_chicken" then return end local unit = CreateUnitByName( "npc_dota_zombie3" , caster_position + RandomVector( RandomFloat( 0, 50 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) if GameRules.ZombieMode == 1 then unit:SetBaseDamageMin(unit:GetBaseDamageMin()*1.5) unit:SetBaseDamageMax(unit:GetBaseDamageMax()*1.5) unit:SetPhysicalArmorBaseValue(unit:GetPhysicalArmorBaseValue()*1.5) unit:SetMaxHealth(unit:GetMaxHealth()*1.5) unit:SetHealth(unit:GetMaxHealth()) end -- Destroy trees around the caster and target end end function Respawn (keys ) local caster= keys.caster local caster_position = caster:GetAbsOrigin() local name = caster:GetUnitName() local team = caster:GetTeam() local respawn_time = GameRules.neutral_respawn Timers:CreateTimer(respawn_time,function() local unit = CreateUnitByName(name, caster_position + RandomVector( RandomFloat( 0, 50)), true, nil, nil, team) end) end function Boss_Respawn (keys ) local caster= keys.caster -- local caster_position = caster:GetAbsOrigin() local position = caster.respoint local name = caster:GetUnitName() local team = caster:GetTeam() local respawn_time = GameRules.boss_respawn if name == "npc_dota_boss_fire_1" then name = "npc_dota_boss_fire_2" elseif name == "npc_dota_boss_fire_2" then name = "npc_dota_boss_fire_3" elseif name == "npc_dota_boss_vampire_1" then name = "npc_dota_boss_vampire_2" elseif name == "npc_dota_boss_vampire_2" then name = "npc_dota_boss_vampire_3" elseif name == "npc_dota_boss_forest_1" then name = "npc_dota_boss_forest_2" elseif name == "npc_dota_boss_forest_2" then name = "npc_dota_boss_forest_3" elseif name == "npc_dota_boss_water_1" then name = "npc_dota_boss_water_2" elseif name == "npc_dota_boss_water_2" then name = "npc_dota_boss_water_3" elseif name == "npc_dota_boss_wind_1" then name = "npc_dota_boss_wind_2" elseif name == "npc_dota_boss_wind_2" then name = "npc_dota_boss_wind_3" elseif name == "npc_dota_spider_boss_1" then name = "npc_dota_spider_boss_2" elseif name == "npc_dota_spider_boss_2" then name = "npc_dota_spider_boss_3" elseif name == "npc_dota_alliance_boss_1" then name = "npc_dota_alliance_boss_2" elseif name == "npc_dota_alliance_boss_2" then name = "npc_dota_alliance_boss_3" elseif name == "npc_dota_naga_boss_1" then name = "npc_dota_naga_boss_2" elseif name == "npc_dota_naga_boss_2" then name = "npc_dota_naga_boss_3" end Timers:CreateTimer(respawn_time,function() local unit = CreateUnitByName(name, position + RandomVector( RandomFloat( 0, 50)), true, nil, nil, team) unit:SetForwardVector(caster.fw) end) end function reincarnate(keys ) local caster= keys.caster local caster_position = caster:GetAbsOrigin() local name = caster:GetUnitName() local team = caster:GetTeam() -- if team == "DOTA_TEAM_BADGUYS" then team = "DOTA_TEAM_GOODGUYS" -- elseif team == "DOTA_TEAM_GOODGUYS" then team = "DOTA_TEAM_BADGUYS" -- end local unit = CreateUnitByName(name, caster_position + RandomVector( RandomFloat( 0, 50)), true, nil, nil, DOTA_TEAM_GOODGUYS) end function GiveGoldPlayers( sum ) for i=0 ,4 do if PlayerResource:IsValidPlayer(i) then PlayerResource:ModifyGold(i, sum, true, 0) end end end function Roshan_Soul_activate( keys ) Spawn:NeutralSpawner1() GameRules.RoshanUpgrade = 1 end function MegaMode_activate() Spawn:MegaMode() end function CreatureLevelUp( keys ) local caster = keys.caster local name= caster:GetUnitName() local game_time=GameRules:GetDOTATime(false,false) caster:CreatureLevelUp(game_time) Say(nil,"GameTime =" .. game_time, false) end function Spawn:On_Difficult_Chosen( event ) local difficulty = event.difficulty GameRules.DIFFICULTY = difficulty local allCreatures = Entities:FindAllByClassname('npc_dota_creature') for i = 1, #allCreatures, 1 do local creature = allCreatures[i] local team = creature:GetTeam() if team ~= DOTA_TEAM_BADGUYS then if difficulty == 1 then Spawn:Upgrade2(creature,1) elseif difficulty == 2 then Spawn:Upgrade2(creature,3) end end end end function Spawn:InitGameMode() -- Register Panorama Listeners CustomGameEventManager:RegisterListener('On_Difficult_Chosen',Dynamic_Wrap(Spawn, 'On_Difficult_Chosen')) ListenToGameEvent("npc_spawned",Dynamic_Wrap( Spawn, 'OnNPCSpawned' ), self ) ListenToGameEvent('entity_killed', Dynamic_Wrap(Spawn, 'OnEntityKilled'), self) print("Make buildings vulnerable") local allBuildings = Entities:FindAllByClassname('npc_dota_building') for i = 1, #allBuildings, 1 do local building = allBuildings[i] if building:HasModifier('modifier_invulnerable') then building:RemoveModifierByName('modifier_invulnerable') building:AddNewModifier(building, nil, "modifier_tower_truesight_aura", {}) end if GetMapName() == "roshdef_turbo" then SetGoldMultiplier(building , 2) end end if GetMapName() == "roshdef_turbo" then local allCreatures = Entities:FindAllByClassname('npc_dota_creature') for i = 1, #allCreatures, 1 do local creature = allCreatures[i] if creature:GetTeam() ~= DOTA_TEAM_GOODGUYS then SetGoldMultiplier(creature , 2) Spawn:Upgrade3(creature, 0.75) end end end -- local spectre = Entities:FindByModel(nil,"models/heroes/spectre/spectre.vmdl") -- if spectre then spectre:SetTeam(DOTA_TEAM_BADGUYS) end end function Spawn:OnEntityKilled( keys ) local killedUnit = EntIndexToHScript( keys.entindex_killed ) -- local killerUnit = EntIndexToHScript( keys.entindex_attacker ) local name = killedUnit:GetUnitName() local team = killedUnit:GetTeam() if name == "npc_dota_thinker" or name == "npc_dota_dummy" then return end if RollPercentage(25) and team == DOTA_TEAM_GOODGUYS and GameRules.MegaMode == 1 then DropItemWithTimer(killedUnit, "item_soul_vessel", 10) end if RollPercentage(GameRules.drop_chance) then for key,value in pairs(neutral_creeps) do -- print("key = "..key) for _,creep in pairs (value) do if creep == name then DropItemWithTimer(killedUnit, key, 60) end end end end if chicken_ticket_drop == false then if RollPercentage(1) then print ("------------------------vse 4iki - puki !--------------------------------") local point = killedUnit:GetAbsOrigin() local newItem = CreateItem( "item_chicken_game_ticket", nil, nil ) local drop = CreateItemOnPositionSync( point, newItem ) chicken_ticket_drop = true end end if not name == "npc_dota_mad_chicken" or not name == "npc_dota_secret_chicken" then if GameRules.ChaosMode == 1 then Spawn:ChaosTrigger(killedUnit) elseif GameRules.ZombieMode == 1 then Spawn:ZombieTrigger(killedUnit) end end if name == "npc_dota_abomination_boss" then GiveGoldPlayers(250) elseif name == "npc_dota_golem_boss" then GiveGoldPlayers(375) elseif name == "npc_dota_dead_witch" then GiveGoldPlayers(500) elseif name == "npc_dota_necronomicon_warrior_boss" then GiveGoldPlayers(1000) elseif name == "npc_dota_necronomicon_archer_boss" then GiveGoldPlayers(1000) elseif name == "npc_dota_nyx_boss" then GiveGoldPlayers(3500) elseif name == "npc_dota_doom_boss" then GiveGoldPlayers(5000) elseif name == "npc_dota_bloodseeker_boss" then GiveGoldPlayers(7500) elseif name == "npc_dota_sans" then GiveGoldPlayers(10000) elseif name == "npc_phantasm_1" then GiveGoldPlayers(15000) end --[[ if RollPercentage(1) then local unit_name = "npc_dota_halloween_pumpkin" local unit_fw = killedUnit:GetForwardVector() local position = killedUnit:GetAbsOrigin() local unit = CreateUnitByName(unit_name, position , true, nil, nil, DOTA_TEAM_NEUTRALS) unit:SetForwardVector(unit_fw) unit:AddNewModifier(unit, nil, "modifier_kill", { duration = 10 }) end ]] if name == "npc_dota_secret_tree1" or name == "npc_dota_secret_tree2" or name == "npc_dota_secret_tree3" or name == "npc_dota_halloween_treant" then local point = killedUnit:GetAbsOrigin() local newItem = CreateItem( "item_secret_branch", nil, nil ) local drop = CreateItemOnPositionSync( point, newItem ) elseif name == "npc_dota_secret_box" then local point = killedUnit:GetAbsOrigin() local newItem = CreateItem( "item_candy", nil, nil ) local drop = CreateItemOnPositionSync( point, newItem ) elseif name == "npc_dota_gold_mine" then local point = killedUnit:GetAbsOrigin() local newItem = CreateItem( "item_kirk", nil, nil ) -- local newItem = CreateItem( "item_puck_essence", nil, nil ) local drop = CreateItemOnPositionSync( point, newItem ) end if name == "npc_dota_dflag_guard1" then local point = Entities:FindByName( nil, "flag1point"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local flag = Entities:FindByName( nil, "flag1") CreateUnitByName( "npc_dota_nflag_guard1" , point + RandomVector( RandomFloat( 0, 50 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) flag:SetTeam(DOTA_TEAM_GOODGUYS) elseif name == "npc_dota_nflag_guard1" then local point = Entities:FindByName( nil, "flag1point"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local flag = Entities:FindByName( nil, "flag1") CreateUnitByName( "npc_dota_dflag_guard1" , point + RandomVector( RandomFloat( 0, 50 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) flag:SetTeam(DOTA_TEAM_BADGUYS) elseif name == "npc_dota_dflag_guard2" then local point = Entities:FindByName( nil, "flag2point"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local flag = Entities:FindByName( nil, "flag2") CreateUnitByName( "npc_dota_nflag_guard2" , point + RandomVector( RandomFloat( 0, 50 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) flag:SetTeam(DOTA_TEAM_GOODGUYS) elseif name == "npc_dota_nflag_guard2" then local point = Entities:FindByName( nil, "flag2point"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local flag = Entities:FindByName( nil, "flag2") CreateUnitByName( "npc_dota_dflag_guard2" , point + RandomVector( RandomFloat( 0, 50 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) flag:SetTeam(DOTA_TEAM_BADGUYS) end if name== "npc_dota_dbase1" then local point1 = Entities:FindByName( nil, "dmpoint1"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local waypoint = Entities:FindByName( nil, "d_waypoint11") -- Записываем в переменную 'waypoint' координаты первого бокса way1 --local return_time = 30 -- Записываем в переменную значение '10' Timers:CreateTimer(1, function() -- Создаем таймер, который запустится через 15 секунд после начала матча и запустит следующую функцию self.DireSpawner= 1 Spawn:DireSpawner2() local unit = CreateUnitByName( "npc_dota_papich" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) _G.choose_boss_timers = {} chooseMode = true Spawn:PrintChoseModeMessage() end if name== "npc_dota_dbase2" then SendToConsole("stopsound") local point1 = killedUnit:GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local waypoint = Entities:FindByName( nil, "d_waypoint1") -- Записываем в переменную 'waypoint' координаты первого бокса way1 Timers:CreateTimer(1, function() EmitGlobalSound("roshan_def.jojo") end) Spawn:PrintFalseEndgameMessage() --local return_time = 30 -- Записываем в переменную значение '10' Timers:CreateTimer(45, function() -- Создаем таймер, который запустится через 15 секунд после начала матча и запустит следующую функцию if GameRules.ZombieMode == 1 then name = "npc_dota_zombie_lord" elseif GameRules.ChaosMode == 1 then name = "npc_dota_chaos_lord" elseif GameRules.DemonMode == 1 then name = "npc_dota_demon_lord" EmitGlobalSound("terrorblade_spawn") elseif GameRules.LichMode == 1 then name = "npc_dota_lich_lord" elseif GameRules.NecroMode == 1 then name = "npc_dota_necro_lord" elseif GameRules.NecroMode == 0 then name = "npc_dota_necro_lord" end local unit = CreateUnitByName( name , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) end if name == "npc_dota_papich" then EmitGlobalSound("Music_Frostivus.WK_killed") elseif name=="npc_dota_terrboss" then SendToConsole("stopsound") Timers:CreateTimer(1, function() EmitGlobalSound("roshan_def.portal2") end) GameRules.EndGame = 1 Spawn:PrintEndgameMessage1() Timers:CreateTimer(90, function() GameRules:SetGameWinner(DOTA_TEAM_GOODGUYS) end) elseif name=="npc_dota_zombie_lord" then SendToConsole("stopsound") Timers:CreateTimer(1, function() EmitGlobalSound("roshan_def.portal2") end) GameRules.EndGame = 1 Spawn:PrintEndgameMessage1() Timers:CreateTimer(90, function() GameRules:SetGameWinner(DOTA_TEAM_GOODGUYS) end) elseif name=="npc_dota_chaos_lord" then SendToConsole("stopsound") Timers:CreateTimer(1, function() EmitGlobalSound("roshan_def.portal2") end) GameRules.EndGame = 1 Spawn:PrintEndgameMessage1() Timers:CreateTimer(90, function() GameRules:SetGameWinner(DOTA_TEAM_GOODGUYS) end) elseif name=="npc_dota_demon_lord" then SendToConsole("stopsound") Timers:CreateTimer(1, function() EmitGlobalSound("roshan_def.portal2") end) GameRules.EndGame = 1 Spawn:PrintEndgameMessage1() Timers:CreateTimer(90, function() GameRules:SetGameWinner(DOTA_TEAM_GOODGUYS) end) elseif name=="npc_dota_lich_lord" then SendToConsole("stopsound") Timers:CreateTimer(1, function() EmitGlobalSound("roshan_def.portal2") end) GameRules.EndGame = 1 Spawn:PrintEndgameMessage1() Timers:CreateTimer(90, function() GameRules:SetGameWinner(DOTA_TEAM_GOODGUYS) end) elseif name=="npc_dota_necro_lord" then SendToConsole("stopsound") Timers:CreateTimer(1, function() EmitGlobalSound("roshan_def.portal2") end) GameRules.EndGame = 1 Spawn:PrintEndgameMessage1() Timers:CreateTimer(90, function() GameRules:SetGameWinner(DOTA_TEAM_GOODGUYS) end) elseif name=="npc_dota_roshan1" then SendToConsole("stopsound") if GameRules.MegaMode == 1 then Timers:CreateTimer(1, function() EmitGlobalSound("padal_sneg") end) Spawn:PrintEndgameMessage3() Timers:CreateTimer(90, function() GameRules:SetGameWinner(DOTA_TEAM_BADGUYS) end) else Timers:CreateTimer(1, function() EmitGlobalSound("kira_theme") end) Spawn:PrintEndgameMessage2() Timers:CreateTimer(15, function() GameRules:SetGameWinner(DOTA_TEAM_BADGUYS) end) end GameRules.EndGame = 1 end if name == "npc_dota_rock" then self.golem=1 elseif name == "npc_dota_ursa3" then self.wolf=1 local child_name = "npc_dota_wolf_child" local child_fw = killedUnit:GetForwardVector() local position = killedUnit:GetAbsOrigin() Timers:CreateTimer(2, function() local unit = CreateUnitByName(child_name, position , true, nil, nil, DOTA_TEAM_GOODGUYS) unit:SetForwardVector(child_fw) end) GameRules:SendCustomMessage("#Game_notification_wolf_announce",0,0) elseif name == "npc_dota_spider_boss_1" then self.ursa=1 local child_name = "npc_dota_ursa_child" local child_fw = killedUnit:GetForwardVector() local position = killedUnit:GetAbsOrigin() Timers:CreateTimer(2, function() local unit = CreateUnitByName(child_name, position , true, nil, nil, DOTA_TEAM_GOODGUYS) unit:SetForwardVector(child_fw) end) GameRules:SendCustomMessage("#Game_notification_ursa_announce",0,0) elseif name == "npc_dota_boss_forest_1" then self.satyr=1 local child_name = "npc_dota_satyr_child" local child_fw = killedUnit:GetForwardVector() local position = killedUnit:GetAbsOrigin() Timers:CreateTimer(2, function() local unit = CreateUnitByName(child_name, position , true, nil, nil, DOTA_TEAM_GOODGUYS) unit:SetForwardVector(child_fw) end) GameRules:SendCustomMessage("#Game_notification_satyr_announce",0,0) elseif name == "npc_dota_naga_boss_1" then self.ogre=1 local child_name = "npc_dota_ogre_child" local child_fw = killedUnit:GetForwardVector() local position = killedUnit:GetAbsOrigin() Timers:CreateTimer(2, function() local unit = CreateUnitByName(child_name, position , true, nil, nil, DOTA_TEAM_GOODGUYS) unit:SetForwardVector(child_fw) end) GameRules:SendCustomMessage("#Game_notification_ogre_announce",0,0) elseif name == "npc_dota_boss_wind_1" then self.centaur=1 local child_name = "npc_dota_centaur_child" local child_fw = killedUnit:GetForwardVector() local position = killedUnit:GetAbsOrigin() Timers:CreateTimer(2, function() local unit = CreateUnitByName(child_name, position , true, nil, nil, DOTA_TEAM_GOODGUYS) unit:SetForwardVector(child_fw) end) GameRules:SendCustomMessage("#Game_notification_centaur_announce",0,0) elseif name == "npc_dota_boss_vampire_1" then self.dragon=1 local child_name = "npc_dota_dragon_child" local child_fw = killedUnit:GetForwardVector() local position = killedUnit:GetAbsOrigin() Timers:CreateTimer(2, function() local unit = CreateUnitByName(child_name, position , true, nil, nil, DOTA_TEAM_GOODGUYS) unit:SetForwardVector(child_fw) end) GameRules:SendCustomMessage("#Game_notification_dragon_announce",0,0) elseif name == "npc_dota_boss_water_1" then self.golem=2 local child_name = "npc_dota_golem_child" local child_fw = killedUnit:GetForwardVector() local position = killedUnit:GetAbsOrigin() Timers:CreateTimer(2, function() local unit = CreateUnitByName(child_name, position , true, nil, nil, DOTA_TEAM_GOODGUYS) unit:SetForwardVector(child_fw) end) GameRules:SendCustomMessage("#Game_notification_golem_announce",0,0) elseif name == "npc_dota_boss_fire_1" then self.kobold=1 local child_name = "npc_dota_kobold_child" local child_fw = killedUnit:GetForwardVector() local position = killedUnit:GetAbsOrigin() Timers:CreateTimer(2, function() local unit = CreateUnitByName(child_name, position , true, nil, nil, DOTA_TEAM_GOODGUYS) unit:SetForwardVector(child_fw) end) GameRules:SendCustomMessage("#Game_notification_kobold_announce",0,0) elseif name == "npc_dota_alliance_boss_1" then self.troll=1 local child_name = "npc_dota_troll_child" local child_fw = killedUnit:GetForwardVector() local position = killedUnit:GetAbsOrigin() Timers:CreateTimer(2, function() local unit = CreateUnitByName(child_name, position , true, nil, nil, DOTA_TEAM_GOODGUYS) unit:SetForwardVector(child_fw) end) GameRules:SendCustomMessage("#Game_notification_troll_announce",0,0) end if name == "npc_cursed_warrior" then GameRules.Number_of_cursed = GameRules.Number_of_cursed - 1 print("Number_of_cursed="..GameRules.Number_of_cursed) if GameRules.Number_of_cursed == 0 then SendToConsole("stopsound") end end end function Spawn:ChaosTrigger(killedUnit) local trigger_chance = 35 local damage = 100 + killedUnit:GetMaxHealth()*0.2 local point = killedUnit:GetAbsOrigin() local damage_radius = 250 -- local particle = "particles/units/heroes/hero_nevermore/nevermore_shadowraze.vpcf" local particle = "particles/econ/items/shadow_fiend/sf_fire_arcana/sf_fire_arcana_shadowraze.vpcf" if RandomInt(1,99)<= trigger_chance and killedUnit:GetTeam() ~= DOTA_TEAM_GOODGUYS then local particleIndex = ParticleManager:CreateParticle(particle, PATTACH_ABSORIGIN, killedUnit) local units = FindUnitsInRadius(killedUnit:GetTeam(), point, nil, damage_radius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC, 0, 0, false) for k, unit in ipairs(units) do local damage_table = { attacker = killedUnit, victim = unit, ability = nil, damage_type = DAMAGE_TYPE_PURE, damage = damage } ApplyDamage(damage_table) end EmitSoundOnLocationWithCaster(point, "Hero_Nevermore.Shadowraze" ,killedUnit) --EmitSoundOnLocationForAllies( point, "Hero_Nevermore.Shadowraze", units ) end end function Spawn:ZombieTrigger(killedUnit) local trigger_chance = 35 local point = killedUnit:GetAbsOrigin() local hp = 35 local dmg = 50 local armor = 100 local bounty = 10 local experience = 10 local name = "npc_dota_template_zombie" local team = killedUnit:GetTeam() if RandomInt(1,100)<= trigger_chance and killedUnit:GetTeam() ~= DOTA_TEAM_GOODGUYS then local unit Timers:CreateTimer(3,function() unit = CreateUnitByName(name, point + RandomVector( RandomFloat( 0, 50)), true, nil, nil, team) unit:SetMaxHealth(killedUnit:GetMaxHealth()*hp/100+1) unit:SetBaseMaxHealth(killedUnit:GetMaxHealth()*hp/100+1) unit:SetHealth(killedUnit:GetMaxHealth()*hp/100+1) unit:SetBaseDamageMin(killedUnit:GetBaseDamageMin()*dmg/100) unit:SetBaseDamageMax(killedUnit:GetBaseDamageMax()*dmg/100) unit:SetPhysicalArmorBaseValue(killedUnit:GetPhysicalArmorBaseValue()*armor/100) unit:SetMaximumGoldBounty(killedUnit:GetMaximumGoldBounty()*bounty/100) unit:SetMinimumGoldBounty(killedUnit:GetMinimumGoldBounty()*bounty/100) unit:SetDeathXP(killedUnit:GetDeathXP()*experience/100) end) end end function Spawn:PrintEndgameMessage1() Timers:CreateTimer(5, function() GameRules:SendCustomMessage("
Game will end in 85 seconds
",0,0) end) Timers:CreateTimer(10, function() GameRules:SendCustomMessage("#Game_notification_end_game_message",0,0) end) --Send stats Timers:CreateTimer(87, function() GameRules:SendCustomMessage("3",0,0) end) Timers:CreateTimer(88, function() GameRules:SendCustomMessage("2",0,0) end) Timers:CreateTimer(89, function() GameRules:SendCustomMessage("1...",0,0) end) end function Spawn:PrintEndgameMessage2() Timers:CreateTimer(5, function() GameRules:SendCustomMessage("
Game will end in 15 seconds
",0,0) end) Timers:CreateTimer(10, function() GameRules:SendCustomMessage("#Game_notification_end_game_message",0,0) end) --Send stats Timers:CreateTimer(12, function() GameRules:SendCustomMessage("3",0,0) end) Timers:CreateTimer(13, function() GameRules:SendCustomMessage("2",0,0) end) Timers:CreateTimer(14, function() GameRules:SendCustomMessage("1...",0,0) end) end function Spawn:PrintEndgameMessage3() Timers:CreateTimer(5, function() GameRules:SendCustomMessage("
Game will end in 85 seconds
",0,0) end) Timers:CreateTimer(10, function() GameRules:SendCustomMessage("#Game_notification_end_game_message",0,0) end) --Send stats Timers:CreateTimer(87, function() GameRules:SendCustomMessage("3",0,0) end) Timers:CreateTimer(88, function() GameRules:SendCustomMessage("2",0,0) end) Timers:CreateTimer(89, function() GameRules:SendCustomMessage("1...",0,0) end) end function Spawn:PrintFalseEndgameMessage() Timers:CreateTimer(5, function() GameRules:SendCustomMessage("
Conragulations !Game will end in 40 seconds
",0,0) end) Timers:CreateTimer(10, function() GameRules:SendCustomMessage("#Game_notification_end_game_message",0,0) end) --Send stats Timers:CreateTimer(42, function() GameRules:SendCustomMessage("3",0,0) end) Timers:CreateTimer(43, function() GameRules:SendCustomMessage("2",0,0) end) Timers:CreateTimer(44, function() GameRules:SendCustomMessage("1...",0,0) end) Timers:CreateTimer(45, function() GameRules:SendCustomMessage("Yes. I lie :) ",0,0) end) end chooseMode = false function Spawn:PrintChoseModeMessage() if not chooseMode then return else chooseMode = false end GameRules:SendCustomMessage("#Game_notification_chose_boss_mode_message",0,0) for index = 0,5 do local player = PlayerResource:GetPlayer(index) if player and GameRules:PlayerHasCustomGameHostPrivileges(player) and IsServer() then CustomGameEventManager:Send_ServerToPlayer( player, "choose_boss_start", {} ) print("index = "..index) end end Timers:CreateTimer(60, function() if final_boss == false and IsServer() then Timers:CreateTimer(1, function() GameRules:SendCustomMessage("3",0,0) end) Timers:CreateTimer(2, function() GameRules:SendCustomMessage("2",0,0) end) Timers:CreateTimer(3, function() GameRules:SendCustomMessage("1...",0,0) end) final_boss = true CustomGameEventManager:Send_ServerToPlayer( GetListenServerHost(), "choose_boss_end", {} ) Timers:CreateTimer(3, function() local int = math.random(1,5) if int <= 1 then Spawn:ZombieMode() elseif int <= 2 then Spawn:ChaosMode() elseif int <= 3 then Spawn:DemonMode() elseif int <= 4 then Spawn:LichMode() elseif int <= 5 then Spawn:NecroMode() elseif int ~= 5 then Spawn:NecroMode() end end) end end) end function Spawn:ZombieMode() GameRules:SendCustomMessage("#Game_notification_zombie_mode_message1",0,0) GameRules:SendCustomMessage("#Game_notification_zombie_mode_message2",0,0) EmitGlobalSound("undying_undying_big_attack_10") GameRules.ZombieMode = 1 end function Spawn:ChaosMode() GameRules:SendCustomMessage("#Game_notification_chaos_mode_message1",0,0) GameRules:SendCustomMessage("#Game_notification_chaos_mode_message2",0,0) EmitGlobalSound("nevermore_nev_arc_level_07") GameRules.ChaosMode = 1 end function Spawn:DemonMode() GameRules:SendCustomMessage("#Game_notification_demon_mode_message1",0,0) GameRules:SendCustomMessage("#Game_notification_demon_mode_message2",0,0) EmitGlobalSound("terrorblade_terr_levelup_06") GameRules.DemonMode = 1 end function Spawn:LichMode() GameRules:SendCustomMessage("#Game_notification_lich_mode_message1",0,0) GameRules:SendCustomMessage("#Game_notification_lich_mode_message2",0,0) EmitGlobalSound("lich_lich_ability_chain_06") GameRules.LichMode = 1 end function Spawn:NecroMode() GameRules:SendCustomMessage("#Game_notification_necro_mode_message1",0,0) GameRules:SendCustomMessage("#Game_notification_necro_mode_message2",0,0) EmitGlobalSound("necrolyte_necr_spawn_03") GameRules.NecroMode = 1 end function Spawn:MegaMode() -- local roshan = Entities:FindByModel(nil,"models/creeps/roshan/roshan.vmdl") -- while roshan:GetUnitName()~="npc_dota_roshan1" do -- roshan = Entities:FindByModel(roshan,"models/creeps/roshan/roshan.vmdl") -- end local unit = Entities:FindByName( nil, "roshan") if unit ~= nil then Spawn:Upgrade4(unit, 100, 200) end -- Spawn:Upgrade2(unit,400) for i=1,3 do local unit = Entities:FindByName( nil, "roshan_guard"..i) if unit ~= nil then Spawn:Upgrade4(unit, 100, 100) end end Spawn:SetSameTeam() Spawn:MegaNeutralSpawner() GameRules.MegaMode = 1 end function Spawn:OnNPCSpawned(keys) --if centaur_const==1 then Say(nil,"Spawn:OnNPCSpawned works !!!" , false) end --Say(nil,"Spawn:OnNPCSpawned works !!!" , false) local npc = EntIndexToHScript(keys.entindex) local name = npc:GetUnitName() local team = npc:GetTeam() if GetMapName() == "roshdef_turbo" then if (team ~= DOTA_TEAM_GOODGUYS and not npc:IsRealHero() ) then SetGoldMultiplier(npc , 2) Spawn:Upgrade3(npc, 0.75) end end local ability = npc:FindAbilityByName("set_color") if ability then ability:SetLevel(1) end if team ~= DOTA_TEAM_GOODGUYS then npc:AddNewModifier(npc, nil, "modifier_invulnerable", {duration = 0.1}) else npc:AddNewModifier(npc, nil, "modifier_bloodseeker_thirst", nil) end -- npc:AddNewModifier(npc, nil, "modifier_special_effect_contest", {}) -- npc:AddNewModifier(npc, nil, "modifier_special_effect_donator", {}) if (team ~= DOTA_TEAM_GOODGUYS and GameRules.DIFFICULTY == 1 and not npc:IsRealHero() ) then Spawn:Upgrade2(npc,1) elseif (team ~= DOTA_TEAM_GOODGUYS and GameRules.DIFFICULTY == 2 and not npc:IsRealHero()) then Spawn:Upgrade2(npc,3) end if (team == DOTA_TEAM_BADGUYS and GameRules.DemonMode == 1) then npc:AddNewModifier(npc, nil, "modifier_demon_lord_buff", {}) end if (team == DOTA_TEAM_GOODGUYS and GameRules.LichMode == 1) then npc:AddNewModifier(npc, nil, "modifier_lich_lord_debuff", {}) end if (team == DOTA_TEAM_GOODGUYS and GameRules.NecroMode == 1) then npc:AddNewModifier(npc, nil, "modifier_necro_lord_debuff", {}) end --npc:AddNewModifier(npc, nil, "modifier_demon_lord_buff", {}) --npc:AddNewModifier(npc, nil, "modifier_insane", {}) if npc:IsRealHero() and npc.FirstSpawned == nil then -- npc.FirstSpawned = true local ability = npc:FindAbilityByName("no_speed_limit") if ability then ability:SetLevel(1) end if name ~= "npc_dota_hero_wisp" then --npc:AddAbility("penguin_sledding_ride") local ability = npc:FindAbilityByName("penguin_sledding_ride") if ability then ability:SetLevel(1) end end npc:AddNewModifier(npc, nil, "modifier_your_armor", {}) if GetMapName() == "roshdef_turbo" then Timers:CreateTimer(0.1, function() npc:AddNewModifier(npc, nil, "modifier_turbomode_bonus", {}) end) end --[[ for i=1,75 do npc:HeroLevelUp(true) end ]] if name=="npc_dota_hero_centaur" then local ability = npc:FindAbilityByName("inherit_centaur_buff") ability:SetLevel(1) self.centaur_buff=1 elseif name=="npc_dota_hero_leshrac" then local ability = npc:FindAbilityByName("inherit_leshrac_buff") ability:SetLevel(1) self.leshrac_buff=1 elseif name=="npc_dota_hero_riki" then local ability = npc:FindAbilityByName("inherit_riki_buff") ability:SetLevel(1) self.riki_buff=1 elseif name=="npc_dota_hero_lycan" then local ability = npc:FindAbilityByName("inherit_lycan_buff") ability:SetLevel(1) self.lycan_buff=1 elseif name=="npc_dota_hero_ursa" then local ability = npc:FindAbilityByName("inherit_ursa_buff") ability:SetLevel(1) self.ursa_buff=1 elseif name=="npc_dota_hero_lone_druid" then local ability = npc:FindAbilityByName("inherit_druid_buff") ability:SetLevel(1) self.druid_buff=1 elseif name=="npc_dota_hero_jakiro" then local ability = npc:FindAbilityByName("inherit_jakiro_buff") ability:SetLevel(1) self.jakiro_buff=1 elseif name=="npc_dota_hero_winter_wyvern" then local ability = npc:FindAbilityByName("inherit_wyvern_buff") ability:SetLevel(1) self.wyvern_buff=1 elseif name=="npc_dota_hero_ogre_magi" then local ability = npc:FindAbilityByName("inherit_ogre_buff") ability:SetLevel(1) self.ogre_buff=1 elseif name=="npc_dota_hero_tiny" then local ability = npc:FindAbilityByName("inherit_tiny_buff") ability:SetLevel(1) self.tiny_buff=1 elseif name=="npc_dota_hero_troll_warlord" then local ability = npc:FindAbilityByName("inherit_troll_buff") ability:SetLevel(1) self.troll_buff=1 elseif name=="npc_dota_hero_huskar" then local ability = npc:FindAbilityByName("inherit_huskar_buff") ability:SetLevel(1) self.huskar_buff=1 elseif name=="npc_dota_hero_meepo" then local ability = npc:FindAbilityByName("inherit_meepo_buff") ability:SetLevel(1) self.meepo_buff=1 elseif name=="npc_dota_hero_pangolier" then local ability = npc:FindAbilityByName("pangolier_greed") ability:SetLevel(1) elseif name=="npc_dota_hero_beastmaster" then local ability = npc:FindAbilityByName("inherit_beastmaster_buff") ability:SetLevel(1) self.beastmaster_buff=1 elseif name=="npc_dota_hero_chen" then local ability = npc:FindAbilityByName("inherit_chen_buff") ability:SetLevel(1) self.chen_buff=1 elseif name=="npc_dota_hero_life_stealer" then local ability = npc:FindAbilityByName("renegade_backtrack") ability:SetLevel(1) elseif name=="npc_dota_hero_omniknight" then local ability = npc:FindAbilityByName("spartacus_call_of_allies") ability:SetLevel(1) elseif name=="npc_dota_hero_phantom_assassin" then local ability = npc:FindAbilityByName("imba_phantom_assassin_triple_blow") ability:SetLevel(1) elseif name=="npc_dota_hero_drow_ranger" then local ability = npc:FindAbilityByName("drow_ranger_trueshot") ability:SetLevel(1) elseif name=="npc_dota_hero_sven" then local ability = npc:FindAbilityByName("sven_thirsty_blade") ability:SetLevel(1) elseif name=="npc_dota_hero_undying" then local ability = npc:FindAbilityByName("zombie_king_zombie_spawn") ability:SetLevel(1) elseif name=="npc_dota_hero_dark_seer" then local ability = npc:FindAbilityByName("earthshaker_aftershock") ability:SetLevel(1) elseif name=="npc_dota_hero_mars" then local ability = npc:FindAbilityByName("mars_friend") ability:SetLevel(1) elseif name=="npc_dota_hero_pudge" then local ability = npc:FindAbilityByName("meatboy_more_meat") ability:SetLevel(1) npc:SetRenderColor(255, 0, 0) elseif name=="npc_dota_hero_dark_willow" then local ability = npc:FindAbilityByName("dark_willow_bramble_maze") ability:SetLevel(1) elseif name=="npc_dota_hero_faceless_void" then local ability = npc:FindAbilityByName("faceless_void_time_walk") ability:SetLevel(1) elseif name=="npc_dota_hero_alchemist" then local ability = npc:FindAbilityByName("alchemist_bounty") ability:SetLevel(1) elseif name=="npc_dota_hero_sniper" then local ability = npc:FindAbilityByName("sniper_land_mines") ability:SetLevel(1) elseif name=="npc_dota_hero_phoenix" then local ability = npc:FindAbilityByName("phoenix_fire_soul") ability:SetLevel(1) elseif name=="npc_dota_hero_arc_warden" then local ability = npc:FindAbilityByName("customability_energy_system") ability:SetLevel(1) elseif name=="npc_dota_hero_puck" then local ability = npc:FindAbilityByName("greevil_lord_create_worker") ability:SetLevel(1) elseif name=="npc_dota_hero_wisp" then local ability = npc:FindAbilityByName("wisp_powerup_dmg") ability:SetLevel(1) local ability = npc:FindAbilityByName("wisp_powerup_armor") ability:SetLevel(1) local ability = npc:FindAbilityByName("wisp_powerup_hp") ability:SetLevel(1) local ability = npc:FindAbilityByName("wisp_powerup_as") ability:SetLevel(1) local ability = npc:FindAbilityByName("wisp_powerup_ms") ability:SetLevel(1) local ability = npc:FindAbilityByName("wisp_infest") ability:SetLevel(1) local ability = npc:FindAbilityByName("wisp_consume") ability:SetLevel(1) elseif name=="npc_dota_hero_treant" then local ability = npc:FindAbilityByName("roshan_spell_block") ability:SetLevel(1) local children = npc:GetChildren() for k,child in pairs(children) do if child:GetClassname() == "dota_item_wearable" then child:RemoveSelf() end end end end --Say(nil,npc:GetUnitName() , false) if npc:GetTeam()== DOTA_TEAM_GOODGUYS then if (name == "npc_dota_troll_child" or name == "npc_dota_troll_junior" or name == "npc_dota_troll_adult" or name == "npc_dota_troll_veteran" or name == "npc_dota_troll_myth" or name == "npc_dota_roshan_troll" or name == "npc_dota_troll1" or name == "npc_dota_troll2" or name == "npc_dota_troll3" or name == "npc_dota_troll4")and self.troll_buff==1 then local ability = npc:FindAbilityByName("troll_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_troll_buff", {}) npc:AddNewModifier(nil, nil, "modifier_shapeshift_speed_lua", {}) elseif (name == "npc_dota_centaur_child" or name == "npc_dota_centaur_junior" or name == "npc_dota_centaur_adult" or name == "npc_dota_centaur_veteran" or name == "npc_dota_centaur_myth" or name == "npc_dota_roshan_centaur" or name == "npc_dota_centaur1" or name == "npc_dota_centaur2") and self.centaur_buff==1 then local ability = npc:FindAbilityByName("centaur_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_centaur_buff", {}) npc:AddNewModifier(nil, nil, "modifier_shapeshift_speed_lua", {}) elseif (name == "npc_dota_centaur_child" or name == "npc_dota_centaur_junior" or name == "npc_dota_centaur_adult" or name == "npc_dota_centaur_veteran" or name == "npc_dota_centaur_myth" or name == "npc_dota_roshan_centaur" or name == "npc_dota_centaur1" or name == "npc_dota_centaur2") and self.leshrac_buff==1 then local ability = npc:FindAbilityByName("leshrac_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_leshrac_buff", {}) elseif (name == "npc_dota_satyr_child" or name == "npc_dota_satyr_junior" or name == "npc_dota_satyr_adult" or name == "npc_dota_satyr_veteran" or name == "npc_dota_satyr_myth" or name == "npc_dota_roshan_satyr" or name == "npc_dota_satyr1" or name == "npc_dota_satyr2" or name == "npc_dota_satyr3" ) and self.riki_buff==1 then local ability = npc:FindAbilityByName("riki_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_riki_buff", {}) elseif (name == "npc_dota_troll_child" or name == "npc_dota_troll_junior" or name == "npc_dota_troll_adult" or name == "npc_dota_troll_veteran" or name == "npc_dota_troll_myth" or name == "npc_dota_roshan_troll" or name == "npc_dota_troll1" or name == "npc_dota_troll2" or name == "npc_dota_troll3" or name == "npc_dota_troll4") and self.huskar_buff==1 then local ability = npc:FindAbilityByName("huskar_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_huskar_buff", {}) npc:AddNewModifier(nil, nil, "modifier_shapeshift_speed_lua", {}) elseif (name == "npc_dota_dragon_child" or name == "npc_dota_dragon_junior" or name == "npc_dota_dragon_adult" or name == "npc_dota_dragon_veteran" or name == "npc_dota_dragon_myth" or name == "npc_dota_roshan_dragon" or name == "npc_dota_dragon1" or name == "npc_dota_dragon2") and self.wyvern_buff==1 then local ability = npc:FindAbilityByName("wyvern_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_wyvern_buff", {}) npc:AddNewModifier(nil, nil, "modifier_shapeshift_speed_lua", {}) elseif (name == "npc_dota_dragon_child" or name == "npc_dota_dragon_junior" or name == "npc_dota_dragon_adult" or name == "npc_dota_dragon_veteran" or name == "npc_dota_dragon_myth" or name == "npc_dota_roshan_dragon" or name == "npc_dota_dragon1" or name == "npc_dota_dragon2") and self.jakiro_buff==1 then local ability = npc:FindAbilityByName("jakiro_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_jakiro_buff", {}) elseif (name == "npc_dota_ursa_child" or name == "npc_dota_ursa_junior" or name == "npc_dota_ursa_adult" or name == "npc_dota_ursa_veteran" or name == "npc_dota_ursa_myth" or name == "npc_dota_roshan_ursa" or name == "npc_dota_ursa1" or name == "npc_dota_ursa2") and self.ursa_buff==1 then local ability = npc:FindAbilityByName("ursa_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_ursa_buff", {}) npc:AddNewModifier(nil, nil, "modifier_shapeshift_speed_lua", {}) elseif (name == "npc_dota_ursa_child" or name == "npc_dota_ursa_junior" or name == "npc_dota_ursa_adult" or name == "npc_dota_ursa_veteran" or name == "npc_dota_ursa_myth" or name == "npc_dota_roshan_ursa" or name == "npc_dota_ursa1" or name == "npc_dota_ursa2") and self.druid_buff==1 then local ability = npc:FindAbilityByName("druid_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_druid_buff", {}) elseif (name == "npc_dota_ogre_child" or name == "npc_dota_ogre_junior" or name == "npc_dota_ogre_adult" or name == "npc_dota_ogre_veteran" or name == "npc_dota_ogre_myth" or name == "npc_dota_roshan_ogre" or name == "npc_dota_ogre1" or name == "npc_dota_ogre2") and self.ogre_buff==1 then local ability = npc:FindAbilityByName("ogre_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_ogre_buff", {}) npc:AddNewModifier(nil, nil, "modifier_shapeshift_speed_lua", {}) elseif (name == "npc_dota_golem_child" or name == "npc_dota_golem_junior" or name == "npc_dota_golem_adult" or name == "npc_dota_golem_veteran" or name == "npc_dota_golem_myth" or name == "npc_dota_roshan_golem" or name == "npc_dota_golem1" or name == "npc_dota_golem2" or name == "npc_dota_golem3" or name == "npc_dota_golem4") and self.tiny_buff==1 then local ability = npc:FindAbilityByName("tiny_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_tiny_buff", {}) npc:AddNewModifier(nil, nil, "modifier_shapeshift_speed_lua", {}) elseif (name == "npc_dota_wolf_child" or name == "npc_dota_wolf_junior" or name == "npc_dota_wolf_adult" or name == "npc_dota_wolf_veteran" or name == "npc_dota_wolf_myth" or name == "npc_dota_roshan_wolf" or name == "npc_dota_wolf1" or name == "npc_dota_wolf2") and self.lycan_buff==1 then local ability = npc:FindAbilityByName("lycan_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_lycan_buff", {}) elseif (name == "npc_dota_kobold_child" or name == "npc_dota_kobold_junior" or name == "npc_dota_kobold_adult" or name == "npc_dota_kobold_veteran" or name == "npc_dota_kobold_myth" or name == "npc_dota_roshan_kobold" or name == "npc_dota_kobold1" or name == "npc_dota_kobold2" or name == "npc_dota_kobold3" or name == "npc_dota_kobold4") and self.meepo_buff==1 then local ability = npc:FindAbilityByName("meepo_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_meepo_buff", {}) end end if (name == "npc_dota_troll1" or name == "npc_dota_troll2" or name == "npc_dota_troll3" or name == "npc_dota_troll4" or name == "npc_dota_roshan_troll" or name == "npc_dota_roshan_centaur" or name == "npc_dota_roshan_satyr" or name == "npc_dota_roshan_dragon" or name == "npc_dota_roshan_ursa" or name == "npc_dota_roshan_ogre" or name == "npc_dota_roshan_golem" or name == "npc_dota_roshan_wolf" or name == "npc_dota_roshan_kobold" or name == "npc_dota_centaur1" or name == "npc_dota_centaur2" or name == "npc_dota_satyr1" or name == "npc_dota_satyr2" or name == "npc_dota_satyr3" or name == "npc_dota_dragon1" or name == "npc_dota_dragon2" or name == "npc_dota_ursa1" or name == "npc_dota_ursa2" or name == "npc_dota_ogre1" or name == "npc_dota_ogre2" or name == "npc_dota_golem1" or name == "npc_dota_golem2" or name == "npc_dota_golem3" or name == "npc_dota_golem4" or name == "npc_dota_wolf1" or name == "npc_dota_wolf2" or name == "npc_dota_kobold_child" or name == "npc_dota_kobold_junior" or name == "npc_dota_kobold_adult" or name == "npc_dota_kobold_veteran" or name == "npc_dota_kobold_myth" or name == "npc_dota_wolf_child" or name == "npc_dota_wolf_junior" or name == "npc_dota_wolf_adult" or name == "npc_dota_wolf_veteran" or name == "npc_dota_wolf_myth" or name == "npc_dota_golem_child" or name == "npc_dota_golem_junior" or name == "npc_dota_golem_adult" or name == "npc_dota_golem_veteran" or name == "npc_dota_golem_myth" or name == "npc_dota_ogre_child" or name == "npc_dota_ogre_junior" or name == "npc_dota_ogre_adult" or name == "npc_dota_ogre_veteran" or name == "npc_dota_ogre_myth" or name == "npc_dota_ursa_child" or name == "npc_dota_ursa_junior" or name == "npc_dota_ursa_adult" or name == "npc_dota_ursa_veteran" or name == "npc_dota_ursa_myth" or name == "npc_dota_dragon_child" or name == "npc_dota_dragon_junior" or name == "npc_dota_dragon_adult" or name == "npc_dota_dragon_veteran" or name == "npc_dota_dragon_myth" or name == "npc_dota_troll_child" or name == "npc_dota_troll_junior" or name == "npc_dota_troll_adult" or name == "npc_dota_troll_veteran" or name == "npc_dota_troll_myth" or name == "npc_dota_satyr_child" or name == "npc_dota_satyr_junior" or name == "npc_dota_satyr_adult" or name == "npc_dota_satyr_veteran" or name == "npc_dota_satyr_myth" or name == "npc_dota_centaur_child" or name == "npc_dota_centaur_junior" or name == "npc_dota_centaur_adult" or name == "npc_dota_centaur_veteran" or name == "npc_dota_centaur_myth" or name == "npc_dota_kobold1" or name == "npc_dota_kobold2" or name == "npc_dota_kobold3" or name == "npc_dota_kobold4") and self.beastmaster_buff==1 then local ability = npc:FindAbilityByName("beastmaster_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_beastmaster_buff", {}) end if (name == "npc_dota_troll1" or name == "npc_dota_troll2" or name == "npc_dota_troll3" or name == "npc_dota_troll4" or name == "npc_dota_roshan_troll" or name == "npc_dota_roshan_centaur" or name == "npc_dota_roshan_satyr" or name == "npc_dota_roshan_dragon" or name == "npc_dota_roshan_ursa" or name == "npc_dota_roshan_ogre" or name == "npc_dota_roshan_golem" or name == "npc_dota_roshan_wolf" or name == "npc_dota_roshan_kobold" or name == "npc_dota_centaur1" or name == "npc_dota_centaur2" or name == "npc_dota_satyr1" or name == "npc_dota_satyr2" or name == "npc_dota_satyr3" or name == "npc_dota_dragon1" or name == "npc_dota_dragon2" or name == "npc_dota_ursa1" or name == "npc_dota_ursa2" or name == "npc_dota_ogre1" or name == "npc_dota_ogre2" or name == "npc_dota_golem1" or name == "npc_dota_golem2" or name == "npc_dota_golem3" or name == "npc_dota_golem4" or name == "npc_dota_wolf1" or name == "npc_dota_wolf2" or name == "npc_dota_kobold_child" or name == "npc_dota_kobold_junior" or name == "npc_dota_kobold_adult" or name == "npc_dota_kobold_veteran" or name == "npc_dota_kobold_myth" or name == "npc_dota_wolf_child" or name == "npc_dota_wolf_junior" or name == "npc_dota_wolf_adult" or name == "npc_dota_wolf_veteran" or name == "npc_dota_wolf_myth" or name == "npc_dota_golem_child" or name == "npc_dota_golem_junior" or name == "npc_dota_golem_adult" or name == "npc_dota_golem_veteran" or name == "npc_dota_golem_myth" or name == "npc_dota_ogre_child" or name == "npc_dota_ogre_junior" or name == "npc_dota_ogre_adult" or name == "npc_dota_ogre_veteran" or name == "npc_dota_ogre_myth" or name == "npc_dota_ursa_child" or name == "npc_dota_ursa_junior" or name == "npc_dota_ursa_adult" or name == "npc_dota_ursa_veteran" or name == "npc_dota_ursa_myth" or name == "npc_dota_dragon_child" or name == "npc_dota_dragon_junior" or name == "npc_dota_dragon_adult" or name == "npc_dota_dragon_veteran" or name == "npc_dota_dragon_myth" or name == "npc_dota_troll_child" or name == "npc_dota_troll_junior" or name == "npc_dota_troll_adult" or name == "npc_dota_troll_veteran" or name == "npc_dota_troll_myth" or name == "npc_dota_satyr_child" or name == "npc_dota_satyr_junior" or name == "npc_dota_satyr_adult" or name == "npc_dota_satyr_veteran" or name == "npc_dota_satyr_myth" or name == "npc_dota_centaur_child" or name == "npc_dota_centaur_junior" or name == "npc_dota_centaur_adult" or name == "npc_dota_centaur_veteran" or name == "npc_dota_centaur_myth" or name == "npc_dota_kobold1" or name == "npc_dota_kobold2" or name == "npc_dota_kobold3" or name == "npc_dota_kobold4") and self.chen_buff==1 then local ability = npc:FindAbilityByName("chen_buff") ability:ApplyDataDrivenModifier(npc, npc, "modifier_chen_buff", {}) npc:AddNewModifier(npc, nil, "modifier_chen_buff1", {}) end if name == "npc_dota_papich" then EmitGlobalSound("roshan_def.reincarnate") end end function Spawn:OnGameRulesStateChange() local newState = GameRules:State_Get() if newState == DOTA_GAMERULES_STATE_PRE_GAME then Spawn:SecretTreeSpawn() Spawn:SecretBoxSpawn() -- Spawn:DireTideTreeSpawner() --Spawn:BoxSpawner() end if newState == DOTA_GAMERULES_STATE_GAME_IN_PROGRESS then EmitGlobalSound("narod_pognali") -- EmitGlobalSound("shadow_demon_shadow_demon_ability_shadow_poison_01") Spawn:DireSpawner1() Spawn:NeutralSpawner() -- Spawn:NeutralSpawnerEvent() Spawn:DireBossSpawner() --Spawn:BoxSpawner() Spawn:SetWDToHost() end end function Spawn:SecretBoxSpawn() -- Функция начнет выполняться, когда начнется матч( на часах будет 00:00 ). print("that work !!!") local k = math.random(1,5) print("k= "..k) local point = Entities:FindByName( nil, "secret_chest_"..k):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' if point then print("point available !!!") end local unit = CreateUnitByName( "npc_dota_secret_box" , point, true, nil, nil, DOTA_TEAM_NEUTRALS ) end function Spawn:SecretTreeSpawn() -- Функция начнет выполняться, когда начнется матч( на часах будет 00:00 ). for i=1,7 do local trees = Entities:FindAllByName("secret_tree_"..i) local length = #trees print("length = "..length) if length == 0 then print("secret_tree_"..i.." not detected !") else local tree = trees[RandomInt(1,length)] local point = tree:GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local unit = CreateUnitByName( "npc_dota_secret_tree1" , point, true, nil, nil, DOTA_TEAM_NEUTRALS ) local ability = unit:FindAbilityByName("set_color") if ability then ability:SetLevel(1) end end end for i=8,11 do local trees = Entities:FindAllByName("secret_tree_"..i) local length = #trees print("length = "..length) if length == 0 then print("secret_tree_"..i.." not detected !") else local tree = trees[RandomInt(1,length)] local point = tree:GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local unit = CreateUnitByName( "npc_dota_secret_tree2" , point, true, nil, nil, DOTA_TEAM_NEUTRALS ) end end end function Spawn:DireTideTreeSpawner() -- Функция начнет выполняться, когда начнется матч( на часах будет 00:00 ). for i=3,11 do for k=1,5 do local point = Entities:FindByName( nil, "secret_tree_"..i.."_"..k):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local unit = CreateUnitByName( "npc_dota_halloween_treant" , point, true, nil, nil, DOTA_TEAM_BADGUYS ) end end end function Spawn:DireSpawner1() -- Функция начнет выполняться, когда начнется матч( на часах будет 00:00 ). local point = Entities:FindByName( nil, "dmpoint1"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local point1 = Entities:FindByName( nil, "drpoint1"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local waypoint = Entities:FindByName( nil, "d_waypoint11") -- Записываем в переменную 'waypoint' координаты первого бокса way1 local return_time = 30 -- Записываем в переменную значение '10' Timers:CreateTimer(20, function() -- Создаем таймер, который запустится через 15 секунд после начала матча и запустит следующую функцию for i=1, 4 do -- Произведет нижние действия столько раз, сколько указано в ROUND_UNITS. То есть в нашем случае создаст 2 юнита. local unit = CreateUnitByName( "npc_dota_dire1" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if GameRules:GetDOTATime(false,false)>300 then local unit = CreateUnitByName( "npc_dota_dire2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if GameRules:GetDOTATime(false,false)>900 then local unit = CreateUnitByName( "npc_dota_dire3" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if GameRules:GetDOTATime(false,false)>1500 then if RandomInt(1,100)>50 then local unit = CreateUnitByName( "npc_dota_dire4_1" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' else local unit = CreateUnitByName( "npc_dota_dire4_2" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end end if GameRules:GetDOTATime(false,false)>2100 then if RandomInt(1,100)>50 then local unit = CreateUnitByName( "npc_dota_dire5_1" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' elseif RandomInt(1,100)<101 then local unit = CreateUnitByName( "npc_dota_dire5_2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end end for j=1,1 do local unit = CreateUnitByName( "npc_dota_direr1", point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if GameRules:GetDOTATime(false,false)>600 then local unit = CreateUnitByName( "npc_dota_direr2" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if GameRules:GetDOTATime(false,false)>1200 then if RandomInt(1,100)>67 then local unit = CreateUnitByName( "npc_dota_direr3_1" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' elseif RandomInt(1,100)>50 then local unit = CreateUnitByName( "npc_dota_direr3_2" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' elseif RandomInt(1,100)<101 then local unit = CreateUnitByName( "npc_dota_direr3_3", point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end end if GameRules:GetDOTATime(false,false)>2100 then local unit = CreateUnitByName( "npc_dota_direr4" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if self.DireSpawner~= 1 then return return_time end-- Возвращаем таймеру время, через которое он должен снова сработать. Когда пройдет последний раунд таймер получит значение 'nil' и выключится. end) end function Spawn:DireSpawner2() -- Функция начнет выполняться, когда начнется матч( на часах будет 00:00 ). local point = Entities:FindByName( nil, "dmpoint2"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local point1 = Entities:FindByName( nil, "drpoint2"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local waypoint = Entities:FindByName( nil, "d_waypoint1") -- Записываем в переменную 'waypoint' координаты первого бокса way1 local return_time = 30 -- Записываем в переменную значение '10' Timers:CreateTimer(10, function() -- Создаем таймер, который запустится через 15 секунд после начала матча и запустит следующую функцию -- if GameRules.EndGame ~= 1 then for i=1, 4 do -- Произведет нижние действия столько раз, сколько указано в ROUND_UNITS. То есть в нашем случае создаст 2 юнита. local unit = CreateUnitByName( "npc_dota_dire" .. 1, point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end local unit = CreateUnitByName( "npc_dota_dire" .. 2, point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' local unit = CreateUnitByName( "npc_dota_dire" .. 3, point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' if RandomInt(1,100)>50 then local unit = CreateUnitByName( "npc_dota_dire4_1" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' else local unit = CreateUnitByName( "npc_dota_dire4_2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if RandomInt(1,100)>50 then local unit = CreateUnitByName( "npc_dota_dire5_1" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' elseif RandomInt(1,100)<101 then local unit = CreateUnitByName( "npc_dota_dire5_2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if GameRules.NecroMode == 1 then unit = CreateUnitByName( "npc_dota_necro_spawn", point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) else unit = CreateUnitByName( "npc_dota_direr1", point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] end unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' if GameRules.LichMode == 1 then unit = CreateUnitByName( "npc_dota_lich_spawn", point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) else unit = CreateUnitByName( "npc_dota_direr2", point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] end unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' if RandomInt(1,100)>67 then local unit = CreateUnitByName( "npc_dota_direr3_1" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' elseif RandomInt(1,100)>50 then local unit = CreateUnitByName( "npc_dota_direr3_2" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' elseif RandomInt(1,100)<101 then local unit = CreateUnitByName( "npc_dota_direr3_3" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end local unit = CreateUnitByName( "npc_dota_direr4", point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) if GameRules.ChaosMode == 1 then if RandomInt(1,100)<26 then local unit = CreateUnitByName( "npc_dota_chaos_minion" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end end if GameRules.DemonMode == 1 then if RandomInt(1,100)<26 then local unit = CreateUnitByName( "npc_dota_demon_splitter" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end end -- end if GameRules.EndGame ~= 1 then return return_time end -- Возвращаем таймеру время, через которое он должен снова сработать. Когда пройдет последний раунд таймер получит значение 'nil' и выключится. end) end function Spawn:NeutralSpawner() -- Функция начнет выполняться, когда начнется матч( на часах будет 00:00 ). local point = Entities:FindByName( nil, "nmpoint"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local point1 = Entities:FindByName( nil, "nrpoint"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local waypoint = Entities:FindByName( nil, "n_waypoint1") -- Записываем в переменную 'waypoint' координаты первого бокса way1 local dire_point = Entities:FindByName( nil, "n_waypoint19"):GetAbsOrigin() local return_time = 30 -- Записываем в переменную значение '10' Timers:CreateTimer(20, function() -- Создаем таймер, который запустится через 15 секунд после начала матча и запустит следующую функцию if GameRules.RoshanUpgrade ~= 1 and GameRules.MegaMode ~= 1 then for i=1, 4 do -- Произведет нижние действия столько раз, сколько указано в ROUND_UNITS. То есть в нашем случае создаст 2 юнита. local unit if RandomInt(1,100)>20 then unit = CreateUnitByName( "npc_dota_kobold2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_kobold3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end --unit:MoveToPositionAggressive(Entities:FindByName( nil, "n_waypoint10"):GetAbsOrigin()) Spawn:AttackMove( unit, dire_point ) --unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if (self.golem==2) then local unit if RandomInt(1,100)>20 then unit = CreateUnitByName( "npc_dota_golem3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_golem4", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end Spawn:AttackMove( unit, dire_point ) -- unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' elseif (self.golem==1) then local unit if RandomInt(1,100)>20 then unit = CreateUnitByName( "npc_dota_golem1", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_golem2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end Spawn:AttackMove( unit, dire_point ) -- unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if self.ursa==1 then local unit if RandomInt(1,100)>20 then unit = CreateUnitByName( "npc_dota_ursa1", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_ursa2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end Spawn:AttackMove( unit, dire_point ) -- unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if self.ogre==1 then if RandomInt(1,100)>20 then unit = CreateUnitByName( "npc_dota_ogre1", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_ogre2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end Spawn:AttackMove( unit, dire_point ) -- unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if self.DireSpawner~=1 then local unit if RandomInt(1,100)>20 then unit = CreateUnitByName( "npc_dota_troll1", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_troll2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end Spawn:AttackMove( unit, dire_point ) -- unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' elseif self.DireSpawner==1 then local unit if RandomInt(1,100)>20 then unit = CreateUnitByName( "npc_dota_troll3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_troll4", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end Spawn:AttackMove( unit, dire_point ) -- unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if self.wolf==1 then local unit if RandomInt(1,100)>20 then unit = CreateUnitByName( "npc_dota_wolf1", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_wolf2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end Spawn:AttackMove( unit, dire_point ) -- unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if self.satyr==1 then local unit if RandomInt(1,100)>20 then unit = CreateUnitByName( "npc_dota_satyr2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_satyr3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end Spawn:AttackMove( unit, dire_point ) -- unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if self.dragon==1 then local unit if RandomInt(1,100)>20 then unit = CreateUnitByName( "npc_dota_dragon1", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_dragon2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end Spawn:AttackMove( unit, dire_point ) -- unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if self.centaur==1 then local unit if RandomInt(1,100)>20 then unit = CreateUnitByName( "npc_dota_centaur1", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_centaur2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end Spawn:AttackMove( unit, dire_point ) -- unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end end if GameRules.RoshanUpgrade ~= 1 and GameRules.MegaMode ~= 1 then return return_time end end) end function Spawn:NeutralSpawnerEvent() -- Функция начнет выполняться, когда начнется матч( на часах будет 00:00 ). local point = Entities:FindByName( nil, "nmpoint"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local point1 = Entities:FindByName( nil, "nrpoint"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local waypoint = Entities:FindByName( nil, "n_waypoint1") -- Записываем в переменную 'waypoint' координаты первого бокса way1 local dire_point = Entities:FindByName( nil, "n_waypoint19"):GetAbsOrigin() local return_time = 30 -- Записываем в переменную значение '10' local wave_number = 0 Timers:CreateTimer(20, function() -- Создаем таймер, который запустится через 15 секунд после начала матча и запустит следующую функцию if GameRules.MegaMode == 0 and GameRules.EndGame == 0 then for i=1, 3 do -- Произведет нижние действия столько раз, сколько указано в ROUND_UNITS. То есть в нашем случае создаст 2 юнита. local unit = CreateUnitByName( "npc_dota_kobold3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:Upgrade4(unit, 10+0.05*wave_number, 10+wave_number*0.25) Spawn:AttackMove( unit, dire_point ) end local unit = CreateUnitByName( "npc_dota_satyr3", point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:Upgrade4(unit, 10+0.05*wave_number, 10+wave_number*0.25) Spawn:AttackMove( unit, dire_point ) if GameRules:GetDOTATime(false,false)>300 then local unit = CreateUnitByName( "npc_dota_wolf2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:Upgrade4(unit, 10+0.05*wave_number, 10+wave_number*0.25) Spawn:AttackMove( unit, dire_point ) end if GameRules:GetDOTATime(false,false)>600 then local unit = CreateUnitByName( "npc_dota_ursa2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:Upgrade4(unit, 10+0.05*wave_number, 10+wave_number*0.25) Spawn:AttackMove( unit, dire_point ) end if GameRules:GetDOTATime(false,false)>900 then local unit = CreateUnitByName( "npc_dota_golem4", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:Upgrade4(unit, 10+0.05*wave_number, 10+wave_number*0.25) Spawn:AttackMove( unit, dire_point ) end if GameRules:GetDOTATime(false,false)>1200 then local unit = CreateUnitByName( "npc_dota_troll4", point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:Upgrade4(unit, 10+0.05*wave_number, 15+wave_number*0.25) Spawn:AttackMove( unit, dire_point ) end if GameRules:GetDOTATime(false,false)>1500 then local unit = CreateUnitByName( "npc_dota_ogre2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:Upgrade4(unit, 10+0.05*wave_number, 15+wave_number*0.25) Spawn:AttackMove( unit, dire_point ) end if GameRules:GetDOTATime(false,false)>1800 then local unit = CreateUnitByName( "npc_dota_centaur2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:Upgrade4(unit, 10+0.05*wave_number, 25+wave_number*0.5) Spawn:AttackMove( unit, dire_point ) end if GameRules:GetDOTATime(false,false)>2100 then local unit = CreateUnitByName( "npc_dota_dragon2", point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:Upgrade4(unit, 10+0.05*wave_number, 25+wave_number*0.5) Spawn:AttackMove( unit, dire_point ) end wave_number = wave_number + 1 end return return_time end) end function Spawn:MegaNeutralSpawner() -- Функция начнет выполняться, когда начнется матч( на часах будет 00:00 ). local point = Entities:FindByName( nil, "nmpoint"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local point1 = Entities:FindByName( nil, "nrpoint"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local waypoint = Entities:FindByName( nil, "n_waypoint1") -- Записываем в переменную 'waypoint' координаты первого бокса way1 local dire_point = Entities:FindByName( nil, "n_waypoint19"):GetAbsOrigin() local return_time = 30 -- Записываем в переменную значение '10' Timers:CreateTimer(0, function() -- Создаем таймер, который запустится через 15 секунд после начала матча и запустит следующую функцию if GameRules.EndGame ~= 1 then for i=1, 4 do -- Произведет нижние действия столько раз, сколько указано в ROUND_UNITS. То есть в нашем случае создаст 2 юнита. local unit = CreateUnitByName( "npc_dota_kobold3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:AttackMove( unit, dire_point ) Spawn:Upgrade2(unit,100) unit:SetPhysicalArmorBaseValue(25) end local unit = CreateUnitByName( "npc_dota_golem4", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:AttackMove( unit, dire_point ) Spawn:Upgrade2(unit,100) unit:SetPhysicalArmorBaseValue(75) local unit = CreateUnitByName( "npc_dota_ursa2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:AttackMove( unit, dire_point ) Spawn:Upgrade2(unit,100) unit:SetPhysicalArmorBaseValue(50) local unit = CreateUnitByName( "npc_dota_ogre2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:AttackMove( unit, dire_point ) Spawn:Upgrade2(unit,100) unit:SetPhysicalArmorBaseValue(75) local unit = CreateUnitByName( "npc_dota_troll4", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:AttackMove( unit, dire_point ) Spawn:Upgrade2(unit,100) unit:SetPhysicalArmorBaseValue(25) local unit = CreateUnitByName( "npc_dota_wolf2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:AttackMove( unit, dire_point ) Spawn:Upgrade2(unit,100) unit:SetPhysicalArmorBaseValue(50) local unit = CreateUnitByName( "npc_dota_satyr3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:AttackMove( unit, dire_point ) Spawn:Upgrade2(unit,100) unit:SetPhysicalArmorBaseValue(50) local unit = CreateUnitByName( "npc_dota_dragon2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:AttackMove( unit, dire_point ) Spawn:Upgrade2(unit,100) unit:SetPhysicalArmorBaseValue(100) local unit = CreateUnitByName( "npc_dota_centaur2", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) Spawn:AttackMove( unit, dire_point ) Spawn:Upgrade2(unit,100) unit:SetPhysicalArmorBaseValue(100) end if GameRules.EndGame ~= 1 then return return_time end end) end function Spawn:NeutralSpawner1() -- Функция начнет выполняться, когда начнется матч( на часах будет 00:00 ). local point = Entities:FindByName( nil, "nmpoint"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local point1 = Entities:FindByName( nil, "nrpoint"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local waypoint = Entities:FindByName( nil, "n_waypoint1") -- Записываем в переменную 'waypoint' координаты первого бокса way1 local return_time = 30 -- Записываем в переменную значение '10' Timers:CreateTimer(0, function() -- Создаем таймер, который запустится через 15 секунд после начала матча и запустит следующую функцию if GameRules.MegaMode ~= 1 then for i=1, 4 do -- Произведет нижние действия столько раз, сколько указано в ROUND_UNITS. То есть в нашем случае создаст 2 юнита. local unit if RandomInt(1,100)<5 then unit = CreateUnitByName( "npc_dota_roshan3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_roshan_kobold", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if (self.golem==1) then local unit if RandomInt(1,100)<5 then unit = CreateUnitByName( "npc_dota_roshan3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_roshan_golem", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if self.ursa==1 then local unit if RandomInt(1,100)<5 then unit = CreateUnitByName( "npc_dota_roshan3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_roshan_ursa", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if self.ogre==1 then local unit if RandomInt(1,100)<5 then unit = CreateUnitByName( "npc_dota_roshan3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_roshan_ogre", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end local unit if RandomInt(1,100)<5 then unit = CreateUnitByName( "npc_dota_roshan3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_roshan_troll", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' if self.wolf==1 then local unit if RandomInt(1,100)<5 then unit = CreateUnitByName( "npc_dota_roshan3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_roshan_wolf", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if self.satyr==1 then local unit if RandomInt(1,100)<5 then unit = CreateUnitByName( "npc_dota_roshan3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_roshan_satyr", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if self.dragon==1 then local unit if RandomInt(1,100)<5 then unit = CreateUnitByName( "npc_dota_roshan3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_roshan_dragon", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end if self.centaur==1 then local unit if RandomInt(1,100)<5 then unit = CreateUnitByName( "npc_dota_roshan3", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) else unit = CreateUnitByName( "npc_dota_roshan_centaur", point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_GOODGUYS ) end unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end end return return_time end) end function Spawn:DireBossSpawner() -- Функция начнет выполняться, когда начнется матч( на часах будет 00:00 ). local point = Entities:FindByName( nil, "dmpoint2"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local point1 = Entities:FindByName( nil, "drpoint2"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local waypoint = Entities:FindByName( nil, "d_waypoint1") -- Записываем в переменную 'waypoint' координаты первого бокса way1 local return_time = 30 -- Записываем в переменную значение '10' local spawn_interval = 600 if GetMapName() == "roshdef_turbo" then spawn_interval = 300 end Timers:CreateTimer(10, function() -- Создаем таймер, который запустится через 15 секунд после начала матча и запустит следующую функцию Timers:CreateTimer(spawn_interval, function() EmitGlobalSound("roshan_def.boss") GameRules:SendCustomMessage("#Game_notification_boss_spawn_abomination",0,0) local unit = CreateUnitByName( "npc_dota_abomination_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(spawn_interval*2, function() EmitGlobalSound("roshan_def.boss") GameRules:SendCustomMessage("#Game_notification_boss_spawn_fire_golem",0,0) local unit = CreateUnitByName( "npc_dota_golem_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(spawn_interval*3, function() EmitGlobalSound("roshan_def.boss") GameRules:SendCustomMessage("#Game_notification_boss_spawn_witch",0,0) local unit = CreateUnitByName( "npc_dota_dead_witch" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' local unit = CreateUnitByName( "forest_dota_dead_ghost" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' local unit = CreateUnitByName( "forest_dota_dead_ghost" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(spawn_interval*4, function() EmitGlobalSound("roshan_def.boss") GameRules:SendCustomMessage("#Game_notification_boss_spawn_necronomicon",0,0) local unit = CreateUnitByName( "npc_dota_necronomicon_warrior_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' local unit = CreateUnitByName( "npc_dota_necronomicon_archer_boss" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(spawn_interval*5, function() EmitGlobalSound("roshan_def.boss") GameRules:SendCustomMessage("#Game_notification_boss_spawn_nyx",0,0) local unit = CreateUnitByName( "npc_dota_nyx_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(spawn_interval*6, function() EmitGlobalSound("roshan_def.boss") GameRules:SendCustomMessage("#Game_notification_boss_spawn_doom",0,0) local unit = CreateUnitByName( "npc_dota_doom_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' local unit = CreateUnitByName( "npc_dota_doom_minion" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' local unit = CreateUnitByName( "npc_dota_doom_minion" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' local unit = CreateUnitByName( "npc_dota_doom_minion" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(spawn_interval*7, function() EmitGlobalSound("roshan_def.boss") GameRules:SendCustomMessage("#Game_notification_boss_spawn_seeker",0,0) local unit = CreateUnitByName( "npc_dota_bloodseeker_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(spawn_interval*8, function() -- EmitGlobalSound("roshan_def.boss") -- GameRules:SendCustomMessage("#Game_notification_boss_spawn_never",0,0) local unit = CreateUnitByName( "npc_dota_sans" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(spawn_interval*9, function() EmitGlobalSound("roshan_def.boss") GameRules:SendCustomMessage("#Game_notification_boss_spawn_spectre",0,0) local unit = CreateUnitByName( "npc_phantasm_1" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(spawn_interval*10, function() EmitGlobalSound("roshan_def.boss") GameRules:SendCustomMessage("#Game_notification_boss_spawn_cursed_warriors",0,0) GameRules.Number_of_cursed = 12 Timers:CreateTimer(1, function() if GameRules.Number_of_cursed ~= 0 then EmitGlobalSound("Sandopolis") return 145 -- repeat time end end ) for i=1,12 do local unit = CreateUnitByName( "npc_cursed_warrior" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) end end) Timers:CreateTimer(spawn_interval*11, function() EmitGlobalSound("roshan_def.boss") GameRules:SendCustomMessage("#Game_notification_boss_maraphon",0,0) Timers:CreateTimer(10, function() local unit = CreateUnitByName( "npc_dota_abomination_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(20, function() local unit = CreateUnitByName( "npc_dota_golem_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(30, function() local unit = CreateUnitByName( "npc_dota_dead_witch" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' local unit = CreateUnitByName( "forest_dota_dead_ghost" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' local unit = CreateUnitByName( "forest_dota_dead_ghost" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(40, function() local unit = CreateUnitByName( "npc_dota_necronomicon_warrior_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' local unit = CreateUnitByName( "npc_dota_necronomicon_archer_boss" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(50, function() local unit = CreateUnitByName( "npc_dota_nyx_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(60, function() local unit = CreateUnitByName( "npc_dota_doom_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' local unit = CreateUnitByName( "npc_dota_doom_minion" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' local unit = CreateUnitByName( "npc_dota_doom_minion" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' local unit = CreateUnitByName( "npc_dota_doom_minion" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(70, function() local unit = CreateUnitByName( "npc_dota_bloodseeker_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(80, function() local unit = CreateUnitByName( "npc_dota_sans" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) Timers:CreateTimer(90, function() local unit = CreateUnitByName( "npc_phantasm_1" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' end) end) end) Timers:CreateTimer(spawn_interval*12, function() Spawn:InfiniteMaraphon() end) end function Spawn:InfiniteMaraphon() local point = Entities:FindByName( nil, "dmpoint2"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local point1 = Entities:FindByName( nil, "drpoint2"):GetAbsOrigin() -- Записываем в переменную 'point' координаты нашего спавнера 'spawnerino' local waypoint = Entities:FindByName( nil, "d_waypoint1") -- Записываем в переменную 'waypoint' координаты первого бокса way1 Timers:CreateTimer(1, function() EmitGlobalSound("SatanBal") return 213 -- repeat time end) Timers:CreateTimer(1, function()GameRules:SendCustomMessage("#Game_notification_infinite_maraphon",0,0) end) Timers:CreateTimer(1, function() EmitGlobalSound("roshan_def.boss") local int = math.random(1,7) if int == 1 then GameRules:SendCustomMessage("#Game_notification_boss_spawn_abomination",0,0) local unit = CreateUnitByName( "npc_dota_abomination_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' Spawn:Upgrade2(unit,500) Spawn:Upgrade2(unit,GameRules.Maraphon_Round/2.5) unit:SetPhysicalArmorBaseValue(175) elseif int == 2 then GameRules:SendCustomMessage("#Game_notification_boss_spawn_fire_golem",0,0) local unit = CreateUnitByName( "npc_dota_golem_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' Spawn:Upgrade2(unit,400) Spawn:Upgrade2(unit,GameRules.Maraphon_Round/2.5) unit:SetPhysicalArmorBaseValue(175) elseif int == 3 then GameRules:SendCustomMessage("#Game_notification_boss_spawn_necronomicon",0,0) local unit = CreateUnitByName( "npc_dota_necronomicon_warrior_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' Spawn:Upgrade2(unit,200) Spawn:Upgrade2(unit,GameRules.Maraphon_Round/2.5) unit:SetPhysicalArmorBaseValue(175) local unit = CreateUnitByName( "npc_dota_necronomicon_archer_boss" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' Spawn:Upgrade2(unit,200) Spawn:Upgrade2(unit,GameRules.Maraphon_Round/2.5) unit:SetPhysicalArmorBaseValue(150) elseif int == 4 then GameRules:SendCustomMessage("#Game_notification_boss_spawn_nyx",0,0) local unit = CreateUnitByName( "npc_dota_nyx_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' Spawn:Upgrade2(unit,60) Spawn:Upgrade2(unit,GameRules.Maraphon_Round/2.5) unit:SetPhysicalArmorBaseValue(175) elseif int == 5 then GameRules:SendCustomMessage("#Game_notification_boss_spawn_doom",0,0) local unit = CreateUnitByName( "npc_dota_doom_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' Spawn:Upgrade2(unit,40) Spawn:Upgrade2(unit,GameRules.Maraphon_Round/2.5) unit:SetPhysicalArmorBaseValue(175) local unit = CreateUnitByName( "npc_dota_doom_minion" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' Spawn:Upgrade2(unit,40) Spawn:Upgrade2(unit,GameRules.Maraphon_Round/2.5) unit:SetPhysicalArmorBaseValue(125) local unit = CreateUnitByName( "npc_dota_doom_minion" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' Spawn:Upgrade2(unit,40) Spawn:Upgrade2(unit,GameRules.Maraphon_Round/2.5) unit:SetPhysicalArmorBaseValue(125) local unit = CreateUnitByName( "npc_dota_doom_minion" , point1 + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' Spawn:Upgrade2(unit,40) Spawn:Upgrade2(unit,GameRules.Maraphon_Round/2.5) unit:SetPhysicalArmorBaseValue(125) elseif int == 6 then GameRules:SendCustomMessage("#Game_notification_boss_spawn_seeker",0,0) local unit = CreateUnitByName( "npc_dota_bloodseeker_boss" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' Spawn:Upgrade2(unit,16) Spawn:Upgrade2(unit,GameRules.Maraphon_Round/2.5) unit:SetPhysicalArmorBaseValue(175) elseif int == 7 then GameRules:SendCustomMessage("#Game_notification_boss_spawn_spectre",0,0) local unit = CreateUnitByName( "npc_phantasm_1" , point + RandomVector( RandomFloat( 0, 200 ) ), true, nil, nil, DOTA_TEAM_BADGUYS ) --[[ Создаем юнита 'example_unit_', в конце к названию добавится 1,2,3,4 или 5, в зависимости от раунда, и в итоге получатся наши example_unit_1, example_unit_2 и т.д. Юнит появится в векторе point + RandomVector (RandomFloat( 0, 200 ) ) - point - наша переменная, а рандомный вектор добавляется для того, чтобы мобы не появлялись в одной точке и не застревали. Мобы будут за силы света. ]] unit:SetInitialGoalEntity( waypoint ) -- Посылаем мобов на наш way1, координаты которого мы записали в переменную 'waypoint' Spawn:Upgrade2(unit,8) Spawn:Upgrade2(unit,GameRules.Maraphon_Round/2.5) unit:SetPhysicalArmorBaseValue(175) end GameRules.Maraphon_Round = GameRules.Maraphon_Round + 1 return 60 end ) end function Spawn:SetSameTeam() local team = DOTA_TEAM_BADGUYS GameRules:SetCustomGameTeamMaxPlayers( team, PlayerResource:GetPlayerCount() ) for i=0,4 do local hero = PlayerResource:GetSelectedHeroEntity(i) if hero then hero:SetTeam(team) PlayerResource:SetCustomTeamAssignment(i,team) end end --GameRules:SetCustomGameTeamMaxPlayers( DOTA_TEAM_GOODGUYS, 0 ) end function Spawn:SetWDToHost() local wd_dire = Entities:FindByName(nil, "wd_dire") if wd_dire then local host = PlayerResource:GetPlayer(0) wd_dire:SetOwner(host) wd_dire:SetControllableByPlayer(0, false) end local wd_radiant = Entities:FindByName(nil, "wd_radiant") if wd_radiant then local host = PlayerResource:GetPlayer(0) wd_radiant:SetOwner(host) wd_radiant:SetControllableByPlayer(0, false) end end function Spawn:AttackMove ( unit, point ) print("that shit work !!!") Timers:CreateTimer(0.1, function() ExecuteOrderFromTable({ UnitIndex = unit:entindex(), OrderType = DOTA_UNIT_ORDER_ATTACK_MOVE, Position = point, Queue = false, }) end) end CustomGameEventManager:RegisterListener( "choose_boss_chose", function( a, keyee ) print( a, keyee ) local boss = keyee.bossname if final_boss == true then return end final_boss = true print(final_boss) if boss == "zombie" then Spawn:ZombieMode() elseif boss == "chaos" then Spawn:ChaosMode() elseif boss == "demon" then Spawn:DemonMode() elseif boss == "lich" then Spawn:LichMode() elseif boss == "necro" then Spawn:NecroMode() end end )