[Offsets] Hotfix#22 - Geterrormessage, _Isplayermoving.. _Isagro + Example Code menu

User Tag List

Results 1 to 1 of 1
  1. #1
    jayswag's Avatar Sergeant
    Reputation
    15
    Join Date
    Mar 2011
    Posts
    44
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Offsets] Hotfix#22 - Geterrormessage, _Isplayermoving.. _Isagro + Example Code

    This is my original post from mmoelites figured Id share it here aswell


    hey guys some of the stuff I needed for my bot was to see the current error message,... the length of that message , if the player is moving and if a player has agro or should I say "being attacked by an agro mob" return 1... simple stuff, but much needed for certain functions...


    Code:
                public const uint Playerbase = 0x0F48C20;
                public const uint IsAgroStatic = 0x0E30A25;
                public const uint ErrorMsgBase = 0x0E25380;
                public const uint ErrorMsgOffs = 0x0;
                //IsRunningbase+offs
                public const uint RunBase1 = 0x17C;
                public const uint RunBase2 = 0x270;
                public const uint RunBase3 = 0x004;
                public const uint RunBase4 = 0x024;
                public const uint IsPlayerRunningOffset = 0x175;


    Example code for _IsMoving Function...

    Code:
     //getrunningbase
                    RunningBase = Rift.ReadUInt(playerBase + PlayerData.RunBase1);
                    RunningBase = Rift.ReadUInt(RunningBase + PlayerData.RunBase2);
                    RunningBase = Rift.ReadUInt(RunningBase + PlayerData.RunBase3);
                    RunningBase = Rift.ReadUInt(RunningBase + PlayerData.RunBase4);
                    
                    public static bool _IsMoving(BlackPosion Rift)
                    {
                          var IsMoving = 0;
                          IsMoving = Rift.ReadByte(RunningBase + PlayerData.IsPlayerRunningOffset);
                          if (IsMoving == 1)
                          {
                                  Console.WriteLine("Toon is moving!!");
                                   return (true);
                          }
                    return (false);
                 }
    Example for _IsAgro()

    Code:
    public static bool _IsAgro(BlackPosion Rift)
            {
                var IsAgro = 0;
                IsAgro = Rift.ReadByte((uint) _baseAddress(Rift) + PlayerData.IsAgroStatic);
                if (IsAgro == 1)
                {
                    Report("::Agro Detected!");
                    return (true);
                }
                return (false);
            }
    And last but not least the error messages!! (I hard coded the length since Im lazy and dont even need the function that much... so buzz off! lol

    Code:
    public static string GetErrorMessage(BlackPosion Rift)
            {
                var lenbase = Rift.ReadUInt((uint) _baseAddress(Rift) + 0x0E20CDC);
                lenbase = Rift.ReadUInt(lenbase + 0x5E4);
                lenbase = Rift.ReadUInt(lenbase + 0x340);
                lenbase = Rift.ReadUInt(lenbase + 0x1D0);
                lenbase = Rift.ReadUInt(lenbase + 0x0);
                int strLen = Rift.ReadByte(lenbase + 0x53);
                Report("Error Message Length: " + strLen);
    
                var errorbase = Rift.ReadUInt((uint) _baseAddress(Rift) + PlayerData.ErrorMsgBase);
                var ErrorMsg = Rift.ReadUnicodeString(errorbase + PlayerData.ErrorMsgOffs, strLen);
                Report("Error Message: " + ErrorMsg);
                if (ErrorMsg == "You are too far away")
                    return ("ToFarAway");
                if (ErrorMsg == "You must be facing your target!")
                    return ("NotFacing");
                else
                {
                    return (ErrorMsg);
                }
            }
    sorry if some of my names confuzzzzeeeees you, but hey what can you do!

    plz press thanks DiS iS WhY We pOsT!


    Hope this helps someone!

    -jay(aceticsoft.com)

    edit* and just incase anyone needs to see my _baseAddress() function
    Code:
    public static int _baseAddress(BlackPosion Rift)
            {
                int baseaddress = Rift.MainModule.BaseAddress.ToInt32();
                return (baseaddress);
            }

    Edit*** Fixed the CurrentErrorMessage...
    public const uint ErrorMsgBase = 0x0E25380; + 0x0 -->should point to CurrentErrorMessage
    Last edited by jayswag; 05-03-2011 at 02:15 PM.

    [Offsets] Hotfix#22 - Geterrormessage, _Isplayermoving.. _Isagro + Example Code
All times are GMT -5. The time now is 04:04 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