Need Storm, Earth, and Fire WW Monk tracking code ( donation) menu

User Tag List

Results 1 to 9 of 9
  1. #1
    thenthelies's Avatar Member
    Reputation
    14
    Join Date
    Dec 2007
    Posts
    70
    Thanks G/R
    3/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need Storm, Earth, and Fire WW Monk tracking code ($20 donation)

    I need a code that handles tracking if a unit has an active spirit panda from the monk spell Storm, Earth, and Fire (SEF).

    Here's what I got for this ability:

    PHP Code:
    local sef select(4,UnitBuffID("player",137639));

    if (
    not sef or sef<2) and UnitExists("focus") and not UnitIsUnit("target""focus") and PQR_SpellAvailable(137639then
    CastSpellByName
    (GetSpellInfo(137639), "focus"
    Now the problem with this is if you cast SEF on a unit with an active spirit it's just going to cancel the effect and go into an endless loop. I need something to track if the unit has an active panda spirit from SEF and because of the overall clunky design of the ability, the only way to do this is through the combat log /w totems or something.

    Storm, Earth, and Fire WeakAura
    Here's an MMO champion thread /w a weakaura that visually tracks your pandas and their target. I post this because it probably contains the code needed to turn it into a PQR code. If you don't have WeakAuras here's the core lua code that makes it works:
    PHP Code:
    -----------------------------------------------------------------------
    --
    -- 
    NameStormEarth, and Fire
    -- AuthorRòxy@Spinebreaker-EU (Shamarox@mmo-champ)
    --
    -- 
    Core for tracking targets health and SEF activation
    -- Note: /cancelaura deactivation have different timings and
    -- 
    events
    -----------------------------------------------------------------------

    function(
    event, ...)
        
        
    local SEF 137639;
        
    local S 138122;
        
    local E 138121;
        
    local F 138123;
        
    local me UnitGUID("player")
        
    local ev,_,source,_,_,_,target,tname,_,_,spellId,spellName,_,damage,over select(2,...)
        
        if 
    not WA_SEF  then
            WA_SEF  
    = {
                
    totem = {nil,nil},
                
    active = {false,false},
                
    last nil,
                
    spellName GetSpellInfo(SEF);
                
    get = function(self,t,b
                    for 
    0,do
                        if 
    self.totem[i]  and self.totem[i][b] == and self.active[ithen
                            
    return i;
                        
    end
                    end
                    
    return nil;
                
    end,
                
    getNext = function(self)
                    if 
    not self.last then
                        
    for 0,do
                            if 
    not self.active[ithen
                                
    return i;
                            
    end
                        end
                    end
                    
    return self.last;
                
    end
            
    }
        
    end
        
        
        
    -- TRACKING TOTEMS
        
    if source == me and (spellId == SEF or spellId == or spellId == or spellId == Fthen
            
            
    if ev == "SPELL_SUMMON" then
                WA_SEF
    .id target
                
            
    elseif ev == "SPELL_CAST_SUCCESS"then
                local unit 
    "target";
                
                if 
    UnitGUID("focus") == target then  unit "focus";
                elseif 
    UnitGUID("mouseover") == target then  unit "mouseover";  end
                
                local max 
    UnitHealthMax(unit);
                
    WA_SEF.last  = {
                    
    target target,
                    
    tname tname,
                    
    targetMaxHP max,
                    
    targetHP  max-UnitHealth(unit),
                    
    totemMaxHP UnitHealthMax("player")*0.1, -- 10%
                    
    totemHP 0;
                    
    name nil,
                    
    icon nil,
                    
    id WA_SEF.id,
                    
    perc = function(self,top,x)
                        
    local p = (self[top]-self[x])*100/self[top];
                        if 
    <= 0 then
                            p 
    0;
                        
    end
                        
    return tonumber(("%.0f"):format(p))
                    
    end,
                    
    set =  function(self,b,x)
                        
    self[b] = self[b]+x
                        if 
    self[b] < 0 then
                            self
    [b] = 0;
                        
    end
                    end
                
    }
                
            
    end
        end
        
        
        
    -- TRACKING HEALTH
        local dmg 
    damage;
        
    local heal string.find(ev,"_HEAL");
        if 
    string.find(ev,"_DAMAGE") or heal then
            
    if string.find(ev,"SWING"then
                dmg 
    spellId;
            elseif 
    heal  then
                dmg 
    = -(damage-over);
            
    end
            
            local t 
    WA_SEF:get(target,"target");
            
    local id WA_SEF:get(target,"id");
            
            if 
    dmg ~= nil  then
                
    if t then
                    WA_SEF
    .totem[t]:set("targetHP",dmg);
                elseif 
    id then
                    WA_SEF
    .totem[id]:set("totemHP",dmg);
                
    end
            end
            
        end
        
        
    return false -- JUST CORE!
    end 
    So the info you need to get a SEF tracking code working is probably in that.

    I'm a very limited coder and need someone to build the brain, in the end I want to end up with this:

    PHP Code:
    local sef select(4,UnitBuffID("player",137639));
    local ActiveSpirit = [brain tracking if SEF on unitID(focuszzz]

    if 
    not ActiveSpirit and (not sef or sef<2) and UnitExists("focus") and not UnitIsUnit("target""focus") and PQR_SpellAvailable(137639then
    CastSpellByName
    (GetSpellInfo(137639), "focus"

    If somebody can get me this code, I'll happily donate $20 to you via paypal.

    Thanks~

    Need Storm, Earth, and Fire WW Monk tracking code ( donation)
  2. #2
    deadpanstiffy's Avatar Knight-Lieutenant
    Reputation
    158
    Join Date
    Mar 2012
    Posts
    240
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is a stripped version that only will use "focus" and use 1 spirit. I have another version in testing that uses "mouseover" and both spirits.

    Code:
    -------------------------
    -- STORM, EARTH & FIRE --
    -------------------------
    local spell, unit = 137639, "focus"
    if UnitExists(unit)
    		and not UnitIsUnit("player-target", unit) then
    	if GetTotemInfo(1) == false then
    		CastSpellByName(GetSpellInfo(spell), unit)
    	end
    else
    	if GetTotemInfo(1) == true then 
    		DestroyTotem(1)
    	end
    end
    Last edited by deadpanstiffy; 04-22-2013 at 04:23 PM.

  3. #3
    DiabloFan's Avatar Master Sergeant
    Reputation
    10
    Join Date
    Sep 2011
    Posts
    80
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's what I have so far, tested it in-game and it's working for both focus and mouseover. Stick this near the top of your rotation:

    PHP Code:
    if Pandas == nil then
        Pandas 
    = { }
    end

    if LoadSEFFunctions == nil then
        LoadSEFFunctions 
    true
        
        
    function SEFFrame_OnEvent(self,event,...)
        
            --
    Combat log events
            
    if event == "COMBAT_LOG_EVENT_UNFILTERED" then    
                local SubEvent 
    select(2, ...)
                
    local SourceName select(5, ...)
                
    local DestGUID select(8, ...)
                
    local DestName select(9, ...)
                
    local SpellID select(12, ...)
                
    local SpellName select(13, ...)
                
    local ExtraSpellID select(15, ...)
                
    local ExtraSpellName select(16, ...)
                
                if 
    SubEvent == "SPELL_CAST_SUCCESS" then
                    
    if SourceName == UnitName("player"then
                        
    if SpellID == 137639 then
                            
    if DestGUID == UnitGUID("mouseover"then
                                table
    .insertPandas, { Name DestNameGUID DestGUID } )
                            
    end
                            
                            
    if DestGUID == UnitGUID("focus"then
                                table
    .insertPandas, { Name DestNameGUID DestGUID } )
                            
    end    
                        end
                    end
                end
                
                
    if SubEvent == "SPELL_AURA_REMOVED" then
                    
    if SourceName == UnitName("player"then
                        
    if SpellID == 137639 then
                            Pandas 
    = { }
                        
    end
                    end
                end
            end
        end
    end

    if LoadSEFFrame == nil then
        LoadSEFFrame 
    true

        SEFFrame 
    CreateFrame("Frame")
        
    SEFFrame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
        
    SEFFrame:SetScript("OnEvent"SEFFrame_OnEvent)
        
    SEFFrame:Show()
    end 
    And this is the actual SEF ability:

    PHP Code:
    local SEF,_,_,SEFCount UnitBuffID("player",137639)
    local SEFFocus true
    local SEFMouseover 
    true

    if UnitExists("target"then
        
    if not SEF or SEFCount 2 then
            
    if UnitExists("focus"then
                
    if UnitCanAttack("player","focus") and not UnitIsUnit("target","focus"then
                    
    for i=1,#Pandas do
                        
    if UnitGUID("focus") == Pandas[i].GUID then
                            SEFFocus 
    nil
                        end
                    end
                    
                    
    if SEFFocus then
                        
    if PQR_SpellAvailable(137639
                         and 
    IsSpellInRange(GetSpellInfo(137639),"focus") == 1 then
                            CastSpellByName
    (GetSpellInfo(137639),"focus")
                            return 
    true
                        end
                    end
                end
            end
        
            
    if UnitExists("mouseover") and not UnitIsUnit("mouseover","focus"then
                
    if UnitCanAttack("player","mouseover") and not UnitIsUnit("target","mouseover"then
                    
    for i=1,#Pandas do
                        
    if UnitGUID("mouseover") == Pandas[i].GUID then
                            SEFMouseover 
    nil
                        end
                    end
                    
                    
    if SEFMouseover then
                        
    if PQR_SpellAvailable(137639
                         and 
    IsSpellInRange(GetSpellInfo(137639),"mouseover") == 1 then
                            CastSpellByName
    (GetSpellInfo(137639),"mouseover")
                            return 
    true
                        end
                    end
                end
            end
        end
    end 
    Can set it to cast on target with SpellID of 0 and it'll work just fine. It also checks that you have a target so that it doesn't automatically cast a panda on something that you want to target. You may want to add a combat check for focus/mouseover as well.

    The only issue I'm running into is that there are no combat log events for when you dismiss a panda so you can only clear targets you've cast on when your buff totally expires (if you lose a charge it doesn't seem to show up in the combat log for some reason). I'm guessing that isn't a huge issue though as pandas should only expire when their target dies?
    Last edited by DiabloFan; 04-23-2013 at 12:34 AM.

  4. #4
    thenthelies's Avatar Member
    Reputation
    14
    Join Date
    Dec 2007
    Posts
    70
    Thanks G/R
    3/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Beautiful man, ****ing beautiful! PM me your paypal email plz

    The only issue I'm running into is that there are no combat log events for when you dismiss a panda so you can only clear targets you've cast on when your buff totally expires (if you lose a charge it doesn't seem to show up in the combat log for some reason). I'm guessing that isn't a huge issue though as pandas should only expire when their target dies?
    I really don't think this is much of a problem at all, because the only time you would want to cast SEF to dismiss an individual panda is because you needed to swap to it, in which case you would either put it on a new target, not have any targets let for pandas to go on, or not want to split your damage.

    I'm upping my donation to $30 because I am so happy with this, it's amazing~

    Also one final request, please if isn't too much of an hassle could you possibly write an extra code for me something to the effect of this:

    If CurrentTarget = Pandas then
    CastSpellByName(GetSpellInfo(137639),"target")
    end

    I'd like this as well for the times where there's three/two targets, my main target dies and I switch over to a target with an active panda.

    THANKS!
    Last edited by thenthelies; 04-23-2013 at 10:06 AM.

  5. #5
    DiabloFan's Avatar Master Sergeant
    Reputation
    10
    Join Date
    Sep 2011
    Posts
    80
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure, here's the updated abilities, I've added combat checks as well and cleaned up the code a bit. Only thing is it won't work on Training Dummies if you want to test it on those. :<

    PHP Code:
    if Pandas == nil then
        Pandas 
    = { }
    end

    if LoadSEFFunctions == nil then
        LoadSEFFunctions 
    true
        
        
    function SEFFrame_OnEvent(self,event,...)
        
            --
    Combat log events
            
    if event == "COMBAT_LOG_EVENT_UNFILTERED" then    
                local SubEvent 
    select(2, ...)
                
    local SourceName select(5, ...)
                
    local DestGUID select(8, ...)
                
    local DestName select(9, ...)
                
    local SpellID select(12, ...)
                
    local SpellName select(13, ...)
                
    local ExtraSpellID select(15, ...)
                
    local ExtraSpellName select(16, ...)
                
                if 
    SubEvent == "SPELL_CAST_SUCCESS" then
                    
    if SourceName == UnitName("player"then
                        
    if SpellID == 137639 then
                            table
    .insertPandasDestGUID )
                        
    end
                    end
                end
                
                
    if SubEvent == "SPELL_AURA_REMOVED" then
                    
    if SourceName == UnitName("player") and DestName == UnitName("player"then
                        
    if SpellID == 137639 then
                            Pandas 
    = { }
                            
    PQR_WriteToChat("Storm, Earth, and Fire: \124cffff0000Cleared")
                        
    end
                    end
                end
            end
        end
    end

    if LoadSEFFrame == nil then
        LoadSEFFrame 
    true

        SEFFrame 
    CreateFrame("Frame")
        
    SEFFrame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
        
    SEFFrame:SetScript("OnEvent"SEFFrame_OnEvent)
        
    SEFFrame:Show()
    end 
    PHP Code:
    local SEF,_,_,SEFCount UnitBuffID("player",137639)
    local SEFFocus true
    local SEFMouseover 
    true

    if UnitExists("target"then
        
        
    --Cancel Pandas on our current target
        
    for i=1,#Pandas do
            
    if UnitGUID("target") == Pandas[ithen
                
    if PQR_SpellAvailable(137639then
                    PQR_CastSpellByName
    (GetSpellInfo(137639),"target")
                    return 
    true
                end
            end
        end
        
        
    if not SEF or SEFCount 2 then
        
            
    --Focus
            
    if UnitExists("focus"then
                
    if UnitCanAttack("player","focus") and not UnitIsUnit("target","focus")
                 and 
    UnitAffectingCombat("focus"then
                    
    for i=1,#Pandas do
                        
    if UnitGUID("focus") == Pandas[ithen
                            SEFFocus 
    nil
                        end
                    end
                    
                    
    if SEFFocus then
                        
    if PQR_SpellAvailable(137639
                         and 
    IsSpellInRange(GetSpellInfo(137639),"focus") == 1 then
                            CastSpellByName
    (GetSpellInfo(137639),"focus")
                            return 
    true
                        end
                    end
                end
            end
            
            
    --Mouseover
            
    if UnitExists("mouseover"then
                
    if UnitCanAttack("player","mouseover") and not UnitIsUnit("target","mouseover")
                 and 
    UnitAffectingCombat("mouseover"then
                    
    for i=1,#Pandas do
                        
    if UnitGUID("mouseover") == Pandas[ithen
                            SEFMouseover 
    nil
                        end
                    end
                    
                    
    if SEFMouseover then
                        
    if PQR_SpellAvailable(137639)
                         and 
    IsSpellInRange(GetSpellInfo(137639),"mouseover") == 1 then
                            CastSpellByName
    (GetSpellInfo(137639),"mouseover")
                            return 
    true
                        end
                    end
                end
            end
        end
    end 
    It does seem to remove all pandas when using it on your target (rather than just the one that is on your target), not sure why that happens.

  6. #6
    thenthelies's Avatar Member
    Reputation
    14
    Join Date
    Dec 2007
    Posts
    70
    Thanks G/R
    3/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey m8 problem /w the 2nd code you posted, it goes into that mindless loop + doesn't clear panda if it's current target D:

    If you could, look over it when you get a spare moment ^^

  7. #7
    DiabloFan's Avatar Master Sergeant
    Reputation
    10
    Join Date
    Sep 2011
    Posts
    80
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Whoopsy, I used my own function for simplifying CastSpellByName which you obviously won't have. This one should work! :<

    PHP Code:
    if Pandas == nil then
        Pandas 
    = { }
    end

    if LoadSEFFunctions == nil then
        LoadSEFFunctions 
    true
        
        
    function SEFFrame_OnEvent(self,event,...)
        
            --
    Combat log events
            
    if event == "COMBAT_LOG_EVENT_UNFILTERED" then    
                local SubEvent 
    select(2, ...)
                
    local SourceName select(5, ...)
                
    local DestGUID select(8, ...)
                
    local DestName select(9, ...)
                
    local SpellID select(12, ...)
                
    local SpellName select(13, ...)
                
    local ExtraSpellID select(15, ...)
                
    local ExtraSpellName select(16, ...)
                
                if 
    SubEvent == "SPELL_CAST_SUCCESS" then
                    
    if SourceName == UnitName("player"then
                        
    if SpellID == 137639 then
                            table
    .insertPandasDestGUID )
                        
    end
                    end
                end
                
                
    if SubEvent == "SPELL_AURA_REMOVED" then
                    
    if SourceName == UnitName("player"then
                        
    if SpellID == 137639 then
                            Pandas 
    = { }
                        
    end
                    end
                end
            end
        end
    end

    if LoadSEFFrame == nil then
        LoadSEFFrame 
    true

        SEFFrame 
    CreateFrame("Frame")
        
    SEFFrame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
        
    SEFFrame:SetScript("OnEvent"SEFFrame_OnEvent)
        
    SEFFrame:Show()
    end 
    PHP Code:
    local SEF,_,_,SEFCount UnitBuffID("player",137639)
    local SEFFocus true
    local SEFMouseover 
    true

    if UnitExists("target"then
        
        
    --Cancel Pandas on our current target
        
    for i=1,#Pandas do
            
    if UnitGUID("target") == Pandas[ithen
                
    if PQR_SpellAvailable(137639then
                    CastSpellByName
    (GetSpellInfo(137639),"target")
                    return 
    true
                end
            end
        end
        
        
    if not SEF or SEFCount 2 then
        
            
    --Focus
            
    if UnitExists("focus"then
                
    if UnitCanAttack("player","focus") and not UnitIsUnit("target","focus"then
                    
    for i=1,#Pandas do
                        
    if UnitGUID("focus") == Pandas[ithen
                            SEFFocus 
    nil
                        end
                    end
                    
                    
    if SEFFocus then
                        
    if PQR_SpellAvailable(137639
                         and 
    IsSpellInRange(GetSpellInfo(137639),"focus") == 1 then
                            CastSpellByName
    (GetSpellInfo(137639),"focus")
                            return 
    true
                        end
                    end
                end
            end
            
            
    --Mouseover
            
    if UnitExists("mouseover"then
                
    if UnitCanAttack("player","mouseover") and not UnitIsUnit("target","mouseover"then
                    
    for i=1,#Pandas do
                        
    if UnitGUID("mouseover") == Pandas[ithen
                            SEFMouseover 
    nil
                        end
                    end
                    
                    
    if SEFMouseover then
                        
    if PQR_SpellAvailable(137639)
                         and 
    IsSpellInRange(GetSpellInfo(137639),"mouseover") == 1 then
                            CastSpellByName
    (GetSpellInfo(137639),"mouseover")
                            return 
    true
                        end
                    end
                end
            end
        end
    end 
    Removed the combat check just to test it. Can add that back in if you like.
    Last edited by DiabloFan; 04-23-2013 at 12:35 PM.

  8. #8
    thenthelies's Avatar Member
    Reputation
    14
    Join Date
    Dec 2007
    Posts
    70
    Thanks G/R
    3/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That one wasn't working either, but I found the problem! (or at least got it working)

    PHP Code:
                if SubEvent == "SPELL_CAST_SUCCESS" then
                    
    if SourceName == UnitName("player"then
                        
    if SpellID == 137639 then
                            table
    .insertPandasDestGUID )
                        
    end
                    end
                end 
    doesn't work, while the original:
    PHP Code:
                if SubEvent == "SPELL_CAST_SUCCESS" then
                    
    if SourceName == UnitName("player"then
                        
    if SpellID == 137639 then
                            
    if DestGUID == UnitGUID("mouseover"then
                                table
    .insertPandas, { Name DestNameGUID DestGUID } )
                            
    end
                            
                            
    if DestGUID == UnitGUID("focus"then
                                table
    .insertPandas, { Name DestNameGUID DestGUID } )
                            
    end    
                        end
                    end
                end 
    does!

    Dunno if that code change was intended or not, but it's working perfectly now so...

    Also, I see what you mean with the cancel code clearing both pandas... but that's not the code fault that's this shitty ability; even if you manually try to clear a panda off a single target it'll sometimes clear both.

    My work around for that was replacing CastSpellByName(GetSpellInfo(137639),"target") /w RunMacroText("/cancelaura Storm, Earth, and Fire"), then you just have to resend the panda(s).

    Anyway, this is as good as it's going to get for this annoying piece of shit ability, THANKS AGAIN!

  9. #9
    DiabloFan's Avatar Master Sergeant
    Reputation
    10
    Join Date
    Sep 2011
    Posts
    80
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup it was intended, you probably have to restart WoW after making the changes in PQR as the functions are set to only load once so if you change the abilities after already having loaded the old versions they won't work.

    The reason I changed that method slightly was because there's a short delay for the combat log to register the spell cast so if you mouseover something really briefly it won't work. Try changing both abilities to the last two I posted, restart WoW and PQR and see if that works.
    Last edited by DiabloFan; 04-23-2013 at 08:38 PM.

Similar Threads

  1. [Monk Only - Video] Stay as Storm/Earth/Fire
    By oden1 in forum World of Warcraft Exploits
    Replies: 12
    Last Post: 11-14-2013, 06:19 PM
  2. Patch 5.2 | New Monk Spell - Storm, Earth and Fire
    By Alauran in forum World of Warcraft General
    Replies: 0
    Last Post: 01-10-2013, 07:49 AM
  3. Hey! Need a signature and avatar for mmowned!
    By Holysymbol in forum Art & Graphic Design
    Replies: 12
    Last Post: 04-18-2007, 08:15 AM
  4. I need a Weapon and Shield model change
    By phx123 in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 04-07-2007, 10:59 AM
  5. Need help badly and fast!
    By wowhacker101 in forum World of Warcraft General
    Replies: 3
    Last Post: 01-26-2007, 08:07 PM
All times are GMT -5. The time now is 10:41 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search