Rogue Combat System menu

User Tag List

Results 1 to 11 of 11
  1. #1
    Spildabongwada's Avatar Member
    Reputation
    4
    Join Date
    Oct 2009
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rogue Combat System

    I have just recently started picking up AutoIt. I'm working on a "combat system" for the rogue, basically, a bot to handle rogue combat. The bot is supposed to initiate upon pressing F1, Start auto attacking, and Sinister Strike if your character has enough energy. It's simple, and it's a starting point.

    However, as the bot stands, it only attacks and not Sinister Strikes. Here is the code I am using:
    Code:
    ;----------------------------------
    ;     Rouge Combat System v1.1
    ;----------------------------------
    #include <NomadMemory.au3>
    
    ;----------------------------------
    ; Hotkeys
    ;----------------------------------
    HotKeySet("{F1}", "ToggleCombat")
    HotKeySet("{ESC}", "Terminate")
    
    Global $UnPause
    
    ;Setting privilege
    SetPrivilege( "SeDebugPrivilege", 1 )
    
    ; 3.2.2 Updated
    Global Const $CurrentEnergy = 0x1B * 4
    Global Const $MaxEnergy = 0x23 * 4
    Global Const $CurrentComboPoints = 0x0113D849
    
    While 1
        Sleep(100)
        ToolTip("Rouge Combat System Loaded",0,0)
    WEnd
    
    Func ToggleCombat()
    	$UnPause = NOT $UnPause
    	While $UnPause
    		ToolTip("Rogue Combat System Running...",0,0)
    		Send("{1}")
    		Sleep(200)
    
    $wow = _MemoryOpen(WinGetProcess("World of Warcraft"))
    $Energy = _MemoryRead("0x" & hex($CurrentEnergy), $wow, "dword")
    $ComboPoints = _MemoryRead("0x" & hex($CurrentComboPoints), $wow, "dword")
    
    			If $Energy > 45 Then
    				Send("{2}")
    				Sleep(200)
    			EndIf
    	WEnd
    EndFunc ;==> ToggleCombat
    
    	Func Terminate()
    		Exit 1
    	EndFunc
    I believe my problem lies somewhere in the way I am trying to retrieve my energy value.

    I've been searching for a while now but I cannot seem to find anything to help me out. Can anyone give me a sense of direction in fixing my code, I feel lost right now. I apologize for my lack of knowledge on the subject.

    Thanks for reading

    Rogue Combat System
  2. #2
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not going to be that simple. You have to find the base address of your player. Then read from that address + 0x8 and then add the offset for energy to that and read and it will give you your energy. There is a lot of examples of autoit scripts that will find your playerbase in here. Just look down a few threads/pages.

  3. #3
    Spildabongwada's Avatar Member
    Reputation
    4
    Join Date
    Oct 2009
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by lanman92 View Post
    It's not going to be that simple. You have to find the base address of your player. Then read from that address + 0x8 and then add the offset for energy to that and read and it will give you your energy. There is a lot of examples of autoit scripts that will find your playerbase in here. Just look down a few threads/pages.
    Thanks, this is what I have now but it still is giving me the same problem

    Code:
    ;----------------------------------
    ;     Rouge Combat System v1.1
    ;----------------------------------
    #include <NomadMemory.au3>
    
    ;----------------------------------
    ; Hotkeys
    ;----------------------------------
    HotKeySet("{F1}", "ToggleCombat")
    HotKeySet("{ESC}", "Terminate")
    
    Global $UnPause
    
    ;Setting privilege
    SetPrivilege( "SeDebugPrivilege", 1 )
    
    ;----------------------------------
    ; 3.2.2 Updated
    ;----------------------------------
    Global Const $PlayerBaseStatic = 0x010B65F4   ;Static Offset
    Global Const $GetSpellIdByName = 0x004ED910
    Global Const $CastSpellById = 0x007C4510
    Global Const $TargetGuid = 0x12 * 4
    Global Const $BaseAttackTime = 0x3D * 4
    Global Const $CurrentHealth = 0x17 * 4
    Global Const $MaxHealth = 0x1F * 4
    ;Global Const $CurrentMana = 0x18 * 4 -- Not Used for Rouge Combat System
    ;Global Const $MaxMana = 0x20 * 4 -- Not Used for Rouge Combat System
    ;Global Const $CurrentRage = 0x19 * 4 -- Not Used for Rouge Combat System
    Global Const $GetCurrentEnergy = 0x1B * 4
    Global Const $GetMaxEnergy = 0x23 * 4
    Global Const $CurrentComboPoints = 0x0113D849
    Global Const $p1 = 0x8
    Global Const $wow = _memoryopen(WinGetProcess("World of Warcraft")) ;Open WoW
    
    While 1
        Sleep(100)
        ToolTip("Rouge Combat System Loaded",0,0)
    WEnd
    
    Func ToggleCombat()
    	$UnPause = NOT $UnPause
    	While $UnPause
    		ToolTip("Rogue Combat System Running...",0,0)
    		Send("{1}")
    		Sleep(200)
    
    ;Gets base addresses
    $lvl1Pointer = _MemoryRead('0x' & hex($PlayerBaseStatic), $wow , 'uint')
    $lvl2Pointer = _MemoryRead('0x' & hex($lvl1Pointer + 0x34), $wow , 'uint')
    $PlayerBase = _MemoryRead('0x' & hex($lvl2Pointer + 0x24), $wow , 'uint')
    
    $En = _MemoryRead('0x' & hex($PlayerBase + $p1), $wow , 'uint')
    $CurrentEnergy = _MemoryRead(($En + $GetCurrentEnergy), $wow, 'uint') ; Current Energy
    $MaxEnergy = _MemoryRead(($En + $GetMaxEnergy), $wow, 'uint') ; Max Energy
    
    If $CurrentEnergy > 45 Then
    				Send("{2}")
    				Sleep(200)
    			EndIf
    	WEnd
    EndFunc ;==> ToggleCombat
    
    	Func Terminate()
    		Exit 1
    	EndFunc

  4. #4
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you ever try just commenting out your actual code and just seeing if you can read your energy and combo points right?

  5. #5
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Generic descriptor thread...

    Energy is UNIT_POWER_3, you are using UNIT_POWER_4
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  6. #6
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If im not mistaken

    Replace:
    Global Const $GetCurrentEnergy = 0x1B * 4
    With:
    Global Const $GetCurrentEnergy = 0X1A * 4

    Also getting your max power is wrong...

    Replace:
    Global Const $GetMaxEnergy = 0x23 * 4
    With:
    Global Const $GetMaxEnergy = 0x22 * 4

    Also It might help to make your pointers(or what ever you want to call them) in another Include, Makes it much easier to update after a patch.

    Just paste all pointer into another file just make sure you remove the Global first. Then at the top of your script add:
    #Include <*whatever you saved your file as*.au3>

    PM me if you want more help with pointers
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  7. #7
    Spildabongwada's Avatar Member
    Reputation
    4
    Join Date
    Oct 2009
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Robske View Post
    Generic descriptor thread...

    Energy is UNIT_POWER_3, you are using UNIT_POWER_4
    Originally Posted by XAutomation View Post
    If im not mistaken

    Replace:
    Global Const $GetCurrentEnergy = 0x1B * 4
    With:
    Global Const $GetCurrentEnergy = 0X1A * 4

    Also getting your max power is wrong...

    Replace:
    Global Const $GetMaxEnergy = 0x23 * 4
    With:
    Global Const $GetMaxEnergy = 0x22 * 4

    Also It might help to make your pointers(or what ever you want to call them) in another Include, Makes it much easier to update after a patch.

    Just paste all pointer into another file just make sure you remove the Global first. Then at the top of your script add:
    #Include <*whatever you saved your file as*.au3>

    PM me if you want more help with pointers
    I have tried using 3:
    Code:
    Global Const $GetCurrentEnergy = 0x1B * 3
    Global Const $GetMaxEnergy = 0x23 * 3
    And I have tried:
    Code:
    Global Const $GetCurrentEnergy = 0x1A * 4
    Global Const $GetMaxEnergy = 0x22 * 4
    I even gave this a whirl:
    Code:
    Global Const $GetCurrentEnergy = 0x1A * 3
    Global Const $GetMaxEnergy = 0x22 * 3
    Still the same problem exists.

  8. #8
    kalixe's Avatar Member
    Reputation
    12
    Join Date
    Nov 2009
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Who knows ?

  9. #9
    mnbvc's Avatar Banned
    Reputation
    120
    Join Date
    Jul 2009
    Posts
    273
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i believe i tested it in the beginning and it worked, but never really used it :P
    in my bot i read this for energy:

    return Memory.ReadInt32(DescriptorFields + CurrentEnergyOffset);

    CurrentEnergyOffset = UNIT_FIELD_POWER4 = end_object + 0x54,
    end_object = 0x6 * 4;

  10. #10
    Spildabongwada's Avatar Member
    Reputation
    4
    Join Date
    Oct 2009
    Posts
    18
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kalixe View Post
    Who knows ?
    Good question, that was sorta the intent of this thread...

    Originally Posted by mnbvc View Post
    i believe i tested it in the beginning and it worked, but never really used it :P
    in my bot i read this for energy:

    return Memory.ReadInt32(DescriptorFields + CurrentEnergyOffset);

    CurrentEnergyOffset = UNIT_FIELD_POWER4 = end_object + 0x54,
    end_object = 0x6 * 4;
    So is energy power 4 or 3? Confused now pretty much. How Can I go about finding which power number (If I'm using that correctly) means which anyway? There are like 7 different ones that all look the same to me and don't really describe which is which. (In reference to the 3.2.2 dump sticky)
    /* offsets:[d:0x0018]:[b:0x0060] */ unsigned long UNIT_FIELD_POWER1;
    /* offsets:[d:0x0019]:[b:0x0064] */ unsigned long UNIT_FIELD_POWER2;
    /* offsets:[d:0x001A]:[b:0x0068] */ unsigned long UNIT_FIELD_POWER3;
    /* offsets:[d:0x001B]:[b:0x006C] */ unsigned long UNIT_FIELD_POWER4;
    /* offsets:[d:0x001C]:[b:0x0070] */ unsigned long UNIT_FIELD_POWER5;
    /* offsets:[d:0x001D]:[b:0x0074] */ unsigned long UNIT_FIELD_POWER6;
    /* offsets:[d:0x001E]:[b:0x0078] */ unsigned long UNIT_FIELD_POWER7;
    Again, sorry for being so intermediate on you guys. lol
    Last edited by Spildabongwada; 12-08-2009 at 11:29 AM.

  11. #11
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Look at UnitPowerType on wowwiki. It's the same enum used for that as for the descriptors. Same order.

Similar Threads

  1. [Selling] Vitalic Elite Rogue Combat Routine | Classic
    By vitalic in forum World of Warcraft Buy Sell Trade
    Replies: 13080
    Last Post: 2 Weeks Ago, 04:30 AM
  2. WoW 1.12.1 Rogue combat cr - Vanilla Botter/Racial/Poisons supported
    By highs in forum WoW Bot Maps And Profiles
    Replies: 4
    Last Post: 06-17-2018, 07:15 PM
  3. [Selling] Vitalic Elite Rogue Combat Routine | Classic
    By vitalic in forum WoW Private Server Buy Sell Trade
    Replies: 10072
    Last Post: 09-15-2015, 10:54 AM
  4. Replies: 1
    Last Post: 07-13-2010, 05:06 PM
  5. Rogues, Combat Spec,
    By Illegalpie in forum World of Warcraft Exploits
    Replies: 15
    Last Post: 02-21-2009, 04:05 AM
All times are GMT -5. The time now is 03:15 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