Just to revive this a little, I was messing around with reflection walking the other day, and this is all that's required for it to work.
program ReflectionWalkingTest;
{$i SRL/SRL/misc/Smart.scar}
{$i SRL/SRL.scar}
const
HOOK_BASE_X = 'ut.a';
HOOK_BASE_Y = 'dq.N';
HOOK_PLAYER = 'cn.n';
HOOK_LOCAL_X = 'm';
HOOK_LOCAL_Y = 'q';
{******************************************************************************}
{ function GetMyPos: TPoint; }
{ By: BenLand100 }
{ Description: Calculates the player's tile position }
{******************************************************************************}
function GetMyPos: TPoint;
var
me: Integer;
begin
me := SmartGetFieldObject(0, HOOK_PLAYER);
Result.x := SmartGetFieldInt(0, HOOK_BASE_X) + SmartGetFieldInt(me, HOOK_LOCAL_X) shr 7;
Result.y := SmartGetFieldInt(0, HOOK_BASE_Y) + SmartGetFieldInt(me, HOOK_LOCAL_Y) shr 7;
SmartFreeObject(me);
end;
{******************************************************************************}
{ function TileToMM(Tile: TPoint): TPoint; }
{ By: BenLand100 }
{ Description: Converts the tile position to a minimap location }
{******************************************************************************}
function TileToMM(tile: TPoint): TPoint;
var
angle: Extended;
tX, tY: Integer;
tP: TPoint;
begin
angle:= rs_GetCompassAngleRadians;
tP := GetMyPos;
tX:= (tile.x - tP.x) * 4 - 2;
tY:= (tP.y - tile.y) * 4 - 2;
Result.x:= round(tX * cos(angle) - tY * sin(angle)) + 629;
Result.y:= round(tX * sin(angle) + tY * cos(angle)) + 85;
end;
{******************************************************************************}
{ function WalkToTile(tile: TPoint): Boolean; }
{ By: marpis, edited by Coh3n }
{ Description: Walks to a tile if it's on the minimap }
{******************************************************************************}
function WalkToTile(tile: TPoint): Boolean;
var
tP: TPoint;
begin
tP := TileToMM(tile);
if (InCircle(tP.X, tP.Y, MMCX, MMCY, 76)) then
begin
Writeln('Tile is on the minimap');
Mouse(tP.X, tP.Y, 4, 4, True);
Result := True;
FFlag(5);
end else
Writeln('Tile is not on the minimap');
end;
begin
Smart_Server := 152;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
Wait(RandomRange(1000, 2000));
WalkToTile(Point(3265, 3428));
end.
You have to have the embedded_SMART.dll from reflection, obviously. Oh and I tested this in Simba. :)
RM, if it would be better for MSI to not connect to the internet, I don't see the harm in having constants for hooks. We could update them as needed, so just have a thread about it which is kept up to date by us or anyone else wanting to help. This could work at least until reflection is fully back up and running (which seems to be heading in the right direction anyway).