Page 1 of 1

have pity on a non programer a few moments of your time

Posted: Mon Sep 27, 2010 10:58 am
by fred55555
I have been trying to geet a warden pet heal working for weeks now
been using snipits from different post and cant seem to get it to work

so i am down to begging :)

i just need something i can through into the onleave combat

check the pet.hp find the pet.maxhp and at 50% or lower through a function cast(warden pet heal) then end

it seems so simple, but has been frustrating to get it working in the script

anyone have a spare few mintues to through a few lines out to me that will work i would muchly appreciate it

thnx

Re: have pity on a non programer a few moments of your time

Posted: Mon Sep 27, 2010 9:40 pm
by rock5
I don't play warden so normally wouldn't comment but you sound desperate so I'll try and help you.

The way I would expect it to work is;
1. Add the skill to the skills section of your profile eg.
<skill name="WARDEN_ELVEN_PRAYER" hotkey="MACRO" priority="30" />

2. In <onLeaveCombat> add something like this;

Code: Select all

player:update()
if 50 > player.Pet.HP/player.Pet.MaxHP * 100 then
    player:cast("WARDEN_ELVEN_PRAYER")
end
This assumes Pet.HP and Pet.MaxHP get updated properly.

Re: have pity on a non programer a few moments of your time

Posted: Fri Oct 01, 2010 9:56 am
by fred55555
Thank you very much for the foot steps in the right direction
it works pretty good with some changes as per below

player:update()
if 50 > (player.Pet.HP/player.Pet.MaxHP * 100) then
player:target( player.Pet );
player:cast("WARDEN_ELVEN_PRAYER")
yrest(3000);
end

thanx again :D