SRL Archive - Research & Development Lounge

function IsAtSymbol


benjaa

2008-05-14 02:40:35

function IsAtSymbol(Name:string) : Boolean;
//by bEnJaa
var
x, y : integer;
begin
if (not LoggedIn) then exit;
Flag;
SymbolAccuracy:=0.5;
if (FindSymbolIn(x, y, Name, MMCX-12, MMCY-12, MMCX+12, MMCY+12)) then
begin
Result:=True;
Writeln('At symbol');
end else
begin
Result:=False;
Writeln('Not at Symbol');
end;
end;

Not too complex, but VERY useful :p Especially when there may be doors involved

Example:

if (FindSymbol(x, y, 'bank')) then Mouse(x, y, 6, 6, true);
if (IsAtSymbol('bank')) then Writeln('Success');

Bobzilla69

2008-05-14 02:54:52

nice, that could be very usefull, i might use it if you dont mind.

starting to script again seeing as i am all most done with school

benjaa

2008-05-14 03:01:21

nice, that could be very usefull, i might use it if you dont mind.


For Sure! :) Thats what its there for
Please Credit XD

Naum

2008-05-14 11:43:56

wouldn't it be the Other way around?
Becuase you cover the symbol so It Mightn't find it, Oh I now see you have symbol Accuracy But to Make it Neater and Shorter :

function AtSymbol(Name:string) : Boolean;  //No Need for the Is ;)
//by bEnJaa
var
x, y : integer;
begin
if (not (LoggedIn)) then exit;
FFlag(0); // This will check if there is No Flag first ;)
if Not (FindSymbolIn(x, y, Name, MMCX-12, MMCY-12, MMCX+12, MMCY+12)) then
begin
Result:=False;
Writeln('NOT At Symbol');
Exit;
end;
Result:=True;
end;
WriteLn('At Symbol');
end;

It Looks much better that way, Anyways GJ

mixster

2008-05-14 11:45:35


if (FindSymbol(x, y, 'bank')) then Mouse(x, y, 6, 6, true);
while not IsAtSymbol('bank') do
Wait(100);
That would be a better use IMO (of course, throw in a TimeFromMark as a failsafe) ;)
Otherwise, nice little function :)

Edit: I like his original layout more than yours NaumanAkhlaQ, though I do agree with FFlag(0);

ShowerThoughts

2008-05-14 12:25:00

Instant ban.

Naum

2008-05-14 12:38:52

From: mixster

if (FindSymbol(x, y, 'bank')) then Mouse(x, y, 6, 6, true);
while not IsAtSymbol('bank') do
Wait(100);
That would be a better use IMO (of course, throw in a TimeFromMark as a failsafe) ;)
Otherwise, nice little function :)

Edit: I like his original layout more than yours NaumanAkhlaQ, though I do agree with FFlag(0);


Ok so.. You gonna Bite my head of :p

Wizzup?

2008-05-14 13:11:48

Also remember to first grab the old SymbolAccuracy, then set it to 0.5, and then set it back to it's original value. :)

Scaper

2008-05-14 14:14:23

not bad i might use and mod this a lil if you dont mind

ShowerThoughts

2008-05-14 14:19:20

Idiots! who the hell is using the symbol! that is instant ban and you will click next to building some times to!

Wizzup?

2008-05-14 14:37:26

From: Hermpie
Idiots! who the hell is using the symbol! that is instant ban and you will click next to building some times to!


What are you talking about…? I always click on the bank symbol.

ShowerThoughts

2008-05-14 14:41:30

… your not you click at the bank…
also you will click sometimes next to the bank.

nielsie95

2008-05-14 16:44:08

So why is that an instant ban again?

ShowerThoughts

2008-05-14 16:50:08

I'm not going to argue with you guys because you guys are mods admins w/e but you know it is not right to use the symbol as FIRST and always choice.
and it causes loss.
also when you are running and in one of the rs mm there gets such black part then the symbols change from place while running and if you use this function stated here it goes wrong…

mixster

2008-05-14 17:02:19

I think someone has been reading paranoid weekly? You won't get banned for symbol clicking even as your first choice… Not to mention you don't have to use this by clicking on a symbol and you could instead use it to make sure you are inside the bank…