SRL Archive - Help

Function to Find if in Wilderness?


Archaic

2012-03-21 23:53:39

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

2012-03-21 23:58:37

From: Archaic
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

2012-03-22 00:04:44

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

2012-03-22 00:10:42

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

2012-03-22 00:11:30

Check for the text Level: or whatever.

Archaic

2012-03-22 00:28:24

thanks for the help guys! I think I've got it.:)

RISK

2012-03-22 00:31:04

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

2012-03-22 00:41:54

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

2012-03-22 01:46:17

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

2012-03-22 01:49:01

From: Archaic
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.