J J
2012-03-18 14:51:52
Hi.
I'm working on a combat script and I'm currently trying to figure out what would be the best way to locate a second monster. The monsters I'm fighting have a quite annoying death animation. I can save around 5 seconds by not waiting for the animation.
However, when I loop my script the first monster it will attack is the monster it's fighting that's in the death animation. So I figured I could search for a specific area but leaving out an area like this:

Leaving out the white area.
What's the best way to do this? I was thinking about these ways:
Option #1
(0, 250, 515, 337) = Bottom area
(0, 0, 515, 90) = Top area
(0, 0, 150, 337) = Left area
(380, 0, 515, 90) = Right area
This would leave the white part out but search in 4 different parts.
FindColorSpiralTolerance(X, Y, {monster color} , a, b, c, d, {tolerance});
–>
if FindColorSpiralTolerance(X, Y, {monster color} , 0, 250, 515, 337, {tolerance}) or FindColorSpiralTolerance(X, Y, {monster color} , 0, 0, 515, 90, {tolerance}) or FindColorSpiralTolerance(X, Y, {monster color} , 0, 0, 150, 337, {tolerance}) or FindColorSpiralTolerance(X, Y, {monster color}, 380, 0, 515, 90, {tolerance}) then
Option #2
Doing something with MSX1, MSY1, MSX2, MSY1 and leaving out a box with the co-ords of the white part. Not sure if this is possible
Any tips?
I'm working on a combat script and I'm currently trying to figure out what would be the best way to locate a second monster. The monsters I'm fighting have a quite annoying death animation. I can save around 5 seconds by not waiting for the animation.
However, when I loop my script the first monster it will attack is the monster it's fighting that's in the death animation. So I figured I could search for a specific area but leaving out an area like this:

Leaving out the white area.
What's the best way to do this? I was thinking about these ways:
Option #1
(0, 250, 515, 337) = Bottom area
(0, 0, 515, 90) = Top area
(0, 0, 150, 337) = Left area
(380, 0, 515, 90) = Right area
This would leave the white part out but search in 4 different parts.
FindColorSpiralTolerance(X, Y, {monster color} , a, b, c, d, {tolerance});
–>
if FindColorSpiralTolerance(X, Y, {monster color} , 0, 250, 515, 337, {tolerance}) or FindColorSpiralTolerance(X, Y, {monster color} , 0, 0, 515, 90, {tolerance}) or FindColorSpiralTolerance(X, Y, {monster color} , 0, 0, 150, 337, {tolerance}) or FindColorSpiralTolerance(X, Y, {monster color}, 380, 0, 515, 90, {tolerance}) then
Option #2
Doing something with MSX1, MSY1, MSX2, MSY1 and leaving out a box with the co-ords of the white part. Not sure if this is possible
Any tips?