Must face target in order to attack.

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Frederick
Posts: 1
Joined: Wed May 12, 2010 6:59 am

Must face target in order to attack.

#1 Post by Frederick » Wed May 12, 2010 7:30 am

Code: Select all

I should start with thanking everyone that created and worked on improving this program.

Now for the problem I'm experiencing.
When playing as mage/priest I'm not having any problems, when playing as rogue/knight I experience the following.
When attacking a mob my character runs on to the mob tries to attack it but then I'm receiving the error ingame 'must face target in order to attack'. The character stays at the location while being attacked by the mob consuming potions until it eventually dies.
This problem occurs sometimes shortly after starting the program sometimes after several hours making use of it.
In first instance I've tried to analyse the problem, a rogue/knight can attack in two different ways(from the front and from behind(sneak attack)). Could it be that the program lets the character run to far on to the mob so that the program should make use of the behind attacks instead of the normal infront attacks. If that is the problem I just have to  register several extra skills. Or could it be that I should change somethings on the programs' coding?

When noticing the problem I've decided to return to the basic coding of the program so no extra addons and deletes from my side, but it still occurs.

Hope I provided enough and accurate information so one of you is able to help me.


Thnx in advance.

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="75" />
		<option name="MP_LOW_POTION"	value="50" />
		<option name="HP_LOW_POTION"	value="75" />
		<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="45" />
		<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="99" />
		<option name="MANA_POTION" value="99" />
		<option name="ARROW_QUIVER" value="2" />
		<option name="THROWN_BAG" value="2" />
		<option name="POISON" value="30" />

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

		<!-- Combat options -->
		<option name="COMBAT_TYPE"        value="melee" />	<!-- leave empty or choose ranged/melee if not using class default -->
		<option name="COMBAT_RANGED_PULL" value="true" /> <!-- only important for melees -->
		<option name="COMBAT_DISTANCE"    value="50" />
		<option name="MAX_FIGHT_TIME"     value="5" />	<!-- Max time without damage before break -->
		<option name="DOT_PERCENT"        value="90" />
		<option name="ANTI_KS"            value="true" />

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

		<!-- 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="100" />
		<option name="WAYPOINT_DEVIATION"	value="15" />
		<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 -->

		<!-- 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="5" /> <!-- 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="Elite_Mob_Name1" />
		<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>

	<!-- define your skills depending from your actual primary class -->
	<!-- see the example for a priest/mage                           -->
	<!-- delete skills you don't have or don't want to use.          -->
	<!-- For more skills to use see /database/skills.xml             -->
	<!-- demo skills for LvL 1 character for all classes             -->


	

	<skills_rogue>
		<skill name="ROGUE_SHADOWSTAB" modifier="" hotkey="VK_2" priority="999"/>
		<skill name="ROGUE_LOW_BLOW" modifier="" hotkey="VK_3" priority="900"/>
		<skill name="ROGUE_WOUND_ATTACK"  modifier="" hotkey="VK_4" priority="850" />
		<skill name="KNIGHT_ENHANCED_ARMOR" modifier="" hotkey="VK_5" />
		<skill name="ROGUE_LIONS_PROTECTION" modifier="" hotkey="VK_6" />
	</skills_rogue>

	
	<skills_knight>
		<skill name="KNIGHT_HOLY_STRIKE" />
		<skill name="KNIGHT_HOLY_SHIELD" />
		<skill name="KNIGHT_HOLY_SEAL"   />
		<skill name="KNIGHT_PUNISHMENT"  />
	</skills_knight>


	<onLoad><![CDATA[
		-- Additional Lua code to execute after loading the profile
		-- and before the bot starts. e.g. You could overwrite profile settings here
		-- like: changeProfileOption("HP_REST", 60);
	]]></onLoad>

	<onDeath><![CDATA[
		-- Additional Lua code to execute on death
		-- pauseOnDeath(); -- Stop the script
		-- player:logout();	-- logout
	]]></onDeath>

	<onLeaveCombat><![CDATA[
		-- Additional Lua code to execute after killing an enemy
	]]></onLeaveCombat>

	<onLevelup><![CDATA[
		-- Additional Lua code to execute after having a levelup
		-- and levelup the skills for a new character (mage or priest recommended)
		-- e.g. sendMacro("SetSpellPoint(_tabnr, _skillnr);"); would levelup a skill
	]]></onLevelup>

	<onSkillCast><![CDATA[
		-- Additional Lua code to execute when casting a skill
		-- Note: arg1 contains the skill being used.
		-- i.e. arg1.Name will be the name of the skill being cast
		-- e.g.:
		--if( 15 > player.HP/player.MaxHP*100 ) then
		--    player:cast("PRIEST_SOUL_SOURCE");
		--elseif( 25 > player.HP/player.MaxHP*100 ) then
		--    player:cast("PRIEST_HOLY_AURA");
		--    player:cast("PRIEST_URGENT_HEAL");
		--    player:cast("PRIEST_URGENT_HEAL");
	]]></onSkillCast>
</profile>

User avatar
Administrator
Site Admin
Posts: 5329
Joined: Sat Jan 05, 2008 4:21 pm

Re: Must face target in order to attack.

#2 Post by Administrator » Wed May 12, 2010 3:25 pm

It's due to lag. The monster is in a different location on your client than it is on the server. There's really not much I can do about that.

salient
Posts: 15
Joined: Thu May 06, 2010 12:47 am

Re: Must face target in order to attack.

#3 Post by salient » Thu May 13, 2010 9:01 am

If the bot realizes it's too close it backs up and the fight resumes as normal. Is there some way for the bot to "guess" if it is in this situation based on the mob HP not decreasing over time or some such and try to unstick itself even if it thinks it's in the right place? If the character moves around and gets out of the monster's attack range (server side) it will move to you and most of the time will fix the problem.

User avatar
Administrator
Site Admin
Posts: 5329
Joined: Sat Jan 05, 2008 4:21 pm

Re: Must face target in order to attack.

#4 Post by Administrator » Thu May 13, 2010 3:02 pm

It should already be doing that. Pay attention to the console window when this happens. What does it say?

Shitsweak
Posts: 3
Joined: Mon May 17, 2010 2:16 pm

Re: Must face target in order to attack.

#5 Post by Shitsweak » Mon May 17, 2010 2:48 pm

Administrator wrote:It should already be doing that. Pay attention to the console window when this happens. What does it say?
I've had a similiar problem with this.

I have seen something like "Target is too close moving back"
-- Usually when this happen there is no issue.

However, the problem occurs because of lag and the mob is not in the location you current see.

Sometimes bot the will clear the target. But, it tabs again (No-movement) and its right back to where it was "Must face target in order to attack"
-- This Cycle repeats until death.
-- AoE's can make it possible to get out of this situation, but r/k has none.


When I'm at keys I simple move using strafe left or right to correct the problem manual.


Half-Fix: You can enable Pull target and this problem will happen less frequently.

User avatar
Administrator
Site Admin
Posts: 5329
Joined: Sat Jan 05, 2008 4:21 pm

Re: Must face target in order to attack.

#6 Post by Administrator » Mon May 17, 2010 5:40 pm

Sounds like you're using an outdated copy of the scripts. I would suggest deleting all the files (except for your profiles and waypoints), then run a new SVN update to make sure everything is up to date.

romvn
Posts: 16
Joined: Tue May 04, 2010 10:22 pm

Re: Must face target in order to attack.

#7 Post by romvn » Mon May 17, 2010 11:26 pm

If you are an R, add Shadow Step in your skills list. It will be useful.
Proud to be the GREATEST botter in Chúa Tể Phục Sinh (RoM Vietnamese version)

RoM_Botter
Posts: 2
Joined: Tue May 18, 2010 11:46 am

Re: Must face target in order to attack.

#8 Post by RoM_Botter » Mon May 24, 2010 11:27 am

I see this happens when u run towards the mob in order to get within the range u sellected, and then the mob running in you or behind u, for some reason then it wont (always) back up to a better distance to hit the mob.

Is it possible to configure when the bot decides that he is too close to a target? cuz id like to change it (i think now its 5-10 meters) to 25 meters.

Ive tried to search through all XML files but cant find it, am i looking in the wrong place or is it not possible to change this?

filipsworks
Posts: 53
Joined: Mon May 10, 2010 10:37 am

Re: Must face target in order to attack.

#9 Post by filipsworks » Mon May 24, 2010 1:55 pm

I have same problem... it is cause of 80% my Deaths on bot:/
Doing that:

Code: Select all

<option name="MAX_FIGHT_TIME"     value="4" />
partially solve my problem (remember to do not set this to less then your longest_damage_spell_cast_time + longest spell flight (like fireballs and other) time + at least 1 secound. After fight our character starts moving and do some steps and coz of that mob have to change his position (to continue attack us) and his position being "reloaded" from the server. Only problem is DoT's that bot notices like any other damage, but when I thinkin' 'bout it - writing a script to recognize type of damage can be harmful as "self-pleasuring" with using barbed wire:/

In concept bot should scan eq what we wearing, calculate bonus damage to dot, and then do complicated script (sorry but I duuno many functions and I write a example):

Code: Select all

x=calculated dot1 damage
x=x+calculated dot2 damage
//(and for sure)
x=x+calculated dot3 damage /*(dunno any class combination what can apply more than 3 type of dots @ one target at the same time)*/
thp=last recognized mobs hp
cthp=current mobs hp

bsd=damage done by WARDEN_BRIAR_SHIELD with get on mind it's level and info that [b]Briar Shield gets NO BONUSES from anything[/b] (ex. if it's on 31lvl then briar shield will always do 44.0 DMG per hit)

if (cthp-thp<x+bsd)
then do.nothing();
else
player:move(some random moves (1 step left, 2 steps forward));

Know that's freak but I wanna only say that is reliable.

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

Re: Must face target in order to attack.

#10 Post by rock5 » Mon May 24, 2010 8:00 pm

RoM_Botter wrote:I see this happens when u run towards the mob in order to get within the range u sellected, and then the mob running in you or behind u, for some reason then it wont (always) back up to a better distance to hit the mob.

Is it possible to configure when the bot decides that he is too close to a target? cuz id like to change it (i think now its 5-10 meters) to 25 meters.

Ive tried to search through all XML files but cant find it, am i looking in the wrong place or is it not possible to change this?
Player.lua line 681;

Code: Select all

		if( dist < 5.0 ) then
Change the "5.0" to what you want.
  • 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

RoM_Botter
Posts: 2
Joined: Tue May 18, 2010 11:46 am

Re: Must face target in order to attack.

#11 Post by RoM_Botter » Tue May 25, 2010 5:45 am

rock5 wrote:
RoM_Botter wrote:I see this happens when u run towards the mob in order to get within the range u sellected, and then the mob running in you or behind u, for some reason then it wont (always) back up to a better distance to hit the mob.

Is it possible to configure when the bot decides that he is too close to a target? cuz id like to change it (i think now its 5-10 meters) to 25 meters.

Ive tried to search through all XML files but cant find it, am i looking in the wrong place or is it not possible to change this?
Player.lua line 681;

Code: Select all

		if( dist < 5.0 ) then
Change the "5.0" to what you want.
I bow to your greatness ^^, thnx for the info :D gonna test it right away :D

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests