Well since no one replied I try my hardest to find a solution and here it is. With this snippet people will be able to walk to tiles using screen points and will be able to check if they are in a tile, that is in a sps map. In other words, if you have the sps point of your tile you can check if you are standing on her or walk to her if she is on screen!
Simba Code:
program Test;
{$DEFINE SMART}
{$i srl-6/srl.simba}
{$i sps\lib\sps-rs3.simba}
var
t : TPoint;
function spsToMainscreen(spsPoint : TPoint) : TPoint;
var
minimapPoint, p, vector : TPoint;
box : TBox;
begin
vector.X := minimap.getCenterPoint.X-sps.getPlayerPos.X;
vector.Y := minimap.getCenterPoint.Y-sps.getPlayerPos.Y;
minimapPoint.X := spsPoint.X+vector.X;
minimapPoint.Y := spsPoint.Y+vector.Y;
result := minimap.pointToMainscreen(minimapPoint);
result.Y := result.Y+8;
end;
function inTile(spsPoint : TPoint) : boolean;
var
box : TBox;
begin
box := mainscreen.playerBox;
box.edit(0,10 ,0 ,-10);
result := box.isPointInside(spsToMainscreen(spsPoint));
end;
function walkTile(spsPoint : Tpoint) : boolean;
var
p : TPoint;
//box : TBox;
begin
if not(inTile(spsPoint)) then
begin
p := spsToMainscreen(spsPoint);
if mainScreen.getBounds().isPointInside(p) then
begin
//box.setBounds(p.X-3, p.Y, p.X+3, p.Y+3);
//mouseBox(box);
mouse(p);
fastClick(MOUSE_LEFT);
repeat
wait(250);
until not(minimap.isPlayerMoving);
end;
end;
result := inTile(spsPoint);
end;
procedure start();
begin
sps.setup('MAP_01', RUNESCAPE_SURFACE);
t := Point(298, 302);
smartImage.clear;
end;
procedure loop();
begin
writeln(walkTile(t));
end;
procedure poll();
var
minimapPoint, p, vector : TPoint;
box, b : TBox;
begin
vector.X := minimap.getCenterPoint.X-sps.getPlayerPos.X;
vector.Y := minimap.getCenterPoint.Y-sps.getPlayerPos.Y;
minimapPoint.X := t.X+vector.X;
minimapPoint.Y := t.Y+vector.Y;
p := minimap.pointToMainscreen(minimapPoint);
box.setBounds(p.X-3, p.Y-3, p.X+3, p.Y+3);
smartImage.drawBox(box, false, clRed);
b := mainscreen.playerBox;
B.edit(0, 15, 0, -10);
smartImage.drawBox(b, false, clRed);
end;
procedure stop();
begin
end;
begin
smartEnableDrawing := true;
setupSRL();
start();
while true do
begin
//poll();
loop;
end;
end.