Trigger KNIGHT_MANA_ABSORPTION by hasDebuff

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
fluxus
Posts: 8
Joined: Thu Aug 05, 2010 8:54 am

Trigger KNIGHT_MANA_ABSORPTION by hasDebuff

#1 Post by fluxus » Thu Aug 05, 2010 9:42 am

Hi,
im trying currently to build a Knight, unfortunately its buring mana pots like hell :/
But there is a Skill named Mana Return which fills up your mana depending on how much "Holy Seal"´s you applied to your target.
Holy Seals are applied by a chance by normal Attacks when the "Holy Seal" buff is active on the player and thats the Problem i never know how much "Holy Seal"´s are activ so i never know when to cast Mana Return :/
my onSkillCast curently looks like this(not working...):

Code: Select all

	<onSkillCast>
	local target = player:getTarget();
	target:updateBuffs();
	if target:hasDebuff("Holy Seal %(3%)") then
	player:cast("KNIGHT_MANA_ABSORPTION");
	end;
	</onSkillCast>
tryed hasDebuff and hasBuff, none working.
any suggestions?

-fluxus

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Trigger KNIGHT_MANA_ABSORPTION by hasDebuff

#2 Post by rock5 » Thu Aug 05, 2010 10:21 am

fluxus wrote:Hi,
im trying currently to build a Knight, unfortunately its buring mana pots like hell :/
But there is a Skill named Mana Return which fills up your mana depending on how much "Holy Seal"´s you applied to your target.
Holy Seals are applied by a chance by normal Attacks when the "Holy Seal" buff is active on the player and thats the Problem i never know how much "Holy Seal"´s are activ so i never know when to cast Mana Return :/
my onSkillCast curently looks like this(not working...):

Code: Select all

	<onSkillCast>
	local target = player:getTarget();
	target:updateBuffs();
	if target:hasDebuff("Holy Seal %(3%)") then
	player:cast("KNIGHT_MANA_ABSORPTION");
	end;
	</onSkillCast>
tryed hasDebuff and hasBuff, none working.
any suggestions?

-fluxus
First you don't need to do "target:updateBuffs()" because it is done in hasDebuff.

Next, hasDebuff returns true or false and the counter. So if you use

Code: Select all

local bool, count = target:hasDebuff("Holy Seal")
then you can do

Code: Select all

if bool == true and count > 2 then 
	player:cast("KNIGHT_MANA_ABSORPTION");
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

fluxus
Posts: 8
Joined: Thu Aug 05, 2010 8:54 am

Re: Trigger KNIGHT_MANA_ABSORPTION by hasDebuff

#3 Post by fluxus » Sat Aug 07, 2010 9:19 am

thanks, works like a charm :)
i would like to share my build, a Knight/Rogue.
Fight sequenz is like this:
Pulls via Throw, Blinds target, applies Disarm 4 times and kills via Shadowstab. Dosnt need mana pots because of MANA_ABSORPTION :)
If it could heal itself it would be unstopable x)

Code: Select all

	<skills_knight>
		<skill name="KNIGHT_ENHANCED_ARMOR"   modifier="" hotkey="VK_1" priority="90" />
		<skill name="KNIGHT_HOLY_SEAL"   modifier="" hotkey="VK_2" priority="90" />
		<skill name="ROGUE_THROW"    modifier="" hotkey="VK_3" priority="100" inbattle="false" />
		<skill name="ROGUE_BLIND_STAB"    modifier="" hotkey="VK_4" priority="100" maxuse="1" />
		<skill name="KNIGHT_DISARMAMENT"    modifier="" hotkey="VK_5" priority="90" autouse="false" />
		<skill name="KNIGHT_MANA_ABSORPTION"  modifier="" hotkey="VK_6" priority="40" autouse="false" />
		<skill name="ROGUE_SHADOWSTAB"  modifier="" hotkey="VK_7" priority="20" />
	</skills_knight>

Code: Select all

	<onSkillCast>
	local target = player:getTarget();
	local bool, count = target:hasDebuff("Holy Seals (3)");
	if bool == true then
		player:cast("KNIGHT_MANA_ABSORPTION");
	end;
	local bool, count = target:hasDebuff("Disarmarment IV");
	if bool == false then
		player:cast("KNIGHT_DISARMAMENT");
	end;
	</onSkillCast>
i think im gona work on a rogue seq. too :)

Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: Trigger KNIGHT_MANA_ABSORPTION by hasDebuff

#4 Post by Starrider » Sun Aug 08, 2010 5:53 am

hello, the skill for the mana return after Holy Seal /Heiliges Siegel is called correctly
KNIGHT_MANA_RETURN

Code: Select all

<skill name="KNIGHT_MANA_RETURN" hotkey="VK_6" priority="91" inbattle="true" cooldown="7" />

fluxus
Posts: 8
Joined: Thu Aug 05, 2010 8:54 am

Re: Trigger KNIGHT_MANA_ABSORPTION by hasDebuff

#5 Post by fluxus » Sun Aug 08, 2010 6:24 am

Starrider wrote:hello, the skill for the mana return after Holy Seal /Heiliges Siegel is called correctly
KNIGHT_MANA_RETURN

Code: Select all

<skill name="KNIGHT_MANA_RETURN" hotkey="VK_6" priority="91" inbattle="true" cooldown="7" />
Which version are you using? Cant find KNIGHT_MANA_RETURN in skills.xml using latest SVN.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests