Page 1 of 1
Rebuffcut Broken?
Posted: Wed Aug 31, 2011 2:41 pm
by Wildfire
I've noticed recently the rebuffcut option is no longer working. I've double checked my profile via a cross-reference with an older profile I was using earlier on this year and I see no problems.
Just to be sure would someone verify this for me.
Code: Select all
<skill name="KNIGHT_HOLY_SEAL" modifier="" hotkey="VK_W" rebuffcut="10" priority="110" />
<skill name="KNIGHT_ENHANCED_ARMOR" modifier="" hotkey="VK_E" rebuffcut="10" priority="110" />
I'm guessing this might have something to do with the memory address register that monitors the buffs remaining time and the recent patches?
Re: Rebuffcut Broken?
Posted: Wed Aug 31, 2011 5:11 pm
by SpiralV
Hm looks like this part of skill.lua 193 subtracts the rebuffcut from the skillcooldown instead of the buffcooldown.
Code: Select all
if( deltaTime(getTime(), self.LastCastTime) <
(self.Cooldown*1000 - self.rebuffcut*1000 - prior) ) then -- Cooldown is in sec
debug_skilluse("ONCOOLDOWN", self.Cooldown*1000-self.rebuffcut*1000 - deltaTime(getTime(), self.LastCastTime) );
return false;
-- else
-- debug_skilluse("NOCOOLDOWN", deltaTime(getTime(), self.LastCastTime) - self.Cooldown*1000-self.rebuffcut*1000 );
end
skill.lua 357
this part means a skill can not be used if the buff already exists
Code: Select all
-- check if 'self' has buff
if self.BuffName ~= nil and self.Target == STARGET_SELF then
if player:hasBuff(self.BuffName) then
debug_skilluse("PLAYERHASBUFF");
return false
end
end
Maybe I don't understand the skill logic correctly I think it's better to wait for rock
Re: Rebuffcut Broken?
Posted: Thu Sep 01, 2011 2:12 am
by rock5
That first code is about cooldown. I don't know why rebuffcut is used there I think its just a mistake.
The problem is we can't just use similar code to implement rebuffcut because we no longer record the skill duration. The bot doesn't really know how long the buff will last.
I wouldn't be surprised though if the duration couldn't be gotten from memory. I'll have a look.
Re: Rebuffcut Broken?
Posted: Thu Sep 01, 2011 4:13 am
by rock5
Looks like pawn:updateBuffs() includes the '.TimeLeft' value so I could probably use that. I'll look into it.
Re: Rebuffcut Broken?
Posted: Thu Sep 01, 2011 5:02 am
by rock5
Something like this should work I think. Please test.
Code: Select all
-- check if 'self' has buff
if self.BuffName ~= nil and self.Target == STARGET_SELF then
local buffitem = player:getBuff(self.BuffName)
if buffitem and (buffitem.TimeLeft > self.rebuffcut + prior) then
debug_skilluse("PLAYERHASBUFF");
return false
end
end
Should rebuffcut be applied to casting buffs on other players too?
Edit: Oops, missed a bracket.
Re: Rebuffcut Broken?
Posted: Thu Sep 01, 2011 9:02 pm
by Wildfire
That works perfectly, thankyou.
And as far as im aware rebuffcut is only for player self cast buffs.
Re: Rebuffcut Broken?
Posted: Sat Sep 03, 2011 12:14 pm
by rock5
Just added the fix to rev 641.
Re: Rebuffcut Broken?
Posted: Wed Sep 07, 2011 5:44 pm
by imaginethat
Hi
I am not really sure what rebuffcut is doing, but aware it must be saying how often to cast a buff? Its in seconds I assume, and should be set to the value of the length the buff lasts?
I see all the rebuffcut values are relatively low, "60", so I am thinking I am way off in my assumption of what rebuffcut is actually doing.
I am running a Rogue and have "Target Area" in my skills list, and have no rebuffcut set, and the bot seems to cast it every 60seconds. Its a 3min buff.
What should I be setting the rebuffcut to? 180? or what is the best way to get the rogue to only cast the buff when it has just run out, or just about to run out.
Code: Select all
<skill name="SCOUT_TARGET_AREA" hotkey="MACRO" priority="50" inbattle="false"/>
Thanks in advance for your help
Re: Rebuffcut Broken?
Posted: Wed Sep 07, 2011 6:39 pm
by Wildfire
Hi imaginethat.
You set it to the number of seconds before buff before it runs out.
i.e. I have mine set to 10, that's to recast 10 seconds before that buff expires.
However, in skills.xml im seeing no mention of a cooldown time...
Code: Select all
<skill name="SCOUT_TARGET_AREA" id="490464" concentration="3" type="buff" buffname="500934" target="self" />
Should there not be a cooldown="180" mentioned in there some where based on it being a 3min buff?
Re: Rebuffcut Broken?
Posted: Wed Sep 07, 2011 10:19 pm
by rock5
As far as I can tell Target Area has no cooldown or duration. It's supposed to last as long as you have Focus.
What the bot is supposed to be doing is cast the buff then not cast it again until the buff disappears.
But I'm not sure how you are supposed to cast it again if you've just run out of focus. I don't think the bot was really set up to handle a skill like this.
Re: Rebuffcut Broken?
Posted: Wed Sep 07, 2011 11:21 pm
by lisa
could probably do a check for amount of focus and cast it at like 80%, if you don't have buff already.
Re: Rebuffcut Broken?
Posted: Thu Sep 08, 2011 12:11 am
by rock5
lisa wrote:could probably do a check for amount of focus and cast it at like 80%, if you don't have buff already.
Hm... Of course there is already a check for focus. Just set the required focus to a higher value so it thinks it doesn't have enough to cast it, eg
Probably not that high though.
Re: Rebuffcut Broken?
Posted: Thu Sep 08, 2011 2:38 am
by imaginethat
Hi again, thanks for the info Wildfire, I think I get it now (and yes I had made bad assumptions at how rebuffcut works)
This Target Area buff is a bit misleading in its description, as it is a 3min buff, and will countdown and expire after 3mins. It will also debuff itself if you run out of focus, which the description of the buff talks about. Is does not however mention the 1800sec time of the buff.
So I am assuming rebuffcut will do no good with this buff at present, as Wildfire has mentioned there is no cooldown mentioned in the skills.xml.
Could this 1800sec be added to the skills.xml as a first step to allow the rebuffcut to work with this buff, and maybe if you think its worth it, add the focus check lisa has mentioned.
Thanks for all the work you guys/gals are putting into this forum, and bot code. I really appreciate it. have learned heaps, and have fun playing around with the bot.
Re: Rebuffcut Broken?
Posted: Thu Sep 08, 2011 3:11 am
by rock5
imaginethat wrote:Hi again, thanks for the info Wildfire, I think I get it now (and yes I had made bad assumptions at how rebuffcut works)
This Target Area buff is a bit misleading in its description, as it is a 3min buff, and will countdown and expire after 3mins. It will also debuff itself if you run out of focus, which the description of the buff talks about. Is does not however mention the 1800sec time of the buff.
So I am assuming rebuffcut will do no good with this buff at present, as Wildfire has mentioned there is no cooldown mentioned in the skills.xml.
Could this 1800sec be added to the skills.xml as a first step to allow the rebuffcut to work with this buff, and maybe if you think its worth it, add the focus check lisa has mentioned.
Thanks for all the work you guys/gals are putting into this forum, and bot code. I really appreciate it. have learned heaps, and have fun playing around with the bot.
Rebuffcut wouldn't help you. It is for undercutting the end of the buff duration. You have an unexplained problem that it is recasting after 1 minutes when it's a 3 minute buff. That would imply you are loosing the buff after 1 minute and it's just reapplying it. Are you sure you are not loosing the buff somehow? If not, if you still have the buff when it castes again then there is some sort of bug that needs to be resolved. Maybe the buff name changes after 1 minute?
Re: Rebuffcut Broken?
Posted: Thu Sep 08, 2011 4:13 pm
by imaginethat
I am pretty confident that the character is not running out of focus, so do not think that is what is triggering the end of the buff.
It is not always 60secs, it just generally around that time frame, sometimes it is much sooner, but I am watching the focus very closely and never see it go below 40%.
I have commented out the Target Area skill in the profile, and have manually cast the buff, and it lasts the full 3mins every time. I have not yet seen it come off due to lack of focus.
During the period of update to RoM, and the updating of the addresses in the last few days for the last game update, the bot would be constantly casting this buff until it was doing something else, like a forced wait period, or combat (set to not cast during combat). I'm not sure what this means, and maybe nothing, as there was obvious issues with the changes of addresses. but have updated the ROM folder (did not run rom\update), and all working well.
Its not a huge issue if the bot keeps casting it, as it does not cost anything to cast. It does look a bit suspect when running around constantly casting this buff though. Not a very human thing to keep doing.
Is there anything I could be trying to see what might be causing this?
Thanks
Re: Rebuffcut Broken?
Posted: Fri Sep 09, 2011 2:37 am
by rock5
This is confusing because, the fact that it doesn't recast during the first minute means that the buff check works. If the buff check works then it shouldn't cast again until the buff is gone. I don't see how it could cast if you still have the buff.
I'm lost, sorry. Maybe someone else has an idea.
Re: Rebuffcut Broken?
Posted: Fri Sep 09, 2011 3:54 am
by lisa
Only thing I could think of was that you have more buffs then bot can see, issue we talked about in another topic. This shouldn't happen though as new buffs go to the end, so if the buff could be seen for the last minute it should still be seen.
Unless it stops seeing all buffs because there was to many and then it doesn't see the buff is there.
Re: Rebuffcut Broken?
Posted: Sun Sep 11, 2011 4:02 pm
by imaginethat
This is the only buff I have on, so not being swamped by other buffs.
This is obviously one of those "weird" things that happen, and as I said its not a critical issue, so might just remove it from the list of skills to use.
Thanks for looking into this anyway.
cheers
Re: Rebuffcut Broken?
Posted: Mon Sep 19, 2011 8:27 am
by Trex
I'm not sure if this is the problem of topic but my knight has a problem with this skill KNIGHT_ENHANCED_ARMOR. He uses it all the time and does not stop, I've tried to update the addresses and also the skill.lua but nothing, not working, you should stop launching the buff. Please check that the update may be they have done. I also tried installing a clean microMACRO and the latest version of rombot, any idea what I'm doing wrong? Before this last patch update to add the mini events rom I did very well.
Excuse my English. Thank you.
Re: Rebuffcut Broken?
Posted: Mon Sep 19, 2011 9:50 pm
by Trex
this code works perfectly in my case, however the latest update is not working.
Code: Select all
-- check if 'self' has buff
if self.BuffName ~= nil and self.Target == STARGET_SELF then
if player:hasBuff(self.BuffName) then
debug_skilluse("PLAYERHASBUFF");
return false
end
end
problem solved.