Jump to content
  • buff/spell reuse after


    Bugreporter
    • Product: WRobot General Type: Suggestion Status: Fixed

    at first: Timer wouldn't be help (imho)

    "spell/buff reuse after ..." should check if a buff (in my case a poison)

    - is set (by user or profile)

    - has a expiration time after x (min/sec)

    x min/sec before the spell is expiring, it should be cast again.

    Usefull for buffs in Raid, which could be set manual by a user and refreshed by the profile

    an example.

    by default, if no other poison is set, the profile use leeching poison.

    for some raid or boss, crippling poison should be better, so the user set it by himself.

    10 min. before the crippling poison expire, it shoud be set new, if the user isn't in combat.

    So the user could be sure, that the poison will not be expire while the boss fight.

    (Bad luck, if the boss fight takes 11 min ;-) )



    User Feedback

    Recommended Comments

    No, not really, because I want update a buff only, If it was set "by hand" before.

     

    What I can is

    ... to detect if the buff is running or not.

    ...set a buff if its not running.

     

    but

    I want to (re)set a buff only if it was already set.

    I dont want set the buff, if its not running before.

     

    I have a lot of poisons. And mostly a rogue use Leeching ... and Deathly ... for solo fights. But in raids I dont need Leeching. Maybe crippling is a better choice. In this case I set i.e. Crippling. No Problem at all. What I want is, that now Cripping was renewed, until it is changed from me to another poison.

     

    (its not very important but would be a nice feature.)

     

    But maybe it could be done by another suggestion that I have: it is possible to use global variables ? Variables that could be set by one Lua-script and read from another ?

     

    With this, I could also realise this.

    Link to comment
    Share on other sites

    Try this code lua:

    timeLeftToCastAgain > max time left before casting again buff in seconds

    minSpellDuration > To ignore spells like Avenging Wrath (combat spell) in seconds 

    local timeLeftToCastAgain = 10;
    local minSpellDuration = 60 * 2;
    for i=1,40 do
    	local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitBuff("player", i); 
    	if spellId and unitCaster == "player" then
    		local expireTimeLeft = expirationTime-GetTime();
    		if (expireTimeLeft >= 0 and duration > minSpellDuration and expireTimeLeft < timeLeftToCastAgain) then
    			CastSpellByName(name);
    		end
    	end
    end
    

    Tell me if don't works or if you don't understand (or if is not what you want).

    Link to comment
    Share on other sites

    I will use parts of this. I think i will do my own code, because for rouges I have only to check 7 spells/poisons, and I know which one I want to reuse. so i dont have to check all 40 possible buffs.

     

    My solution:

    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...