New function

  • Hey,


    while writing some luas i encounterd a problem

    You can use the function "UseSkill(a,b)" to cast a spell from the Skillbook. But you dont have ANY function to cast Setskills from the (equipped) menu. Something like

    "UseSetSkill(class in id, number)

    Incase its a good idea, here are some infos that could help


    -- return values --

    GetSuitSkill_List(class, skillID) returns name, texture path and index(no clue whats that)


    -- count setskills --

    Since the Skillbook counts the spells on each page via GetNumSkill(i) i made a counting func for setskills aswell

    Code
    function countSetskills(number)
        local i = 0
        if GetSuitSkill_List(number, 0) ~= nil then
            repeat
                i = i + 1
            until GetSuitSkill_List(number, i) == nil
        end
        return i
    end

    number is the class number (warrior 1, scout 2, rogue 3 ...; can be returned by GetClassInfoByID(number))


    other spells like GetSkillCooldown(a,b) would need an addition/new cd func aswell, this this is based off the skillbook aswell (a = skilltab (general, primary ...), b = skill1, skill2 ...)


    Im sure im not the only one who would like to see an function like this since there are a lot of macro-coders which could benefit from that function aswell

    cheers!:*


    edit:

    afaik, people are currently using the function "UseAction()" and input their ActionBar ID of the setskill. There MIGHT be another way to cast Setskills but i dont know them yet. Kitty is using the function "CastSpellByName"

  • No idea if this serves your purpose, but I feel like sharing:


    The index given by GetSuitSkill_List resembles the total order in which you have learned the skill on your charcter, thus being different for almost everyone.

    DragSuitSkill_job(index) uses this to place a certain skill on your cursor to for example then place it on the skill plate by SkillPlateReceiveDrag(0,i) with indices from (currently) 0-7, which naturally only works while out of combat.


    SkillPlateUpdate(i) returns the equipped setskills name, icon path, total cooldown, current cooldown with indices as above.


    As for using setskills I wouldnt know why you should need any additional functions to CastSpellByName or (if you want to) UseAction as they already provide enough options.


    Cheers! :thumbup:

    Think! It's not illegal yet.

    I'm just here for the drama.