SRL Archive - Help and Support

Wilderness level not working ?


Aidan

2007-04-01 12:59:21

Hello i have been building a nature runner and it working fine accept i would like to be able to tell what level wilderness im in! When i put writeln(+inttostr(Wildernesslevel)) it says 0 when im in level 8 wilderness! Does anyone know if that procedur still works or is it dead?

JuKKa

2007-04-01 14:30:17

i can try working out a function :D just gimme a second or a day lolz :D

Aidan

2007-04-01 15:13:52

You found anything the only thing i can think the problem is, is if they have changed the font!

JuKKa

2007-04-01 16:12:51

or the location of text :) ill look into it NOW


program New;
{.Include SRL/SRL.Scar}
var
level : integer;

function InWilderness: Boolean;
var
skull: Integer;
begin
skull := BitmapFromString(5, 5, 'z78DA7373C3078CCD8D5C8C0C7' +
'1B1F1CB3ABB39595A5A629A09114756834C42C40128C72517');
if (FindBitmapIn(skull, x, y, 476, 256, 504, 280)) then
Result := True;
FreeBitmap(skull);
end;

Function GetWildyLevel : Integer;
var
txt , S , ChatChars , WildyLevel : integer;
Txt2 : string;
begin
Result := 0;
if (InWilderness) then
begin
txt := 1;
Txt2:= inttostr(txt)
ChatChars := LoadChars2(AppPath + 'CharsChat2\');
S := CreateBitmapMaskFromText(Txt2, ChatChars);
if FindBitmapMaskTolerance(S,x,y,501,285,514,300,10,50)then
begin
WildyLevel:= Txt;
Result:= WildyLevel;
exit;
end;
repeat
FreeBitmap(S)
Wait(150+random(50))
txt:= txt + 1;
Txt2:= inttostr(txt)
S := CreateBitmapMaskFromText(txt2, ChatChars);
until(FindBitmapMaskTolerance(S,x,y,501,285,514,300,10,50)or(Txt >= 61))
if Txt >= 61 then
begin
writeln('Error, Couldnt Get Wildy Level')
exit;
end;
WildyLevel:= Txt;
Result:= WildyLevel;
end else
Writeln('Not In Wildy!')
end;

begin
SetupSRL;
Level:= GetWildyLevel;
Writeln('Wildy: ' + inttostr(Level))
end.

this does not work properly for now, as i got pked >_< and couldnt finnish it :(

Aidan

2007-04-01 17:21:00

Hey thank you but ive kind of resolved the problem (Didn't use WildernessLevel) so you can quit looking but if you still want to look then it would be great for other member whos want to use Wilderness.scar!
Thanx for your help,
Aidan