Advertisement
test12333

Untitled

Sep 29th, 2022
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.31 KB | None | 0 0
  1. function on_update()
  2.     if in_game() and is_key_pressed(0x2E) then
  3.         local local_hero = get_local_hero()
  4.         if local_hero:GetEntityName() == "npc_dota_hero_skywrath_mage" then
  5.             for k, entity in pairs(get_entity_list()) do
  6.                 if entity:IsHero() and not entity:IsAlly() then
  7.  
  8.                     execute_order( -- silence
  9.                         local_hero,
  10.                         DotaUnitOrder.CAST_TARGET,
  11.                         PlayerOrderIssuer.HERO_ONLY,
  12.                         Vector3D(0, 0, 0),
  13.                         entity:GetIndex(),
  14.                         local_hero:GetAbility(2):Get(),
  15.                         false,
  16.                         true
  17.                     )
  18.  
  19.                     execute_order( -- arcane bolt
  20.                         local_hero,
  21.                         DotaUnitOrder.CAST_TARGET,
  22.                         PlayerOrderIssuer.HERO_ONLY,
  23.                         Vector3D(0, 0, 0),
  24.                         entity:GetIndex(),
  25.                         local_hero:GetAbility(0):Get(),
  26.                         false,
  27.                         true
  28.                     )
  29.  
  30.                     execute_order( -- shot
  31.                         local_hero,
  32.                         DotaUnitOrder.CAST_NO_TARGET,
  33.                         PlayerOrderIssuer.HERO_ONLY,
  34.                         Vector3D(0, 0, 0),
  35.                         0,
  36.                         local_hero:GetAbility(1):Get(),
  37.                         false,
  38.                         true
  39.                     )
  40.  
  41.                     execute_order( -- ult
  42.                         local_hero,
  43.                         DotaUnitOrder.CAST_POSITION,
  44.                         PlayerOrderIssuer.HERO_ONLY,
  45.                         entity:GetAbsOrigin(),
  46.                         0,
  47.                         local_hero:GetAbility(5):Get(),
  48.                         false,
  49.                         true
  50.                     )
  51.                 end
  52.             end
  53.         end
  54.     end
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement