Trouble with disenchanting waypoint
Posted: Mon Jan 14, 2013 8:44 am
Hey yo
I got some trouble with my disenchanting waypoint
The bot is supposed to buy the items and then start disenchanting -
and it worked greatly till the last update of the game and the last rombot-update.
Now it wont stop to buy items - no more disenchanting.
Any clues?
I got some trouble with my disenchanting waypoint
The bot is supposed to buy the items and then start disenchanting -
and it worked greatly till the last update of the game and the last rombot-update.
Now it wont stop to buy items - no more disenchanting.
Any clues?
Code: Select all
<waypoints>><!-- -->
<onLoad>
repeat
-- Buy items
inventory:update();
count = inventory:getItemCount(0) - 1
inventory:storeBuyItem(8, count);
-- Disenchanting items
printf(player.Name.." Start Disenchanting items.\n")
inventory:update();
for i, item in pairs(inventory.BagSlot) do
if item.SlotNumber > 60 and item.Available and not item.Empty and (3 > item.Quality)
and (item.ObjType == 0 or item.ObjType == 1) and (50 > item.Worth) then
slot = i-60
if( bot.ClientLanguage == "RU" ) then
item.Name = utf82oem_russian(item.Name);
end
printf("Disenchanting item in slot: "..slot.." Item name: "..item.Name..".\n")
RoMScript("UseSkill(1,3);");yrest(500);
RoMScript("PickupBagItem(GetBagItemInfo("..slot.."));");yrest(3500);
end
end
-- Check for Error
repeat cur_gold = RoMScript("GetPlayerMoney('copper')") yrest(100) until cur_gold
cprintf(cli.white, player.Name.." Bag Space: %s\n", inventory:itemTotalCount(0))
cprintf(cli.white, player.Name.." Have Gold: %s\n", cur_gold)
if 50 > cur_gold then
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Disenchanting:"..player.Name.." Not enough gold.|r')")
error("\a\a\Error. "..player.Name.." GOLD WARNING!");
elseif(inventory:itemTotalCount(0) == 0) then
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Disenchanting: "..player.Name.." Not enough BagSpase.|r')")
error("\a\a\a\Player "..player.Name.." Not enough BagSpase.");
end
until false
</onLoad>
</waypoints>