PDA

View Full Version : Please help with broken macro/script


Orentius
08-04-2005, 10:39 PM
About a three weeks ago I found a great script on the blizzard forums for any healer. It checked everyon's HP in the party and cast a heal automatically on the person missing the most HP. I used it for about 2 weeks and when editing the spell number after training to update because I gained new skills, I somehow broke it. Please help me.

It is designed to cast spell by number because there is not enough character spaces available to cast by name. I tried to find the post on the paladin forums where I originally got this but it has long since been lost.

/script CastSpell(31)(p)='player'H=UnitHealth M=UnitHealthMax h=H(p)/M(p);function F(a)if not UnitIsDeadOrGhost(a)and SpellCanTargetUnit(a)then g=H(a)/M(a)if g<h then p=a h=g end end end for i=1,4do F('party'..i)F('partypet'..i)end;SpellTargetUnit(p )