Page 1 of 1

NEEED HELP TO GET PRIEST CHECK FOR BUFFS

Posted: Tue Oct 09, 2012 6:00 pm
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?

Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

Posted: Tue Oct 09, 2012 7:24 pm
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

Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

Posted: Wed Oct 10, 2012 1:21 am
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

Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

Posted: Wed Oct 10, 2012 2:15 am
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>


Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

Posted: Wed Oct 10, 2012 3:22 am
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>


Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

Posted: Wed Oct 10, 2012 3:51 am
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>

Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

Posted: Wed Oct 10, 2012 4:12 am
by newton666
i'm a nab i know atlest i made you luagh ^^

Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

Posted: Mon Oct 22, 2012 3:23 pm
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?

Re: NEEED HELP TO GET PRIEST CHECK FOR BUFFS

Posted: Mon Oct 22, 2012 6:00 pm
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>