Nemockulous
02-08-2006, 01:06 PM
i know there is a /script command to use an item in a bag location, but for the life of me i can seem to figure/find it out someone please help. also, i am looking for a potion/drink mod that gives me a bar that changes due to any/all potions and changes the water i have on the bar (as in various types of conjured water, and also vendored drinks ect.) thanks.
belleboomGD
08-08-2006, 04:16 PM
To use a macro to consume something in a specific bag slot (in this case the top left slot of your main/far right bag; see http://wow.azzor.com/162/bag_numbers_&_slots/inventory_numbering.php for a nice guide to bag slot numbering):
/script UseContainerItem(0,1);
More complicated, but if you insert this function code into an addon file you can use the function in macros to eat/drink/consume whatever from any bag slot (replace "Conjured Crystal Water" with the name of the item you want to consume):
function ImThirsty()
for bag=0,4 do
for slot=1,GetContainerNumSlots(bag) do
if (GetContainerItemLink(bag,slot)) then
if (string.find(GetContainerItemLink(bag,slot), "Conjured Crystal Water")) then
UseContainerItem(bag,slot)
end
end
end
end
end
=> Then in-game, your macro looks like this:
/script ImThirsty();
Also, if you only need to do this once (I use this method for food _and_ water so it doesn't all fit into a macro) I suppose you could just use the following in a macro:
/script for bag=0,4 do for slot=1,GetContainerNumSlots(bag) do if (GetContainerItemLink(bag,slot)) then if (string.find(GetContainerItemLink(bag,slot), "Conjured Crystal Water")) then UseContainerItem(bag,slot)
end end end end end
(More details here: http://ui.worldofwar.net/macros.php?id=256)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.