SRL Archive - SRL Archives

OpenWorldScreen


Tootoot222

2008-11-02 01:32:02

This function from WorldSwitcher.scar is broken, I fixed it, I hope this is where to put this:

{*******************************************************************************
function OpenWorldScreen: Boolean;
by: ZephyrsFury & Narcle, fixed by Tootoot222
Description: Opens the world screen. Returns true if world screen is opened.
*******************************************************************************}
function OpenWorldScreen: Boolean;
var
T, WorldMask, X, Y: Integer;
begin
if(WorldScreen) then
begin
Result := True;
Exit;
end;
WorldMask := BitmapFromString(48, 14, 'beNrNlEEOwCAIBPv/T29' +
'PTYzCZkgjysngWsZFKj0tIcnvesEOnquQ9MVVPESgIaa7mMzWfq3i' +
'8PgfPxt4QtPGDCmRCcxnDYw/yzXZvSCP9zPztlRufeHTwnezxEOAw' +
'+pneaCNbf0qDRofDQJgeOA/x88FScZT9gL851vB');
try
if(FindBitmapMaskTolerance(WorldMask, X, Y, 322, 236, 419, 251, 1, 1)) then
begin
MouseBox(322, 236, 419, 251, 1);
T:= GetSystemTime + 60000;
repeat
Wait(100);
if(GetSystemTime > T) then
Exit;
Result:= WorldScreen;
until(Result);
end;
finally
FreeBitmap(WorldMask);
end;
end;

ZephyrsFury

2008-11-02 02:03:24

You sure? We only made it like 2 weeks ago and it was working fine like 10 mins ago. :confused:

EDIT: This might have been better placed in the Misc section. :)