Getting the Area name menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Chumbax's Avatar Private
    Reputation
    1
    Join Date
    Feb 2013
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting the Area name

    I've been trying to get the area name, but with some problems.

    This returns the correct value if the "name" is long enought
    Code:
    Memory.ReadString(0x180437c + 0x29, 100);
    But if the Area name is "Stonefort" it reads the "old" value togheter with the new.
    "Stonefort Level 1" etc.

    How do I make it so that it only reads the "current" area and don't apply the old togheter with the new?
    Greetings

    Getting the Area name
  2. #2
    enigma32's Avatar Legendary
    Reputation
    912
    Join Date
    Jan 2013
    Posts
    551
    Thanks G/R
    4/738
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How is the ReadString method implemented? Keep in mind it probably is a null-terminated string that you are trying to read. Anything after, (and including '\0' depending on language) is junk and is not considered valid data.

  3. #3
    Chumbax's Avatar Private
    Reputation
    1
    Join Date
    Feb 2013
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its Loot Alert source. Do I check in ReadString if its the value is null ?

    Code:
      public string ReadString(int addr, int length, bool ascii = true)
            {
                if (ascii == false)
                    return Encoding.Unicode.GetString(ReadMem(addr, length));
                return Encoding.ASCII.GetString(ReadMem(addr, length));
            }

  4. #4
    enigma32's Avatar Legendary
    Reputation
    912
    Join Date
    Jan 2013
    Posts
    551
    Thanks G/R
    4/738
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's how I convert bytes into a string:
    Code:
    private string ReadString(byte[] buffer, int offset, int length)
    {
        return Encoding.ASCII.GetString(
            buffer,
            offset,
            length)
            .Split('\0')[0];
    }
    Note how I split the string on all '\0' (null) chars, then just take the first part.

  5. #5
    Chumbax's Avatar Private
    Reputation
    1
    Join Date
    Feb 2013
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by enigma32 View Post
    Here's how I convert bytes into a string:
    Code:
    private string ReadString(byte[] buffer, int offset, int length)
    {
        return Encoding.ASCII.GetString(
            buffer,
            offset,
            length)
            .Split('\0')[0];
    }
    Note how I split the string on all '\0' (null) chars, then just take the first part.
    Works like a charm, but I had to get the index at 5 instead of 0. Thanks Enigma32

  6. #6
    enigma32's Avatar Legendary
    Reputation
    912
    Join Date
    Jan 2013
    Posts
    551
    Thanks G/R
    4/738
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're welcome

    And, that's because the address or offset isn't quite right.
    Example of what is read:
    Code:
    "\0\0\0Bastion's Keep Stronghold\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
    As you can (hopefully) see the address should start 3 bytes later.

    Not sure why you get it to work at index 5 though since for me I get index 3 (0,1,2 contains '\0'),
    I'd say the correct address is "0x180437c + 0x2c".

Similar Threads

  1. I need to get the last name to an account.
    By mudfish in forum World of Warcraft General
    Replies: 1
    Last Post: 07-04-2008, 03:45 AM
  2. How to get the last name of the account you scammed
    By anxius in forum WoW Scam Prevention
    Replies: 5
    Last Post: 06-13-2008, 05:11 PM
  3. [HOW TO] Get the Last Name of your account...!!!!
    By LAFD in forum WoW Scam Prevention
    Replies: 9
    Last Post: 02-25-2008, 07:25 PM
  4. How to get the second name of a scammed account.
    By Discto in forum WoW Scam Prevention
    Replies: 16
    Last Post: 02-14-2008, 02:10 PM
  5. A way of getting the last name
    By Nomiss in forum WoW Scam Prevention
    Replies: 3
    Last Post: 11-10-2007, 12:58 PM
All times are GMT -5. The time now is 09:14 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