SRL Archive - Reflection Development

Simple FindObjReflection


NiCbaZ

2008-08-13 00:26:51

Function FindObjREF(TileX,TileY: integer; chooseop: string): boolean;
var
XYZ: TPoint;
Tiles: TpointArray;

begin
Tiles:= [Point(TileX,TileY)];
if (DistanceFrom(Tiles[0]) > 5) then
begin
if not TileOnMM(Tiles[0]) then
begin
Writeln('You are Either Very Far Away From your Obj or in a Random');
Result := False;
Exit;
end;
WalkToTile(Tiles[0], 0, 0);
FFlag(1);
Wait(100);
end;
XYZ:= TileToMS(Tiles[0], 16);
Mouse(XYZ.X, XYZ.Y, 4, 4, False);
Wait(80 + Random(120));
Result := ChooseOption(chooseop);
end;

use GetMyPos , or Sumil's path generator to the the Tiles of the the object you finding, put them in, and put in what option. And theres a good finder for things like banks, spinning wheels, wells ect…. i just made it ib my script should be usefull

The_Shermanator

2008-08-13 03:15:31

If I was making a Reflection script, I would definitely use this, Goodjob!:D

sjlou

2008-08-13 05:53:15

i wouldn't really call this a find object cause you have to put the cords in the script so it walks to the tile on the MM where the object is(or am i wrong ?)
I think a real find object would work with Id's
what you made is something like ChooseOptionTile or something idk XD

Gu3st...

2008-08-13 09:21:15

From: dushii
i wouldn't really call this a find object cause you have to put the cords in the script so it walks to the tile on the MM where the object is(or am i wrong ?)
I think a real find object would work with Id's
what you made is something like ChooseOptionTile or something idk XD


1st it walks to the tile, and clicks on the tile, so that if theres a object there your mouse would click on it.

ShowerThoughts

2008-08-13 09:23:01

Pretty obvious that this is made for static objects like tree's and stuff ;)

Shady?

2008-08-13 12:53:42

Writeln('You are Either Very Far Away From your Obj or in a Random');

What if i'm trying to find an objet wich is inside a random event? (What i mean is that you should delete that "or in a Random" text)
Just a suggestion, its a great and usefull func btw.

TViYH

2008-08-13 16:45:05

I don't suggest using tiles in random events..

NiCbaZ

2008-08-13 17:23:10

sorry about the random event thing, i used that justcause in my script , i walk to the write place, and if it cannot find the obj its, in a random event…… and no its not for static trees hermpie, stuff like cooking ranges, bankes ect..

TViYH

2008-08-13 20:12:13

If it's for cooking ranges, then it can be used for static trees, too.

Cooking ranges don't move, nor do trees.

NiCbaZ

2008-08-13 22:02:23

From: TheVoiceInYourHead
If it's for cooking ranges, then it can be used for static trees, too.

Cooking ranges don't move, nor do trees.


trees fall down……

TViYH

2008-08-13 23:24:03

But they're still there, are they not?

Method

2008-08-13 23:44:17

From: TheVoiceInYourHead
But they're still there, are they not?


You can still interact with ranges after you "use" them. Trees are not the same way. The tiles may still be there, but the object isn't there anymore.

TViYH

2008-08-14 00:01:40

Which is why you would do something along the lines of:

if Not FindObjREF then begin repeat Inc(Failed) repeat Wait(120); FindNormalRandoms; until(FindObjRef or Failed=5); end;

NiCbaZ

2008-08-14 01:18:10

it doesnt return false if the object is not there and it does move the mouse and click…. thats why you use it on things like stairs ect…

TViYH

2008-08-14 01:19:39

It should be a boolean =/

NiCbaZ

2008-08-14 02:25:53

Function FindObjREF(TileX,TileY: integer; chooseop: string): boolean;


It is but how can it turn False if it does not find the Item?????? it doesnt use color, it will always click…

TViYH

2008-08-14 09:20:48

if not ChooseOption? does that not return a true or false?