SRL Archive - SRL Archives

function IsPortal : Boolean;


Bego

2006-06-25 21:45:51

I have 2 more house functions coming up, but I'm having slight unexplainable problems.

{*******************************************************************************
function IsPortal : Boolean;
By: Bego
Description: Checks if theres a portal to houses on the minimap and returns true
*******************************************************************************}
function IsPortal : Boolean;
var
twx, twy, portal : integer;
begin
portal := BitmapFromString(5, 5, 'z78DA73323336733671363437' +
'777176B4307171B180B09DC0E21012228E4C628A239B804B0DB2B' +
'8135E7B014C9B22EA');
if (FindBitmap(portal, twx, twy)) then
begin
result := true;
end else
begin
result := false;
end;
end;

Hope it gets implemented, nothing special though.

UPDATED! Uses a small unique bitmap now - works fine.

Bego

2006-06-26 01:54:26

Updated, it now uses a small unique bitmap, works fine now.

WT-Fakawi

2006-06-26 02:40:52

[php]function IsPortal : Boolean;
var
twx, twy, portal : integer;
begin
portal := BitmapFromString(5, 5, 'z78DA73323336733671363437' +
'777176B4307171B180B09DC0E21012228E4C628A239B804B0DB2B' +
'8135E7B014C9B22EA');
Result:=(FindBitmap(portal, twx, twy));
end;
[/php]

The same, only shorter…

Bego

2006-06-26 08:34:35

Thanks :p.