Proper way for changing profile options in Waypoint?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Proper way for changing profile options in Waypoint?

#1 Post by noobbotter » Mon Jun 08, 2015 7:52 am

I was wondering what is the proper way for changing profile options within a waypoint file? I've seen it done a few ways and for some reason, I'm seeing some inconsistent result with some of the methods.

I have two separate waypoint files I was messing with this weekend. In one of them, where I need to kill and Loot for quest items, I had to mess with it quite a bit to get it working and this is what I ended up with to get it working:

Code: Select all

	settings.profile.mobs = {105151} -- "Zapa River Ostrich"
	settings.profile.LOOT = "true"
	settings.profile.ANTI_KS = "true"
	settings.profile.LOOT_ALL = "true"
	settings.profile.options.TARGET_LEVELDIF_BELOW = "55"
Yet, in a different waypoint file, One where it was just killing with no looting, I had to enter the profile changing like this:

Code: Select all

	settings.profile.mobs = {105141, "Northern Lurker"} -- "Northern Lurker"
	settings.profile.options.LOOT = "false"
	settings.profile.options.ANTI_KS = "false"
	settings.profile.options.TARGET_LEVELDIF_BELOW = "60"
I'm not sure why it was working one way in one file and a different way in the other file. Which is the proper way? I've also seen it done like this but didn't try this one:

Code: Select all

	changeProfileOption("LOOT", false)
	changeProfileOption("ANTI_KS", true)
	changeProfileOption("TARGET_LEVELDIF_BELOW", 60)
Would that be the better way of doing it?

On a side note, If I were to use the ID of a mob in a variable for use of setting what mobs to attack, and only had 1 mob I wanted to attack, which way should I set up that variable? I was having trouble passing a variable into the mobs profile option.

Code: Select all


myMOB = 105141
-- then use this to set it:
settings.profile.mobs = {myMOB}

or

myMOB = {105141}
-- then use this to set it:
settings.profile.mobs = myMOB


User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Proper way for changing profile options in Waypoint?

#2 Post by rock5 » Mon Jun 08, 2015 8:55 am

LOOT, ANTI_KS and LOOT_ALL are definitely options, as you can see in profiles, so they should be under options. I don't know why the first example would work.

Your problems may stem from the fact that you are using the wrong data types. In xml files, all values are written with quotes surrounded them because this is the way xml works, eg. LOOT="true", TARGET_LEVELDIF_BELOW="55" but when an xml profile is loaded into the settings.profile variable then variable types are converted to their respective types, eg. LOOT="true" becomes settings.profile.options.LOOT=true. Try changing your booleans to booleans and your numbers to numbers. See if that makes it work properly.

Sure you can use changeProfileOption. It's essentially does the same thing. You still have to use the correct type. Of course it can only be used for 'options'. Mobs would still have to be done separately although you could always use Lisas userfunction changeOptionFriendMob. Please note: the mobs list remains in effect until changed or the profile is reloaded. So reset the mobs list at the end of the waypoint file if needed.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: Proper way for changing profile options in Waypoint?

#3 Post by noobbotter » Mon Jun 08, 2015 9:25 am

Thanks Rock5. I'll give those a try. And yes, at the end of my waypoint files, I have it reloading the profile just so it doesn't screw something else up. Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests