Page 1 of 1

Daily Quest Remaining

Posted: Sat Jan 28, 2012 11:21 am
by Guest1234
I have a Waypoint setup to work with cot_tele.

It checks if my mule has enough Phirius Token Coins, if not, it goes to farm dailies.
When Dailies are done, it goes back to Varanas and loads cot_tele.

My problem is it craps out when it checks daily count.
I took the code from another waypoint file on this forum, forgot which one, apologies to original author for not being able to give credit...

On onLoad, it gets (or tries) dailies quest count.

Code: Select all

	<onLoad>
		local dailycomplete_ptr = 0x9CD1E0
		local dailycomplete_offset = 0xACF4
		function getDailyComplete()
			return memoryReadBytePtr(getProc(),dailycomplete_ptr,dailycomplete_offset)
		end	
		
		function checkDQCount()
			local _tmpQC = getDailyComplete()
			cprintf(cli.lightblue,"%s quests completed.\n",tostring(_tmpQC))
		end
	</onLoad>
and then, when turning in quests

Code: Select all

		sendMacro("CompleteQuest()");
		checkDQCount()
		player:update()
		if 10 > getDailyComplete() then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("Billboard"))
		else 
			__WPL:setWaypointIndex(__WPL:findWaypointTag("Back"))
		end
I get error message, compared to a nil value.
I'm thinking I have the wrong address / offset.

Couldn't find it in addresses.lua either.

Thanks for your help.

Re: Daily Quest Remaining

Posted: Sat Jan 28, 2012 12:42 pm
by Shogun
Origin is from the CoT script. Replace like this:

Code: Select all

		function getDailyComplete()
			--[[
			local dailycomplete_ptr = 0x9CD1E0
			local dailycomplete_offset = 0xACF4
			return memoryReadBytePtr(getProc(),dailycomplete_ptr,dailycomplete_offset)
			--]]

			local dailyQuestCount, dailyQuestsPerDay;
			repeat dailyQuestCount, dailyQuestsPerDay = RoMScript("Daily_count()") until nil ~= dailyQuestCount and nil ~= dailyQuestsPerDay
			return dailyQuestCount;
		end

Re: Daily Quest Remaining

Posted: Sat Jan 28, 2012 2:32 pm
by Guest1234
Trying that now, thx.

Re: Daily Quest Remaining

Posted: Sat Jan 28, 2012 2:35 pm
by Guest1234
I lied, gonna have to try it out tomorrow.

Re: Daily Quest Remaining

Posted: Sun Jan 29, 2012 12:48 pm
by Guest1234
Tried it, works like a charm.

Thanks !