Page 1 of 1

Rev 584: moving in 3 dimensions!

Posted: Sun Mar 27, 2011 1:32 am
by rock5
When in water, the bot now swims directly towards waypoints and mobs regardless of how deep they are.

There have been a few people long awaiting this so I thought I'd make an announcement.

Enjoy :)

Note: Please report any bugs here.

Re: Rev 584: moving in 3 dimensions!

Posted: Sun Mar 27, 2011 3:22 am
by JackBlonder
I updated today. Now I get an error sometimes (reproduceable) after targeting an NPC (Locken at Silverfall) :

Code: Select all

.../player.lua:1934: attempt to perform arithmetic on field 'Y' (a nil value)
Line 1934 (part of moveInRange):

Code: Select all

local ry = self.Y + (target.Y - self.Y) * ratio
I added

Code: Select all

printf("self.Y: %d\n",self.Y);
printf("target.Y: %d\n",target.Y);
to see which Y is NULL and it's the target's.
I have no idea why though.

Re: Rev 584: moving in 3 dimensions!

Posted: Sun Mar 27, 2011 4:26 am
by rock5
It's because target_NPC doesn't provide a y value.

I've added a check for the Y value in 'moveInRange' like I added in moveTo. I'll wait just a bit longer to see if other problems show up before committing.

Re: Rev 584: moving in 3 dimensions!

Posted: Sun Mar 27, 2011 6:49 am
by Tsutomu
Maybe a check can be made: if target's Y-coord value is nill -> take player's Y as target Y, else use target.Y
should solve the prob.
(better to implement in bot than all of us changing files)

P.S. HUGE THX for this update!!!
Great job!

Re: Rev 584: moving in 3 dimensions!

Posted: Sun Mar 27, 2011 7:19 am
by rock5
Tsutomu wrote:Maybe a check can be made: if target's Y-coord value is nill -> take player's Y as target Y, else use target.Y
should solve the prob.
Yes exactly what I did.
Tsutomu wrote:(better to implement in bot than all of us changing files)
Ok, I'll commit it.

Re: Rev 584: moving in 3 dimensions!

Posted: Tue Mar 29, 2011 9:55 pm
by lisa
Bot now tries to movein and use melee skills before it states it is moving into melee range. While doing this it does a little dance with mob as it keeps moving forward continually. and as it uses a melee skill it spins to face target, as it's still moving forward it runs thru target and then as it uses another skill spins to face it yet again. It does this continually until it posts the moving into melee suguested range

Edit: Seems to only occur when it sees a mob to kill as it is arriving at a waypoint spot.
If it has

Code: Select all

Stopping waypoint: Target acquired.
then it works just fine.


Code: Select all

Use F: SCOUT_SHOT          =>   Mud Lord (21142/21142)
Use 5: SCOUT_VAMPIRE_ARROWS=>   Mud Lord (21142/21142)
Use F: SCOUT_SHOT          =>   Mud Lord (20001/21142)
Ranged pulling finished, mob in melee distance.
Use 2: ROGUE_SHADOWSTAB    =>   Mud Lord (19200/21142)
Use 4: ROGUE_LOW_BLOW      =>   Mud Lord (18334/21142)
Use 2: ROGUE_SHADOWSTAB    =>   Mud Lord (17533/21142)
Use 4: ROGUE_LOW_BLOW      =>   Mud Lord (16227/21142)
Use 2: ROGUE_SHADOWSTAB    =>   Mud Lord (12876/21142)
Use 4: ROGUE_LOW_BLOW      =>   Mud Lord (10708/21142)
Use 2: ROGUE_SHADOWSTAB    =>   Mud Lord (8967/21142)
Use 4: ROGUE_LOW_BLOW      =>   Mud Lord (7162/21142)
Use 2: ROGUE_SHADOWSTAB    =>   Mud Lord (6188/21142)
Use 2: ROGUE_SHADOWSTAB    =>   Mud Lord (5436/21142)
Moving in | Suggested range: 50 | Distance: 67
Use 2: ROGUE_SHADOWSTAB    =>   Mud Lord (2321/21142)
Use 4: ROGUE_LOW_BLOW      =>   Mud Lord (1756/21142)
Use 2: ROGUE_SHADOWSTAB    =>   Mud Lord (1299/21142)
Use 2: ROGUE_SHADOWSTAB    =>   Mud Lord (0/21142)

Re: Rev 584: moving in 3 dimensions!

Posted: Tue Mar 29, 2011 11:34 pm
by rock5
The behaviour you are describing sounds like the way it behaved when applying that original suggestion I had for removing the pauses at waypoints in this post.
http://www.solarstrike.net/phpBB3/viewt ... =21&t=2320
If you tried this, then please restore it as that didn't work properly. Revision 586 shouldn't pause at waypoints and shouldn't behave as you described.

Re: Rev 584: moving in 3 dimensions!

Posted: Wed Mar 30, 2011 1:01 am
by Tsutomu
I cannot seem to update to rev 586 :/
Error code i get:

Code: Select all

Server sent unexpected return value (405 Method Not Allowed) in response to...
Any idea why?

also where do i find this setting?

Code: Select all

allowSystemCommands

Re: Rev 584: moving in 3 dimensions!

Posted: Wed Mar 30, 2011 1:28 am
by rock5
Tsutomu wrote:I cannot seem to update to rev 586 :/
Error code i get:

Code: Select all

Server sent unexpected return value (405 Method Not Allowed) in response to...
Any idea why?
I don't know what that means but for me it works fine.
Tsutomu wrote:also where do i find this setting?

Code: Select all

allowSystemCommands
In config.lua in the micromacro folder. Around line 71. But I suspect if you want to stop system commands you could set

Code: Select all

allowSystemCommands = false;
anywhere such as in the onload section of a profile and it would override the default value.

Re: Rev 584: moving in 3 dimensions!

Posted: Wed Mar 30, 2011 1:30 am
by lisa
rock5 wrote:The behaviour you are describing sounds like the way it behaved when applying that original suggestion I had for removing the pauses at waypoints in this post.
http://www.solarstrike.net/phpBB3/viewt ... =21&t=2320
If you tried this, then please restore it as that didn't work properly. Revision 586 shouldn't pause at waypoints and shouldn't behave as you described.
Nope did a full update & revert to current revision.
Not sure why it was doing this, was really weird.
If it was moving to a waypoint it worked fine, it would only do the weird thing if it was at the waypoint coords and doing it's turn to next waypoint and then started fight.
I'll do some more testing to narrow it down.

Re: Rev 584: moving in 3 dimensions!

Posted: Wed Mar 30, 2011 12:26 pm
by Administrator
Tsutomu wrote:I cannot seem to update to rev 586 :/
Error code i get:

Code: Select all

Server sent unexpected return value (405 Method Not Allowed) in response to...
Any idea why?
Probably just server problems. Try again.

Re: Rev 584: moving in 3 dimensions!

Posted: Wed Mar 30, 2011 1:01 pm
by Tsutomu
yes that were server problems, after couple of minutes it worked.