
Originally Posted by
hoodz
Things like walking is pretty hard for rsps :s
That particular RSPS actually has the tile position located in the top right corner of the screen, I could grab the text from there to return the current tile position and then I could calculate any other tile. For example if I'm on tile 2000, 2000 (Center of minimap is coords 684, 84 or something, each tile is 4 pixels across on the minimap) and want to walk to 2005, 2001 I would just do
Simba Code:
function v_tileTo_Coords(Location, Tile:TPoint):TPoint;
begin
result.x := ((Tile.x - Location.x) * 4) + 637;
result.y := ((Location.y - Tile.y) * 4) + 85;
end;
It's a shame XP is so fast, quick writeup of walking:
Simba Code:
{$I SRL/SRL.Simba}
var
Position:TPoint;
function v_get_tile:TPoint;
begin
result := Position; // would have text stuff here
end;
function v_tileTo_Coords(Location, Tile:TPoint):TPoint;
begin
result.x := ((Tile.x - Location.x) * 4) + 637;
result.y := ((Location.y - Tile.y) * 4) + 85;
end;
function v_tile_walk(Tile:TPoint):Boolean;
var
Coord:TPoint;
begin
// stuff here to make sure the tile is on the minimap
Coord := v_tileTo_Coords(v_get_tile, Tile);
Mouse(Coord.x, Coord.y, 0, 0, Mouse_left);
Writeln(coord);
wait(500);
while (isMoving) do
wait(50);
end;
begin
Mousespeed := 15;
Position := Point(3106, 3495);
v_tile_walk(Point(3095, 3495));
end.
I might make something walking related just because it might be soo easy lol