Best way to stop casting Disarmament once stacked 4 times.
-
- Posts: 210
- Joined: Wed Oct 27, 2010 11:34 am
Best way to stop casting Disarmament once stacked 4 times.
I'd like to stack disarmament 4 times to start a fight, but then not use it again in that fight, or at least until the affect wears off. What would be the easiest way to do this?
Re: Best way to stop casting Disarmament once stacked 4 time
You could set its maxuse value to 1
Then, in the <onSkillCast> section, check if the skill is Disarmament, if so then it casts it another 3 times.
That's simple but just remember it isn't checking health or mana during that time.
Code: Select all
<skill name="KNIGHT_DISARMAMENT" modifier="" hotkey="macro" priority="90" maxuse="1"/>
Code: Select all
if arg1.Name == "KNIGHT_DISARMAMENT" then
player:cast("KNIGHT_DISARMAMENT");
player:cast("KNIGHT_DISARMAMENT");
player:cast("KNIGHT_DISARMAMENT");
end
- 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
-
- Posts: 210
- Joined: Wed Oct 27, 2010 11:34 am
Re: Best way to stop casting Disarmament once stacked 4 time
Perfect - thanks Rock!
Re: Best way to stop casting Disarmament once stacked 4 time
rock5 wrote:You could set its maxuse value to 1Then, in the <onSkillCast> section, check if the skill is Disarmament, if so then it casts it another 3 times.Code: Select all
<skill name="KNIGHT_DISARMAMENT" modifier="" hotkey="macro" priority="90" maxuse="1"/>
That's simple but just remember it isn't checking health or mana during that time.Code: Select all
if arg1.Name == "KNIGHT_DISARMAMENT" then player:cast("KNIGHT_DISARMAMENT"); player:cast("KNIGHT_DISARMAMENT"); player:cast("KNIGHT_DISARMAMENT"); end
BTW is there already a way to check if you got so many stacked of such buff?
I was thinking in this case, and not have it without checking for HP/MP, you could use checking the buff created by this skill and then if its <4 cast it, i think that would work, But checking buff stacks would be good in a lot of skills.
Thanks for reading! 
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Re: Best way to stop casting Disarmament once stacked 4 time
Some of the skills in the skills database include buff and debuff requirements, eg.jduartedj wrote:BTW is there already a way to check if you got so many stacked of such buff?
Code: Select all
<skill name="WARRIOR_TACTICAL_ATTACK" aslevel="4" skilltab="4" skillnum="4" rage="15" range="50" cooldown="5" type="damage" target="enemy" reqbufftype="debuff" reqbuffcount="1" reqbufftarget="target" reqbuffname="Bleed" />
There are also buff functions pawn:hasBuff() and pawn:hasDebuff() but they don't return the number even though updateBuffs does collect that information.
I guess the easiest way to do it would be to run
Code: Select all
target=player:getTarget()()
target:updateBuffs()
for i = 3, target.Debuffs["Disarmament debuff name"), -1 do -- Not sure what the debuff is called
player:cast("KNIGHT_DISARMAMENT");
end
- 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: Best way to stop casting Disarmament once stacked 4 time
i have been using this config for quite some time
u have to replace "Heilige Siegel (3)" and "Abrüstung IV" with the corresponding debuff name of your client language
-flix
Code: Select all
<onSkillCast>
local target = player:getTarget();
local bool, count = target:hasDebuff("Heilige Siegel (3)");
if bool == true then
player:cast("KNIGHT_MANA_ABSORPTION");
end;
local bool, count = target:hasDebuff("Abrüstung IV");
if bool == false then
player:cast("KNIGHT_DISARMAMENT");
end;
</onSkillCast>
-flix
Re: Best way to stop casting Disarmament once stacked 4 time
<onSkillCast>
local target = player:getTarget();
local bool, count = target:hasDebuff("Heilige Siegel (3)");
if bool == true then
player:cast("KNIGHT_MANA_ABSORPTION");
end;
local bool, count = target:hasDebuff("Abr\129stung IV");
if bool == false then
player:cast("KNIGHT_DISARMAMENT");
end;
</onSkillCast>
works better (ü=\129)
any idea how to stop casting KNIGHT_DISARMAMENT at buffing myself?
<skill name="KNIGHT_DISARMAMENT" modifier="" hotkey="VK_6" priority="80" autouse="false" inbattle="true" /> didnt work
rock5 code didnt work
local target = player:getTarget();
local bool, count = target:hasDebuff("Heilige Siegel (3)");
if bool == true then
player:cast("KNIGHT_MANA_ABSORPTION");
end;
local bool, count = target:hasDebuff("Abr\129stung IV");
if bool == false then
player:cast("KNIGHT_DISARMAMENT");
end;
</onSkillCast>
works better (ü=\129)
any idea how to stop casting KNIGHT_DISARMAMENT at buffing myself?
<skill name="KNIGHT_DISARMAMENT" modifier="" hotkey="VK_6" priority="80" autouse="false" inbattle="true" /> didnt work
rock5 code didnt work
Re: Best way to stop casting Disarmament once stacked 4 time
I don't know about umlauts but are the debuffs supposed to have the numbers after their names? After all that's what the 'count' variable is for. Try it without the numbers.
- 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: Best way to stop casting Disarmament once stacked 4 time
problem is that the debuff cout is not 1,2,3 its I,II,III,IV so we need a reqdebuffcount= < 4 or IV
without nummbers bot just spam the skilll
maybe target:hasDebuff("Abr\129stung (IV)"); works, ill give it a test and post what happend.
without nummbers bot just spam the skilll
maybe target:hasDebuff("Abr\129stung (IV)"); works, ill give it a test and post what happend.
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest