Code: Select all
function GetItemBagSlot(_itemName)
for i=1,180,1 do
local inventoryIndex, icon, itemName, itemCount, locked, invalid = GetBagItemInfo ( i )
if itemName == _itemName then
return inventoryIndex
end
end
return "empty"
end
function GuildContributeItem(_itemName)
slot = GetItemBagSlot(_itemName)
PickupBagItem(slot)
GCB_GetContributionItem()
GCB_ContributionItemOK(0,0)
endThat works fine but when I try to use it through the bot it doesn't work. I don't get an error message in game or in the bot so I'm at a loss.
The code in my waypoint is:
Code: Select all
if( donateMats ) then
sendMacro("GuildContributeItem("Dusk Orchid");")
yrest(500)
sendMacro("GuildContributeItem("Pine Wood");")
yrest(500)
sendMacro("GuildContributeItem("Dark Crystal");")
yrest(500)
end
sendMacro("GuildContributeItem("Guild Rune");")