3 Silly Questions, for the Price of None! menu

User Tag List

Results 1 to 9 of 9
  1. #1
    Sillyboy72's Avatar Member
    Reputation
    13
    Join Date
    Jan 2009
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    3 Silly Questions, for the Price of None!

    Hey Party Fans --

    1) How do I know if I am clear to start casting? not already casting, not in global cooldown, I suppose not stunned, etc.

    2) okay, okay... don't beg! If you really want me to continue begging for info... how do I check if my target has a specific buff/spell on them? (are you lifebloomed, rejuved, mark of the wilded). I tried taking a look at the UnitAura in IDA, but I became very concerned that my head would assplode.

    3) Lastly... what's the easiest way to control my bot via the wow cmdline? like /bot start-fishing. I saw some references to (uhh... terminology is escaping me but) registering a callback w/ lua, but that seems hairy Can I just grab the text in the console window (and my addon can just ChatFrame1:AddMessage random crap that my bot polls for).

    Thanks for any helpies.
    -Silly

    3 Silly Questions, for the Price of None!
  2. #2
    luciferc's Avatar Contributor
    Reputation
    90
    Join Date
    Jul 2008
    Posts
    373
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1) for stuns read debuffs not sure about casting

    2) i wish i knew but i never looked into it (i think ur trying for a healbot)

    3) Like a CMD promt?

    string line = Console.ReadLine();
    if (line == "saveall")
    {

  3. #3
    Sillyboy72's Avatar Member
    Reputation
    13
    Join Date
    Jan 2009
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by luciferc View Post
    1) for stuns read debuffs not sure about casting

    2) i wish i knew but i never looked into it (i think ur trying for a healbot)

    3) Like a CMD promt?

    string line = Console.ReadLine();
    if (line == "saveall")
    {
    Ya, want a heal bot.

    And sorry for some lack of clarity there... I am talking about the actual WoW console window (where you /say I Rock!)

  4. #4
    jbrauman's Avatar Member
    Reputation
    65
    Join Date
    Dec 2007
    Posts
    72
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1) How do I know if I am clear to start casting? not already casting, not in global cooldown, I suppose not stunned, etc.
    To check if you are stunned or incapacitaed you will need to read the buffs / debuffs of the object (not sure how to do.) To check if you are in the global cooldown, why not just make sure you have waited 1500ms (+ some for the lag) after the last spell cast? I'm not sure how to check if you are already casting but perhaps this will help:
    [07:14:50]: UNIT_FIELD_CHANNEL_OBJECT = 0x14

  5. #5
    Sillyboy72's Avatar Member
    Reputation
    13
    Join Date
    Jan 2009
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, the more typical problem is casting a (typically) 3 second long spell ... but getting spanked my mobs making it 4 seconds. Or putting on a bunch of haste gear, and making is 2.8 seconds. Using straight time, just isn't great.

    The channel field only seems to apply when... channeling (arcane missiles), but not during a long cast (fireball).

    So, trying to be a good little hacker, I was doing some digging. Secretly I am hoping to see green text saying "why not just do x!?"... as a reward for at least trying ;-)

    Okay, so starting at the hot lua function IsCurrentSpell (004D2AB0). Stepping through in the debugger it eventually calls:

    004D2B19 call sub_76C210

    That sub (sub_76C210) seems to returns 1 and 0, which is nice of it Tracing into that bad boy a bit, we get to...

    0076C251 call sub_76C110

    And *that* function is pretty straight forward and apparently the heart of the matter. Doing a rough translation from asm to c (cuz that's how I roll...) you get:
    Code:
    BYTE __cdecl sub_76C110(int SpellId)
    {
      int *eax = 0xFF2538;
    
      if ( *eax & 1 || !*eax )
        eax = 0;
    
      while ( !(eax & 1) && eax )
      {
        if ( *(_DWORD *)(eax + 0x20) == SpellId )
          return 1;
    
        eax = *(_DWORD *)(eax + 0x4);
      }
    
      return 0;
    }
    Which is to say 0xFF2538 points to some sort of list of items. ItemBase+0x4 is a next pointer. ItemBase+0x20 is a spell id. And if you can your spell id shows in the list... you are currently casting it.

    Why a list? I have no freakin idea. You can only cast 1 spell at time. <boggle>.

    Still, at least I can call this function repeatedly to know when I am done casting...

    I think
    -Silly

    EDIT: Just an update that I am now calling this function to know when I am done casting the current spell, and it works great!
    Last edited by Sillyboy72; 01-28-2009 at 12:23 PM.

  6. #6
    Harland's Avatar Member
    Reputation
    8
    Join Date
    Oct 2007
    Posts
    50
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I still haven't had any luck trying to find what buffs I have on I'm not sure how bobbysing does it, I tried reading his WoWX source but with no prevail.

    Here are some of the functions he uses, my problem is I don't know how to get the dwStorage of an object.

    Code:
    bool CGUnit_C::HasAura( unsigned long dwSpellID )
    {
        for( int i = 0; i < 80; i++ )
        {
            unsigned long dwCurSpellID = GetAuraSpellID( i );
    
            if( !dwSpellID || dwCurSpellID == dwSpellID )
                return true;
        }
    
        return false;
    }
    Code:
    UNIT_FIELD_AURASTATE = 0xD8,
    
    unsigned long CGUnit_C::GetAuraSpellID( unsigned long dwIndex )
    {
        return GetKnownField( UNIT_FIELD_AURASTATE + dwIndex * 4 );
    }
    Code:
    unsigned long CGObject_C::GetKnownField( unsigned long dwField )
    {
        return *(unsigned long*)( dwStorage + dwField );
    }
    If anyone has any ideas or could point me to a forum post that has already been made elsewhere let me know.

  7. #7
    RiseAndShine's Avatar Member
    Reputation
    18
    Join Date
    Jan 2009
    Posts
    27
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Buffs start at Object + 0xE34. So just do something like that:


    Code:
    public const int OBJ_UNIT_FIRST_BUFF = 0xE34;
    
            public bool hasAura(uint obj, uint auraID)
            {
                for (int i = 0; i < 80; i++)
                {
                    uint curAura = Memory.ReadUInt(hProcess, obj + OBJ_UNIT_FIRST_BUFF + (i * 4));
                    if (curAura == auraID) return true;
                }
                return false;
            }
    You can find the Spell-IDs on Thottbot, for example Stamina would be 48161. (Power Word: Fortitude - Thottbot: World of Warcraft)

  8. #8
    Harland's Avatar Member
    Reputation
    8
    Join Date
    Oct 2007
    Posts
    50
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers RiseAndShine, I'll check that out now and see how it goes.

    Edit: You are a legend worked like a treat .
    Last edited by Harland; 02-01-2009 at 03:39 AM.

  9. #9
    Sillyboy72's Avatar Member
    Reputation
    13
    Join Date
    Jan 2009
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome, thanks. Indeed alot of good info in that memory region.

    I could see HoT's showing up in the list (nothing like stack count, but still cool), and even some freaky "talent" related stuff I wouldn't have expected.

    Cross faction mostly seemed to work, could see "grace", "rapture", "see invis", "divine aegis" on the priest I clicked. Pretty hot to see talent related stuff cross faction.

    btw, if you want to convert from spellid to spellname inside wow, just use GetSpellInfo(id)

    When fighting mobs, I didn't see spells showing up here (like roots, and DoT's).

Similar Threads

  1. A question for the Mac model switchers out there...
    By iindigo in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 09-17-2007, 03:18 PM
  2. Some questions for the pros ^^
    By simmo in forum WoW ME Questions and Requests
    Replies: 6
    Last Post: 09-09-2007, 02:55 PM
All times are GMT -5. The time now is 01:16 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search