SRL Archive - General

Some changes to object finding, tracking & WaitWhileChopping


Coh3n

2011-02-02 04:00:42

If you haven't seen already, I made quite a few updates tonight.

  • For WaitWhileChopping, it tracks the object like normal, but now it resets the "tracking box" to a box around the closest point of the TPA to the player. The box is reset during the repeat..until loop in WaitWhileChopping. Try it out if you don't understand. ;)
  • I'm not sure, but I think the same concept may work for mining and fishing as well (probably even other skills). With proper tweaking of a ROCK_MAX_DIST (I think that's what it's called in Woodcutting.simba) constant, I'm sure it would work.
  • I've implemented this, and from what I can tell, it works pretty well. I have made the "NotBoxes" TBoxArray global as that was really the only way I could make it work effectively. Don't worry, the box array is reset as soon as MSI_FindObjectsIn has returned true.
  • I didn't really make any changes to MSI_TrackObject, I just added checks for the bounds of the tracking box so we avoid the Simba warnings saying "You've gone out of bounds" or whatever. It will now, no matter what, stay within the main screen.
  • I've also added a MaxWait to TMSObject to be used as the maximum time to wait for the object to disappear. I've set this for all trees, and will do rocks tomorrow if no one else does. Keep in mind the time needs to be changed in MSI_WaitWhileMining as well (see WaitWhileChopping to see what I mean).
There were a few other smaller updates, see the SVN log or the diff if you're interested.

Gu3st...

2011-02-02 04:19:37

I'll take a better look at it when I get home from school, and test it out :)