Now, Im planning to make a script with refl. I made debugger.. rsupdate atm..so I though I share this, may come handy and spare few minutes..
Also I would like to know is there something similar to items like NPCs..? Im pretty sure it's possible..
This one, updates, v2, is pretty more useful, you can easily create and print tile arrays with this..
F9 to create a point & press F10 whenever you want to print it..
SCAR Code:
program Debug;
{.Include SRL\SRL\Misc\Smart.Scar}
{.Include SRL\SRL.Scar}
{.Include SRL\SRL\Reflection\Reflection.Scar}
var
mx, my, dx, dy, I,
Speed, Animation : integer;
MMAngleDeg : extended;
CharMoving : boolean;
NPCs : array of TNPC;
Path : Tpointarray;
Output, Piece : String;
const
GeneratePathArray = True;
//True to great tile array,
//later F10 to print it..
//If false then it works as refl. debugger
PrintNPCs = False; //Only if above is False.
begin
SmartSetup('world106', True, True, False);
SetTargetDC(SmartGetDC);
SetupSRL;
SetupReflection;
repeat
Wait(200);
If IsFkeydown(10) then
begin
for i:=0 to High(Path) do
begin
Piece := ' Point('+inttostr(path[i].x)+', '+inttostr(path[i].y)+'),';
If I = High(Path) then Piece[length(Piece)] := ']';
Output := Output + Piece;
end;
writeln('Tiles := ['+Output+';');
end;
if IsFkeyDown(9) then
if GeneratePathArray then
begin
Setlength(Path, Length(Path)+1);
GetMyPos(mx, my);
Path[High(Path)] := Point(mx, my);
writeln('Path['+inttostr(high(path))+']= '+inttostr(path[i].x)+', '+inttostr(path[i].y));
end else
begin
GetMyPos(mx, my);
Speed := GetSpeed;
MMAngleDeg := GetMinimapAngleDeg;
CharMoving := CharacterMoving;
Animation := GetAnimation;
GetFlag(dx, dy);
if PrintNPCS then NPCs := GetNPCs;
writeln('GetMyPos = '+inttostr(mx)+', '+inttostr(my))
writeln('GetSpeed = '+inttostr(speed))
writeln('GetMinimapAngleDeg = '+floattostr(MMAngleDeg))
writeln('CharacterMoving = '+booltostr(CharMoving))
writeln('GetAnimation = '+inttostr(Animation))
writeln('Dest = '+inttostr(dx)+', '+inttostr(dy))
For i:= 0 to high(NPCs) do
writeln(
'Name='+NPCs[i].Name+
' X='+inttostr(NPCs[i].TileX)+
' Y='+inttostr(NPCs[i].Tiley)+
' Type='+inttostr(NPCs[i].NPCType)+
' Height='+inttostr(NPCs[i].Height)+
' Fight='+booltostr(NPCs[i].InFight)+
' Moving='+booltostr(NPCs[i].IsMoving)+
' Anim='+inttostr(NPCs[i].Animation));
writeln('');
end;
until false;
end.