Page 2 of 2

Re: Set up aggro timeout and management of RoM Bot

Posted: Sat Aug 27, 2011 12:08 pm
by rock5
bobdole wrote:I didn't see the issue as clear as the OP but the big problem is when the bot does pause for aggro wait timeout it doesn't always stop but rather just runs or rides the mount the entire wait time.
If we make it so it doesn't wait then it wont be an issue anymore.

Re: Set up aggro timeout and management of RoM Bot

Posted: Sat Aug 27, 2011 1:24 pm
by bobdole
I made a change in 2 areas and so far so good:

Code: Select all

			if( os.difftime(os.time(), aggroWaitStart) > 0 ) then
				cprintf(cli.red, language[34]);		-- Aggro wait time out
				break;
			end;

Code: Select all

					player:target(player:findEnemy(true, nil, nil, nil));
								local target = player:getTarget();
							if( os.difftime(os.time(), aggroWaitStart) > 0 ) then
								cprintf(cli.red, language[34]);		-- Aggro wait time out
							break;
							end;
I changed the number to 0 in both spots.

Re: Set up aggro timeout and management of RoM Bot

Posted: Sun Aug 28, 2011 12:38 am
by rock5
lisa wrote:
rock5 wrote:Target memory range is around 250, so if it is beyond that it won't show as targeting anything.
That's about casting distance. I think you'll find at more like 500.

I noticed something else though. pawn:update() doesn't check if a pawn has expired or changed. So the id might change to another id or random number and the name might change to "<unknown>" but it still returns a pawn with faulty values.

Is there any point in returning a pawn if it is no longer valid?

This is making me think. Is it possible that party.lua saves the party addresses but when it goes to use them or update the pawn it is no longer valid and hence why we get invalid ids?

I see that the pawns are saved in a table in PartyTable() and the only place it tries to update the pawns is in PartyHeals(). It updates the table at the start of the function by calling PartyTable() but casting skills takes time so maybe some of those party member move out of range before you get around to healing them so then the pawn becomes invalid. Maybe that bit of code needs to be rewritten to be more reliable. Although I still think there is an issue with pawn:update returning a pawn with faulty values.

Personally I think pawn:update should check to see if the id changes. If it does it should return nil as the pawn is no longer valid.

Re: Set up aggro timeout and management of RoM Bot

Posted: Sun Aug 28, 2011 1:02 am
by lisa
Yeah recently I had been looking at when the players address updates and thinking of trying to work a way to also do it with pawns.

Also been playing with updating that table on cast like spiral did in a post a little while back. Haven't had a chance to test as yet as haven't done much party botting lately.

Re: Set up aggro timeout and management of RoM Bot

Posted: Mon Aug 29, 2011 9:20 am
by SpiralV
rock5 wrote: Personally I think pawn:update should check to see if the id changes. If it does it should return nil as the pawn is no longer valid.
did think about it also but that would break nearly everything in player.lua.

Re: Set up aggro timeout and management of RoM Bot

Posted: Mon Aug 29, 2011 10:54 am
by rock5
To do a good job, really we should change it then fix everything that breaks. Because if it breaks that means it is assuming that the pawn will always exist, which is not right.

I think what it would involve is finding nearly every instance of pawn:update and put in a check to see if it still exists.Too big a job for anyone to want to take it on probably.

Re: Set up aggro timeout and management of RoM Bot

Posted: Sat Sep 10, 2011 11:08 am
by bobdole
So is a solution for this never going to happen?

Re: Set up aggro timeout and management of RoM Bot

Posted: Sat Sep 10, 2011 4:52 pm
by lisa
bobdole wrote:So is a solution for this never going to happen?
rock5 wrote:Too big a job for anyone to want to take it on probably.
I have to much on my plate to also take this on.

Re: Set up aggro timeout and management of RoM Bot

Posted: Sun Sep 11, 2011 8:41 am
by rock5
bobdole wrote:So is a solution for this never going to happen?
Did you try this?
http://www.solarstrike.net/phpBB3/viewt ... 857#p25857

Re: Set up aggro timeout and management of RoM Bot

Posted: Wed Nov 02, 2011 3:07 pm
by Rickster
rock5 wrote:
bobdole wrote:So is a solution for this never going to happen?
Did you try this?
http://www.solarstrike.net/phpBB3/viewt ... 857#p25857
i tried to replace the code in bot.lua and ended up in not replacing it with

Code: Select all

break
Instead just cutting of

Code: Select all

if( os.difftime(os.time(), aggroWaitStart) > 4 ) then
	cprintf(cli.red, language[34]);		-- Aggro wait time out
	break;
end;
worked without any error message.

I am not sure if this solves the above mentioned problem ... I have to test it a little more with this change.

Ric

Re: Set up aggro timeout and management of RoM Bot

Posted: Mon Apr 02, 2012 6:54 pm
by paulr8008
so how do you attack specific mobs with bot? :geek:

Re: Set up aggro timeout and management of RoM Bot

Posted: Tue Apr 03, 2012 9:48 am
by rock5
paulr8008 wrote:so how do you attack specific mobs with bot? :geek:
Please do not post off topic questions. And try reading the wiki a bit before asking simple questions.
http://www.solarstrike.net/wiki/index.p ... le=RoM_Bot
Check out the profile options in the "Configuration" section.