Loading

Paste #p7kftfsoi

  1. teamSkullPoints = {0, 0}
  2.  
  3.  
  4. skullGolemKilled = 0
  5.  
  6. firstSkullGolemSpawn = true
  7.  
  8. skullunit_good = nil
  9. skullunit_bad = nil
  10.  
  11. point1_good = nil
  12. point2_good = nil
  13.  
  14. function deadTrigger (unit)
  15.     if (unit:GetUnitName() == "npc_dota_neutral_rock_golem")
  16.     then
  17.  
  18.         for i = 0, 33, 1 do
  19.                 local item = CreateItem("item_skull", nil, nil)
  20.                 local pos = unit:GetAbsOrigin()
  21.                 local drop = CreateItemOnPositionSync( pos, item )
  22.                 local pos_launch = pos+RandomVector(RandomFloat(150,200))
  23.                 item:LaunchLoot(true, 200, 0.75, pos_launch)
  24.         end
  25.    
  26.     end
  27.    
  28.     if (unit:GetUnitName() == "npc_dota_neutral_skull_golem")
  29.     then
  30.  
  31.     if (unit:GetTeamNumber() == 2 )
  32.     then
  33.     point1_good = unit:GetAbsOrigin()
  34.     print (unit:GetAbsOrigin())
  35.     print ("team1")
  36.     end
  37.    
  38.     if (unit:GetTeamNumber() == 3 )
  39.     then
  40.     point1_bad = unit:GetAbsOrigin()
  41.     print (unit:GetAbsOrigin())
  42.     print ("team2")
  43.     end
  44.    
  45.     skullGolemKilled = skullGolemKilled + 1
  46.     print ("killed")
  47.         if (skullGolemKilled >= 2)
  48.             then
  49.             skullGolemKilled = 0
  50.            
  51.             Timers:CreateTimer( 120.0, function()
  52.                     hota:triggerMines(true)
  53.                 end
  54.             )
  55.  
  56.         end
  57.    
  58.     end
  59.    
  60.     if (unit:GetUnitName() == "npc_dota_neutral_kobold")
  61.     then
  62.    
  63.     for i = 0, 1, 1 do
  64.             local item = CreateItem("item_skull", nil, nil)
  65.             local pos = unit:GetAbsOrigin()
  66.             local drop = CreateItemOnPositionSync( pos, item )
  67.             local pos_launch = pos+RandomVector(RandomFloat(150,200))
  68.             item:LaunchLoot(true, 200, 0.75, pos_launch)
  69.     end
  70.  
  71.     end
  72.    
  73. end
  74.  
  75. function summonGolems()
  76. teamSkullPoints[1] = 0
  77. teamSkullPoints[2] = 0
  78. hota:triggerMines(false)
  79.  
  80.  
  81. if (firstSkullGolemSpawn)
  82. then
  83.     point1_good = Entities:FindByName( nil, "skullGolemSpawn_good"):GetAbsOrigin()
  84.     point1_bad = Entities:FindByName( nil, "skullGolemSpawn_bad"):GetAbsOrigin()
  85.  
  86.     print ("FIRST SkullGOLEMSpawn")
  87.     print (point1_good)
  88.     firstSkullGolemSpawn = false
  89. end
  90.  
  91.     local wp1 = Entities:FindByName( nil, "lane_mid_pathcorner_goodguys_6"):GetAbsOrigin()
  92.  
  93.     print ("using point1_good >>>")
  94.     print (point1_good)
  95.     skullunit_good = CreateUnitByName("npc_dota_neutral_skull_golem", point1_good, true, nil, nil, DOTA_TEAM_GOODGUYS)
  96.     ExecuteOrderFromTable({ UnitIndex = skullunit_good:GetEntityIndex(), OrderType =  DOTA_UNIT_ORDER_ATTACK_MOVE , Position = wp1, Queue = true})
  97.  
  98.     local wp1 = Entities:FindByName( nil, "lane_mid_pathcorner_badguys_6"):GetAbsOrigin()
  99.  
  100.     skullunit_bad = CreateUnitByName("npc_dota_neutral_skull_golem", point1_bad, true, nil, nil, DOTA_TEAM_BADGUYS)
  101.     ExecuteOrderFromTable({ UnitIndex = skullunit_bad:GetEntityIndex(), OrderType =  DOTA_UNIT_ORDER_ATTACK_MOVE , Position = wp1, Queue = true})
  102.  
  103.  
  104.  
  105. for key,value in pairs(koboldEntities)
  106. do
  107.       print ("summon golem")
  108.       value:ForceKill(false)
  109.    
  110. end