mally42";p="65584 wrote:Richy - Ok so I think I have it working a bit better with targeting and movement. Not too sure what if anything I did that may have help it so I wanted to run the changes I made by you and see if what I did makes sense.
In the RunToLoc I changed the following and this is where I'm not sure if what I did is right but it seems to turn better now.
Even though my arrow keys are set for movement I tried to change it to use a and d to move left and right. Not sure if what I did is right though so here's what I changed it to.
kRight=VirtualKey.VK_d
kLeft=VirtualKey.VK_a
Also I changed this: howClose=0
Then I went to MainFunctions and changed this:
if mobDist > 10 then
Call RunToLoc(mobX, mobY, -1, FALSE, 1)
In the character ini file I switched from CLOSESTSCON to RANDOMPOINTS and increased the RandomRunRange a bit. Last I set LookForMonsterTime=1
Here is what I noticed after making those changes. First the bot when starting to run would make minor left and right movements based on it's target I think. If it had nothing targeted it would run straight. It seemed to make the most dramatic turns when entering combat. Obviously because it entered combat and was turning to face the creature. It always has done this though.
As far as the range it would most often find a target in range but sometimes would still try and cast on creatures out of range. Also for no apparent reason I can see the bot will most often switch back to it's target after healing itself now which is great!
My main question is did I do the VirtualKey thing right? Also when running is it suppose to make more dramatic course changes? Like if the bot did not find a target will it always run straight or is it random? In other words can the bot make a 90 angle turn when looking for a target in RANDOMPOINTS mode? If so I don't think I fixed my movement issue as it will mostly run straight but does kind of move left or right when running now.
It would be so awesome if there was a waypoint system implemented in the future. Often I'd run into walls or in water. Also I had a question about RANDOMSQUARE. Does that work? I don't think it does but, it would be cool to have the bot only hunt in a definable radius or square.
Anyways just wanted to update my progress with the hunter. Let me know what you think. Thanks!
Don't use RandomPoints - not really setup for EQ2, will never "see" a target, just uses the TAB key to go through targets.
Your Virtual Keys is fine.
Honestly, I have redone 50% of the target logic in 2.5 and it does a great job of targetting things correclty now and not even trying to run to them if they are not in range... so hang on, I think you'll like it, I'm gone until Sat... sorry