OnPreSkillCast for KNIGHT_MANA_RETURN

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

OnPreSkillCast for KNIGHT_MANA_RETURN

#1 Post by MiesterMan »

So, I did some searching and couldn't find this in the forum. There were some modifications to the profile skill insert but I wanted a little more control over when it was used. Hopes this helps you knight grinding peoples!

First, you need to have the skill in your profile skills list to use it.
Then you add this to your profile or ammend your OnPreSkillCast section with the contents:

Code: Select all

	<onPreSkillCast>
		target = player:getTarget();
		if not tmpSkill then
			tmpSkill = {};
			for i,v in pairs(settings.profile.skills) do
				if( v.Name == "KNIGHT_MANA_RETURN" ) then
					skill_found = true;
					tmpSkill = CSkill(v);
					break;
				end
			end
			cprintf(cli.yellow,"tmpSkill updated to KNIGHT_MANA_RETURN.\n");
		end
		if not isInCooldown then
			function isInCooldown(skill)
				return ((skill.Cooldown*1000 + 1000) > deltaTime(getTime(), skill.LastCastTime))
			end
		end
		if ((player.Class1 == 6) and (85 > (player.MP/player.MaxMP*100)) and
		(target:hasBuff("Holy Seals", 3)) and not isInCooldown(tmpSkill)) then
			player:cast("KNIGHT_MANA_RETURN");
			return false;
		end
	</onPreSkillCast>
Post Reply