Some questions on skills

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Some questions on skills

#1 Post by noobbotter »

I have just a couple questions about some skills. My first question is about some skills that when I enable them in my profile, they seem to cast over, and over, and over. For instance, the Priest's Magic Barrier. If I enable it, the bot will cast it repeatedly. What would my settings need to be so it only casts it when the buff is gone (or about to expire)? The same thing seems to happen a lot of times with other buff skills so I just want to understand the different parts of the setting so I can set it properly. I'd post my current setting for that skill from my profile but I've messed with it so much that it's obviously wrong. I've recently made sure I have the latest skills file (I think at some point I had edited something in there but I updated it with the latest).

My other question deals with the mage's Flame. Is there any way to set it so it will not use it if the target is below a certain # of HP? I was also thinking of implementing a way where if the target has over a certain amount of HP, that it will keep casting Flame until that hp drops below that level. I tried to put some code in my onPreSkillCast section but I couldn't get it to work. Here's what I tried using:

Code: Select all

<onPreSkillCast><![CDATA[
	if player:haveTarget() then
		target = player:getTarget();
		if target.Type == 2 then
			if 70000 > target.HP then
				ChangeProfileSkill("MAGE_FLAME","AutoUse",false)
			else
				ChangeProfileSkill("MAGE_FLAME","AutoUse",true)
			end
			if target.HP > 300000 then
				printf("target HP is higher than 300,000. Using Flame!")
				player:cast("MAGE_FLAME")
			end
		end
	end
]]></onPreSkillCast>
the line if target.Type == 2 then was my attempt at making sure the target is something I want to attack as I don't want this code to execute if, for instance, the bot is trying to apply a self buff. In this particular example I wanted it to where if the target has more than 300K HP, it would only cast flame. If the target HP was between 70K and 300K, it would do my normal skills use, and if the target HP is below 70K, then it would NOT cast a flame. I couldn't seem to get this to work. Also, I wanted to add a check so it doesn't change the setting from true to true but I couldn't figure out how to check the current setting of a skill's autouse.
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Some questions on skills

#2 Post by lisa »

you could just do the code when the skill is flame

Code: Select all

<onPreSkillCast><![CDATA[
if arg1.Name == "MAGE_FLAME" then
target = player:getTarget();
if target and 70000 > target.HP then
return false -- makes it not cast the skill
end
end
]]></onPreSkillCast>
Something like that anyway.

Might need to use onSkillCast instead of onPreSkillCast, can't remember.

As for the more than 300k hp, would that make it "elite" compared to your hp?
Elite is your max HP * elite factor (default 5),
if enemy max hp is greater than that then it is "elite"

Example
player max HP 100,000
elite factor 4
enemy max hp 500,000
So 4 * 100,000 = 400,000 which is less than enemy max HP, so enemy would be "elite"

Code: Select all

	<preCodeOnElite><![CDATA[
		-- code to use before a boss or tough mob
		-- _arg1 is target pawn, _arg1.Name = target's name
	]]></preCodeOnElite>
That is where I put my item buff userfunction call, itemBuffs()
http://www.solarstrike.net/phpBB3/viewt ... =itembuffs
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
noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: Some questions on skills

#3 Post by noobbotter »

I forgot to mention that your post helped tremendously. Thank you Lisa.
Post Reply