Page 1 of 1
if target has mana then use spell x
Posted: Sun Jan 29, 2012 8:47 pm
by Edamh
Is there a way to setup a skill so that it is only used when a mob/target has mana? Specifically, I want to setup MAGE_SILENCE with high priority but only to be cast if the mob/target has mana. I looked at
the RoM Configuration page, but I didn't see anything obvious.
Any pointers?
Re: if target has mana then use spell x
Posted: Sun Jan 29, 2012 10:54 pm
by lisa
Hmm if it was me I would have silence added to profile just like normal and then add code to onskillcast and check for maxmp ~= 100, since all other forms of "mana" have 100 as max then if it isn't 100 then you can assume it is actually mana and not rage/focus/*
Can't think of the code off hand but something like
Code: Select all
if arg1.Name == "MAGE_SILENCE" then
target = player:getTarget()
if target and target.MaxMP == 100 then return false end
end
so basically anytime it goes to use silence it checks if maxMP is 100 and if it is then it doesn't use the skill.
You get the idea anyway.