Originally Posted by
nicerman1
Hi everyone,
So i'm working on a script and want to use the pottery. I'd like to use the minimap, but the icon is blocked by the icon from jack the tanner (the yellow crafting symbol). I'd like to click on that, so my question is, is there a specific command for this? I couldn't find it immediatly :/. If there isn't what's my best option? I find that SPS isn't precise enough :/.
Thanks for the help!
Hey, you could use the procedure I have in my script
Simba Code:
procedure walkToBank;
var
x, y: Integer;
walkPoint: TPoint;
p: TPoint;
begin
if not isLoggedIn then
begin
if not players[currentPlayer].login then
terminateScript;
end;
writeln('Walking to the bank.');
repeat
if findBitmapToleranceIn(Symbol, x, y, minimap.getBounds(), 30) then break;
walkPoint := Point(minimap.cx - 35 + random(-7, 7), minimap.cy + -70 + random(-7, 7));
mouse(walkPoint, MOUSE_MOVE, MOUSE_HUMAN);
fastClick(MOUSE_LEFT);
wait(gaussRangeInt(500, 800));
minimap.waitPlayerMoving();
until findBitmapToleranceIn(Symbol, x, y, minimap.getBounds(), 30);
mouse(point(x + random(-7, 7), y + 5 + random(-2, 7)), MOUSE_MOVE, MOUSE_HUMAN);
fastClick(MOUSE_LEFT);
wait(gaussRangeInt(300, 400));
minimap.waitPlayerMoving();
end;
This doesn't require SPS only SRL!
You need to declare your 'Symbol' in the script using BitmapFromString
Example
Simba Code:
Symbol := BitmapFromString(7, 7, 'meJwBkwBs/wYVNB9ylCynzCy13B5v' +
'kAkgPwQLKyOGrDO64y+w2i613jG23yugyQwoSC6r1SqZxBBPcRmYw' +
'hphhR1rkQYTMy+v3iiTvhFFZimmzwUPLgcVNQQLKyqZyTO78Cmk1B' +
'WRvAQPLwUMLAcOLw4lSiuYxjK58jW++C+u3xM2XAkSNQkQMwgSMRm' +
'GsiOFsjSy7y2e0w8qUBF9Nis=');
I would say this is your best bet. All this does is walks north until it finds the specific minimap icon. When it finds the icon it will click it.
If you want me to convert jack the tanner icon into Bitmap just tell me or you could use this 'MM_SYMBOL_TANNER' instead, much more efficient.
In the future I would recommend that you look at the Villavu docs http://docs.villavu.com/srl-6/minimap.html
You're welcome