Advertisement
test12333

Untitled

Sep 29th, 2022
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.45 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.                     local it = entity:FindItemByName("item_sheepstick") --hex
  19.                     if it then
  20.                         execute_order(
  21.                             local_hero,
  22.                             DotaUnitOrder.CAST_TARGET,
  23.                             PlayerOrderIssuer.HERO_ONLY,
  24.                             Vector3D(0, 0, 0),
  25.                             entity:GetIndex(),
  26.                             it,
  27.                             false,
  28.                             true
  29.                         )
  30.                     end
  31.  
  32.                     local it1 = entity:FindItemByName("item_rod_of_atos") --atos
  33.                     if it1 then
  34.                         execute_order(
  35.                             local_hero,
  36.                             DotaUnitOrder.CAST_TARGET,
  37.                             PlayerOrderIssuer.HERO_ONLY,
  38.                             Vector3D(0, 0, 0),
  39.                             entity:GetIndex(),
  40.                             it1,
  41.                             false,
  42.                             true
  43.                         )
  44.                     end
  45.  
  46.                     execute_order( -- ult
  47.                         local_hero,
  48.                         DotaUnitOrder.CAST_TARGET,
  49.                         PlayerOrderIssuer.HERO_ONLY,
  50.                         Vector3D(0, 0, 0),
  51.                         entity:GetIndex(),
  52.                         local_hero:GetAbility(3):Get(),
  53.                         false,
  54.                         true
  55.                     )
  56.                 end
  57.             end
  58.         end
  59.     end
  60. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement