SRL Archive - Reflection Help

Reflection and tiles


Troll

2011-04-16 18:18:09

So for tiles are they just a grid counting up?

So if i have a bottom left and top right i could just go

BottomLeft<Tile<TopRight

Or how would i find if im in a area.

Sorry for being a noob im trying to finish a script for like the 100th time :p

Thanks :)

Gu3st...

2011-04-16 18:44:22

Tiles start at 0,0 at the left bottom corner of the runescape map, and ends in the top right corner of the map

Here's a function for checking if you're inside a box:
Example: TileInBox(GetMyTile, IntToBox(3245, 5423, 7545, 8655));
function TileInBox(T : TTile; B : TBox): Boolean;
begin
Result := PointInBox(Point(Tile.X, Tile.Y), B);
end;
I'm sure this function is in reflection already though (It should be at least)

Troll

2011-04-16 18:46:08

Thanks that great :)

TomTuff

2011-04-16 19:17:23

function MeInBox(Box: TBox): Boolean;
function GetMyPos: TTile;

MeInBox is what Zyt3x was thinking of. Also, it's "GetMyPos" not "GetMyTile"

Gu3st...

2011-04-23 16:04:51

From: TomTuff
function MeInBox(Box: TBox): Boolean;
function GetMyPos: TTile;

MeInBox is what Zyt3x was thinking of. Also, it's "GetMyPos" not "GetMyTile"
Thanks, I'm not really that much into reflection :)