SRL Archive - OSR Help

FindDTMRotated Help?


rya

2010-02-28 16:35:04

So im trying to make the walking part of my scirpt and i post the start of the function in to a new scar to try it out and see if it compiles and it does not compile
I think its to do with the parameters of FindDTMRotated but im not to sure

{.include srl/srl.scar}


Function Walker:Boolean;

Var a,x,y,WalkDTM:Integer;

Begin
If Not LoggedIn Then Exit;

{ If (Loc='Bank') Then
If (LocTo='Tree1') Then
Begin
}
WalkDTM := DTMFromString('78DA632C676660D0636440066DF5450C46401' +
'A24FA1F08180B806AE450D5BCFAFA1D4CC34419DB806AD450D57C' +
'7CFF0E554D1D508D150173407619E2570300B830144C');

If FindDTMRotated(WalkDTM,x,y,MMX1,MMY2,MMX2,MMY2,-20,20,2,a) Then
Begin
WriteLn('FoundDTM')
Mouse(x,y,5,5,True);
End Else WriteLn('Not Found DTM');


End;



Begin
SetUpSRL
Wait(3000);
Walker;
End.

Thanks for any help
~Rya

Wanted

2010-02-28 16:44:08

Degrees(-20), Degrees(20), Degrees(2)

Also, a needs to be :Extended.

rya

2010-02-28 16:48:32

From: IceFire908
Degrees(-20), Degrees(20), Degrees(2)

Also, a needs to be :Extended.


Umm what need to be :Extended
Could you maybe please post what that lines needs to look like
i would be forever thanksfull

Wanted

2010-02-28 16:52:33

{.include srl/srl.scar}


Function Walker:Boolean;

Var
x,y,WalkDTM:Integer;
A: Extended; // " var Angle: Extended"

Begin
If Not LoggedIn Then Exit;

{ If (Loc='Bank') Then
If (LocTo='Tree1') Then
Begin
}
WalkDTM := DTMFromString('78DA632C676660D0636440066DF5450C46401' +
'A24FA1F08180B806AE450D5BCFAFA1D4CC34419DB806AD450D57C' +
'7CFF0E554D1D508D150173407619E2570300B830144C');

If FindDTMRotated(WalkDTM,x,y,MMX1,MMY2,MMX2,MMY2,Degrees(-20),Degrees(20),Degrees(2),A) Then
Begin
WriteLn('FoundDTM')
Mouse(x,y,5,5,True);
End Else WriteLn('Not Found DTM');

FreeDTM(WalkDTM); // Free it
End;

rya

2010-02-28 17:02:20

Thany you for the help:)