NEEED HELP TO GET PRIEST CHECK FOR BUFFS

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
newton666
Posts: 81
Joined: Fri Oct 22, 2010 3:16 pm

NEEED HELP TO GET PRIEST CHECK FOR BUFFS

#1 Post by newton666 »

Hi, trying to get this to work, i want my priest to check for the buff on my tank and if it's not there to cast it

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
   <onLoad>   

while(true) do


RoMScript("TargetUnit('party1');");
if not party1:hasBuff("Amplified Attack") then
         player:cast(""PRIEST_AMPLIFIED_ATTACK")
        


end

   </onLoad>

</waypoints>
anyone know what im doing wrong?
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

#2 Post by lisa »

newton666 wrote:anyone know what im doing wrong?
yup

RoMScript("TargetUnit('party1');");

that will make you target the character in party1, which is good but you don't actually check the buffs for your target.

So you would want to use

target = player:getTarget()

and then

if not target:hasBuff("Amplified Attack") then


So you end up with this

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
   <onLoad>   

while(true) do
RoMScript("TargetUnit('party1');");
target = player:getTarget()
if not target:hasBuff("Amplified Attack") then
         player:cast("PRIEST_AMPLIFIED_ATTACK")
end
yrest(1000)
end
   </onLoad>

</waypoints>

you also had 2 " in the player cast

Also adding a yrest to a loop will help, you also were missing an end
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
newton666
Posts: 81
Joined: Fri Oct 22, 2010 3:16 pm

Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

#3 Post by newton666 »

thx lisa , if i wanted to check for another like this

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
   <onLoad>   

while(true) do
RoMScript("TargetUnit('party1');");
target = player:getTarget()
if not target:hasBuff("Amplified Attack") then
         player:cast("PRIEST_AMPLIFIED_ATTACK")
if not target:hasBuff("Grace Of Life") then
         player:cast(""PRIEST_GRACE_OF_LIFE")
end
yrest(1000)
end
   </onLoad>

</waypoints>

it get an error?
i'm i missing something
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

#4 Post by lisa »

when you add an "if" you need to add an "end"

You can save yourself the hassle though and just do this, just make sure your profile has the skills in it.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
   <onLoad>   

while(true) do
		PartyTable()
		yrest(200)
		player:update()
				for i,v in ipairs(partymemberpawn) do
					player:target(partymemberpawn[i])
					player:update()
					partymemberpawn[i]:update()
					partymemberpawn[i]:updateBuffs()
					local target = player:getTarget();
					if target.HP/target.MaxHP*100 > 10 then
						player:checkSkills(true);
					end
				end
end 
  </onLoad>

</waypoints>

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
newton666
Posts: 81
Joined: Fri Oct 22, 2010 3:16 pm

Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

#5 Post by newton666 »

ok tried your . it dosnt work .this what i have on my priest profile

Code: Select all

	<skills_priest>
		<skill name="PRIEST_SOUL_SOURCE"    hotkey="MACRO" priority="50" autouse="false"/>
		<skill name="PRIEST_HOLY_AURA"      hotkey="MACRO" priority="50" autouse="false"/>
		<skill name="PRIEST_URGENT_HEAL"   hotkey="MACRO" priority="90" />
		<skill name="PRIEST_REGENERATE"     hotkey="MACRO" priority="50" autouse="false"/>
		<skill name="PRIEST_GRACE_OF_LIFE"    hotkey="MACRO" priority="50" autouse="false"/>
		<skill name="PRIEST_AMPLIFIED_ATTACK"         hotkey="MACRO" priority="50" autouse="false"/>
		<skill name="PRIEST_WAVE_ARMOR"     hotkey="MACRO" priority="50" autouse="false"/>
		<skill name="PRIEST_SOUL_BOND"      hotkey="MACRO" priority="50" autouse="false"/>
		<skill name="PRIEST_MAGIC_BARRIER"  hotkey="MACRO" priority="50" autouse="false"/>
	</skills_priest>
and i also tried my own way point and added end and it still getting error

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
   <onLoad>   

while(true) do
RoMScript("TargetUnit('party1');");
target = player:getTarget()
if not target:hasBuff("Amplified Attack") then
         player:cast("PRIEST_AMPLIFIED_ATTACK")
end
if not target:hasBuff("Grace Of Life") then
         player:cast(""PRIEST_GRACE_OF_LIFE")
end
yrest(1000)

end
   </onLoad>

</waypoints>

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

#6 Post by lisa »

autouse="false"

with those skill set to not automatically use them, it won't use them lol

you can change the values to true in the WP and leave the profile as is.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
   <onLoad>   
changeProfileSkill("PRIEST_AMPLIFIED_ATTACK", "AutoUse", true);
changeProfileSkill("PRIEST_GRACE_OF_LIFE", "AutoUse", true);

while(true) do
      PartyTable()
      yrest(200)
      player:update()
            for i,v in ipairs(partymemberpawn) do
               player:target(partymemberpawn[i])
               player:update()
               partymemberpawn[i]:update()
               partymemberpawn[i]:updateBuffs()
               local target = player:getTarget();
               if target.HP/target.MaxHP*100 > 10 then
                  player:checkSkills(true);
               end
            end
end 
  </onLoad>

</waypoints>
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
newton666
Posts: 81
Joined: Fri Oct 22, 2010 3:16 pm

Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

#7 Post by newton666 »

i'm a nab i know atlest i made you luagh ^^
Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

#8 Post by Cindy »

So, is there a smarter way to do this?

I'd rather expand partyhealer waypoint file to periodically cycle through, and amp melee's (if they dont have the druid/warrior buff) and cast GoL (if they dont have Touch of Unicorn).

As is, priest also casts amp attack on self, looks very not-smart, hence bot like when it does that before starting a fight.

What would be the smart way to go about doing that?
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

#9 Post by lisa »

you could do a target class check in the onpreskillcast for the classes you want to use Amp on.

Code: Select all

<onPreSkillCast>
<![CDATA[
if arg1.Name == "PRIEST_AMPLIFIED_ATTACK" then
	local target = player:getTarget()
	if target.Class1 == CLASS_PRIEST then
		return false
	end
end
]]>
</onPreSkillCast>
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