Log in

View Full Version : can sum one help me with my sample script?



wantonman
12-28-2011, 05:25 AM
it is telling me no =(

I am standing next to rare tree and I have selected my client.

(Ive tried several attempts and have even used different arrangements/ dtm/ etc...)
(chord is just something I added that is completely unnecessary)





program new;
{$i srl/srl.scar}

procedure Procedure_Tree;
var
x,y:integer;
begin
Wait(1000+RandomRange(200, 700));
if
FindSymbol(x,y,'tree') then
writeln('found tree') else
writeln('no')

end;



begin
ClearDebug();
SetupSRL();
ActivateClient;
sleep(1000);
playsound('chord');
Procedure_Tree;
end.

Brandon
12-28-2011, 06:05 AM
Please.. To make it easier, Indent the code like below.. If you do it this way, it's easier to read and many more people will actually try to help you.. Otherwise they will just assume that you have not read the tutorials and especially the one on standards, take a quick look and then might not respond.

Simba Code:



procedure Procedure_Tree;
var
x,y:integer;

begin
Wait(1000+RandomRange(200, 700));

if FindSymbol(x,y,'tree') then
writeln('found tree')
else
writeln('no');
end;



Anyway your problem is with that FindSymbol. It will only find symbols that are NOT blocked by objects or NPC's or other players.. Lets say your looking for a bank symbol and too many people are standing on it, without some sort of accuracy check, the symbol will never be found.

This is what I use to debug symbols and see what they look like:



Function DebugSymbols: Integer;
var
SymbolBitmap: Integer;
begin
SymbolBitmap := BitmapFromString(15, 5, 'beNpjYGRgYDwABmw+jCx5' +
'vBDE08sOQZK7GYAkRAFQJX7FcISpGK4eKIumZf78+ZiKsZo/HwyQF' +
'cPVA8Xd1XmAJLJKkDMAo5RFgw==');

Result := 494860;
DisplayDebugImgWindow(30, 30);
DrawBitmapDebugImg(SymbolBitmap);
FreeBitmap(SymbolBitmap);
end;

begin
DebugSymbols;
end.

wantonman
12-28-2011, 06:17 AM
im sorry ggzggzgg for my poor standards on coding