Changing Profile setting back
Posted: Mon Nov 07, 2011 9:24 pm
hi
I am wanting to know if there is a way of setting profile settings back to the orginal settings listed in the profile document once you change them using code in a function.
example:
Profile.xml contains
I am wanting to change the "COMBAT_DISTANCE" to something very small due to the area the bot is running through, as attacking distant mobs pulls the bot away from the waypoints too much, and gets stuck trying to get back to the narrow path it needs to travel through.
So I use
How do I get this setting back to what it is listed in the profile.xml once the bot gets past the narrow path?
I already know some of you are going to say just use type="RUN" or "TRAVEL", but there are other things I want to do this way, like increasing the amount of potions to buy before heading somewhere I know there are no health potions available, but setting it back to 'normal' profile settings once back to a place where there are easy access to potions.
I know I could just set it to the same value as in the profile, but that means I have a hard coded value in my function that will not work across various characters using this same function.
Also on a side note, what is the difference between COMBAT_DISTANCE and MAX_TARGET_DIST. If bot is targeting something, that seems like combat to me. I'm sure there is a valuable distance, so keen to find out.
cheers
I am wanting to know if there is a way of setting profile settings back to the orginal settings listed in the profile document once you change them using code in a function.
example:
Profile.xml contains
Code: Select all
<option name="COMBAT_TYPE" value="melee" /> <!-- leave empty or choose ranged/melee if not using class default -->
<option name="COMBAT_RANGED_PULL" value="false" /> <!-- only important for melees -->
<option name="COMBAT_DISTANCE" value="200" />
<option name="MAX_FIGHT_TIME" value="15" /> <!-- Max time without damage before break -->
<option name="DOT_PERCENT" value="90" />
<option name="ANTI_KS" value="true" />
<option name="MAX_TARGET_DIST" value="225" />So I use
Code: Select all
changeProfileOption("COMBAT_DISTANCE", 30);I already know some of you are going to say just use type="RUN" or "TRAVEL", but there are other things I want to do this way, like increasing the amount of potions to buy before heading somewhere I know there are no health potions available, but setting it back to 'normal' profile settings once back to a place where there are easy access to potions.
I know I could just set it to the same value as in the profile, but that means I have a hard coded value in my function that will not work across various characters using this same function.
Also on a side note, what is the difference between COMBAT_DISTANCE and MAX_TARGET_DIST. If bot is targeting something, that seems like combat to me. I'm sure there is a valuable distance, so keen to find out.
cheers