Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. local backpackIdAtHouse = 9602 -- POTION CONTAINER ID
  2. local pos = {x=32318, y=32240, z=7} -- POSITION OF POTION CONTAINER
  3. local drinkTarget = 'Widzewek'
  4. local manaPot = 'ultimate mana potion'
  5.  
  6. Module.New('mana drink helper', function(module)
  7. local container = Container.GetByName(Item.GetName(backpackIdAtHouse ))
  8. if not(container:isOpen()) then
  9. Self.UseItemFromGround(pos.x, pos.y, pos.z)
  10. wait(1000, 2000)
  11. end
  12.  
  13. local drinkID = Creature.New(drinkTarget):ID()
  14. local cont = Container.GetFirst()
  15. local count = 0
  16. if cont:ItemCount() >= 1 then
  17. count = cont:ItemCount() - 1
  18. end
  19.  
  20. if(cont:GetItemData(count).id == Item.GetItemIDFromDualInput(manaPot)) and drinkID ~= 0 then
  21. cont:UseItemWithCreature(count, drinkID)
  22. elseif (Item.isContainer(cont:GetItemData(count).id)) then
  23. cont:UseItem(count, true)
  24. end
  25. module:Delay(1400)
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement