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
Minimap file/memory
Results 1 to 4 of 4

Thread: Minimap file/memory

  1. #1

    Minimap file/memory

    Hello, I'm new around here but I've been reading a lot of threads to learn more about the bot development for some months.

    I was doing some tests and researchs about pathfinder and I was trying to find a good solution to work on Tibia, but I face a problem, as I could see the minimap file is stored in the memory and it has the same struct as the minimap files in the "Automap" folder, but the files are just updated after you close the client, and in the memory it's in runtime.

    Anyway, it store the sqm speed and then the sqm color in the minimap right? Let's say it is a yes(Cuz I'm almost sure it has this struct), some sqm's have that brow/dark red color used in some walls, like in the serpent spawn in goroma, but in farmine the same color is used as a walkable sqm, so we can't base the pathfinder in the minimap color, so we would use the sqm speed, but if we use a fire bomb in that ground the client will set those sqm's as speed 0, so if we are away from that sqm with the firebomb, lets say 30 sqms away so it will be out of the screen, and after a while the firebomb will vanish, but in the memory it will keep those sqm's with the speed 0(unless you walk near of those sqms again), but we will be able to walk in that sqm, so we can not base the pathfinder in the minimap speed too.

    With all this in mind, how would it be possible to create a good pathfinder based in these informations if they are not really 100% updated if you are out of screen or something like that ? Or am I missing something here?

    Thx, casky.

  2. #2
    Senior Member
    Join Date
    Jan 2008
    Location
    Cambridge, England
    Posts
    725
    The way I would do it personally:

    Read the map files to begin with, and get them into memory. As you move around the map and it gets explored check that the map files that should currently be available in the client memory are not blanketed out in the file (run an automatic checker every few seconds), then just overwrite your shit in memory with information from the client itself.

    The way most people currently do it:

    Fuck the customer, make them acquire maps, restart the client, then they can bot. Brutal, but it shouldn't be a massive problem. The thing that would piss me off is if I had never been to Vengoth or somewhere and had to find my way there before I could bot, as well as having to fully explore all the hunting grounds (right pain in the backside if you ask me).

  3. #3
    I got it, but even using the client maps we will face the problem I described above, that we can not use colors or even the speed of the files/memory, because it won't update if you are not in the screen, so hunting in caves like one with dragon lords, it will be saved as speed 0, but wont update to 1~254 if you don't walk there again, so if you try to check the path from another point of the cave the path "will be blocked", doesn't matter if you check the memory or the files.

  4. #4
    Senior Member
    Join Date
    Jan 2012
    Posts
    417
    map files are pretty good sources of info for pathfinding. These files are saved with the "last view state". Meaning that if the sqms in question were walkable back in the save time, then it has a good chance to be walkable yet (probably it's covered by some field like fire, energy, poison, etc) and we can use it to reach the desired location.

    I used to work with files, then once my character stopped, I checked the local map (aka 3D array of tiles around your character) to solve the puzzle. If my bot failed to trace a path in the local map, then I was really trapped or something weird was happening. Of course, in a place containing a lot of DLs, you'll often need to check the local map due those fields, but with a list of field ids which you want to walk over (fire, energy, etc), in the local map you can detect and bypass them due its IDs in the sqm items stack.

    For pathfinding related, the key point is to advance in the path rather than to reach the exact location. This way you can always become closer and closer to the location you want.

Posting Permissions

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