I think I get closer.
Then the pullonly argument ist not suitable for my needs.
So I decide to use the Flame (as a Mage) as an opener.
During fight the flame has a lower priority than weakness or discharge.
To do that I put a second skill into the skillbase called MAGE_FLAME_OPEN (with same ID than the origin Flame)
Code: Select all
<skill name="MAGE_FLAME_OPEN" id="491150" range="225" type="damage" casttime="3" cooldown="0" target="enemy" />
For that I can see which Flame is used by the bot in debug mode.
In the profile I put the Flame_open with highest priority and maxuse="1"
Code: Select all
<skill name="MAGE_FLAME_OPEN" hotkey="MACRO" priority="100" maxuse="1"/>
...
<skill name="MAGE_FLAME" hotkey="MACRO" priority="68" />
and the normal Flame with lower priority.
With that I have my opener working.
In the special case a mob is aggroing me unplanned (e.g I don´t need it for quest but i got too close) The mob would make damage on me while I´m casting my long lasting opener. Instead I want to stun it in this special case. If I open the fight the mob is not aggroing me while initial cast, if I get accidently into fight - it is.
So I put this on the onSkillCast section:
Code: Select all
if arg1.Name == "MAGE_FLAME_OPEN" then
if 0 < CountMobs(true,150) then
player:cast("MAGE_LIGHTNING");
end;
end
I thought this was a good idea. But it does not work.
The bot casts (and succeeds) alwas the flame opener before casting the Lightning. Even with a significant long yrest(1000) after the Mage_Lightning (Just in case of overlapping) the Flame is cast as the first spell.
The Lightning does normally dismiss.
Do I use it wrong? Is the oncast section performed before the origin skill is casted or while it is casted? In this case I should interrupt the origin spell somehow.