WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Toggling Pet Abilites (https://www.wowinterface.com/forums/showthread.php?t=350)

Random 02-23-05 06:40 PM

Toggling Pet Abilites
 
hey everyone, Im trying to make a mod that automatically toggles the hunter pet abilities "Growl" and "Cower" on entering a PvP battle.

Code:

if (event == "PLAYER_REGEN_DISABLED") then
       
        if (UnitIsPlayer("target")) then

                        if (name == "Growl") and (autoCastEnabled) then
                                TogglePetAutocast(DunnoWhatGoesHere);
                        end
        end
end

that's about all I have...

and I tried adding the following code to Rauen's PetDefend because he had a premade toggle function that already worked but my code didnt work I guess....

Code:

-- Toggle Growl On PvP Enter
        if (event == "PLAYER_REGEN_DISABLED") then
               
                if (UnitIsPlayer("target")) then       
                       
                        PetDefend_Config.Growl = false;
                else
                        PetDefend_Config.Growl = true;
                end
        end

so anyway, I would like it very much if somone could help me out here, I perfer to start from stratch but if u get Rauen's premade toggle thing to work Im cool with that too.

Thanks


All times are GMT -6. The time now is 04:55 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI