Page 1 of 1

Trouble with disenchanting waypoint

Posted: Mon Jan 14, 2013 8:44 am
by prometheus
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?

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>

Re: Trouble with disenchanting waypoint

Posted: Mon Jan 14, 2013 1:50 pm
by rock5
Worked for me. I'm on 5.0.6.2607 client and I tested it with bot rev 744. It bought, disenchanted and repeated.

Re: Trouble with disenchanting waypoint

Posted: Mon Jan 14, 2013 2:23 pm
by prometheus
This is strange then - I've tried it with a new micro-macro folder and on 2 different clients (slim/full) and even tried to re-patch.
Any clue how I could solve the problem that the bot just don't stop to buy items so it can start to disenchant the items?

Re: Trouble with disenchanting waypoint

Posted: Mon Jan 14, 2013 2:57 pm
by rock5
What do you mean by "don't stop to buy items"? Do you mean "doesn't buy items"? Do you open the shop first?

Re: Trouble with disenchanting waypoint

Posted: Tue Jan 15, 2013 6:15 am
by prometheus
Well - first, thanks for your help, even if I didn't change anything, the problem solved itself.

The problem yesterday and the day before was, that the bot just bought items until the inventory was full and didn't stop buying. So there was no chance to disenchant because it always wanted to buy more and more.
Now, after updating everything again 2 times, it works.


Thanks again and have a nice day.