PDA

View Full Version : how does orion pro tell whether or not ur farming patches are diseased or ready?



Grunt
06-26-2014, 03:36 AM
So I've been wondering how Orion pro's farming plugin can tell you the status of your crops. Is it possible for smart to do the same?

Turpinator
06-26-2014, 03:38 AM
Reflection. Yes.

Grunt
07-03-2014, 02:43 AM
which hooks are we talking about here?

Flight
07-03-2014, 02:52 AM
Off the top of my head I would assume it has a list of every tile which your player can grow crops on, and keeps track of these tiles. If the object ID at that tile matches the ID of diseased plant the bot will know, based on which tile, if the farming patch at "X location" is healthy or diseased.

Simple stuff when you think about it. You could make a script to instantly tell you which of your farming patches have something growing, if they're healthy, and if they're diseased or not. It's nothing fancy, believe me.

Method
07-03-2014, 03:50 AM
Off the top of my head I would assume it has a list of every tile which your player can grow crops on, and keeps track of these tiles. If the object ID at that tile matches the ID of diseased plant the bot will know, based on which tile, if the farming patch at "X location" is healthy or diseased.

Simple stuff when you think about it. You could make a script to instantly tell you which of your farming patches have something growing, if they're healthy, and if they're diseased or not. It's nothing fancy, believe me.

It's far simpler than that, actually. Each player's account has a bunch of variables associated with it that keep track of things like quest progress, achievement status, unlockable events, game settings, etc. Information on farming patches is also stored in these variables. The server notifies the client when these variables change so the client can display things properly, and Orion just needs to figure out which variables correspond to the patches and decode the information.

As an aside, the farming patches always have the same id whether the plant is diseased, healthy, or if there is nothing in the patch at all. Under the hood, the client uses the variables I mentioned before to display the correct farming patch for each player.

Flight
07-03-2014, 04:20 AM
It's far simpler than that, actually. Each player's account has a bunch of variables associated with it that keep track of things like quest progress, achievement status, unlockable events, game settings, etc. Information on farming patches is also stored in these variables. The server notifies the client when these variables change so the client can display things properly, and Orion just needs to figure out which variables correspond to the patches and decode the information.

As an aside, the farming patches always have the same id whether the plant is diseased, healthy, or if there is nothing in the patch at all. Under the hood, the client uses the variables I mentioned before to display the correct farming patch for each player.

I can't say I'm too surprised but that sure is a lot of specific variables to store in the client itself. AFAIK we don't have those hooks in the updater that OSR-Reflection uses so if he's really wanting a tool to do just that he might as well use the method I said above.

Krazy_Meerkat
07-03-2014, 11:23 AM
I can't say I'm too surprised but that sure is a lot of specific variables to store in the client itself. AFAIK we don't have those hooks in the updater that OSR-Reflection uses so if he's really wanting a tool to do just that he might as well use the method I said above.
R_GetSettingArray is exactly what method is talking about. We already use this array to check for poison status, carried weight etc etc. But I'm sure it has many other potential uses

Cov
07-03-2014, 04:30 PM
http://pastie.org/private/q4vy9bzwc5mq8sbnnjbj6g some of the configs if anyone is interested. Massive credits to Method for some of these, I did some digging as well to add to it. I think there is only one site missing and that's Keldagrim hops patch, but shouldn't be too hard to find.