Set up aggro timeout and management of RoM Bot

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Set up aggro timeout and management of RoM Bot

#21 Post by rock5 » Sat Aug 27, 2011 12:08 pm

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.
  • 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

bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: Set up aggro timeout and management of RoM Bot

#22 Post by bobdole » Sat Aug 27, 2011 1:24 pm

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.

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

Re: Set up aggro timeout and management of RoM Bot

#23 Post by rock5 » Sun Aug 28, 2011 12:38 am

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.
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Set up aggro timeout and management of RoM Bot

#24 Post by lisa » Sun Aug 28, 2011 1:02 am

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.
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

SpiralV
Posts: 72
Joined: Sat Jun 25, 2011 10:37 am
Location: Germany

Re: Set up aggro timeout and management of RoM Bot

#25 Post by SpiralV » Mon Aug 29, 2011 9:20 am

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.

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

Re: Set up aggro timeout and management of RoM Bot

#26 Post by rock5 » Mon Aug 29, 2011 10:54 am

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.
  • 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

bobdole
Posts: 152
Joined: Thu May 26, 2011 6:30 pm

Re: Set up aggro timeout and management of RoM Bot

#27 Post by bobdole » Sat Sep 10, 2011 11:08 am

So is a solution for this never going to happen?

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

Re: Set up aggro timeout and management of RoM Bot

#28 Post by lisa » Sat Sep 10, 2011 4:52 pm

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.
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: Set up aggro timeout and management of RoM Bot

#29 Post by rock5 » Sun Sep 11, 2011 8:41 am

bobdole wrote:So is a solution for this never going to happen?
Did you try this?
http://www.solarstrike.net/phpBB3/viewt ... 857#p25857
  • 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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: Set up aggro timeout and management of RoM Bot

#30 Post by Rickster » Wed Nov 02, 2011 3:07 pm

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

paulr8008
Posts: 10
Joined: Tue Feb 14, 2012 2:50 am

Re: Set up aggro timeout and management of RoM Bot

#31 Post by paulr8008 » Mon Apr 02, 2012 6:54 pm

so how do you attack specific mobs with bot? :geek:

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

Re: Set up aggro timeout and management of RoM Bot

#32 Post by rock5 » Tue Apr 03, 2012 9:48 am

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.
  • 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: Ahrefs [Bot] and 2 guests