SRL Archive - Help and Support

FindSymbol(x,y,'bank');


tylanbo

2007-11-04 01:06:01

Here is the error I get:


Successfully compiled
Please Enter a Valid Symbol Name!
Successfully executed

while running this tester code:


if FindSymbol(x,y,'bank') then
begin
Disguise('found =)');
Mouse(x,y,3,3,true);
end else
Disguise('not found =(');

I already looked at the method list and saw that 'bank' is a valid input, please explain.

BobboHobbo

2007-11-04 01:08:06

Umm, weird… Maybe you deleted something in Symbol.SCAR

EDIT**
This is what i use in my script:
if FindSymbol(x, y, 'bank') then

Copy and paste, maybe SCAR is being retarted :D idk…

Jason2gs

2007-11-04 01:42:53

Just tested, gave me an error. Tried updating SRL… Same error :|

HyperSecret

2007-11-04 01:51:47

i believe it is something wrong in the GetSymbolColorIn function b/c it give me that error for every symbol argument i have tried also…

R0b0t1

2007-11-04 12:12:52

Yeah, takes you a while to figure out SCAR's stupid errors.


Try getting a dev to dev the SVN?

tylanbo

2007-11-04 19:13:18

From: HyperSecret
i believe it is something wrong in the GetSymbolColorIn function b/c it give me that error for every symbol argument i have tried also…


FindSymbol(x,y,'tree') works just fine, I use that on my banker script but when i put in 'bank' it throws an error, so the actual methods works except for 'bank' for all I know.

WT-Fakawi

2007-11-04 19:39:01

Try this:

BankColor := GetSymbolColor(dx, dy, 'bank')

Its better. Just scan for the unique BankColor (<- is global in SRL ) when walking to the bank. then switch to

Function ClickDTMRotated(TheDTM:Integer):Boolean;
var

WhichAngle: ExtEnded;
FBx, FBy: Integer;

begin
If FindDtmRotated(TheDTM, FBx, FBy, MMX1, MMY1, MMX2, MMY2,
Radians(-30), Radians(30), 0.5,
WhichAngle) Then
begin
If rs_onMiniMap(FBx, FBy) Then
begin
Mouse(FBx, FBy, 0, 0, True);
FTWait(4);
FFlag(0);
Result := True;
End
End
End;

Make sure you make the proper Bank DTM made of colors 195386 (I believe )and center with tol 255 (any color)

and use:

   if FindColor(Bx, By, BankColor, MMx1, MMy1, MMx2, MMy2) then
begin
Mouse(Bx, By, 2, 2, True);
FTWait(4);
Wait(3000 + Random(1000));
FFlag(0);
end

Below is my WalkToDraynor, very flawless:


Procedure WalkToDraynor;
var
Bx, By, Mark3:integer;
begin
SetRun(False);
WaterWalk2( 420, 240, 60, ( 10 + Random( 10 ) ), 10, -( 20 - Random( 15 ) ), 1, 1, 9 );
MarkTime(Mark3);
repeat
If not Loggedin Then break;
wait(100);
If ( TimeFromMark( Mark3 ) > 180000 ) Then begin Logout; Exit; End;
FindNormalRandoms;
WaterWalk2( 420, 240, 60, ( 10 + Random( 10 ) ), 10, -( 20 - Random( 15 ) ), 1, 1, 5 );
until FindColor(Bx, By, BankColor, MMx1, MMy1, MMx2, MMy2) or ClickDTMRotated(DB2);
if FindColor(Bx, By, BankColor, MMx1, MMy1, MMx2, MMy2) then
begin
Mouse(Bx, By, 2, 2, True);
FTWait(4);
Wait(3000 + Random(1000));
FFlag(0);
end
makeCompass('N');
FFlag(0);
FTWait(4);
ClickDTMRotated(DB2);
If Not OpenBankFast('db') Then if not OpenBankQuiet('db') then LogOut;
End;

R0b0t1

2007-11-04 19:51:51

Elitists…


^^

tylanbo

2007-11-04 22:05:14

Thanks a lot fawki, I'll be sure to use your code to help create mine :D

You sure that there is not an error in SRL though?