Im trying to work out the right function to pick up the item from a bank - so far im using :
Code: Select all
sendMacro("DrawBankItem("..bank_item..")");yrest(500);
Would appreciate a helping hand
Code: Select all
sendMacro("DrawBankItem("..bank_item..")");yrest(500);
Code: Select all
sendMacro("PickupBankItem(x);")
Code: Select all
item:moveTo("bag1")
Code: Select all
sendMacro("PickupBagItem(x)")
Or 'bags', to put it into any bag.wizzyslo wrote:can use bag1, bag2 ,bag3,...Code: Select all
item:moveTo("bag1")
Code: Select all
item:moveTo("bag1")
Code: Select all
sendMacro("PickupBagItem(x)")
Code: Select all
RoMScript("PickupBankItem("..x..")") -- x is the bank slot number
Code: Select all
toslot = inventory:findItem("Itemname")
if toslot then
RoMScript("PickupBagItem("..toslot.BagId..")")
end
Code: Select all
if CursorHasItem() then
toslot = inventory:findItem(0)
if toslot then
RoMScript("PickupBagItem("..toslot.BagId..")")
end
end
Yes well basicly that was the reason why i turned to you guys for help - couldnt work out the function to do that work but thanks to your hints i went on the right track.You are not understanding how moveTo works. item:moveTo("bag1") moves 'item' to bag1, not the item you are holding with your mouse. moveTo deals with items in your inventory. Because you are taking an item from your bank you need to use the "PickUp" functions, as you know.
I have reserved 5 first slots in the bank just for pot swapping and i use the code below to to put it there:How you are going to know which bank slot to pick up, I'm not sure.
Code: Select all
bank_table = {};
player:target_NPC("Housekeeper");
sendMacro("SpeakFrame_ListDialogOption(1, 4)"); yrest(1500); -- opening the bank box
if( inventory:itemTotalCount(207200) > 0 ) then -- Unbridled Enthusiasm
inventory:useItem(207200)
inventory:update()
yrest(750)
table.insert(bank_table,"Potion: Unbridled Enthusiasm")
end
if( inventory:itemTotalCount(207202) > 0 ) then -- Clear Thought
inventory:useItem(207202)
yrest(1000)
inventory:update()
yrest(750)
table.insert(bank_table,"Potion: Clear Thought")
end
if( inventory:itemTotalCount(207203) > 0 ) then -- Turn of Luck Powder Dust
inventory:useItem(207203)
inventory:update()
yrest(750)
table.insert(bank_table,"Potion: Turn of Luck Powder Dust")
end
if( inventory:itemTotalCount(207210) > 0 ) then -- Smoked Bacon with Herbs
inventory:useItem(207210)
inventory:update()
yrest(750)
table.insert(bank_table,"207210")
end
sendMacro("CloseWindows()");
Code: Select all
if (#bank_table ~= 0 ) then
player:target_NPC("Housekeeper"); -- Pick Up Pots from Bank
sendMacro("SpeakFrame_ListDialogOption(1, 4)"); yrest(1500); -- opening the bank
for i,v in ipairs(bank_table) do
sendMacro("PickupBankItem("..i..");") ;yrest(500);
toslot = inventory:findItem(v,"bag1")
if toslot then
print ("Found same item (",v, ") will try to stack them at slot.");
RoMScript("PickupBagItem("..toslot.BagId..")")
else
toslot = inventory:findItem(0,"bags")
print ("Cant find any stackable item in backpack - (",v, ") will be placed in first empty slot.")
RoMScript("PickupBagItem("..toslot.BagId..")")
end
end
sendMacro("CloseWindows()"); -- closing the bank
else
printf("No bank items to retrieve\n");
end
Users browsing this forum: Ahrefs [Bot] and 42 guests