WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Chat Event Pet Feeder Script help (https://www.wowinterface.com/forums/showthread.php?t=8343)

Inokis 02-03-07 04:16 PM

Chat Event Pet Feeder Script help
 
This script works fine if you type in the pet name manually, as it appears in the Chat Frame (substituting UnitName('Pet') for the actual name):

Code:

function PetActionEXPBar_FeedPet()
        local petname = UnitName("Pet");
        if ( event == "CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS") then
                if arg1 == ( "UnitName('Pet') gains 1 Happiness from Feed Pet Effect." ) then
                PetEXPBarFeedText:Show();
                PetEXPBarFeedText:SetText("1 Loyalty Gain");
                end
        end
end

Is there any way to insert the local 'petname' variable into the Arg 1 conditional and have it match the chat frame text?

Inokis 02-06-07 07:21 PM

If anyone has any ideas or workarounds for making this work, feel free to chime in.


All times are GMT -6. The time now is 06:12 AM.

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