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 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
JAPI - Useful Tools for Tibia - Page 3
Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 47

Thread: JAPI - Useful Tools for Tibia

  1. #21
    Senior Member
    Join Date
    Jan 2008
    Location
    Cambridge, England
    Posts
    725
    It's been a while since I worked on this, but I've made some more changes recently... If there is any interest I will most likely continue to do so.

    Latest changes:
    Test Program:
    AutoLauncher - If no Tibia client is running the sample program will automatically launch one.
    AutoExit - If the client we are connected to exits, the bot will also exit to prevent instability.
    No longer crashes if client exit or logged out.

    API:
    Address list update to 9.86.
    Added Util.getFileVersion(string filePath) which will get the file version of a given file (e.g "9.8.6.0" for latest protocol) and ClientVersion string in Constants.cs which will hold the currently supported client version.
    Made some changes which supports the new map colour in and around the Venore swamp.
    Modified the ReadBool() function to return a string as this is my best current understanding of memory reading.
    Added ReaderClass.IsConnected() which returns "0A" if connected and "00" if disconnected (note as strings!)


    Currently working on A* again, but will be making some modifications to this, too. If anyone has any simple requests I may be able to fulfill them, just ask

    Edit: More changes made, now I have been able to read the hotkeys from the clients memory. Although not implemented into the test project yet, it should make it so that the healer doesn't need to rely on user input for finding hotkeys...

    Commit nr 50 done!
    Last edited by XtrmJash; 06-02-2013 at 01:40 AM.

  2. #22
    Senior Member
    Join Date
    Jan 2008
    Location
    Cambridge, England
    Posts
    725
    Some more work completed today, added client chooser functionality to the test program (and the functions behind it to JAPI). Made some changes across the ReaderClass, now it supports multiple clients (previously the Handle was singularly set in the Util class, now it's set there for the functions of the bot, and can be declared independently for each call to the ReadX functions (ie ReadInt32, ReadString), also added that functionality to a few of the actual read functions (ie BlGet) so that they can be used globally for both the client chooser and the rest of the system.

  3. #23
    Senior Member
    Join Date
    Oct 2010
    Posts
    146
    really nice Jash!!
    I am interested in this thread, since a lot of info is really well explained in your code and that makes it one of the best ways to understand things, at least for me =)

  4. #24
    Senior Member
    Join Date
    Jan 2008
    Location
    Cambridge, England
    Posts
    725
    Thanks bro, code is getting sloppy ATM as I'm trying to find a new "simple" way to get processes I want.

    Coming features:
    Error logging
    GetClient fixes
    BlGet updates
    Memory Address updates

    A few others, nothing too worth mentioning though

  5. #25
    Senior Member
    Join Date
    Jan 2008
    Location
    Cambridge, England
    Posts
    725
    Done some more work on this project today, commit nr 59 changelog:

    Added new AStar test project (AS2).
    Updated Reader class to use Process.GetProcessesByName() as the function was never broken, I just had some difficulties with it.
    Fixed the large map file parser (now returns in a sensible format...
    Removed a load of useless code (moved to Removed Code.txt)
    Enhanced XpNextLevel() function so it no longer calls ReadProcessMemory 7 times, only once.
    Updated the Constant ClientVersion for 10.0.1.0 (latest protocol).

    Will continue to work on it this week as I find time and energy to do so.

  6. #26
    Senior Member
    Join Date
    Oct 2010
    Posts
    146
    nice Jash.
    The Removed Code.txt for? at least github marks in red the code section you have deleted (same in google I suppose), isn't that enough? :O
    And I'll check your A* to see if the one in my project is already done or not. Thanks for it.

    Quote Originally Posted by XtrmJash View Post
    Thanks bro, code is getting sloppy ATM as I'm trying to find a new "simple" way to get processes I want.

    Coming features:
    Error logging
    GetClient fixes
    BlGet updates
    Memory Address updates

    A few others, nothing too worth mentioning though
    never saw this post.
    the Error Logging feature, what do you have in mind? I've heard Dark's one is kinda good... I should do mine too, but pfffffffffffffff xD

  7. #27
    Senior Member
    Join Date
    Jan 2008
    Location
    Cambridge, England
    Posts
    725
    Quote Originally Posted by Puterin View Post
    nice Jash.
    The Removed Code.txt for? at least github marks in red the code section you have deleted (same in google I suppose), isn't that enough? :O
    And I'll check your A* to see if the one in my project is already done or not. Thanks for it.



    never saw this post.
    the Error Logging feature, what do you have in mind? I've heard Dark's one is kinda good... I should do mine too, but pfffffffffffffff xD
    I'm using TortoiseSVN locally, and the google standard SVN server, so it does support storing deleted code, but using a Removed Code.txt just makes it easier to recycle old code if I need to... I prefer it, and it's only a couple of KB I think.

    As for the error logging, basically there will be an output window which will log each function that is called within the bot. That means say you call getClients() and one or more clients returns a null value, or throws an exception, the end user can see this error, and I will eventually add a crash handler to dump the log to a text document which they can use to report the issue. On top of that, the Lua functionality will have an output window, which will track all thrown lua exceptions, and once again dump them to a text file... I know from experience that engines are notoriously difficult to trace, hence the desire to add a logging function to both the Lua engine and the bots own code... That way if the Lua engine encounters an error I can tell if it's a bug in my code or in a script almost instantly.

    The logging is functional at the minute, so if you want you could download and compile and check the test program. Under "General" there is a logging settings pane, consisting of "Error level", which sets the type of errors to log (e.g Warnings - it will log all warnings and more serious error messages, or just Information, which logs every single message and function call). The logging at the minute has actually proven quite useful in resolving my getClients function, as well as some GUI update issues which were caused by multiple threads trying to update the same GUI element... It's already proving to be worth far more than the time I invested setting it up :P

  8. #28
    Senior Member
    Join Date
    Oct 2010
    Posts
    146
    Quote Originally Posted by XtrmJash View Post
    I'm using TortoiseSVN locally, and the google standard SVN server, so it does support storing deleted code, but using a Removed Code.txt just makes it easier to recycle old code if I need to... I prefer it, and it's only a couple of KB I think.

    As for the error logging, basically there will be an output window which will log each function that is called within the bot. That means say you call getClients() and one or more clients returns a null value, or throws an exception, the end user can see this error, and I will eventually add a crash handler to dump the log to a text document which they can use to report the issue. On top of that, the Lua functionality will have an output window, which will track all thrown lua exceptions, and once again dump them to a text file... I know from experience that engines are notoriously difficult to trace, hence the desire to add a logging function to both the Lua engine and the bots own code... That way if the Lua engine encounters an error I can tell if it's a bug in my code or in a script almost instantly.

    The logging is functional at the minute, so if you want you could download and compile and check the test program. Under "General" there is a logging settings pane, consisting of "Error level", which sets the type of errors to log (e.g Warnings - it will log all warnings and more serious error messages, or just Information, which logs every single message and function call). The logging at the minute has actually proven quite useful in resolving my getClients function, as well as some GUI update issues which were caused by multiple threads trying to update the same GUI element... It's already proving to be worth far more than the time I invested setting it up :P
    I love the quality of your answers

  9. #29
    Senior Member
    Join Date
    Jan 2008
    Location
    Cambridge, England
    Posts
    725
    More pictures of the bot at the minute:






  10. #30
    Senior Member
    Join Date
    Jan 2008
    Location
    Cambridge, England
    Posts
    725
    And some more, since 4 per page limit:




Posting Permissions

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