cleartarget issue
Re: Heads up! Big update comming. Looking for testers.
thought I would post this here since you are doing updates and stuff.
skill.lua line 666ish has the function unnopmouse(), it needs a yrest(500) at the end of it, line 682ish.
What happens is if you use a target ground aoe skill and it kills everything then it goes to cleartarget straight away but the targetPtr is still frozen and so it goes into this endless loop.
Obviously not ideal solution, ideally would have the rest only if all targets are killed in that single skill cast but I don't have the time to work out how to implement that lol
I must say though I am loving the thunderstorm on my mage.
--=== Added ===--
Nope the rest didn't fix it, going to need to add a variable and check it in cleartarget, not sure how else to do it.
skill.lua line 666ish has the function unnopmouse(), it needs a yrest(500) at the end of it, line 682ish.
What happens is if you use a target ground aoe skill and it kills everything then it goes to cleartarget straight away but the targetPtr is still frozen and so it goes into this endless loop.
Obviously not ideal solution, ideally would have the rest only if all targets are killed in that single skill cast but I don't have the time to work out how to implement that lol
I must say though I am loving the thunderstorm on my mage.
--=== Added ===--
Nope the rest didn't fix it, going to need to add a variable and check it in cleartarget, not sure how else to do it.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Heads up! Big update comming. Looking for testers.
targetPtr only gets frozen in the "Attack()" function and only for objects that don't maintain a target such as harvestables and objects, not mobs. Are you saying it get stuck in a loop doing cleartargets?
- 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
Re: Heads up! Big update comming. Looking for testers.
adding a variable didn't fix it either, still trying to pinpoint the cause but it is only when bot uses thunderstorm and kills all mobs it is trying to kill in that 1 attack and then does cleartarget
It is an infinite loop as it sat like that for 8 hours.
with the variable I added it isn't every time anymore, just occasionally, before the variable it was every single time I killed all mobs in that 1 attack.
all i did was add this to cleartarget
made the unnopmouse function global, added in the value change in the nop and unnop, forgot to add a return after the function call. That might be why it still got stuck.
I'll do some testing a bit later today if I get the time.
Code: Select all
Use MACRO: MAGE_THUNDERSTORM => Ousul Salamander (0/16191)
Fight finished. Killed 11 Ousul Salamander. (fight #120 / runtime 28 minutes)
Clearing target.
---stuck here
Paused. (Delete) to continue, (CTRL+L) exit to shell, (CTRL+C) quit
Resumed.
Moving to waypoint #127, (2342, 2949)
Stopping waypoint: Target acquired before moving.
Engaging enemy [Ousul Salamander] in combat.
Use MACRO: MAGE_THUNDERSTORM => Ousul Salamander (0/16191)
Fight finished. Killed 12 Ousul Salamander. (fight #121 / runtime 529 minutes)
Clearing target.
with the variable I added it isn't every time anymore, just occasionally, before the variable it was every single time I killed all mobs in that 1 attack.
all i did was add this to cleartarget
Code: Select all
if PTRnoped then unnopmouse() end
I'll do some testing a bit later today if I get the time.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Heads up! Big update comming. Looking for testers.
I don't think the problem is that the mouse is noped. I can't see why that would cause a problem. All it would mean is you wouldn't be able to manually click anything in game. When it got "stuck" did you test the mouse in the game?
I think what you are saying is after it does the cleartarget it gets stuck. Trying to find where in the code it gets stuck might be a bit difficult though. I'm not able to reproduce the problem.
I think what you are saying is after it does the cleartarget it gets stuck. Trying to find where in the code it gets stuck might be a bit difficult though. I'm not able to reproduce the problem.
- 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
Re: Heads up! Big update comming. Looking for testers.
you could probably take a mage with thunderstorm to a low level area and just set it to wander or something so it casts the aoe and kills things instantly, that might reproduce it.rock5 wrote:I'm not able to reproduce the problem.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Heads up! Big update comming. Looking for testers.
That's exactly what I did. It didn't do it.
- 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
Re: Heads up! Big update comming. Looking for testers.
ok managed to get it with debug settings, all, set to true.
and all prints stopped there, just sitting there now
I can move around by clicking the mouse, I targeted a mob and it did a print of distance and still sat there not doing anything else. I attacked the mob and killed it, bot then continued on with the WP, to many prints to get the actual print after it started again.
It has to be stuck in a loop somewhere for all prints to stop.
Code: Select all
[DEBUG] 597161216 target dist > MAX_TARGET_DIST with battling from other mob
Clearing target.
[DEBUG] FightStartX 2476.2648925781 FightStartZ 1527.23046875
[DEBUG] dir_FS->WP rad -0.195 dir_FS->FE rad -0.070
[DEBUG] Line FS->WP / FS->FE: angleDif rad 0.125 grad 7
[DEBUG] We (would) pass(ed) wp #109 (dist 52.7) in a dist of 6 (skip at 100)
I can move around by clicking the mouse, I targeted a mob and it did a print of distance and still sat there not doing anything else. I attacked the mob and killed it, bot then continued on with the WP, to many prints to get the actual print after it started again.
It has to be stuck in a loop somewhere for all prints to stop.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Heads up! Big update comming. Looking for testers.
ok stuck again, looked like this, it stopped at clearing starget, I did the targets manually.
ok those prints are only done when player.Battling is true, 3 places with this code
which are all in the evaltargetdefault code in player.lua
So it isn't updating the combat flag?
Code: Select all
Use MACRO: MAGE_PURGATORY_FIRE [DEBUG] gap between skilluse 6325, pcasting=false=> Ousul Salamander (0/16191)
Clearing target.
--stopped here
[DEBUG] 630042368 target dist > MAX_TARGET_DIST with battling from other mob
[DEBUG] 119601664 target dist > MAX_TARGET_DIST with battling from other mob
[DEBUG] 630042368 target dist > MAX_TARGET_DIST with battling from other mob
[DEBUG] 119601664 target dist > MAX_TARGET_DIST with battling from other mob
[DEBUG] 119596544 target dist > MAX_TARGET_DIST with battling from other mob
[DEBUG] 119599104 target dist > MAX_TARGET_DIST with battling from other mob
[DEBUG] 630041088 target dist > MAX_TARGET_DIST with battling from other mob
Code: Select all
if( player.Battling == true and -- we have aggro
target.TargetPtr ~= player.Address ) then -- but not from that mob
debug_target("target dist > MAX_TARGET_DIST with battling from other mob")
return false;
end;
So it isn't updating the combat flag?
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
cleartarget issue
Ok so I added prints before every single usage of the evaltargetdefault, this is the bit where I start to pull out my hair. I get the message
which is only in the targetdefault function but I am not getting any of the prints I added to where the targetdefault is called, so it is being called but not from where I added prints?
I am thinking need to approach this from the useskill for target ground aoe as it is only happening with using thunderstorm.
Code: Select all
[DEBUG] 630042368 target dist > MAX_TARGET_DIST with battling from other mob
I am thinking need to approach this from the useskill for target ground aoe as it is only happening with using thunderstorm.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: cleartarget issue
OK so after putting prints absolutely everywhere I could think of I have this info to add.
The cleartarget is ALWAYS from bot.lua line 524
the evaltargetdefault is ALWAYS from player.lua line 1634
lootAll() isn't called, debug settings are true and no prints from it when it gets stuck.
So in order to do the findenemy it needs to think self.Battling is false but in the evaltargetdefault it is doing prints that are only done if player.Battling is true.
It sometimes also prints "Error in reading memory" which comes when memoryreadrepeat fails from pawn.lua line 239
apart from that I got absolutely nothing.
The cleartarget is ALWAYS from bot.lua line 524
Code: Select all
if( player.TargetPtr ~= 0 and not player:haveTarget() ) then
player:clearTarget();
end
Code: Select all
-- Loot any other dead monsters nearby
self:update()
if not self.Battling or not self:findEnemy(true,nil,evalTargetDefault) then
self:lootAll()
end
So in order to do the findenemy it needs to think self.Battling is false but in the evaltargetdefault it is doing prints that are only done if player.Battling is true.
It sometimes also prints "Error in reading memory" which comes when memoryreadrepeat fails from pawn.lua line 239
Code: Select all
if( settings.options.DEBUGGING ) then
print("Error in memory reading");
end
apart from that I got absolutely nothing.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: cleartarget issue
Hey lisa.
I have posted this problem allready in this thread
Have checked everything point by point - onleavecombat, target distance -... Now, I think I got it! Your are using your "madman" addon, dont you?
I have deleted this madman code fragment from my "onSkillCast" - since then it doesnt stuck anymore. The "reading in memory"-error cames from time to time - but the bot isnt stucking!
I have posted this problem allready in this thread
Have checked everything point by point - onleavecombat, target distance -... Now, I think I got it! Your are using your "madman" addon, dont you?
I have deleted this madman code fragment from my "onSkillCast" - since then it doesnt stuck anymore. The "reading in memory"-error cames from time to time - but the bot isnt stucking!
Re: cleartarget issue
nope no madman addon at all, not doing DoD so I don't have it in addons folder unless I do DoD.
No code in profile for it either.
I notice you never answered my last post on that topic.
For me the memory read error is after getting snuck, a good 10+ seconds later, so I doubt it is the actual issue here.
What worries me is that all debug prints stop but if I target something it instantly posts the to far away debug message. So there is a loop somewhere that is checking for target with evaltargetdefault but is in a loop with no debug messages.
No code in profile for it either.
I notice you never answered my last post on that topic.
For me the memory read error is after getting snuck, a good 10+ seconds later, so I doubt it is the actual issue here.
What worries me is that all debug prints stop but if I target something it instantly posts the to far away debug message. So there is a loop somewhere that is checking for target with evaltargetdefault but is in a loop with no debug messages.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: cleartarget issue
Code: Select all
if not self.Battling or not self:findEnemy(true,nil,evalTargetDefault) then
self:lootAll()
end
No that's not right. It only does the findEnemy if Battling is true. If player.Battling were false then "not self.Battling" would be true so it wouldn't check the other 'or' part because it doesn't need to. What it means is, if you aren't battling or if you are battling but you can't find any valid mobs attacking you then lootall. The fact that it doesn't do the lootall means it thinks you are battling and there is a valid mob attacking you. If there is nothing attacking you and you are getting readmemory errors then maybe your problem is not a programing bug but a memory reading issue.lisa wrote:So in order to do the findenemy it needs to think self.Battling is false but in the evaltargetdefault it is doing prints that are only done if player.Battling is true.
- 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
Re: cleartarget issue
Ahh yup I was thinking it was "and" and not "or" my bad
I may have come across something, doing more testing but I managed to last 30 mins of no getting stuck.
I think it might actually be the pawn.inParty flag, still testing to narrow down the exact issue though, indications are this atm
I may have come across something, doing more testing but I managed to last 30 mins of no getting stuck.
I think it might actually be the pawn.inParty flag, still testing to narrow down the exact issue though, indications are this atm
Code: Select all
target:getTarget().InParty
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: cleartarget issue
That seems a possibility. Evaluating friendly aggro is done differently in different places. Maybe in one place it decides a target is valid and in another it decides it isn't so it's stuck in a loop but never attacks. But still, are you in a party or have a pet?
You know this may all be obsolete once I release the new version. I did a lot of changes to the way it does targeting that it may already be fixed. I think it's about time I release a version to the public, an RC1 version.
You know this may all be obsolete once I release the new version. I did a lot of changes to the way it does targeting that it may already be fixed. I think it's about time I release a version to the public, an RC1 version.
- 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
Re: cleartarget issue
technically I am in a party but other party member is not even on same map, I do have an egg pet but not any other pet.
Had it running for 2 hours with no stucks.
not sure if to be happy or not happy, spent way to much time on this today.rock5 wrote:You know this may all be obsolete once I release the new version
Had it running for 2 hours with no stucks.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: cleartarget issue
If you know what you had to do to fix it, I can have a look to see if it's fixed in the new version.lisa wrote:Had it running for 2 hours with no stucks.
- 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
Re: cleartarget issue
bot.lua line 609
If party is true then it does the code after the else, if it doesn't have a target then it never does a player:update() so it stays in the while player.Battling loop.
moving the player:update() to after the player:havetarget end should fix it.
You have no idea how painful it was to find this lol
Code: Select all
while(player.Battling) do
if( player.Current_waypoint_type == WPT_TRAVEL ) then
cprintf(cli.green, language[113]); -- we don't stop and don't fight back
break;
end;
if ( settings.profile.options.PARTY ~= true ) then
player:target(player:findEnemy(true, nil, evalTargetDefault, player.IgnoreTarget));
-- wait a second with the aggro message to avoid wrong msg
-- because of slow battle flag from the client
if( msg_print == false and os.difftime(os.time(), aggroWaitStart) > 1 ) then
cprintf(cli.green, language[35]); -- Waiting on aggressive enemies.
msg_print = true;
end;
if( player:haveTarget() ) then
if( msg_print == false ) then
cprintf(cli.green, language[35]); -- Waiting on aggressive enemies.
msg_print = true;
end;
break;
end;
if( os.difftime(os.time(), aggroWaitStart) > 4 ) then
cprintf(cli.red, language[34]); -- Aggro wait time out
break;
end;
yrest(10);
player:update();
else
player:target(player:findEnemy(true, nil, nil));
local target = player:getTarget();
if player:haveTarget() then
if( settings.profile.options.ANTI_KS ) then
if( target:haveTarget() and
target:getTarget().Address ~= player.Address and
(not player:isFriend(CPawn(target.TargetPtr))) and
target:getTarget().Address ~= 0 -- because of distance limitation
and target:getTarget().InParty ~= true )then
cprintf(cli.red, language[5], target.Name);
else
player:fight();
end
else
player:fight();
end
yrest(10);
player:update();
end
end
end
moving the player:update() to after the player:havetarget end should fix it.
Code: Select all
else
player:fight();
end
end
yrest(10);
player:update();
end
end
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: cleartarget issue
I've done that once or twice, putting print messages everywhere because I don't know where the problem is. It's very frustrating and time consuming.
Yeah, so that section looks nothing like that now. There isn't even a while loop there anymore. :S
I'm about to post my new version if you want to check it out.
Yeah, so that section looks nothing like that now. There isn't even a while loop there anymore. :S
I'm about to post my new version if you want to check it out.
- 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
Who is online
Users browsing this forum: No registered users and 1 guest