cast spells based on mob strength or hp ?how?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

cast spells based on mob strength or hp ?how?

#1 Post by beanybabe » Thu Apr 28, 2016 7:25 pm

Having seen some spells casting on every mob but are really only needed on elite or boss mobs.
I was wondering if there is a formula or some method to say if mobs is stronger than average mob in area to buff or use some attack?

kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: cast spells based on mob strength or hp ?how?

#2 Post by kenzu38 » Fri May 06, 2016 6:30 am

Not sure but I think these can be done by having a custom onPreSkillCast in your profile.

Formula for determining strong mobs is entirely up to you. You can either go by HP or by Level.

Untested and might have errors, but here's what I came up with. I think it'll get you started in the right direction:

Code: Select all

<onPreSkillCast><![CDATA[
if arg1.Type ~= STYPE_DAMAGE and arg1.Type ~= STYPE_DOT then return true end -- allow any non-damage type skills to be cast
local strongskills = {"MAGE_BLAH","ROGUE_BLAH","WARRIOR_BLAH"} -- list skills you want to cast on strong mobs here, these skills will also be skipped if the mobs are weak
local normalmoblvl = 95
local strongskill = false
if table.contains(strongskills, arg1.Name) then strongskill = true end
if player:getTarget() and ((player:getTarget().Level > normalmoblvl and strongskill) or (player:getTarget().Level <= normalmoblvl and not strongskill)) then
	return true
end
return false	 
]]></onPreSkillCast>

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 25 guests