SRL Archive - OSR Help

FindSymbol .. Not Finding


Gushers

2012-01-02 23:27:07

Okay so I went and looked at Coh3n's thread on a tutorial for this and I copied the code and tried it and it didn't work. Help out please?
program FindSymbolExample;

{$include SRL/SRL.scar}

function WalkToWillows: Boolean;
var x, y : Integer;
begin
if not LoggedIn then
Exit;
SetRun(True);
SymbolAccuracy := 0.5;//Notice how I set the accuracy to 50%, so it will still work if it only finds half of the symbol.
Result := FindSymbol(x, y, 'fish');
if Result then
begin
Writeln('Found fishing symbol!');
Mouse(x, y, 4, 4, True);//Click the fishing symbol.
end else
begin
Writeln('Couldn''t find the fishing symbol');
Logout;//Logout and execute script if it can't find the symbol.
TerminateScript;
end;
SymbolAccuracy := 0.8;//Make sure you set the SymbolAccuracy back to the defaut accuracy, 0.8 or 80%.
end;

begin
ClearDebug;
SetupSRL;
ActivateClient;
if WalkToWillows then
Writeln('Walking to Willows!')
else
Writeln('Not walking to Willows.');
end.

Brandon

2012-01-03 00:11:23

Find symbol won't work if there is someone or too many ppl standing on it..

Gushers

2012-01-03 00:12:12

There wasn't anybody in my world.. "/

Brandon

2012-01-03 00:16:34

From: Gushers
There wasn't anybody in my world.. "/


Hmm well symbol finding in the include uses bitmaps and they can probably either be outdated OR the accuracy of your search can be too high.. It sorta depends.. Me personally I use a TPA of a grey colour for the outer circle then I check to see if my symbol colours is inside the grey.. if it is, symbol found..

Gushers

2012-01-03 00:27:34

Okay thanks man, I'll give that a shot.

Coh3n

2012-01-03 02:00:36

Symbol finding doesn't work right now due to a bug in Simba. The bug has been found and fixed and will work with the next release. If you wish, you can download the (not released) newest version here. Symbol finding should then work. :)

Wizzup?

2012-01-03 05:47:51

From: Coh3n
Symbol finding doesn't work right now due to a bug in Simba. The bug has been found and fixed and will work with the next release. If you wish, you can download the (not released) newest version here. Symbol finding should then work. :)


You don't want that version.

Coh3n, Simba Stable is 0.99, Simba Prev is 0.98. But the auto build is not working atm.

Gushers

2012-01-03 06:23:32

Alrighty thank you Coh3n I'll just wait till the next version is released.
By the way, you have an amazing tutorials on just about everything big thank you on that as well!

Coh3n

2012-01-03 15:33:16

From: Wizzup?
You don't want that version.

Coh3n, Simba Stable is 0.99, Simba Prev is 0.98. But the auto build is not working atm.
Has 0.99 been added to the updater yet? Is that the one with the bitmap fix? Does it also have Dgby's FindFile fix?

Wizzup?

2012-01-03 20:06:20

From: Coh3n
Has 0.99 been added to the updater yet? Is that the one with the bitmap fix? Does it also have Dgby's FindFile fix?


982 will fix all know issues. I will release it tomorrow.