if target has mana then use spell x

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
Edamh
Posts: 106
Joined: Tue May 24, 2011 11:56 pm

if target has mana then use spell x

#1 Post 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?
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: if target has mana then use spell x

#2 Post 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.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Post Reply