SRL Archive - OSR Help

[Req]Color cooking detection?


Flight

2011-10-31 00:46:26

So… I'm looking for some suggestions on how to detect our player is cooking (on a log fire). I could use pixelshift but that wouldn't be very accurate for something like this. I could do inventory check for cooked/raw items, but then what happens if the fire extinguishes before we're done? Could also check for for the fire color, as long as it exists within a pixel range from our player (MSCX/MSCY), but what happens if another player lights a fire near us at the same distance?

I don't know how anyone else has done it or even MSI for that matter, but if you have dealt with this before or just have some good suggestions I'm all ears!

Coh3n

2011-10-31 01:45:59

MSI only has support for ranges currently, and it just waits until there isn't any raw material left. You can count the raw materials every couple seconds and if the number hasn't changed, the player isn't cooking anymore. Should work since you always cook at a constant speed.

TomTuff

2011-10-31 01:47:04

time marking based on last change in raw fish count.

Narcle

2011-10-31 02:04:10

From: TomTuff
time marking based on last change in raw fish count.


This. If you know the exact time it takes to cook with some give room 100-400 ms then u'll know if fire went out or some other problem arises that u can use to trigger to cook again.

kingarabian

2011-10-31 02:11:34

Or while cooking on logs, for an example, if uncooked sharks stop changing into sharks then we know the fire's out or something's wrong. Have the script count the dtm's of each shark and if that number fails to increase after a period of time then you would have it restart the cooking phase by burning the logs and so on.

Flight

2011-10-31 02:16:32

Ah yeah, cooking does have a constant time, and if I have some allowances in there (for lag and such) I could just use some DTM/Bitmap counting and compare that to the changes in quantity per X amount of milliseconds. Thanks for the suggestions guys, I'll give that a go.

Main

2011-10-31 02:22:29

use quick exp tab and read the current exp off that, or I guess do the good old mouse over skill and read off exp

Flight

2011-10-31 04:36:32

Got it working perfectly, thank you guys very much. :)

Sir R. M8gic1an

2011-10-31 06:06:02

Well, I see you've already figured it out… nonetheless, when you first start cooking on a fire you have to click the fire. You could just keep those coords and check for fire colours there. The only exception would be if someone lit a fire in the same exact spot as you

-RM

Flight

2011-10-31 06:47:01

From: Sir R. M8gic1an
Well, I see you've already figured it out… nonetheless, when you first start cooking on a fire you have to click the fire. You could just keep those coords and check for fire colours there. The only exception would be if someone lit a fire in the same exact spot as you

-RM


Yep, that was one of my original ideas but like you just stated, there's the slim chance another fire could be lit there. But, luckily through some bitmap counting and time checking/comparing, I have it working wonderfully and much faster than I could have hoped for.

kingarabian

2011-10-31 06:50:52

From: Flight
Yep, that was one of my original ideas but like you just stated, there's the slim chance another fire could be lit there. But, luckily through some bitmap counting and time checking/comparing, I have it working wonderfully and much faster than I could have hoped for.


That's awesome I'm glad you got it. Hey if you need any testing just hit me up. My army is based right now in Draynor Bank!

Flight

2011-10-31 06:54:08

From: kingarabian
That's awesome I'm glad you got it. Hey if you need any testing just hit me up. My army is based right now in Draynor Bank!


Yeah I may just do that. I've a bit of tweaking to do, especially with the fishing detection (pixelshift) and adding a couple more bits, but I'll surely let ya know if I need some testing. Thank you, Kingarabian. :)