Advertisement
Guest User

Untitled

a guest
May 26th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.63 KB | None | 0 0
  1. local inf = {}
  2.  
  3. inf.Ban = {"Crencoder", "Informer"}
  4. inf.Enable = Menu.AddOption(inf.Ban, "Enable", "")
  5. inf.fontItem = Renderer.LoadFont("Arial", 18, Enum.FontWeight.EXTRABOLD)
  6.  
  7. -- function inf.OnModifierGained(ent, mod)
  8. --  if not Menu.IsEnabled(inf.Enable) then return end
  9. --  Log.Write(Modifier.GetName(mod).."|"..NPC.GetUnitName(ent))
  10. --  if Modifier.GetName(mod) == 'modifier_dark_willow_creature_invulnerable' then
  11. --      local ability = tostring( Entity.GetOrigin(ent) )
  12. --          Log.Write(tostring( ability ))
  13. --  end
  14. -- end
  15. function inf.OnUpdate()
  16.     if not Heroes.GetLocal() or not Engine.IsInGame() or not Menu.IsEnabled(inf.Enable) then
  17.         return
  18.     end
  19.     if Input.IsKeyDownOnce(Enum.ButtonCode.KEY_F) then
  20.         cursor = Input.GetWorldCursorPos()
  21.         Log.Write(tostring(cursor))
  22.     end
  23.     myHero = Heroes.GetLocal()
  24.     items = PhysicalItems.GetAll()
  25.     if items and #items > 0 then
  26.         for i=0, #items do
  27.             item = items[i]
  28.             if item then
  29.                 item2 = PhysicalItem.GetItem(item)
  30.                 if Ability.GetName(item2) == "item_recipe_ultimate_scepter_2" then
  31.                     myPos = Entity.GetAbsOrigin(myHero)
  32.                     pos1 = Vector(-2361.3220214844, 1868.6048583984, 159.998046875)
  33.                     if (myPos - pos1):Length2D() < 500 then
  34.                         Player.PrepareUnitOrders(Players.GetLocal(), Enum.UnitOrder.DOTA_UNIT_ORDER_PICKUP_ITEM, item, Vector(0, 0, 0), nil, Enum.PlayerOrderIssuer.DOTA_ORDER_ISSUER_PASSED_UNIT_ONLY, myHero)
  35.                     end
  36.                 end
  37.             end
  38.         end
  39.     end
  40. end
  41.  
  42.  
  43.  
  44. return inf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement