Page 1 of 1

Bot can't read inventory.Money

Posted: Sat Sep 03, 2011 7:23 am
by ichmagbotsyay
Hi,
I built in a logging function for my Cyclops-Bot. It used to work perfectly, but recently it can't read inventory.Money correctly anymore and keeps telling me that I have 0 gold. Here is my waypoint, in which the bot logs:

Code: Select all

<!-- #  1 --><waypoint x="-33358" z="-16212" y="411">
		player:update();
		moneyPrev = inventory.Money;
		gProfitPrev = gProfitPrev + profit;
		
		player:merchant("Carey Delis"); yrest(4000);
		player:update(); yrest(50);

		filename = getExecutionPath() .. "/logs/caProfit.xml";
		file, err = io.open(filename, "a+");
		if( not file ) then
			error(err, 0);
		end

		player:update();

		profit = inventory.Money - moneyPrev;
		gProfit = gProfitPrev + profit;		

		timeTaken = (os.difftime(os.time(),startTime) - player.Sleeping_time) / 60;

		moneyPerMinute = profit / timeTaken;
		
		printf("It is " ..os.date().. " and I have " ..inventory.Money.. " Gold, since the last run gave " ..profit.. " Gold. It took " ..timeTaken.. " minutes. Thats a profit of " ..moneyPerMinute.. " Gold per minute and a total profit of " ..gProfit.. " Gold.\n\n")
		file:write("It is " ..os.date().. " and I have " ..inventory.Money.. " Gold, since the last run gave " ..profit.. " Gold. It took " ..timeTaken.. " minutes. Thats a profit of " ..moneyPerMinute.. " Gold per minute and a total profit of " ..gProfit.. " Gold.\n\n")
		
		file:close();
		startTime = os.time();
	</waypoint>
Yesterday it logged everything correctly, but today it just keeps saying that I have 0 Gold, the last run gave 0 gold and i made a profit of 0 gold per minute with a total profit of 0. The time taken is correctly logged. Everything else works fine too, just the money part isn't correctly read by the bot, even though I have changed nothing. I have already tried using the "fixaddresses.bat" but it didn't help.

How can I fix this problem?

Re: Bot can't read inventory.Money

Posted: Sat Sep 03, 2011 8:18 am
by lisa
Hmm inventory.Money works for me, nothing at all changed?
Maybe try doing an update and revert on the rombot folder?

Re: Bot can't read inventory.Money

Posted: Sat Sep 03, 2011 8:43 am
by ichmagbotsyay
OK, I deleted the "adresses.lua" completely and had the Tortoise thingy update the folder. Now inventory.Money works again... pretty weird though that it messed up overnight, since I didn't change anything lol. Just restarted my PC this morning and after that it didn't work anymore.
But it's fixed now, so problem solved :)