WARNING! I didn't test it! Please post some feedback if you can! would be great!
Warning: You might have to disable ALL your addons and your Chat will be spammed witch dump messages!
Heal the Player with the lowest HP in your raid!
10 player raid:
Code:
/dump loadstring(" local ma=0; local mn=0; t=\"raid\"; for n=\"1\",\"10\" do local a=(UnitHealthMax(t..n)-UnitHealth(t..n)); if a > ma then ma=a mn=n end end TargetUnit(t..mn); if ma>=8000 then RunMacro(\"BIG\") else RunMacro(\"SMALL\") end ") ()
10 player raid (+RANGE CHECK!)
Code:
/dump loadstring(" ma=0; mn=0; t=\"raid\"; for n=\"1\",\"10\" do a=(UnitHealthMax(t..n)-UnitHealth(t..n)); if (a > ma) and (UnitInRange(t..n)==1) then ma=a mn=n end end TargetUnit(t..mn); if ma>=8000 then RunMacro(\"B\") else RunMacro(\"S\") end ") ()
25 player raid:
Code:
/dump loadstring(" local ma=0; local mn=0; t=\"raid\"; for n=\"1\",\"25\" do local a=(UnitHealthMax(t..n)-UnitHealth(t..n)); if a > ma then ma=a mn=n end end TargetUnit(t..mn); if ma>=8000 then RunMacro(\"BIG\") else RunMacro(\"SMALL\") end ") ()
25 player raid (+RANGE CHECK!)
Code:
/dump loadstring(" ma=0; mn=0; t=\"raid\"; for n=\"1\",\"25\" do a=(UnitHealthMax(t..n)-UnitHealth(t..n)); if (a > ma) and (UnitInRange(t..n)==1) then ma=a mn=n end end TargetUnit(t..mn); if ma>=8000 then RunMacro(\"B\") else RunMacro(\"S\") end ") ()
40 player raid:
Code:
/dump loadstring(" local ma=0; local mn=0; t=\"raid\"; for n=\"1\",\"40\" do local a=(UnitHealthMax(t..n)-UnitHealth(t..n)); if a > ma then ma=a mn=n end end TargetUnit(t..mn); if ma>=8000 then RunMacro(\"BIG\") else RunMacro(\"SMALL\") end ") ()
40 player raid (+RANGE CHECK!)
Code:
/dump loadstring(" ma=0; mn=0; t=\"raid\"; for n=\"1\",\"40\" do a=(UnitHealthMax(t..n)-UnitHealth(t..n)); if (a > ma) and (UnitInRange(t..n)==1) then ma=a mn=n end end TargetUnit(t..mn); if ma>=8000 then RunMacro(\"B\") else RunMacro(\"S\") end ") ()
----SMALL--- (name the macro exact "SMALL")
Code:
/cast Flash of Light
----BIG------ (name the macro exact "BIG")
this macro will target the player in your raid with the LOWEST HP and it will run the macros "BIG" and "SMALL", the macro "BIG" should contain a big healing spell (Holy light, Nourish, healing Weave), the "SMALL" macro should countain a small healing spell (Flash of Light, Rejuvenation, lesser healing Weave), etc!
the SMALL macro is used if the target has lost more than 8000 HP the BIG macro is used if the target has lost less then 8k HP!
this is NOT really tested!
please post your feedback!