• 0

    posted a message on Finding Spell ID - Driving me insane
    Thanks a heap guys, that works perfectly. Just for a conclusion I will place the full code here that will simply print the spell ID in say for anyone who wishes to know.
    function GetSpellID(spell)
       
       local name
       
       for i = 1, 100000 do
          
          name = GetSpellInfo(i)
          
          if name == spell then
             
             return i
             
          end
          
       end
       
    end
    local spellID = GetSpellID("Mighty Strength")
    SendChatMessage(""..spellID.."","SAY", ORCISH)


    Thanks heaps again guys, that has be plaguing me for a very long time
    Posted in: AddOn HELP!
  • 0

    posted a message on Finding Spell ID - Driving me insane
    I have rectified the problem I with an old mod that I updated to work with wrath flasks/elixirs so my addon woes are over. However, I still have no bloody idea how to get spell ID's.

    I am very much a newbie at the lua thing, and although someone gave me a fish(give a man a fish he eats for a day etc...) in the form of some script i still have no idea how to implement it.

    I think if anyone could give an example of using this with say a chat message output for the spell ID it would help more people than just myself. I have been all over forums searching for a solution and this is a last resort. Here is the script:
    function GetSpellID(spell)
    
        local name
    
        for i = 1, 100000 do
    
            name = GetSpellInfo(i)
    
            if name == spell then
    
                return i
    
            end
    
        end
    
    end
    

    courtesy of Treader on Cenarion Circle

    Any help would be appreciated
    Posted in: AddOn HELP!
  • To post a comment, please or register a new account.