Page 1 of 2
Taking too long to damage target
Posted: Tue Jun 25, 2013 12:37 am
by McGuffin
I have recently noticed that the bot is throwing this during fights that take longer than 10 seconds. The target is being damaged yet the bot still disengaged, backs up and re-engages. I have changed my max fight time to 15 but it still stops at 10 seconds. Also, MM window does show the target's HP dropping.
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 1:09 am
by rock5
As far as I can see it only breaks if it has been more than MAX_FIGHT_TIME since the start of the fight and MAX_FIGHT_TIME since the last damage was done. So if MAX_FIGHT_TIME has passed but you are still doing damage then it shouldn't break. And if you change MAX_FIGHT_TIME to 15s then it shouldn't break for 15s. Are you sure you set the value properly? Also, are you using an older bot that might be using different code or are you using the latest?
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 2:00 am
by lisa
MAX_FIGHT_TIME
That profile option, for me atleast, ends the fight if it has been longer than that value after first attacking the mob and it is still alive. It has never been about damage to target for me, ever.
If I do instances I set that value to 60, if I don't do instances I leave it at 20.
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 2:08 am
by rock5
This is how it's used now. There are 2 parts to it.
Code: Select all
if getGameTime() - self.fightStartTime > settings.profile.options.MAX_FIGHT_TIME then
and
Code: Select all
if target.LastDamage == 0 or (getGameTime() - self.LastHitTime) > settings.profile.options.MAX_FIGHT_TIME then
So if it's doing damage it shouldn't break but it's possible LastHitTime is not working properly. I seem to remember it sometimes behaved strangely. I'll check if it still works.
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 2:49 am
by lisa
ok just before the check for max fight time I added this
Code: Select all
target:updateLastDamage()
self:updateLastHitTime()
print(getGameTime() - self.LastHitTime)
Made a new char and just did the human WP that comes with bot, this is results.
Code: Select all
Engaging enemy [Wolf Cub] in combat.
0.20100000000002
Moving in | Suggested range: 50 | Distance: 67
Use MACRO: ROGUE_SHADOWSTAB => Wolf Cub (180/180)
Use MACRO: ROGUE_LOW_BLOW => Wolf Cub (157/180)
3.3869999999997
Use MACRO: ROGUE_SHADOWSTAB => Wolf Cub (101/180)
Use MACRO: ROGUE_LOW_BLOW => Wolf Cub (85/180)
6.3989999999999
Use MACRO: ROGUE_SHADOWSTAB => Wolf Cub (45/180)
Use MACRO: ROGUE_LOW_BLOW => Wolf Cub (0/180)
even though I am clearly hitting the mob the time is going up.
So then I added a print in the update function
Code: Select all
print("last hit "..self.LastHitTime)
print("fight start "..self.fightStartTime)
Last hit seems to always be 0 and so the value gets set to the fight start time
Code: Select all
last hit 0
fight start 3034.805
0.21199999999999
Moving in | Suggested range: 50 | Distance: 199
Use MACRO: ROGUE_SHADOWSTAB => Young Bear (208/232)
Use MACRO: ROGUE_LOW_BLOW => Young Bear (173/232)
last hit 0
fight start 3034.805
7.7020000000002
Use MACRO: ROGUE_SHADOWSTAB => Young Bear (143/232)
Use MACRO: ROGUE_LOW_BLOW => Young Bear (118/232)
last hit 0
fight start 3034.805
10.753
last hit 0
fight start 3034.805
10.753
Taking too long to damage target, breaking sequence...
So I checked the address
charLastHitTime = 0xA410FC,
and it was always 0, never changed.
Nearest address that did change was 0xA41120
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 3:31 am
by rock5
Seems to work. On white damage it works fine. I noticed with skills that if it one-hit kills the mob it doesn't update the hit time but that shouldn't be a problem.
I just set up a character so it needed about 10 Rising Tides to kill a mob, that's about 20s, had no problems.
You also get the "taking too long to damage target" message if it fails to damage the target 4 skills in a row. If that's the case try increasing MAX_SKILLUSE_NODMG. Just add it to your profile, if you don't already have it, and set it to a larger number than 4.
Edit: Sorry Lisa, didn't see you posted. The fact that your memory always shows 0 is curious. When you browse to that memory area does the right side look something like this?
I'll try what you did with a rogue and see what happens.
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 4:02 am
by lisa
Similar, it has the under attack id and onwards.
i used a rogue for testing and put on the crappy weapon so fights were taking a good 20 seconds at times, so lots of times for white hits, maybe it is just with casters?
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 4:08 am
by rock5
Nope, even with rogue it always updates. I even tried removing all addons just in case it was somehow coming from an addon. It still updated.
There has to be some difference between your setup and mine. Are you using Windows 7 64bit? Is there any chance that some thing you've excluded using the model files is stopping it working? Or maybe it's an addon you are using that I'm not using that is interfering with the normal functioning of that memory. These seem far fetched but they are all I can think of.
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 4:26 am
by lisa
ok this is a mage
Code: Select all
Engaging enemy [Young Bear] in combat.
last hit 0
fight start 9050.544
0.075000000000728
Use MACRO: MAGE_FLAME => Young Bear (232/232)
Use MACRO: MAGE_FIREBALL => Young Bear (162/232)
last hit 0
fight start 9050.544
4.9130000000005
Use MACRO: MAGE_FLAME => Young Bear (101/232)
last hit 0
fight start 9050.544
5.6929999999993
Use MACRO: MAGE_FLAME => Young Bear (101/232)
last hit 0
fight start 9050.544
8.9600000000009
Use MACRO: MAGE_FLAME => * Failed to cast *
Took a screenie after the second flame and before the 3rd which killed the mob, again last hit was always 0.
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 4:43 am
by lisa
thats on win7 32bit, I haven't updated any 64bit machines and to be honest I didn't intend to.
I took out all addons except d303fix and the ingamefunctions, it was still the same.
Are you sure you don't have an addon that is adding combat details or messages?
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 5:47 am
by rock5
I took out all addons including d303fix only leaving igf. How about my idea about the model files?
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 5:56 am
by McGuffin
lisa wrote:If I do instances I set that value to 60, if I don't do instances I leave it at 20.
Facepalm... just never even occurred to me. Thanks, profile changed.
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 6:01 am
by McGuffin
rock5 wrote:There has to be some difference between your setup and mine. Are you using Windows 7 64bit? Is there any chance that some thing you've excluded using the model files is stopping it working? Or maybe it's an addon you are using that I'm not using that is interfering with the normal functioning of that memory. These seem far fetched but they are all I can think of.
My setup is on a x64 but operating in XP SP3 compat mode. Not a slim client and all models/textures are active. I do have the SimpleDamageLog addon as well as d303fix and PBInfo. Not sure what other addons would affect combat.
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 6:53 am
by rock5
I'm running our of ideas. Maybe we could look at the address, that the code that writes to memory, uses. I found it here.
Code: Select all
printf("%X\n",memoryReadInt(getProc(),0x80CF05))
Open the commandline and execute that and see what you get. You should get
A410FC but if you get something else maybe that will be the correct address for you and we could use that pointer to find the correct address for each user.
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 7:00 am
by lisa
aus server shut down, ill check it tomorrow.
I had a look when not logged in to server in CE, yeah it has 00A410FC.
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 7:14 am
by rock5
So that means the code that writes to that address is there but is just doesn't run. Why wouldn't it run? This is beyond me I think.
Re: Taking too long to damage target
Posted: Tue Jun 25, 2013 6:58 pm
by lisa
well atleast it defaults to fight start time when it is 0, which is what you would expect as a back up when it fails.
Just means we have to assume that profile option is for the max fight time and nothing to do with damage to mob.
Re: Taking too long to damage target
Posted: Wed Jun 26, 2013 12:11 am
by rock5
Maybe we could use a different address. I found one that increments with the total amount of damage you have done to the target. I could make that work although I would have to keep track of the value and last time it changed. The beauty of lasthittime was that I didn't need to record any values.
Can you check this address while fighting. Does it increment? 0xA06A38
Re: Taking too long to damage target
Posted: Wed Jun 26, 2013 9:52 pm
by lisa
rock5 wrote:Can you check this address while fighting. Does it increment? 0xA06A38
Stayed 0 for me whole time again and the whole area of memory was all 0 aswell.
A06024 --> A06EF8
That whole section of memory is 0
Re: Taking too long to damage target
Posted: Thu Jun 27, 2013 4:19 am
by rock5
I think we should just forget about it then. For those that the code works, they don't have to worry. The user for who it doesn't work will have to add time to MAX_FIGHT_TIME if they need it and don't want it to break on those long fights.