Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can you tell me why this isnt working?

Featured Replies

Remember Im a novice at LUA. So please give me a detailed explanation so I can learn more. See Im still not sure how to through code together. So im finding other code and editing it to see if I can make it work for what im wanting to do. This is going to be a Disease Manager for DKs. Once the Disease get to 3 sec left of its target debuff then the DK will recast the move according to the disease to reapply it.

 

if not (UnitIsDead("target")) and not (IsFlying("player")) and not (IsResting("player")) and not (UnitIsAFK("player")) then

    --[[ refresh the Diseases on the target if there are less then 3 sec left (to be sure that it dont run out while a fight ]]
    local timeLeftToCastAgain = 3;
    local idDiseases={59879,59921}
--[[             Blood Plague,Frost Fever ]]
    idDiseases[1]={59879,59921}
--[[             Outbreak,Plague Strike ]]
    idDiseases[2]={77575,45462}
    --[[             Outbreak,Icy Touch ]]
    idDiseases[3]={77575,45477}
    local now=GetTime();
    for i=("1,2"),#idDiseases do
        local spell="";
        local DiseaseFound=()
        for j=1,#idDiseases do
            spellname=GetSpellInfo(idDiseases[j])
            local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitBuff("target",spellname);
            if (name==spellname) then
                local expireTimeLeft = expirationTime-now;
                DiseasesFound=idDiseases[j]
                if (expireTimeLeft < timeLeftToCastAgain) then
                    if (IsUsableSpell(spellname)) then
                        local start, duration, enable = GetSpellCooldown(spellname)
                        if (duration==3) then
                            CastSpellByName(spellname);
                            spell=spellname;
                        end
                    end
                    
                end
                break;
            end
        end
        if (DiseasesFound==0) then
            for j=("1,2"),#idDeases do
                local spellname=GetSpellInfo(idDeases[j])
                if (IsUsableSpell(spellname)) then
                    local start, duration, enable = GetSpellCooldown(spellname)
                    if (duration==0) then
                        CastSpellByName(spellname);
                        spell=spellname;
                        break;
                    end
                end
            end
        end
        if not (spell=="") then
            print("Diseases: "..spell)
            result=true
            break;
        end
        
    end
end
result=(diseased>0)

local DiseasesFound = 0;
if not (UnitIsDead("target")) and not (IsFlying("player")) and not (IsResting("player")) and not (UnitIsAFK("player")) then
    --[[ refresh the Diseases on the target if there are less then 3 sec left (to be sure that it dont run out while a fight ]]
    local timeLeftToCastAgain = 3;
    local idDiseases={59879,59921}
	--[[ Blood Plague,Frost Fever ]]
    idDiseases[1]={59879,59921}
	--[[ Outbreak,Plague Strike ]]
    idDiseases[2]={77575,45462}
    --[[ Outbreak,Icy Touch ]]
    idDiseases[3]={77575,45477}
    local now=GetTime();
    for i=1,3,1 do
        local spell="";
        --[[local DiseaseFound=()   NOT USED ]]
        for j=1,2,1 do
            spellname=GetSpellInfo(idDiseases[i][j])
            local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitBuff("target",spellname);
            if (name==spellname) then
                local expireTimeLeft = expirationTime-now;
                DiseasesFound=idDiseases[i][j]
                if (expireTimeLeft < timeLeftToCastAgain) then
                    if (IsUsableSpell(spellname)) then
                        local start, duration, enable = GetSpellCooldown(spellname)
                        if (duration==3) then
                            CastSpellByName(spellname);
                            spell=spellname;
                        end
                    end
                    
                end
                break;
            end
        end
        if (DiseasesFound==0) then
            for j=1,2,1 do
                local spellname=GetSpellInfo(idDiseases[i][j])
                if (IsUsableSpell(spellname)) then
                    local start, duration, enable = GetSpellCooldown(spellname)
                    if (duration==0) then
                        CastSpellByName(spellname);
                        spell=spellname;
                        break;
                    end
                end
            end
        end
        if not (spell=="") then
            print("Diseases: "..spell)
            result=true
            break;
        end
        
    end
end
result=(DiseasesFound>0) --[[ replace  result=(diseased>0)]]

Try it

  • Author

OK Driodz is not casting Plague Strike to put Blood Plague on the target. Its not doing (1,2,1 do)

meaning that

 

    --[[ Outbreak,Plague Strike ]]
idDiseases[2]={77575,45462}

 

Isnt being used for some reason or kept up on the target. But

 

--[[ Outbreak,Icy Touch ]]
idDiseases[3]={77575,45477}

 

Is being kept up on the target.

 

is there a reason why bot spells aren't being fires consecutively??? to keep the debuffs up on the target?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.