12-17-2013, 12:16 PM
(12-17-2013, 09:51 AM)wildicedemon Wrote: Fatal just a head's up you should for global variables make sure that they are unique by adding something to them I was having issues to that and didn't realize which is why I changed lasttick to lasttickSH so that it is unique you need to change it slightly everywhere it appears to prevent crossover from different modules. You should also remove the thing's related to petpartyhealassist. Since they are not needed. aside from that everything looks to be in order.
Thanks, I have updated the lastticksh and sh2 to f3 and f2. I will test when bot goes live before posting. I also removed:
Code:
function FatalMount.OnUpdate( Event, ticks )
if ( gChoco =="1" ) and ( ticks - lasttickSH > 200 ) then
lasttickSH = ticks
CheckCompanion()
end
if ( gPetHeal == "1" ) and ( ticks - lasttickSH > 200 ) then
lasttickSH2 = ticks
PetPartyHealAssist()
end
end
function PetPartyHealAssist()
local pet = Player.pet
local PetHeals = ActionList("type=11")
local PetHeal = PetHeals[32]
if pet.contentid == 1399 then
local PetHeal = PetHeals[36]
end
local acPetHeal = ActionList:Get(PetHeal.id,PetHealTarget.id,13)
local PetHealTarget = GetBestSummonHealTarget()
if Debugy == "1" then
d("Entering Pet Heal Assist = "..tostring(PetHealTarget.name))
end
if (PetHealTarget ~= nil) and(PetHealTarget.hp.percent < 100) then
if Debugy == "1" then
d("Preparing to Cast Embrace On = "..tostring(PetHealTarget.name)..", Hp Percentage at = "..tostring(PetHealTarget.hp.percent))
end
if ( pet ~= nil and pet ~= 0) then
if (acPetHeal.isready) then
acPetHeal:Cast()
end
end
end
end
.. per your instructions. Thanks for the guidance as well as the code.