Death Knight Runes menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    mordok's Avatar Member
    Reputation
    11
    Join Date
    Oct 2007
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Death Knight Runes

    Hi, since I myself had a bit of trouble finding how to calculate cooldowns for Death Knights due to the fact that runes play a vital part on cd calculation and that theres little information about how to retrive rune states in a non inyected way, I decided to post the class I did for this purpose.

    The C# class is pretty straight foward and can be easily ported to c++ or any other language except autoIt (Note: if you port it to autoIt you brain will melt and all your extremities that don't serve a moving, grabbing or noding purpose will fall to the floor )

    Anyway here you have, ready to use out of the box.
    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics;
    
    namespace yourappname
    {
        class DKRunes
        {
    
            //****UPDATE ON PATCH RELASE****
            //Current version: 3.2.2
            //SUB_573820
            uint runeState = 0x121AF44;
            uint runeType = 0x121AEC0;
            //******************************
    
    
            //----RuneType values----
            //Blood = 0
            //Frost = 2
            //Unholy = 1
            //Death = 3
            //-----------------------
    
            //WOW handle
            static IntPtr hProcess;
    
            //Base conversion variables
            const int base10 = 10;
            char[] cHexa = new char[] { 'A', 'B', 'C', 'D', 'E', 'F' };
            int[] iHexaNumeric = new int[] { 10, 11, 12, 13, 14, 15 };
            int[] iHexaIndices = new int[] { 0, 1, 2, 3, 4, 5 };
            const int asciiDiff = 48;
    
            public DKRunes()
            {
                Process.EnterDebugMode();
                hProcess = Memory.OpenProcess(Memory.GetProcessIdByProcessName("wow.exe"));
            }
    
            public String DecimalToBase(int iDec, int numbase)
            {
                string strBin = "";
                int[] result = new int[32];
                int MaxBit = 32;
                for (; iDec > 0; iDec /= numbase)
                {
                    int rem = iDec % numbase;
                    result[--MaxBit] = rem;
                }
                for (int i = 0; i < result.Length; i++)
                    if ((int)result.GetValue(i) >= base10)
                        strBin += cHexa[(int)result.GetValue(i) % base10];
                    else
                        strBin += result.GetValue(i);
                strBin = strBin.TrimStart(new char[] { '0' });
                return strBin;
            }
    
            public Boolean isBloodRuneReady()
            {
                //Rune State 
                int state = Memory.ReadInt(hProcess, runeState);
                String stateToBin = DecimalToBase(state, 2);
                char[] stateCharArray = stateToBin.ToCharArray();
    
                //Rune Type
                uint runetype1 = Memory.ReadUInt(hProcess, runeType + 0x00);
                uint runetype2 = Memory.ReadUInt(hProcess, runeType + 0x04);
                uint runetype3 = Memory.ReadUInt(hProcess, runeType + 0x10);
                uint runetype4 = Memory.ReadUInt(hProcess, runeType + 0x14);
                uint runetype5 = Memory.ReadUInt(hProcess, runeType + 0x08);
                uint runetype6 = Memory.ReadUInt(hProcess, runeType + 0x0C);
                
                if (stateCharArray[7] == '0' && stateCharArray[6] == '0')
                {
                    if (runetype1 == 3 && stateCharArray[7] == '1')
                    {
                        return true;
                    }
                    if (runetype2 == 3 && stateCharArray[6] == '1')
                    {
                        return true;
                    }
                    if (runetype3 == 3 && stateCharArray[5] == '1')
                    {
                        return true;
                    }
                    if (runetype4 == 3 && stateCharArray[4] == '1')
                    {
                        return true;
                    }
                    if (runetype5 == 3 && stateCharArray[3] == '1')
                    {
                        return true;
                    }
                    if (runetype6 == 3 && stateCharArray[2] == '1')
                    {
                        return true;
                    }
                    return false;
                }
                return true;
    
            }
    
            public Boolean isFrostRuneReady(){
                //Rune State 
                int state = Memory.ReadInt(hProcess, runeState);
                String stateToBin = DecimalToBase(state, 2);
                char[] stateCharArray = stateToBin.ToCharArray();
    
                //Rune Type
                uint runetype1 = Memory.ReadUInt(hProcess, runeType + 0x00);
                uint runetype2 = Memory.ReadUInt(hProcess, runeType + 0x04);
                uint runetype3 = Memory.ReadUInt(hProcess, runeType + 0x10);
                uint runetype4 = Memory.ReadUInt(hProcess, runeType + 0x14);
                uint runetype5 = Memory.ReadUInt(hProcess, runeType + 0x08);
                uint runetype6 = Memory.ReadUInt(hProcess, runeType + 0x0C);
    
                if (stateCharArray[3] == '0' && stateCharArray[2] == '0')
                {
                    if (runetype1 == 3 && stateCharArray[7] == '1')
                    {
                        return true;
                    }
                    if (runetype2 == 3 && stateCharArray[6] == '1')
                    {
                        return true;
                    }
                    if (runetype3 == 3 && stateCharArray[5] == '1')
                    {
                        return true;
                    }
                    if (runetype4 == 3 && stateCharArray[4] == '1')
                    {
                        return true;
                    }
                    if (runetype5 == 3 && stateCharArray[3] == '1')
                    {
                        return true;
                    }
                    if (runetype6 == 3 && stateCharArray[2] == '1')
                    {
                        return true;
                    }
                    return false;
                }
                return true;
                
            }
    
            public Boolean isUnholyRuneReady()
            {
                //Rune State 
                int state = Memory.ReadInt(hProcess, runeState);
                String stateToBin = DecimalToBase(state, 2);
                char[] stateCharArray = stateToBin.ToCharArray();
    
                //Rune Type
                uint runetype1 = Memory.ReadUInt(hProcess, runeType + 0x00);
                uint runetype2 = Memory.ReadUInt(hProcess, runeType + 0x04);
                uint runetype3 = Memory.ReadUInt(hProcess, runeType + 0x10);
                uint runetype4 = Memory.ReadUInt(hProcess, runeType + 0x14);
                uint runetype5 = Memory.ReadUInt(hProcess, runeType + 0x08);
                uint runetype6 = Memory.ReadUInt(hProcess, runeType + 0x0C);
    
                if (stateCharArray[5] == '0' && stateCharArray[4] == '0')
                {
                    if (runetype1 == 3 && stateCharArray[7] == '1')
                    {
                        return true;
                    }
                    if (runetype2 == 3 && stateCharArray[6] == '1')
                    {
                        return true;
                    }
                    if (runetype3 == 3 && stateCharArray[5] == '1')
                    {
                        return true;
                    }
                    if (runetype4 == 3 && stateCharArray[4] == '1')
                    {
                        return true;
                    }
                    if (runetype5 == 3 && stateCharArray[3] == '1')
                    {
                        return true;
                    }
                    if (runetype6 == 3 && stateCharArray[2] == '1')
                    {
                        return true;
                    }
                    return false;
                }
                return true;
    
            }
    
    
    
    
        }
    }
    
    Credits go for all that people who actually spend time helping other in this forum, even I their questions had been covered 2^99999 times, and that no matter what, they always find a way to help and cheer your day .
    Last edited by mordok; 10-26-2009 at 12:26 AM.
    "I'm not going to expose my methods for time bending, as i don't want to do get nerfed!"-Kynox

    Death Knight Runes
  2. #2
    Kryso's Avatar Active Member
    Reputation
    40
    Join Date
    Jul 2009
    Posts
    97
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You know we have loops and bitwise operators, right?

    edit:

    Code:
    string[] runeTypes = { "Blood", "Frost", "Unholy", "Death" };
    
    uint runeStates = process.Read<uint>( new IntPtr( 0x0121AF44 ) );
    for ( int i = 0; i < 6; i++ ) {
        int type = process.Read<int>( new IntPtr( 0x0121AEC0 + i * 4 ) );
        bool ready = ( runeStates & ( 1 << i ) ) == 0;
        Console.WriteLine( runeTypes[ type ] + " rune " + ( ready ? "isn't ready " : "is ready" ) );
    
        int cooldownStart = process.Read<int>( new IntPtr( 0x0121AF20 + i * 4 ) );
        Console.WriteLine( " > start: " + cooldownStart );
    }
    I've tried to find also the cooldown length, but it's done with floats and that makes my head hurt badly. Yea, I suck at reverse engineering
    Last edited by Kryso; 10-26-2009 at 05:05 AM.

  3. #3
    mordok's Avatar Member
    Reputation
    11
    Join Date
    Oct 2007
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I was trying to keep the algorithm complexity low O(1) but anyway, as a friend of mine told me programing its like painting, you could ask to different guys to paint a view from a window, and no matter that the view is the same for both, their painting will be different.

    I've tried to find also the cooldown length
    For the cooldown I used a boolean version of the cooldown method we were talking about here http://www.mmowned.com/forums/wow-memory-editing/248891-3-1-3-info-getting-spell-cooldowns.html
    plus the class I posted here so I did somthing like,
    Code:
    if(isSpellReady() && isFrostRuneReady()){
    //cast IceTouch
    }
    It worked like a charm ^^.
    Last edited by mordok; 10-26-2009 at 12:58 PM.
    "I'm not going to expose my methods for time bending, as i don't want to do get nerfed!"-Kynox

  4. #4
    Kryso's Avatar Active Member
    Reputation
    40
    Join Date
    Jul 2009
    Posts
    97
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How is converting to binary string less complex than using bitwise operator?

    And yes, it works nicely, but the bot would act a little bit better if he knew when rune will become online. For example "mm my frost runes are off, but I have unholy rune online! should I wait for frost and use death strike or throw another plague strike?"

  5. #5
    mordok's Avatar Member
    Reputation
    11
    Join Date
    Oct 2007
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea converting to binary was a little lame there ^^ (ill change that).

    I see your point, you could check if forst rune is going to be aviable in less than X ms, and if so do Death Strike rather than Plague Strike. Nice!!!

    ¿How about if you use rune start time since we know the pointer, and calculate the time just like we did with cds, with Evironment.TickCount?
    "I'm not going to expose my methods for time bending, as i don't want to do get nerfed!"-Kynox

  6. #6
    adaephon's Avatar Active Member
    Reputation
    76
    Join Date
    May 2009
    Posts
    167
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ironically mordok, your code uses O(n) structures (loops with variables controlling how long they run) whereas Kryso's is O(1) - the loop is a fixed length of 6. A loop doesn't make code O(n) or >O(1) simply by its presence.

  7. #7
    Kryso's Avatar Active Member
    Reputation
    40
    Join Date
    Jul 2009
    Posts
    97
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by mordok View Post
    ¿How about if you use rune start time since we know the pointer, and calculate the time just like we did with cds, with Evironment.TickCount?
    How do you want to calculate when rune will be ready again, if you don't know how long it takes to recharge? It's by default 10 seconds, but what about unholy presence and improved unholy presence? I'll try to look at it again tomorrow.

  8. #8
    mordok's Avatar Member
    Reputation
    11
    Join Date
    Oct 2007
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the worst scenario, (and just like a solution NOTE: this isnt the best solution) I guess you could always handle timers in a separated thread with Thread.sleep(x); and where x input 10000 or the value you need acording to unholy pressence o improved pressence (you could read talentes, auras or any other external factor to decide x value).

    Adaephon, I didnt calculated the complexity of my method I just sed that when I did it I was trying to keep it simple (I agree Kryso´s method is good)
    Last edited by mordok; 10-26-2009 at 09:59 PM.
    "I'm not going to expose my methods for time bending, as i don't want to do get nerfed!"-Kynox

  9. #9
    Borean's Avatar Contributor
    Reputation
    103
    Join Date
    Sep 2009
    Posts
    9
    Thanks G/R
    2/36
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks for the code.

    I've condensed it a little - feel free to flame my code though, it's the best way that I learn

    Code:
            static public bool RuneReady(int number)
            {
                return ((Connection.wow.ReadByte(runeState) & (1 << number)) != 0);
            }
    
            static public int RuneType(int number)
            {
                return Connection.wow.ReadByte(runeType + (uint)(0x04 * number));
            }
            
            static public int getRunes(int type) //0, 1, 2 : blood, unholy, frost
            {
                int available = 0;
    
                for (int i = 0; i < 6; i++)
                {
                    if (RuneReady(i))
                        if (RuneType(i) == 3 || RuneType(i) == type) //type 3 = death rune
                            available++;
                }
    
                return available;
            }
    The getRunes() function returns how many useable runes are available for a certain rune type.

  10. #10
    mordok's Avatar Member
    Reputation
    11
    Join Date
    Oct 2007
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did anyone noticed something wired with the latest update I mean reading the new values for
    //Current version: 3.3.0
    //SUB_584750 //3.2.2 SUB_573820
    uint runeState = 0xC3CB50; //3.2.2 0x121AF44;
    uint runeType = 0xC3CACC; //3.2.2 0x121AEC0;

    just returns -1????

    ¿¿¿¿any ideas of what the could have changed???? anyone else having this issue?
    Last edited by mordok; 01-06-2010 at 06:59 AM.
    "I'm not going to expose my methods for time bending, as i don't want to do get nerfed!"-Kynox

  11. #11
    mordok's Avatar Member
    Reputation
    11
    Join Date
    Oct 2007
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just wondering if the changed the way rune times are stored. Althought the funtions are identical.
    "I'm not going to expose my methods for time bending, as i don't want to do get nerfed!"-Kynox

  12. #12
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thx guys - was just able to implement on OS X :-)

    @mordok - I don't think the function has changed @ all, I just created a variable for OS X:

    Code:
    	MemoryAccess *memory = [controller wowMemoryAccess];
    	UInt32 runeState = 0, runeType = 0, cooldownStart = 0, cooldownEnd = 0;
    	[memory loadDataForObject: self atAddress: 0xE02904 Buffer: (Byte*)&runeState BufLength: sizeof(runeState)];
    
    	int i;
    	NSArray *runes = [NSArray arrayWithObjects: @"Blood", @"Unholy", @"Frost", @"Death", nil];
    	for ( i = 0; i < 6; i++ ){
    		[memory loadDataForObject: self atAddress: 0xE028C0 + (i*4) Buffer: (Byte*)&runeType BufLength: sizeof(runeType)];
    		BOOL ready = ( runeState & (1 << i ) ) == 0;
    		
    		PGLog(@"%@ rune %@", [runes objectAtIndex:runeType], ready ? @"isn't ready" : @"is ready");
    		
    		[memory loadDataForObject: self atAddress: 0xE02920 + (i*4) Buffer: (Byte*)&cooldownStart BufLength: sizeof(cooldownStart)];
    		[memory loadDataForObject: self atAddress: 0xE02920 + (i*4) + 0x20 Buffer: (Byte*)&cooldownEnd BufLength: sizeof(cooldownEnd)];
    		PGLog(@" --> CD Start: 0x%X  CD End:  0x%X", cooldownStart, cooldownEnd);
    		PGLog(@" --> CD diff: %d", cooldownEnd - cooldownStart);
    	}
    https://tanaris4.com

  13. #13
    mordok's Avatar Member
    Reputation
    11
    Join Date
    Oct 2007
    Posts
    103
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Humm... I just relized that if you dont use any spell and read the memory it gives a -1 value, but after using a spell then all works like a charm again ^^ returned value is 255 therefore 11111111 bin value ^^.
    "I'm not going to expose my methods for time bending, as i don't want to do get nerfed!"-Kynox

  14. #14
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    if((unsigned char)-1 == 255)
    	std::cout << "You're reading it wrong.";

  15. #15
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why don't you use something like:
    var state = (BitVector32)Connection.wow.ReadObject(runeState, typeof(BitVector32));

    and a struct for the types

    var types = (SomeStructThatHolds6IntegersOrW/e)Connection.wow.ReadObject(runeState, typeof(SomeStructThatHolds6IntegersOrW/e));


    BitVector32 Structure (System.Collections.Specialized)

    instead of?
    int state = Memory.ReadInt(hProcess, runeState);
    String stateToBin = DecimalToBase(state, 2);
    char[] stateCharArray = stateToBin.ToCharArray();

    //Rune Type
    uint runetype1 = Memory.ReadUInt(hProcess, runeType + 0x00);
    uint runetype2 = Memory.ReadUInt(hProcess, runeType + 0x04);
    uint runetype3 = Memory.ReadUInt(hProcess, runeType + 0x10);
    uint runetype4 = Memory.ReadUInt(hProcess, runeType + 0x14);
    uint runetype5 = Memory.ReadUInt(hProcess, runeType + 0x0;
    uint runetype6 = Memory.ReadUInt(hProcess, runeType + 0x0C);


    Last edited by Nesox; 01-07-2010 at 01:47 PM.

Page 1 of 2 12 LastLast

Similar Threads

  1. Death Knight Runes
    By turtlemans in forum PE Support forum
    Replies: 2
    Last Post: 11-30-2016, 12:56 AM
  2. Death Knights runes
    By kisjaksi in forum WoW Memory Editing
    Replies: 3
    Last Post: 08-19-2010, 04:51 AM
  3. Reading Death Knight rune states from memory
    By ~Unknown~ in forum WoW Memory Editing
    Replies: 9
    Last Post: 06-09-2010, 11:15 AM
  4. [Death Knight] Use Dancing Rune Blade ALL THE TIME
    By neax1337 in forum World of Warcraft Exploits
    Replies: 16
    Last Post: 11-18-2008, 02:21 PM
All times are GMT -5. The time now is 02:20 PM. 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