Claymore
2008-12-09 20:27:02
Ok i got lots of questions about reflection.
So if i get a TPoint from the RS screen (E.g. Point(461, 131)) and all it does is add 0.0… I just don't understand this at all.
How do we really get the tile from the MS? I know how to get the on in the MM.
I made a tool for Reflection, i'm to release it later once it has been tested by me.
Here is the rest of my functions.
Well comment me for any mistakes and things to add. Curretly working on a Catherby Fisher. So i would be glad if you could please HELP me, reflection is so strange.
type
TTile = record
x, y: extended;
end;
TTileArray = Array of TTile;
function PointToTile(Tile: TPoint): TTile;
begin
Result.x := Tile.x + 0.0;
Result.y := Tile.y + 0.0;
end;
So if i get a TPoint from the RS screen (E.g. Point(461, 131)) and all it does is add 0.0… I just don't understand this at all.
How do we really get the tile from the MS? I know how to get the on in the MM.
procedure FindMMTile;
var
P0, P: TPoint;
begin
GetMousePos(P.x, P.y);
P0 := MMToTile(P);
WriteLn('MM Tile.x: ' + IntToStr(P0.x));
WriteLn('MM Tile.y: ' + IntToStr(P0.y));
WriteLn('Is in Minimap: ' + BoolToStr(TileOnMM(P0)));
end;
I made a tool for Reflection, i'm to release it later once it has been tested by me.
Here is the rest of my functions.
program ReflectionTool;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Reflection/Reflection.scar}
const
// Smart set up.
Members = True; // Members world?
World = 107; // What world?
Signed = True; // Use signed? Leave true if confused.
High_Detail = False; // Use high detail?
// Set up controls. It supports FKeys only (E.g. F1, F12).
NPC_Control = 8; // Which FKey to use for NPC's?
Me_Control = 9; // Which FKey to use for your player?
MMTile_Control = 10; // Which FKey to use for MM tiles?
Object_Control = 11; // Which FKey to use for finding UID objects?
Quit_Control = 12; // Which FKey to use for stopping the reflection tool?
procedure FindNPCTool;
var
NPCs: array of TNPC;
h, i: Integer;
begin
NPCs := SortNPCs(GetNPCs);
h := High(NPCs);
for i := 0 to h do
begin
WriteLn('NPC'#39's name: ' + NPCs[i].Name);
WriteLn('Tile.y: ' + IntToStr(NPCs[i].Tile.x));
WriteLn('Tile.x: ' + IntToStr(NPCs[i].Tile.y));
WriteLn('NPC'#39's type: ' + IntToStr(NPCs[i].NPCType));
WriteLn('NPC'#39's height: ' + IntToStr(NPCs[i].Height));
WriteLn('NPC'#39's HP ratio: ' + IntToStr(NPCs[i].HPRatio));
WriteLn('In fight? ' + BoolToStr(NPCs[i].InFight));
WriteLn('Is moving? ' + BoolToStr(NPCs[i].IsMoving));
WriteLn('NPC'#39's animation ID: ' + IntToStr(NPCs[i].Animation));
WriteLn('NPC'#39's turn direction: ' + IntToStr(NPCs[i].TurnDirection));
WriteLn('');
Wait(100);
end;
end;
procedure FindMeTool;
var
PMe: TMe;
begin
PMe := GetMe;
WriteLn('Tile.x: ' + IntToStr(PMe.Tile.y));
WriteLn('Tile.y: ' + IntToStr(PMe.Tile.y));
WriteLn('My height: ' + IntToStr(PMe.Height));
WriteLn('My MS.x: ' + IntToStr(PMe.MS.x));
WriteLn('My MS.y: ' + IntToStr(PMe.MS.y));
WriteLn('My animation ID: ' + IntToStr(PMe.Animation));
WriteLn('My speed: ' + IntToStr(PMe.Speed));
WriteLn('My HP ratio: ' + IntToStr(PMe.HPRatio));
WriteLn('My level: ' + IntToStr(PMe.Level));
WriteLn('My login index: ' + IntToStr(PMe.LoginIndex));
WriteLn('My combat id: ' + IntToStr(PMe.Combat));
WriteLn('My HP ratio: ' + BoolToStr(PMe.InFight));
end;
procedure FindMMTile;
var
P0, P: TPoint;
begin
GetMousePos(P.x, P.y);
P0 := MMToTile(P);
WriteLn('MM Tile.x: ' + IntToStr(P0.x));
WriteLn('MM Tile.y: ' + IntToStr(P0.y));
WriteLn('Is in Minimap: ' + BoolToStr(TileOnMM(P0)));
end;
procedure FindObjectTool;
var
P0, P: TPoint;
IUD: UID;
begin
GetMousePos(P.x, P.y);
P0 := MMToTile(P);
IUD := GetObjectAt(P0.x, P0.y);
WriteLn('objType: ' + IntToStr(IUD.objType));
WriteLn('High: ' + IntToStr(IUD.UID.High));
WriteLn('Low: ' + IntToStr(IUD.UID.Low));
end;
begin
SMARTSetupEx(World, Members, Signed, High_Detail);
SetTargetDC(SmartGetDC);
repeat
wait(150);
until (SmartGetColor(253, 233) <> 1118604);
while not IsFKeyDown(Quit_Control) do
begin
if IsFKeyDown(NPC_Control) then
FindNPCTool;
Wait(100);
if IsFKeyDown(Me_Control) then
FindMeTool;
Wait(100);
if IsFKeyDown(MMTile_Control) then
FindMMTile;
Wait(100);
if IsFKeyDown(Object_Control) then
FindObjectTool;
Wait(100);
end;
WriteLn('Thank you for using Reflection Tool! Good luck on your script.');
end.
Well comment me for any mistakes and things to add. Curretly working on a Catherby Fisher. So i would be glad if you could please HELP me, reflection is so strange.