Log in

View Full Version : Function to Find if in Wilderness?



Archaic
03-22-2012, 03:53 AM
Is there a built in SRL function/variable to find if the character is in the wilderness? (I.E. something like find symbol except with the wilderness skull?)

If not, what would be a good way to find if the character is in the wilderness? I've tried using a bitmap of the wilderness skull, but that doesn't seem to be working too well because the skull is semi-clear (and as a result changes somewhat with the background).

Thanks:)

x[Warrior]x3500
03-22-2012, 03:58 AM
Is there a built in SRL function/variable to find if the character is in the wilderness? (I.E. something like find symbol except with the wilderness skull?)

If not, what would be a good way to find if the character is in the wilderness? I've tried using a bitmap of the wilderness skull, but that doesn't seem to be working too well because the skull is semi-clear (and as a result changes somewhat with the background).

Thanks:)

wouldnt a dtm work? or even count high(TPA) within that region to determine if its there?

Archaic
03-22-2012, 04:04 AM
wouldnt a dtm work? or even count high(TPA) within that region to determine if its there?

That's what I'm trying right now. I feel like there should be something (perhaps within find symbol) to tell if the character is in the wilderness though.

Thanks for the quick response:)

Gucci
03-22-2012, 04:10 AM
What I was thinking was I'm pretty sure there is something that comes up on the screen telling you what level your at, make a bitmap or DTM of that and what the script check the corner of the mainscreen for it

Sex
03-22-2012, 04:11 AM
Check for the text Level: or whatever.

Archaic
03-22-2012, 04:28 AM
thanks for the help guys! I think I've got it.:)

RISK
03-22-2012, 04:31 AM
Even though your question has been answered already, here is how I would do it:

function InWilderness(): Boolean;
begin
Result := (CountColorTolerance(523066, 0, 0, 0, 0, 15) > 0);
end;

Replace 523066 with the skull color and the 0s with the box to search for the wilderness skull in. You could also add in a check for the red color of the text too if it is always there. The 0 at the end is to tell it if the pixels with the matching colors it finds is over 0, then we are in the wilderness. You could raise this if you want to be more strict with it.

Archaic
03-22-2012, 04:41 AM
That's a good point RISK. I actually am going to stick just with the color of the text (e.g. Level:51), because it is actually a very unique color and is a good indicator as it doesn't show up anywhere else in my path:)

Thank you again guys:D

Er1k
03-22-2012, 05:46 AM
function InWildy: boolean;
begin
//Tweak search area and color!
result:= FindTextTPAEx(1939681, 5, MSX1, MSY1, MSX2, MSY2, X, Y, 'evel', SmallChars, Nothing);
end;Maybe this?

The skull is a bit transparent and will overlay with other colors. Not sure if color finding would be reliable.

Sex
03-22-2012, 05:49 AM
That's a good point RISK. I actually am going to stick just with the color of the text (e.g. Level:51), because it is actually a very unique color and is a good indicator as it doesn't show up anywhere else in my path:)

Thank you again guys:D

Okay, try counting it to make sure it exists in some quantity since it is possible that it could show up outside the wilderness.

Edit: Nevermind, I just read the above posts and they already said that.