boundaries for the bot

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

boundaries for the bot

#1 Post by silinky » Sat Jan 07, 2012 7:34 pm

hi all!

lately i am encountering a weird problem. i am boting in an area, where there are no obstacles, nothing to get stuck in. but sometimes players run through my place, and pulling aggroed mobs from other area. the mobs then reset aggro since the players are on mounts, and starts running back to another area. my bot follows it to kill it, but then gets stuck and cannot return to the initial area, resulting in logout and game client closing.

can i somehow tell my bot to not go too far from the initial boting spot? i only have one waypoint btw where the bot just keeps watching after mobs in a fairly big radius and kills them then comes back to the waypoint and keeps scanning the area.

any info appreciated!

User avatar
cufRet8e
Posts: 82
Joined: Tue Dec 27, 2011 2:33 pm
Location: UK

Re: boundaries for the bot

#2 Post by cufRet8e » Sat Jan 07, 2012 8:13 pm

As a workaround, you can add those "mobs from other area" to friends list, as a option in your waypoint file.

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: boundaries for the bot

#3 Post by kuripot » Sat Jan 07, 2012 8:16 pm

also check the "MAX_TARGET_DIST"

Code: Select all

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

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: boundaries for the bot

#4 Post by silinky » Sun Jan 08, 2012 4:23 am

thanks for the answers!

i cannod add those to the friend list because they are the same mob.
i will try max target distance, but i doubt it will work since it affects only the distance at which my character will target the mob, but the mob is close when targeted, my character follows it back to the place full of obstacles.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: boundaries for the bot

#5 Post by lisa » Sun Jan 08, 2012 4:56 am

So you just want to be in this 1 spot and not leave it.

Instead of using a WP with just 1 set of coords run with code in the onload and set boundaries.

Easiest would be if you can set a box that is aligned to X and Z axis.

Actually going to have to think on this some more, might need to use a timer check for coords and if you leave the "box" then break fight.

Would need testing but might be able to use

Code: Select all

break_fight = true;

Give this a try in your current WP.
make sure you start the bot when character is in the spot you want to be in.

Code: Select all

<onLoad>
	player:update()
	playerx = player.X
	playerz = player.Z
	boxsize = 50 -- so box will be 100 X 100
	function box()
		player:update()
		if player.X > playerx + boxsize or 
			playerx - boxsize > player.X or
			player.Z > playerz + boxsize or
			playerz - boxsize > player.Z then
			player:clearTarget();
			break_fight = true;
			player:moveTo(CWaypoint(playerx,playerz),true)
		end
	end
	unregisterTimer("fightbox");
	printf("Fight Box created\n");
	registerTimer("fightbox", secondsToTimer(5), box);	
</onLoad>
Adjust boxsize if it is to small.
Untested but will probably work lol
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: boundaries for the bot

#6 Post by rock5 » Sun Jan 08, 2012 6:14 am

The problem, though, is it should not go too far from the path. It is already set to do this but maybe once it has locked on to a target that is in range, it doesn't check to see if it goes out of range.

Just had a look. Looks hard to fix. What it does is, in bot.lua it checks the distance of the mob from the path. If it's not too far from the path and player then it does player:fight(). player:fight() will keep an eye on distance to player but doesn't check distance to path. It's not impossible to fix just tricky to reproduce the distance to path check in player.
  • 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

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: boundaries for the bot

#7 Post by silinky » Sun Jan 08, 2012 5:30 pm

wow i am simply amazed by you guys :)
i will try this waypoint and if it does not work 100% even then the idea is super, and i will try to improve it to my best knowledge.

thank you!

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: boundaries for the bot

#8 Post by silinky » Mon Jan 09, 2012 4:24 am

sorry for the double post.

tested it, it works nice, but after fight it will run away and keeps unsticking the char. i will think about the cause of this, but if you have a quicker solution please share it, thanks :)

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest