SRL Archive - Reflection Discussion

Normal vs S.M.A.R.T vs Reflection


basic_i

2008-08-11 19:52:19

Hi, will someone please tell me the difference between these???

I mean Normal is when you do it in your browser right? S.M.A.R.T. is when it has its own client with a fake mouse and you can minimize it, right? Reflection?????? i don't know the difference! Which is best?

Hugolord

2008-08-11 19:53:41

OffTopic: BCEL owns all.


and reflection is using SMART to get tiles and like npcs and shit and normal is just hard color coding (getting kinda old tbh).

basic_i

2008-08-11 19:57:52

From: Hugolord
OffTopic: BCEL owns all.


and reflection is using SMART to get tiles and like npcs and shit and normal is just hard color coding (getting kinda old tbh).


tiles like the sqares u can see in rs when the colors arent blended???

i used to have a highly detailed wild map with that to ambush noobs lol….so how would one get these tiles?????

also i noticed when you go somewhere in rs, and you click to check the map, the center is where u are, could SRL possibly use that?????

A Random Guy

2008-08-11 20:39:45

SMART and reflection are two different things, but you can only use reflection in SMART. It's not like you have to choose which one you use. Like Hugolord said, normally you would just look for the color of the object you want but with reflection the script looks at the source for the Java applet and finds out exactly where all the NPCs are and where you are on the map. It's a lot easier and more reliable, and because you are using SMART you can still minimize it.

basic_i

2008-08-11 20:43:57

ooooohhh so how do you use/ incorporate reflection into a script, can you also give me an example of where reflection might be used and stuff?? thanks

carlover

2008-08-11 21:17:54

Reflection can be used for basically anything look uo masterkills tutorial on how to download it and then go over to Timer's guide on how to use it. I think its pretty awsome.

basic_i

2008-08-11 22:18:21

From: carlover
Reflection can be used for basically anything look uo masterkills tutorial on how to download it and then go over to Timer's guide on how to use it. I think its pretty awsome.


Thanks very much.

Widget

2008-08-12 04:01:43

Try running this (you'll have to have reflection set up):
program DebugNPCs;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include srl/srl/reflection/reflection.scar}
var
i:integer;
NPCs:array of TNPC;
Peoples: array of TPlayer;
s:string;
p:TPoint;
begin
SetupSRL;
SetupReflection;
SmartSetup('world55', True, False, False);
sleep(10000);
while true do
repeat
try
ClearDebug;
NPCs := SortNPCs(GetNPCs);
p := GetMyPos;
writeln('Tile ('+inttostr(p.x)+', '+inttostr(p.y)+')');
writeln('MS ('+inttostr(TileToMS(p,20).x)+', '+inttostr(TileToMS(p,20).y)+')');
Writeln('NPCs on screen: '+inttostr(GetArrayLength(NPCs)));
for i := 0 to High(NPCs) do
begin
s := padr(NPCs[i].Name,20);
s := s + ' ID: '+padr(inttostr(NPCs[i].NPCType),7);
s := s + ' ('+inttostr(NPCs[i].Tile.X)+', '+inttostr(NPCs[i].Tile.Y)+')';
s := s + ' In Fight: '+BoolToStr(NPCs[i].InFight);
s := s + ' Is Moving: '+BoolToStr(NPCs[i].IsMoving);
Writeln(s);
end;
Peoples := GetPlayers;
for i := 0 to High(Peoples) do
begin
s := padr(Peoples[i].Name,15);
s := s + ' ('+inttostr(Peoples[i].Tile.X)+', '+inttostr(Peoples[i].Tile.Y)+')';
s := s + ' Level: '+Padr(IntToStr(Peoples[i].Level),2);
s := s + ' Is Moving: '+Padr(BoolToStr(Peoples[i].Speed > 0),5);;
s := s + ' HP%: '+Padr(IntToStr(Peoples[i].HPRatio),3);
Writeln(s);
end;
sleep(1500);
except
writeln('oh noes!')
sleep(1500);
end;
until False;
end.

If it says something like unknown identifier X or MS, then update your reflection subversion, the whole thing has been TPointererized

SMART simply makes SCAR not use up your mouse so you can do other things on your computer, and it has Reflection (which lets it read variables such as NPC positions) which is being maintained by various SRL Members.