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 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 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 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
Why using an array for messages and battlelist creatures?
Results 1 to 8 of 8

Thread: Why using an array for messages and battlelist creatures?

  1. #1
    Senior Member
    Join Date
    Oct 2010
    Posts
    146

    Why using an array for messages and battlelist creatures?

    Supppp guys, I have been searching some addresses and already finished with chat module (read,talk,channels,statusbar,etc)
    But now I've got this question... I have seen that some ppl (posts from 2008 lol) say it's better to put into an array this things:
    Creatures from Battlelist (with id,isattacking,etc)
    Messages from channels (sender,time,type,etc)

    Why this? I mean, I can understand that you want to reduce a little the CPU %, but even doing so you will have to update the array each 500-1000ms (so once again reading that memory and adding them to the array)


    From my point of view this is bullsh*... no, just kidding, it's just I don't get it, only that.

    Thaaaaaanksssssssss

  2. #2
    Member Diego's Avatar
    Join Date
    Mar 2012
    Location
    México
    Posts
    79
    Or you can just update the cache when needed, instead of adding a timer to it
    TibiaViewer taking AFK botting to a whole different level Sign up!.

  3. #3
    Senior Member
    Join Date
    Dec 2011
    Posts
    249
    Quote Originally Posted by Diego View Post
    Or you can just update the cache when needed, instead of adding a timer to it
    Wouldn't that take away the entire point of caching it?

  4. #4
    Member Diego's Avatar
    Join Date
    Mar 2012
    Location
    México
    Posts
    79
    No. If you set up a timer to constantly update the battle list, you will be updating this for no reason most of the time.
    In the other hand you can just call up a function like "UpdateCache()" when you really do need it.
    TibiaViewer taking AFK botting to a whole different level Sign up!.

  5. #5
    Or, if you want to get really tricky, you can jump into Kernelland, change the paging table to point one of your memory pages to the same physical address as Tibia's battlelist, and use it as your own. Or just inject like a pr0.


    Disclaimer: Playing with Kernel data is asking for a date with bluescreen

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

  7. #7
    Senior Member
    Join Date
    Oct 2010
    Posts
    146
    Quote Originally Posted by Diego View Post
    No. If you set up a timer to constantly update the battle list, you will be updating this for no reason most of the time.
    In the other hand you can just call up a function like "UpdateCache()" when you really do need it.
    :O
    ye, I saw that Ibot use that technic... I like it, prolly will use that too

    Quote Originally Posted by DarkstaR View Post
    Or, if you want to get really tricky, you can jump into Kernelland, change the paging table to point one of your memory pages to the same physical address as Tibia's battlelist, and use it as your own.
    o m f g, that sounded really really amazing, would like to do that, but for now I don't have enough knowledge, sht
    Quote Originally Posted by XtrmJash View Post
    epic XDDDDD


    thx guys, I'll do it then =)

  8. #8
    Well, they are stored in arrays in Tibia code, so this is the best way to collect the data from the structures, doing the same, XD

    If you inject code/dll, you don't need to update the array, because the pointer will point directly to the structure X)
    #explanationfail
    Last edited by Blood; 03-26-2013 at 10:44 PM.

Posting Permissions

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