Guest User

Untitled

a guest
Aug 12th, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. "ober_summon_gunner"
  2. {
  3. // General
  4.  
  5.  
  6. //------------------------------------------------------------------------------------------------------------
  7.  
  8. -
  9. "ID" "5005"
  10.  
  11. // unique ID number for this ability. Do not change
  12.  
  13. this once established or it will invalidate collected stats.
  14. "AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_POINT"
  15. "AbilityCastPoint" "0.4 0.4 0.4 0.4"
  16. "AbilityCastRange" "600"
  17. "BaseClass" "ability_datadriven"
  18.  
  19. // Time
  20.  
  21.  
  22. //------------------------------------------------------------------------------------------------------------
  23.  
  24. -
  25. "AbilityCooldown" "8.0"
  26.  
  27. // Cost
  28.  
  29.  
  30. //------------------------------------------------------------------------------------------------------------
  31.  
  32. -
  33. "AbilityManaCost" "145"
  34.  
  35. // Special
  36.  
  37.  
  38. //------------------------------------------------------------------------------------------------------------
  39.  
  40. -
  41. "OnSpellStart"
  42. {
  43. "SpawnUnit"
  44. {
  45. "UnitName" "npc_dota_lycan_wolf1"
  46. "Target" "POINT"
  47. "Duration" "45"
  48. "UnitCount" "1"
  49. }
  50. "RunScript"
  51. {
  52. "Target" "POINT"
  53. "Caster" "CASTER"
  54. "Point" "TARGET"
  55. "ScriptFile" "Ober.lua"
  56. "Function" "CheckGunner"
  57. }
  58. }
  59. }
  60.  
  61.  
  62. Ober.lua
  63.  
  64. function CheckGunner( keys )
  65. local find = keys.caster:FindAbilityByName("ober_summon_gunner"):GetLevel()
  66. local Caster = keys.caster
  67. local point = keys.target_points[1]
  68. if find == 1 then
  69. CreateUnitByName("ober_gunner1", point, true, Caster, Caster, Caster:GetTeam())
  70. elseif find == 2 then
  71. CreateUnitByName("ober_gunner2", point, true, Caster, Caster, Caster:GetTeam())
  72. elseif find == 3 then
  73. CreateUnitByName("ober_gunner3", point, true, Caster, Caster, Caster:GetTeam())
  74. elseif find == 4 then
  75. CreateUnitByName("ober_gunner4", point, true, Caster, Caster, Caster:GetTeam())
  76. end
  77. end
Advertisement
Add Comment
Please, Sign In to add comment