Signup Now
Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23
  1. #21
    Free User albino's Avatar
    Join Date
    Apr 2014
    Location
    Brazil
    Posts
    183
    Reputation
    27
    Rep Power
    21
    I always dream with something like that when hunting catacombs, so it can highlight sqm of rare loot bodies

  2. #22
    Free User shAdOwArt's Avatar
    Join Date
    Apr 2015
    Location
    Kharos
    Posts
    189
    Reputation
    151
    Rep Power
    20
    Quote Originally Posted by Raphael View Post
    Number 1 really isn't that much of a problem, all you gotta do is keep a "cache" of the currently dead monsters and when you read a "Loot of..." message, check which new corpse was added. That's the one that just died. I'd argue you don't even need foreach deadcreature, you should just loop over all alive creatures (foreach creature) and if one disappears within a certain timespan of a "Loot of..." message, then that's the creature. Well, both are the same approach on a different direction.
    Isn't that exactly what I am doing? Even if I check for corpses from inside the function that reads the loot messages I will still run into problems in situations where multiple monsters die between two invocations of the message handler (which frequently will happen regardless of how small we make the delay given to auto). Then there will be multiple new loot messages, and multiple new corpses but no real way to connect them to each others.


    About your code, a few possible improvements:

    • WindBot has string.explode and table.marge (equivalent of your mergeTable) baked in one of its standard libs (Mine, actually)
    • WindBot has a few useful regexes like REGEX_LOOT baked in one of its standard libs (Mine, actually)


    Other than that, pretty good stuff. The part about checking for looted bodies was really well thought...
    Thanks, it's the first wb script I've ever written.

  3. #23
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by shAdOwArt View Post
    Isn't that exactly what I am doing? Even if I check for corpses from inside the function that reads the loot messages I will still run into problems in situations where multiple monsters die between two invocations of the message handler (which frequently will happen regardless of how small we make the delay given to auto). Then there will be multiple new loot messages, and multiple new corpses but no real way to connect them to each others.
    I haven't really had that much of a look at your code, so I'm sorry if that's how you did that. That should work really well for the vast majority of the cases for the vast majority of the hunting places. When it doesn't, simply assuming both dropped the most valuable stuff seems like a valid option.

 

 

Posting Permissions

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