Question about HP_Rest in charactername.xml

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Sumdumguy
Posts: 24
Joined: Mon Aug 30, 2010 6:03 am

Question about HP_Rest in charactername.xml

#1 Post by Sumdumguy » Tue Nov 09, 2010 6:34 am

Hello,

This is (part of) my character.XML:

Code: Select all

<option name="HP_LOW"			value="85" />
		<option name="MP_LOW_POTION"	value="50" />
		<option name="HP_LOW_POTION"	value="70" />
		<option name="USE_HP_POTION"	value="best" />	<!-- potion select strategy: best|minstack -->
		<option name="USE_MANA_POTION"	value="best" />	<!-- potion select strategy: best|minstack -->

		<!-- Rest if HP or Mana is below that level -->
		<option name="HP_REST" value="35" />
		<option name="MP_REST" value="15" />
The problem I have is, that my character when botting is not resting at 35%, but keeps going and going until he dies.
I am not sure how or where to tackle that problem, maybe someone can help? :)
I'm using a normal way point file, without any other commands or anything.

Edit:
Forgot to ask...

How can I use i.e. [Shift]-[1] as hotkey in the bot?

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Question about HP_Rest in charactername.xml

#2 Post by jduartedj » Tue Nov 09, 2010 9:57 am

Sumdumguy wrote:Hello,
Edit:
Forgot to ask...

How can I use i.e. [Shift]-[1] as hotkey in the bot?

Lat time I checked you couldn't! As far I Knows, and has it was announced in rom-bot, it does not support modifier keys! I don't know why or whether this as been fixed but I know MicroMacro DOES support modifier keys.
I don't have the links because i'm at not home but i already created and used a lua script in MM that uses modifier keys.

As for your other issue, do you have any code in your profile or use in-game macros as a Skill? the bot usually checks the HP unless something is "running" that does not check the HP for rest, also if you get aggro the bot will stop resting ofc, he's not just gonna stand there resting and die, if he's got to die it'll die with honor, KIA! xD
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

Sumdumguy
Posts: 24
Joined: Mon Aug 30, 2010 6:03 am

Re: Question about HP_Rest in charactername.xml

#3 Post by Sumdumguy » Tue Nov 09, 2010 10:09 am

I only have the bot running (rom/bot path:xyz)
and the waypoint path file is just waypoints, no selling, nothing....just run in circles until I come back from work :p

The bot does use potions, but naturally at some point they run out and then I die.

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Question about HP_Rest in charactername.xml

#4 Post by jduartedj » Tue Nov 09, 2010 10:29 am

Sumdumguy wrote:I only have the bot running (rom/bot path:xyz)
and the waypoint path file is just waypoints, no selling, nothing....just run in circles until I come back from work :p

The bot does use potions, but naturally at some point they run out and then I die.
I usually just buy more potions to start w/ xD, anyway beware not to make your bot do OBVIOUS circles otherwise ppl will notice you're a bot. What else did you change about the profile file?
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

Sumdumguy
Posts: 24
Joined: Mon Aug 30, 2010 6:03 am

Re: Question about HP_Rest in charactername.xml

#5 Post by Sumdumguy » Tue Nov 09, 2010 10:52 am

I'm running in an Instance...20 minute circle, then back to entrance. I use that when I can work from home and peek at the comp every 15-20 minutes.

Here is the XML file, for my scout and my knight. I didn't change anything else and ommitted the comments and other classes.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<profile>
	<options>
		<!-- Try the bot with a new char mage                   -->
		<!-- At the pioneer village. Use demo.xml waypoint file -->
		<option name="HP_LOW"			value="85" />
		<option name="MP_LOW_POTION"	value="50" />
		<option name="HP_LOW_POTION"	value="70" />
		<option name="USE_HP_POTION"	value="best" />	<!-- potion select strategy: best|minstack -->
		<option name="USE_MANA_POTION"	value="best" />	<!-- potion select strategy: best|minstack -->

		<!-- Rest if HP or Mana is below that level -->
		<option name="HP_REST" value="35" />
		<option name="MP_REST" value="15" />

		<!-- Shopping options, how many of what do you want to keep in your inventory -->
		<option name="HEALING_POTION" value="2" />
		<option name="MANA_POTION" value="1" />
		<option name="ARROW_QUIVER" value="0" />
		<option name="THROWN_BAG" value="0" />
		<option name="POISON" value="0" />

		<!-- either false or arrow or thrown -->
		<option name="RELOAD_AMMUNITION" value="arrow" />	<!-- false|arrow|thrown -->

		<!-- Combat options -->
		<option name="COMBAT_TYPE"        value="" />	<!-- 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="60" />
		<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="60" />

		<!-- Attack monsters 3 levels above or 10 below your level -->
		<option name="TARGET_LEVELDIF_ABOVE" value="5" />
		<option name="TARGET_LEVELDIF_BELOW" value="50" />

		<!-- Waypoint and movement settings -->
		<option name="WAYPOINTS"		value="" />  <!-- leave empty to show a list -->
		<option name="RETURNPATH"		value="" />
		<option name="PATH_TYPE"		value="waypoints" />	<!-- waypoints | wander -->
		<option name="WANDER_RADIUS"		value="500" />
		<option name="WAYPOINT_DEVIATION"	value="0" />
		<option name="QUICK_TURN" 		value="false" />

		<!-- Loot settings -->
		<option name="LOOT"               value="true" />
		<option name="LOOT_IN_COMBAT"     value="true" />
		<option name="LOOT_DISTANCE"      value="100" />
		<option name="LOOT_PAUSE_AFTER"   value="0" />		<!-- probability in % for a short rest -->

		<!-- Harvest options -->
		<option name="HARVEST_DISTANCE"		value="120" />

		<!-- Log out and resurrect settings -->
		<option name="LOGOUT_TIME" 			value="0" />	<!-- in minutes, 0 = timer disabled -->
		<option name="LOGOUT_SHUTDOWN"		value="false" />
		<option name="LOGOUT_WHEN_STUCK"	value="true" />
		<option name="RES_AUTOMATIC_AFTER_DEATH" value="true" />
		<option name="MAX_DEATHS" value="10" /> <!-- Log out after this many deaths -->

		<!-- For more options and documentation see the RoM Bot Wiki:  -->
		<!-- http://www.solarstrike.net/wiki/index.php5?title=RoM_Bot  -->

	</options>

	<friends>
		<!-- names of friends we help fighting or enemys we don't want to attack -->
		<!-- for umlauts use \129 (ue),\132 (ae),\148 (oe) e.g. K\132fer         -->
		<friend name="MyOtherCharacter1" />
		<friend name="MyOtherCharacter2" />
		<friend name="Stone Armored Rhino" />
		<friend name="Elite_Mob_Name2" />
	</friends>

	<mobs>
		<!-- names of mobs we want to attack 				-->
		<!-- if no names defined we will attack all mobs	-->
	<!--	<mob name="" />
		<mob name="" />
		<mob name="" /> -->
	</mobs>

	<hotkeys>
    	<!-- to communicate with the RoM API / define ingame dummy macro at place 1 -->
		<hotkey name="MACRO"        modifier="" key="VK_0" />
	</hotkeys>


	<skills_scout>
		<skill name="SCOUT_VAMPIRE_ARROWS" modifier="" hotkey="VK_9" priority="100" />
		<skill name="SCOUT_SHOT"        modifier="" hotkey="VK_2" priority="90" />
		<skill name="SCOUT_AUTOSHOT"    modifier="" hotkey="VK_4" priority="80" />
		<skill name="SCOUT_WIND_ARROWS" modifier="" hotkey="VK_1" priority="70" />
		<skill name="SCOUT_HEALING_SHOT"        modifier="" hotkey="VK_7" priority="90" hpper="80" />
		<skill name="KNIGHT_ENHANCED_ARMOR"    modifier="" hotkey="VK_5" priority="130" maxuse="1" />
		<skill name="SCOUT_FROST_ARROW"    modifier="" hotkey="VK_6" priority="130" maxuse="1" />
	</skills_scout>


	<skills_knight>
		<skill name="KNIGHT_HOLY_STRIKE"  modifier="" hotkey="VK_1" priority="110" />
		<skill name="SCOUT_SHOT"        modifier="" hotkey="VK_2" priority="105" />
		<skill name="KNIGHT_HOLY_SEAL"    modifier="" hotkey="VK_5" priority="112" maxuse="1" />
		<skill name="KNIGHT_ENHANCED_ARMOR"    modifier="" hotkey="VK_6" priority="130" maxuse="1" />
		<skill name="KNIGHT_MANA_RETURN"   modifier="" hotkey="VK_3" priority="40" />
	</skills_knight>


User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Question about HP_Rest in charactername.xml

#6 Post by jduartedj » Tue Nov 09, 2010 4:15 pm

Sumdumguy wrote:I'm running in an Instance...20 minute circle, then back to entrance. I use that when I can work from home and peek at the comp every 15-20 minutes.

Here is the XML file, for my scout and my knight. I didn't change anything else and ommitted the comments and other classes.
Are you sure it keeps on going under 35% without aggro? isn't it just getting aggro when it is low?
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

Sumdumguy
Posts: 24
Joined: Mon Aug 30, 2010 6:03 am

Re: Question about HP_Rest in charactername.xml

#7 Post by Sumdumguy » Tue Nov 09, 2010 5:42 pm

He kills mobs, goes below 25% (so WAY below the 35% treshold) and without pausing, continues to the next waypoint where the next mobs wait who would kill him.

Sumdumguy
Posts: 24
Joined: Mon Aug 30, 2010 6:03 am

Re: Question about HP_Rest in charactername.xml

#8 Post by Sumdumguy » Wed Nov 10, 2010 6:18 pm

I found the problem.

the bot checks for HP at the beginning of combat or when "entering combat".

Is there any way to check for HP when looting corpses or *before* moving to the next waypoint?

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Question about HP_Rest in charactername.xml

#9 Post by jduartedj » Thu Nov 11, 2010 7:29 am

Sumdumguy wrote:I found the problem.

the bot checks for HP at the beginning of combat or when "entering combat".

Is there any way to check for HP when looting corpses or *before* moving to the next waypoint?

Well you can use a rom-bot function to do it manually but i don't think that is what you want! It should check that always, in waypoints and all!
I'd like the input of a mod/admin here because i'm not sure about exactly when is that checked but i don't think it is ONLY on those occasions
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

Sumdumguy
Posts: 24
Joined: Mon Aug 30, 2010 6:03 am

Re: Question about HP_Rest in charactername.xml

#10 Post by Sumdumguy » Fri Nov 12, 2010 5:41 am

Currently the check is:

Code: Select all

-- rest after getting new target and before starting fight
		-- rest between 50 until 99 sec, at most until full, after that additional rnd(10)
		if( player:haveTarget()  and
		    player.Current_waypoint_type ~= WPT_RUN ) then	-- no resting if running waypoin type

The problem (for me) is, that in instances, I need to set the target range much shorter than outside, or the bot will try to attack through the wall over and over. (unless there is a trick with the settings that I am not aware of?) With the short target range, the bot is then with aggro range of mobs...so he does rest for about 0.5 seconds and then he gets attacked and resting stops.
I have tweaked the ranges a little bit and now the bot does rest, but the drawback is that he sometimes gets stuck in walls or corners.
Generally speaking I think it'd be best to check for HP
- after reaching a waypoint
- being out of combat
- before moving to the next waypoint.

If that's not possible, that's ok, too :)

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

Re: Question about HP_Rest in charactername.xml

#11 Post by rock5 » Fri Nov 12, 2010 7:43 pm

Personally I think you're right. If you are below the HP_Rest value it should rest at the first opportunity not only just before a fight.

I can see probably why it was done this way, it's because you might heal some while traveling so don't need to spend as much time resting. But, to help the character be more survivable, I would prefer if it rested at the first opportunity.

Looking at the code it looks like all you have to do is remove the check to see is you have a target.

Try changing this;

Code: Select all

		-- rest after getting new target and before starting fight
		-- rest between 50 until 99 sec, at most until full, after that additional rnd(10)
		if( player:haveTarget()  and
		    player.Current_waypoint_type ~= WPT_RUN ) then	-- no resting if running waypoin type
to this

Code: Select all

		-- rest after getting new target and before starting fight
		-- rest between 50 until 99 sec, at most until full, after that additional rnd(10)
		if( player.Current_waypoint_type ~= WPT_RUN ) then	-- no resting if running waypoin type
Let us know how that works.
  • 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

Sumdumguy
Posts: 24
Joined: Mon Aug 30, 2010 6:03 am

Re: Question about HP_Rest in charactername.xml

#12 Post by Sumdumguy » Wed Nov 17, 2010 4:16 am

apologies for the delay, but your suggestion worked, rock5 :)
bot is now resting after combat or before moving to the next waypoint. Cheers! :)

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Question about HP_Rest in charactername.xml

#13 Post by botje » Wed Nov 17, 2010 6:47 am

i think this should be made default ^^

or atleast a toggle option,

Botje

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

Re: Question about HP_Rest in charactername.xml

#14 Post by rock5 » Wed Nov 17, 2010 10:05 pm

Ok I've committed it to rev 520.
  • 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

Post Reply

Who is online

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