Advertisement
Guest User

thiago GAY!!!!!

a guest
Jun 30th, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.09 KB | None | 0 0
  1.  
  2. local maxCreeps = 0 -- Variavel Global
  3.  
  4. Timers:CreateTimer
  5. ( 15, -- Start this timer 30 game-time seconds later
  6.   function()
  7.      
  8.       DebugPrint("This function is called 30 seconds after the game begins, and every 30 seconds thereafter") --escolheSkill()
  9.      
  10.     function UnitDifficulty()
  11.  
  12.   end
  13. )
  14.  
  15. =============================================================================================================================
  16.  
  17. function UnitDifficulty()
  18.  local difficulty = getDifficulty()
  19.      
  20.       if difficulty == "Easy" then
  21.         maxCreeps = 5
  22.       end
  23.  
  24.       if difficulty == "Medium" then
  25.         maxCreeps = 10
  26.       end
  27.  
  28.       if difficulty == "Hard" then
  29.         maxCreeps = 20
  30.       end
  31.  
  32.       local i = RandomInt(1, maxCreeps)
  33.      
  34.       for x=0, i do
  35.         spawnUnit(difficulty)
  36.       end
  37. end
  38.  
  39. =============================================================================================================================
  40.  
  41. function spawnUnit(difficulty)
  42.  
  43.   local creep = selectCreep(difficulty)
  44.   print("selecionou o creep")
  45.   print(tostring(unit))
  46.   local marker = selectMarker()
  47.   print("selecionou o marcador")
  48.   print(tostring(marker))
  49.  
  50.  
  51.   print("spawnando")
  52.   local point = Entities:FindByName( nil, marker):GetAbsOrigin()
  53.   local unit = CreateUnitByName(creep, point, true, nil, nil, DOTA_TEAM_CUSTOM_8 )
  54.  
  55.    local killedUnit = EntIndexToHScript( event.entindex_killed )
  56.     if killedUnit and killedUnit:IsCreep() then
  57.  
  58. end
  59.  
  60. =============================================================================================================================
  61.  
  62. function DotaVerifica (event)
  63.     local killedUnit = EntIndexToHScript( event.entindex_killed )
  64.     if killedUnit and killedUnit:IsCreep() then
  65.        
  66.           local valor = 0
  67.           valor = valor - maxcreeps
  68.  
  69.           print(tostring(valor))
  70.          
  71.           if valor == 0 then
  72.             spawnUnit(difficulty)
  73.           end
  74.     end
  75. end
  76.  
  77. =============================================================================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement