Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local backpackIdAtHouse = 9602 -- POTION CONTAINER ID
- local pos = {x=32318, y=32240, z=7} -- POSITION OF POTION CONTAINER
- local drinkTarget = 'Widzewek'
- local manaPot = 'ultimate mana potion'
- Module.New('mana drink helper', function(module)
- local container = Container.GetByName(Item.GetName(backpackIdAtHouse ))
- if not(container:isOpen()) then
- Self.UseItemFromGround(pos.x, pos.y, pos.z)
- wait(1000, 2000)
- end
- local drinkID = Creature.New(drinkTarget):ID()
- local cont = Container.GetFirst()
- local count = 0
- if cont:ItemCount() >= 1 then
- count = cont:ItemCount() - 1
- end
- if(cont:GetItemData(count).id == Item.GetItemIDFromDualInput(manaPot)) and drinkID ~= 0 then
- cont:UseItemWithCreature(count, drinkID)
- elseif (Item.isContainer(cont:GetItemData(count).id)) then
- cont:UseItem(count, true)
- end
- module:Delay(1400)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement