Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
9.44 addresses and changes - ONLY HERE! - Page 9
Page 9 of 13 FirstFirst ... 7891011 ... LastLast
Results 81 to 90 of 127

Thread: 9.44 addresses and changes - ONLY HERE!

  1. #81
    Senior Member
    Join Date
    Aug 2010
    Posts
    532

    RE: 9.44 addresses and changes - ONLY HERE!

    Something changed in the Map structure?

    Sometimes when I"m checking a tile look's like that it's getting another tile from another floor, really weird.

  2. #82
    Super Moderator
    Join Date
    May 2007
    Posts
    1,191

    RE: 9.44 addresses and changes - ONLY HERE!

    Quote Originally Posted by maozao
    Something changed in the Map structure?

    Sometimes when I"m checking a tile look's like that it's getting another tile from another floor, really weird.
    The code that klusbert added/changed in TibiaAPI was written by me, and sadly there is a minor bug in it. I told him about it a while ago, but he must have forgotten to patch it.

    This is TibiaAPI's current code:
    [code=c#]
    private Tile GetTile(Location worldLocation, Tile playerTile)
    {
    // All credits goes to blaster_89 who solved this.
    if (playerTile == null) { playerTile = GetTileWithPlayer(); }
    Location memLoc = worldLocation.ToMemoryLocation(playerTile,client);
    uint num = memLoc.ToTileNumber();

    int minFloor = 0, maxFloor = 0;
    for (int i = 0; i < 8; i++)
    {
    if (playerTile.TileNumber >= Addresses.Map.MaxTiles * i &&
    playerTile.TileNumber <= Addresses.Map.MaxTiles * (i + 1))
    {

    minFloor = Convert.ToInt32(Addresses.Map.MaxTiles * i);
    maxFloor = Convert.ToInt32(Addresses.Map.MaxTiles * (i + 1) - 1);
    break;
    }
    }
    if (num > maxFloor) { num = Convert.ToUInt32(num - maxFloor + minFloor - 1); }
    else if (num < minFloor) { num = Convert.ToUInt32(maxFloor - minFloor + num + 1); }
    return GetTile(num, playerTile);
    }

    [/code]

    and this is my current code:
    [code=c#]
    internal Tile GetTile(int X, int Y, Tile playerTile)
    {
    if (playerTile == null) playerTile = GetPlayerTile();
    Location memLoc = WorldLocationToMemoryLocation(new Location(X, Y, playerTile.WorldLocation.Z), playerTile);
    int num = MemoryLocationToTileNumber(memLoc);
    int minFloor = 0, maxFloor = 0;
    for (int i = 0; i < 8; i++)
    {
    if (playerTile.TileNumber >= Client.Addresses.Map.MaxTilesPerFloor * i &&
    playerTile.TileNumber < Client.Addresses.Map.MaxTilesPerFloor * (i + 1))
    {
    minFloor = Client.Addresses.Map.MaxTilesPerFloor * i;
    maxFloor = Client.Addresses.Map.MaxTilesPerFloor * (i + 1) - 1;
    break;
    }
    }
    if (num > maxFloor) { num = num - maxFloor + minFloor - 1; }
    else if (num < minFloor) { num = maxFloor - minFloor + num + 1; }
    return GetTile(num, playerTile);
    }

    internal Tile GetTile(Location loc, Tile playerTile)
    {
    if (playerTile == null) playerTile = GetPlayerTile();
    return GetTile(loc.X, loc.Y, playerTile);
    }
    [/code]

    Note that this will only return tiles on the same floor.

  3. #83
    Senior Member
    Join Date
    Aug 2010
    Posts
    532

    RE: 9.44 addresses and changes - ONLY HERE!

    Thank you Blaster, I made some modifications and look's like that it's working better now.

    I will try to test it more to find if it is working 100% for now.

    Thank you again.

  4. #84
    Junior Member
    Join Date
    Nov 2009
    Posts
    3

    RE: 9.44 addresses and changes - ONLY HERE!

    Can't seem to make it work for some reason >.<


    Code:
                        internal static int XoR = 0x3ABF8C;// (
                        internal static int HP = 0x541000;// 
    
                int HP = Memory.ReadByte(Addresses.Player.HP) + Addresses.baseAddress(Client.Tibia);
                int XOR = Memory.ReadByte(Addresses.Player.XoR) + Addresses.baseAddress(Client.Tibia);
                int total = (HP ^ XOR);
    
                MessageBox.Show(Memory.ReadByte(total).ToString());
                MessageBox.Show(total.ToString());

  5. #85
    Super Moderator klusbert's Avatar
    Join Date
    Dec 2007
    Posts
    1,201

    RE: 9.44 addresses and changes - ONLY HERE!

    try read int32 or uint32 instead of read byte

  6. #86
    Senior Member
    Join Date
    Jul 2008
    Posts
    124

    RE: 9.44 addresses and changes - ONLY HERE!

    why u are reading byte instead of read a int?

  7. #87
    Senior Member
    Join Date
    Jan 2008
    Location
    Cambridge, England
    Posts
    725

    RE: 9.44 addresses and changes - ONLY HERE!

    Shouldn't you read byte then convert it to int? That's what I've been doing but my readint32 command does both automatically! Careful with your instructions and advice guys, dunno if his code will do what it needs to.

  8. #88
    Junior Member
    Join Date
    Nov 2009
    Posts
    3

    RE: 9.44 addresses and changes - ONLY HERE!

    int HP = Memory.ReadInt(Addresses.Player.HP) + Addresses.baseAddress(Client.Tibia);
    int XOR = Memory.ReadInt(Addresses.Player.XoR) + Addresses.baseAddress(Client.Tibia);
    int total = HP ^ XOR;


    returns 33707513

  9. #89
    Moderator
    Join Date
    Oct 2009
    Posts
    482

    RE: 9.44 addresses and changes - ONLY HERE!

    Quote Originally Posted by Geez
    int HP = Memory.ReadInt(Addresses.Player.HP) + Addresses.baseAddress(Client.Tibia);
    int XOR = Memory.ReadInt(Addresses.Player.XoR) + Addresses.baseAddress(Client.Tibia);
    int total = HP ^ XOR;


    returns 33707513
    @Up
    Nothing strange in returned value, you're reading it wrong way

    [code=pseudocode]int baseAddress = (here do all operations counting base address);
    int HP = Memory.ReadInt(hpAdr with XP base - 0x400000 + baseAddress);
    int XOR = Memory.ReadInt(XOR adr with XP base - 0x400000 + baseAddress);
    int total = HP ^ XOR;[/code]

  10. #90
    Junior Member
    Join Date
    Nov 2009
    Posts
    3

    RE: 9.44 addresses and changes - ONLY HERE!

    rightt! thanks i knew i was doing something wrong lol

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •