SRL Archive - General Botting Help

minimap.findSymbol question


Spaceblow

2014-08-16 13:19:30

So I'm adjusting a procedure by adding a failsafe. The player has to run to the redberry bushes, if it somehow ends up in another place while it should be at the redberry bushes, the script will terminate. I did this by checking for an altar and a tree symbol in the minimap. If it returns true it will go to the next procedure, if not then it will terminate the script.

This is the minimap when I'm at the redberry bushes place so you would know what symbols I'm talking about:

[ATTACH=CONFIG]23806[/ATTACH]

You can see both the symbols (altar symbol and tree symbol) are on the minimap, so normally it has to start the next procedure, I did the following:
  if (minimap.findSymbol(altarSymbol, MM_SYMBOL_ALTAR, minimap.getBounds()) and minimap.findSymbol(treeSymbol, MM_SYMBOL_TREE, minimap.getBounds())) then
begin
writeLn('--------------------------------------------------------------------------- We found the redberry bushes.');
end else
begin
writeLn('--------------------------------------------------------------------------- We somehow didn''t find the redberry bushes, maybe you''re at the wrong location, terminating script.');
terminateScript;
end;

So if it finds altar symbol and tree symbol it goes to the next procedure, otherwise it terminates. But for me it doesn't do that, it does the opposite thing, it terminates the script. After a few minutes of trying to figure out what's wrong I tried this:

  if not (minimap.findSymbol(altarSymbol, MM_SYMBOL_ALTAR, minimap.getBounds()) and minimap.findSymbol(treeSymbol, MM_SYMBOL_TREE, minimap.getBounds())) then
begin
writeLn('--------------------------------------------------------------------------- We found the redberry bushes.');
end else
begin
writeLn('--------------------------------------------------------------------------- We somehow didn''t find the redberry bushes, maybe you''re at the wrong location, terminating script.');
terminateScript;
end;

And it works! But why? Now it's saying 'if I don't find altar symbol and tree symbol I'll continue, otherwise terminate if I find those symbols', but it does the opposite thing, it doesn't make any sense?

Sin

2014-08-16 13:26:16

I dont think the symbols have been updated. What I would do is create a few new bitmaps and override the old ones.

theorange

2014-08-16 14:42:03

From: Spaceblow
So I'm adjusting a procedure by adding a failsafe. The player has to run to the redberry bushes, if it somehow ends up in another place while it should be at the redberry bushes, the script will terminate. I did this by checking for an altar and a tree symbol in the minimap. If it returns true it will go to the next procedure, if not then it will terminate the script.

This is the minimap when I'm at the redberry bushes place so you would know what symbols I'm talking about:

[ATTACH=CONFIG]23806[/ATTACH]

You can see both the symbols (altar symbol and tree symbol) are on the minimap, so normally it has to start the next procedure, I did the following:
  if (minimap.findSymbol(altarSymbol, MM_SYMBOL_ALTAR, minimap.getBounds()) and minimap.findSymbol(treeSymbol, MM_SYMBOL_TREE, minimap.getBounds())) then
begin
writeLn('--------------------------------------------------------------------------- We found the redberry bushes.');
end else
begin
writeLn('--------------------------------------------------------------------------- We somehow didn''t find the redberry bushes, maybe you''re at the wrong location, terminating script.');
terminateScript;
end;

So if it finds altar symbol and tree symbol it goes to the next procedure, otherwise it terminates. But for me it doesn't do that, it does the opposite thing, it terminates the script. After a few minutes of trying to figure out what's wrong I tried this:

  if not (minimap.findSymbol(altarSymbol, MM_SYMBOL_ALTAR, minimap.getBounds()) and minimap.findSymbol(treeSymbol, MM_SYMBOL_TREE, minimap.getBounds())) then
begin
writeLn('--------------------------------------------------------------------------- We found the redberry bushes.');
end else
begin
writeLn('--------------------------------------------------------------------------- We somehow didn''t find the redberry bushes, maybe you''re at the wrong location, terminating script.');
terminateScript;
end;

And it works! But why? Now it's saying 'if I don't find altar symbol and tree symbol I'll continue, otherwise terminate if I find those symbols', but it does the opposite thing, it doesn't make any sense?

Many of the MM symbols like sin said have not had their bitmaps updated.

To change the BTM yourself, take a snipping of the minimap symbol, then crop it it's just part of the minimap symbol and nothing else, then try to pick a unique color on it using simba's color picker. Save this.

Then use Simba - tools - bitmap conversion. It will output a string in simba, and use that string to replace the bmp in the minimap file (SRL-6/Lib/Interfaces)

MM_SYMBOL_BANK:
with result do
begin
name := 'Bank';
bmp := BitmapFromString(8, 6, 'meJz7eX7bj3Nbv53ZjIa+n1hbl5UT' + //Replace all of this with what simba gives you for the new symbol.
'5RcBRb4h8UXVWbuPfjm62sLEnYVbG4jYRU3ki6boLD+js/XOlyOrI' + //Replace all of this with what simba gives you for the new symbol.
'OJAQeW2Nca7HutvuKW39d6HA8ssjN2A4gIW0Xqrr2rNPCLgXyg549' + // Replace all of this with what simba gives you for the new symbol.
'DrfUvMjVyB4oJ2ifrr72lM3ifomqa57BwAxABEEg=='); //Replace all of this with what simba gives you fro the new symbol.
color := YOUR-UNIQUE-COLOR-HERE;
end;
(Make a copy of the minimap file before editing, then once you make your changes, save it as minimap.simba and then make sure to test it with findSymbol.

Additional examples of old MM symbols being updated:
https://github.com/SRL/SRL-6/commit/e77d85b4f30324255a5b48748d789c6036a07e76 (Red outline means it was removed, green was added)

Spaceblow

2014-08-16 17:02:00

From: Sin
I dont think the symbols have been updated. What I would do is create a few new bitmaps and override the old ones.


From: theorange
Many of the MM symbols like sin said have not had their bitmaps updated.

To change the BTM yourself, take a snipping of the minimap symbol, then crop it it's just part of the minimap symbol and nothing else, then try to pick a unique color on it using simba's color picker. Save this.

Then use Simba - tools - bitmap conversion. It will output a string in simba, and use that string to replace the bmp in the minimap file (SRL-6/Lib/Interfaces)

MM_SYMBOL_BANK:
with result do
begin
name := 'Bank';
bmp := BitmapFromString(8, 6, 'meJz7eX7bj3Nbv53ZjIa+n1hbl5UT' + //Replace all of this with what simba gives you for the new symbol.
'5RcBRb4h8UXVWbuPfjm62sLEnYVbG4jYRU3ki6boLD+js/XOlyOrI' + //Replace all of this with what simba gives you for the new symbol.
'OJAQeW2Nca7HutvuKW39d6HA8ssjN2A4gIW0Xqrr2rNPCLgXyg549' + // Replace all of this with what simba gives you for the new symbol.
'DrfUvMjVyB4oJ2ifrr72lM3ifomqa57BwAxABEEg=='); //Replace all of this with what simba gives you fro the new symbol.
color := YOUR-UNIQUE-COLOR-HERE;
end;
(Make a copy of the minimap file before editing, then once you make your changes, save it as minimap.simba and then make sure to test it with findSymbol.

Additional examples of old MM symbols being updated:
https://github.com/SRL/SRL-6/commit/e77d85b4f30324255a5b48748d789c6036a07e76 (Red outline means it was removed, green was added)


You were both right, it was because of the outdated symbols. Thank you very much, both of you!

In case someone needs the updated bitmaps for the altar and tree symbol, here you go:
    MM_SYMBOL_ALTAR:
with result do
begin
name := 'Altar';
bmp := BitmapFromString(12, 9, 'meJx7tHvxuu7yBF8HMz1VWzOt/Fh' +
'fIAIygFygIFDq0e7F1SmhlgYa5oZqng7GEX42O+a27JzXCmR42hsC' +
'BYFSQAV+DmYmeioeDkYxAQ7Fqb7vL+8AIiADyAUKAqV87E0DnS3sz' +
'HSi/e1rcsKOrJv27/VZIAIygFygIFAq0MkixNUqLdxty8zGV+c2A2' +
'X/vzsPREAGkAsUBEqFuFmFultnRXsBua9R1bwGqwFKARUEuVi72xs' +
'nhLk0FsUc2zQDYheQAeQCBYFSQAX+9qb2VgbBXjZp0Z7VOWEfgG6+' +
'sgPISI10BwoCpQIdzWqSQpysDF1tDSP97NKiPPcu7Ny3uAvIAHKBg' +
'k5WBkAFAEZxkcA=');
color := 16772303;
end;
    MM_SYMBOL_TREE:
with result do
begin
name := 'Tree';
bmp := BitmapFromString(12, 9, 'meJzTSwhx76iy3T7PccV0g0l5atP' +
'zlabnyzbEytdFa3VnOhUma1pYm+ycqzerRG52kdikDOGpWXwb+9kn' +
'ZrFkubJmuvBXBylPzNRrTBHfMoF7YgpLtR9jlTdToRdzRwLLjHzmT' +
'FemNEeWQg/ehhCZomCeFQ1sHXFMua7M2c5ANUyVAcz5HkyBFoyhZg' +
'wp9kwZjlzxDixtMbz+1jw2uty2WtwBdox5yYxxtozuetzmyozxTox' +
'FHszpTkwFKfyGevwaciwOWryuFgyBQUxe+hx2ypy2MaxuqWyRliwh' +
'VkzZMVx2/ryWRoKGRhwuvsze/ey+0awe2Ry2efz6JmxOJoyO5hzBt' +
'tzWQGUhfBbOPJYJrGGz2UOncDvk85k4cxvZc5l4cRmYyrqa81lp8O' +
'qq8uqo8RiasUfN54pbym2Xw2aVxGUezafvwqrvBADudFGa');
color := 752464;
end;

EDIT: also added the updated bitmap for the training dummy:
    MM_SYMBOL_TRAINING_DUMMY:
with result do
begin
name := 'Training Dummy';
bmp := BitmapFromString(10, 11, 'meJzr2LC3ecLk7Yunr5lQNSHbCY' +
'iAjK2Lp2d2Tw5Ydbx2yqzZZ+52zZpdHWvTl+kIREBG/uTZsfvuRff' +
'MXjWrv3nB0s4Td6u62yujLYEopqXdZ8/92Bkrls3sX9pRXBZtkzVl' +
'dsOFV6lNLV7l9S6H3rj1ziuNtgFKNSXYNCfa5IWYRfXNzjhwz2vJI' +
'Yv6iUBuS6JNS7JdSW5YTlFydpCpc0G585LDMbtuBVfUArkF+TFl2c' +
'FdvS2hS3a6z1yrteGGfuUE14454XvuBk9fETd/fU9P05op7dET5vq' +
'deGc8b2+sjzEQ2c/ZHrzvUWL/TKBUbm1D2LJ9nlNXB689kZDgHxfj' +
'FbbigM+UVbEr9jdPmmJc3B3ROmlqW3VJW1t8RWFMYWZJayuQG9Uyw' +
'ayoQyEkVU7boLkgfeOMrqk1qUAEZDQXpMmoa8n5xQMA7yGhiw==');
color := 4630208;
end;

The Mayor

2014-08-16 17:51:41

From: Spaceblow
You were both right, it was because of the outdated symbols. Thank you very much, both of you!

In case someone needs the updated bitmaps for the altar and tree symbol, here you go:

snip


Can you post your actual bmps here so I can take a look

Spaceblow

2014-08-16 19:26:04

From: The Mayor
Can you post your actual bmps here so I can take a look
I deleted them after updating the bitmaps… But because I think you're asking this for a reason I decided to do it again: printscreen the minimap, crop the picture, get the new strings, test if it works, …

I hope you meant pictures when you said 'actual bmps'. Here you go:

Training dummy:

[ATTACH=CONFIG]23814[/ATTACH]
    MM_SYMBOL_TRAINING_DUMMY:
with result do
begin
name := 'Training Dummy';
bmp := BitmapFromString(10, 11, 'meJzr2LC3eeLk7Yunr5lQNSHbCY' +
'iAjK2Lp2d2Tw5Ydbx2yqzZZ+52zZpdHWvTl+kIREBG/uTZsfvuRff' +
'MXjWrv3nB0s4Td6u62yujLYEopqXdZ8/92Bkrls2csLSjuCzaJmvK' +
'7IYLr1KbWrzK610OvXHrnVcabQOUakqwaU60yQsxi+qbnXHgnteSQ' +
'xb1E4HclkSblmS7ktywnKLk7CBT54Jy5yWHY3bdCq6oBXIL8mPKso' +
'O7eltCl+x0n7lWa8MN/coJrh1zwvfcDZ6+Im7++p6epjVT2qMnzPU' +
'78c543t5YH2Mgsp+zPXjfo8T+mUCp8rbOsGX7PKeuDl57IiHBPy7G' +
'K2zFAZ8pq2JW7M+prnVvm5Mxef609pqStrb4isKYwsyS1lYgN61/t' +
'k/bbN34gvD4pAk1xRtndE2tSQUiIGNSXUlyenZAdTcAK7qkkA==');
color := 4630208;
end;

Altar:

[ATTACH=CONFIG]23815[/ATTACH]
    MM_SYMBOL_ALTAR:
with result do
begin
name := 'Altar';
bmp := BitmapFromString(12, 10, 'meJx7tHvxuu7yBF8HMz1VWzOt/F' +
'hfIAIygFygIFDq0e7F1SmhlgYa5oZqng7GEX42O+a27JzXCmR42hs' +
'CBYFSQAV+DmYmeioeDkYxAQ7Fqb7vL+8AIiADyAUKAqV87E0DnS3s' +
'zHSi/e1rcsKOrJv27/VZIAIygFygIFAq0MkixNUqLdxty8zGV+c2A' +
'2X/vzsPREAGkAsUBEqFuFmFultnRXsBua9R1bwGqwFKARUEuVi72x' +
'snhLk0FsUc2zQDYheQAeQCBYFSQAX+9qb2VgbBXjZp0Z7VOWEfgG6' +
'+sgPISI10BwoCpQIdzWqSQpysDF1tDSP97NKiPPcu7Ny3uAvIAHKB' +
'gk5WBkAFZ+a0LG8pTg/zdLExDPSwqs2Nqs+NAjKAXKAgUAqoAADYVqBy');
color := 16772820;
end;

Tree:


[ATTACH=CONFIG]23816[/ATTACH]
    MM_SYMBOL_TREE:
with result do
begin
name := 'Tree';
bmp := BitmapFromString(12, 9, 'meJzTjQ9x76iy3T7PccV0g0l5atP' +
'zlabnyzbEytdFa3VnOhUma1jamuycqzerRG52kdikDOGpWXwb+9kn' +
'ZrFkubJmuvBXBylPzNRrTBHfMoF7YgpLtR9jlTdToRdzRwLLjHzmT' +
'FemNEeWQg/ehhCZomCeFQ1sHXFMua7M2c5ANUyVAcz5HkyBFoyhZg' +
'wp9kwZjlzxDixtMbz+1jw2uty2WtwBdox5yYxxtozuetzmyozxTox' +
'FHszpTkwFKfyGevwaciwOWryuFgyBQUxe+hx2ypy2MaxuqWyRliwh' +
'VkzZMVx2/ryWRoKGRhwuvsze/ey+0awe2Ry2efz6JmxOJoyO5hzBt' +
'tzWQGUhfBbOPJYJrGGz2UOncDvk85k4cxvZc5l4cRmYyrqa81lp8O' +
'qq8uqo8RiasUfN54pbym2Xw2aVxGUezafvwqrvBADuLlGa');
color := 752464;
end;

EDIT:

Clothes shop:

[ATTACH=CONFIG]23817[/ATTACH]
    MM_SYMBOL_SHOP_CLOTHES:
with result do
begin
name := 'Clothes Shop';
bmp := BitmapFromString(10, 11, 'meJxlic9Lg3Achv8J23T6Ub9KjK' +
'Bfzu90u47yqLGCtcCCBXXQRbBbeGijthbzUAYziLX6S3v1EEHwHJ7' +
'3eZlhM8PW9QYr5T/mltuNhg9fH2bdBbPv1cnwFhGXUXe8+MZb5/zz' +
'bT+O9uLIWmWH6xwRFzsPd7O5cjei15nxngIIJiILw1q7U70eVA48d' +
'Tmnl2lB9oQpXg3kdoc0rphc8o+2lwtpMQY7eYopmw1SOWMtTeO1Xo' +
'/SsfR8D+R0gomIq3ybUv+sMk1+EU/7f16n6neFZLTxmACIGBwjanp' +
'L012ItOkIfiBcXhT4ASaiqrpEtqo6RJyoSYpFZBVCvIz2D5TBVl8=');
color := 2198398;
end;

EDIT 2:

Quest:

[ATTACH=CONFIG]23826[/ATTACH]
    MM_SYMBOL_QUEST:
with result do
begin
name := 'Quest';
bmp := BitmapFromString(8, 9, 'meJwB2AAn/zQzTiUoShodQmtUXmlS' +
'WhocPSUnSjg1UV1QYI9va5NZTtOFZb95XZJZTpBubVtMWTErSbJzX' +
't2Sb9aHZ8uAYtySb7ByXSslQFA3Sb5nS8l6WuajgOSee71zVKdbQU' +
'YwQtGLbNyQa9+WcuSadd2SbtOKaNiNadCLbDwrQZxTPb9uTsp8WsF' +
'3V7BnSZNNNzopQC0rUahkU7pqSq9gQ6ZbP7VmSKJfTionTGdIV3FK' +
'UWA5PKVaQ55VP2Q6PW5IUGJCUDMyWhogTRIcTVU9VVI5TRMeUhwjV' +
'TMxVhLaVko=');
color := 14914681;
end;

EDIT 3: SEE THIS ISSUE