valros 0 Report post Posted June 11, 2006 ok guys well i have had Starting an Add-on Part 1 up for sometime now it time to see who did thier homework. this is a quick script i typed up to do the following. checks to see if you are missing more then <MissingHP>checks to see if you do not currently have renewthen casts Renew with the rank of <Rank> on yourselfotherwise it does nothing this is the script. you need to open the FPmod.lua file with notepad and paste the following and save. function RenewMe(MissingHP, Rank) if UnitHealthMax('player') - UnitHealth('player') > MissingHP then if Get_Player_Buff_Index('Renew') == -1 then CastSpellByName('Renew(Rank '..Rank..')', true); end end end function Get_Player_Buff_Index(BuffName) local pbuff_id = 0 local pbuff_name = '' local pbuff_index, untilCancelled = GetPlayerBuff(pbuff_id, "HELPFUL") while pbuff_index >= 0 do FPmodTooltipTextLeft1:SetText(nil); FPmodTooltip:SetPlayerBuff(pbuff_index); pbuff_name = FPmodTooltipTextLeft1:GetText(); if pbuff_name == BuffName then break; end pbuff_id = pbuff_id + 1; pbuff_index, untilCancelled = GetPlayerBuff(pbuff_id, "HELPFUL"); if pbuff_id > 20 then pbuff_index = -1; break; end end return pbuff_index; end to run this script make a macro with the following /script RenewMe(<MissingHP>, <Rank>); /cast <some spell> <some spell> could be the heal you use the most so you don't have to worry about your health as much when healing tanks that are missing more health. let me know if you have any questions Share this post Link to post Share on other sites More sharing options...
Joesf 0 Report post Posted June 11, 2006 How'd you get the quote\code window to scroll?! Share this post Link to post Share on other sites More sharing options...
valros 0 Report post Posted June 11, 2006 code windows do that on their own. i started useing those so when you copy and paste it would save the tabs and make the code more readable. Share this post Link to post Share on other sites More sharing options...
Recommended Posts