Change Profile Option in Onload help needed

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Hidden
Posts: 101
Joined: Tue May 08, 2012 6:10 pm

Change Profile Option in Onload help needed

#1 Post by Hidden » Fri Oct 19, 2012 4:16 am

Trying to add a logout timer to my eoj script.. so i can tell it to log out after 3 hours.
It will change the profile option but then it errors. My first time trying to add profile changes to my onlaod so dont know if im doing it right.

Code: Select all

<onload>
 		changeProfileOption("LOGOUT_TIME" , "182");

 YourTargetScore = 6000

	function waitForEventStart()
		repeat
			yrest(1000) -- check every second
			local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
			if Count == 2 and YourTargetScore > ScorePE then break end
		until false
	end

	function isEventFinished()
		 local namePE,messagePE,namePH,ScorePE,Count , IsScoreVisible= RoMScript("PE_GetInfo(1)")
		 if Count ~= 2 or ScorePE >= YourTargetScore then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("Home Base"));
	    end
	end

</onload>
Error message
C:/rombot/micromacro/scripts/rom/classes/player.lua:3006: attempt to compare number with string

Hidden
Posts: 101
Joined: Tue May 08, 2012 6:10 pm

Re: Change Profile Option in Onload help needed

#2 Post by Hidden » Fri Oct 19, 2012 4:43 am

I got it, added "" where i shouldn't have. should have been
changeProfileOption("LOGOUT_TIME", 182);

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests