[QUESTION] GetSpellIDByName (3.3.5a) menu

User Tag List

Results 1 to 13 of 13
  1. #1
    Natrist's Avatar Member
    Reputation
    11
    Join Date
    Mar 2013
    Posts
    146
    Thanks G/R
    9/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [QUESTION] GetSpellIDByName (3.3.5a)

    Hi,

    I was wondering if anyone knew how to use the GetSpellIDByName function on patch 3.3.5a.
    I've been trying with various variable types and it always crashes.

    Has anyone here been able to successfully return the spell ID?

    [QUESTION] GetSpellIDByName (3.3.5a)
  2. #2
    =manzarek='s Avatar Member
    Reputation
    3
    Join Date
    Feb 2010
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Last edited by =manzarek=; 10-16-2013 at 04:39 PM.

  3. #3
    Natrist's Avatar Member
    Reputation
    11
    Join Date
    Mar 2013
    Posts
    146
    Thanks G/R
    9/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks but that won't help me for what I'm trying to do. I'll however look into GetSpellInfo(ID);

  4. #4
    Natrist's Avatar Member
    Reputation
    11
    Join Date
    Mar 2013
    Posts
    146
    Thanks G/R
    9/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bump. Still need help.

  5. #5
    miceiken's Avatar Contributor Authenticator enabled
    Reputation
    208
    Join Date
    Dec 2007
    Posts
    401
    Thanks G/R
    7/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe you should explain a bit more what you're trying to achieve and how/what you tried. Right now, you are asking for spoonfeeding.

    Also, have a look at:
    https://github.com/miceiken/IceFlake...lCollection.cs
    https://github.com/miceiken/IceFlake...ts/WoWSpell.cs

  6. #6
    Natrist's Avatar Member
    Reputation
    11
    Join Date
    Mar 2013
    Posts
    146
    Thanks G/R
    9/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm trying to get the spell ID by name.
    Basically the function takes two arguments, both integers, but I don't know what to pass to them.

  7. #7
    JuJuBoSc's Avatar Banned for scamming CoreCoins Purchaser
    Reputation
    1019
    Join Date
    May 2007
    Posts
    922
    Thanks G/R
    1/3
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well just take a look at how the func is called and how args is handled, from what I see first arg is the char* of the spell name, and second a reference to a DWORD.

  8. #8
    =manzarek='s Avatar Member
    Reputation
    3
    Join Date
    Feb 2010
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    post your code

  9. #9
    Turtle25's Avatar Member
    Reputation
    1
    Join Date
    Jan 2023
    Posts
    14
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is the method i am using

    Code:
    int GetSpellIdByName(lua_State* L)
    {
        // Check if the first argument is a string.
        if (!lua_isstring(L, 1))
        {
            // If not, display an error message.
            DisplayError(L, "GetSpellIdFromName: Invalid argument. Expected a string.");
            lua_pushnil(L); // Push nil onto the Lua stack to represent an error.
            return 1;       // Return the number of values pushed onto the stack (1 in this case).
        }
    
        // Convert the Lua string argument to a C string.
        const char* SpellName = ToString(L, 1);
    
        // Variables to store the rank and SpellId.
        int rank;
        int Spellid = ((int(__cdecl*)(const char*, int*))0x00540200)(SpellName, &rank);
    
        // Push the SpellId onto the Lua stack and return 1 (number of values pushed).
        lua_pushinteger(L, Spellid);
        return 1;
    }

  10. #10
    maikel233's Avatar Contributor
    Reputation
    137
    Join Date
    Sep 2010
    Posts
    110
    Thanks G/R
    38/64
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    For a moment i thought there was a active topic. But you replied to a 10 year old topic... Good job

  11. #11
    Turtle25's Avatar Member
    Reputation
    1
    Join Date
    Jan 2023
    Posts
    14
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Id love a active wotlk 3.3.5a topic sharing idea's and stuff but seems to me no one really working on wotlk anymore.

  12. #12
    unsigned's Avatar Member
    Reputation
    2
    Join Date
    Jul 2023
    Posts
    14
    Thanks G/R
    11/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm working on an internal, just don't post much, have been learning from previous posts Currently figuring out calling these Lua funcs

  13. #13
    Turtle25's Avatar Member
    Reputation
    1
    Join Date
    Jan 2023
    Posts
    14
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you are up for sharing knowledge and want to chat, message me and well exchange discords. i am more then happy to share with people willing to learn

  14. Thanks unsigned (1 members gave Thanks to Turtle25 for this useful post)

Similar Threads

  1. Model Changing Question
    By MasterYuke in forum World of Warcraft General
    Replies: 6
    Last Post: 09-17-2006, 09:56 PM
  2. Couple Private Server questions
    By Jboz in forum World of Warcraft General
    Replies: 21
    Last Post: 07-26-2006, 07:37 PM
  3. Sorry..newb mail question
    By nolbishop in forum World of Warcraft General
    Replies: 2
    Last Post: 06-07-2006, 07:21 PM
  4. Question..
    By janzi9 in forum Community Chat
    Replies: 3
    Last Post: 04-02-2006, 10:20 AM
  5. A GALB question
    By bassman in forum World of Warcraft General
    Replies: 4
    Last Post: 03-28-2006, 09:49 AM
All times are GMT -5. The time now is 03:12 AM. 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