SRL Archive - SRL Suggestions

FindSymbol - Summoning Icon


Sin

2012-03-05 16:53:54

procedure IdentifySummoningIcon;
var
summoning,x,y:Integer;
begin
Summoning := BitmapFromString(9, 8, 'meJw7cAAK5CK9f/7+aeETNX/+/AOo' +
'QMgCJMWrZI0mlV7l+OLSEaAWPhE5NKnJm9YpVWcBNWJKaQdl+zX0A' +
'mWB2tGkgG4ASgFJbmV+ZCmgaUAHABFQr3NiPhChmQYUAcoCNcIdCQ' +
'DNvH2k');

if FindBitmapSpiralTolerance(summoning,x,y,MMX1,MMY1,MMX2,MMY2,4) then
begin
writeLn('Found summoning Bitmap, clicking');
MMouse(x,y,0,0);
end;
end;

Tested it with 3 different locations, it worked all the time.

footballjds

2012-03-05 16:54:48

From: Sin
procedure IdentifySummoningIcon;
var
summoning,x,y:Integer;
begin
Summoning := BitmapFromString(9, 8, 'meJw7cAAK5CK9f/7+aeETNX/+/AOo' +
'QMgCJMWrZI0mlV7l+OLSEaAWPhE5NKnJm9YpVWcBNWJKaQdl+zX0A' +
'mWB2tGkgG4ASgFJbmV+ZCmgaUAHABFQr3NiPhChmQYUAcoCNcIdCQ' +
'DNvH2k');

if FindBitmapSpiralTolerance(summoning,x,y,MMX1,MMY1,MMX2,MMY2,4) then
begin
writeLn('Found summoning Bitmap, clicking');
MMouse(x,y,0,0);
end;
end;

Tested it with 3 different locations, it worked all the time.


that's misleading. My debug box said it was clicking. My mouse just moved without clicking :(

but very nice(:

Sin

2012-03-05 16:57:04

From: footballjds
that's misleading. My debug box said it was clicking. My mouse just moved without clicking :(

but very nice(:



Lol :P
I changed it to moving the mouse instead of clicking :p

Gucci

2012-03-05 16:58:34

Nice I want to make a summ script and this would be useful

Sin

2012-03-05 16:59:50


I see you Fakawi, hurry up and insert this :p

Coh3n

2012-03-05 17:37:08

From: Sin

I see you Fakawi, hurry up and insert this :p
He can't. :p

I will add the symbol as soon as I can, but not the function. It'll just work if you call FindSymbol.

Also, I think there's a Runecrafting symbol now that appears near the mysterious ruins. If someone could make a bitmap for that as well that would be great. :)

Sin

2012-03-05 17:54:51

From: Coh3n
He can't. :p

I will add the symbol as soon as I can, but not the function. It'll just work if you call FindSymbol.

Also, I think there's a Runecrafting symbol now that appears near the mysterious ruins. If someone could make a bitmap for that as well that would be great. :)

On it :P


E*
Runecrafting Icon -


runecraft:= BitmapFromString(5, 6, 'meJxj3P6NqfVnSEgkEEWklHB6/gVy' +
'mQW+Q0QYt38DIqAgRATIgItAdMFFgAqA2oEkRAQoCwDjDifZ');


Flight

2012-03-05 18:10:29

I found bitmaps to not work so accurate for finding MM symbols. That's why I've been using my own dual-color searching for symbols. Coh3n, what happens when a symbol is obstructed by Players/NPCs/Items or even other symbols? (Some have priority and overlap other symbols)

Coh3n

2012-03-05 18:18:38

From: Flight
I found bitmaps to not work so accurate for finding MM symbols. That's why I've been using my own dual-color searching for symbols. Coh3n, what happens when a symbol is obstructed by Players/NPCs/Items or even other symbols? (Some have priority and overlap other symbols)
There's a SymbolAccuracy variable you can set in SRL. That should take care of any discrepancies. By default it's set to 0.8 which I think means the symbol on the minimap needs to match the bitmap 80% or something. I usually set it as 0.4 when I used it in my scripts.

Kyle Undefined

2012-03-05 18:25:19

Here you go:


RuneCraftingBMP := BitmapFromString(15, 5, 'meJxjZGA4cOBAREpJY3M7U+tPxu3' +
'fgAjICAmJBCKIOJABVMPIwMAIVgwR5/T8C1QGIZkFvsPVY1UMJOGG' +
'A7VA1GMq1rawgQgCFQCVwdUD9QLFgbLIilV0teCGABFcPcRwoCxEM' +
'QBG91kH');

EDIT: Sin ninja'd me :/

Sin

2012-03-05 18:36:41

From: Kyle Undefined
Here you go:


RuneCraftingBMP := BitmapFromString(15, 5, 'meJxjZGA4cOBAREpJY3M7U+tPxu3' +
'fgAjICAmJBCKIOJABVMPIwMAIVgwR5/T8C1QGIZkFvsPVY1UMJOGG' +
'A7VA1GMq1rawgQgCFQCVwdUD9QLFgbLIilV0teCGABFcPcRwoCxEM' +
'QBG91kH');

EDIT: Sin ninja'd me :/


Gf.

footballjds

2012-03-05 18:37:25

From: Kyle Undefined
Here you go:


RuneCraftingBMP := BitmapFromString(15, 5, 'meJxjZGA4cOBAREpJY3M7U+tPxu3' +
'fgAjICAmJBCKIOJABVMPIwMAIVgwR5/T8C1QGIZkFvsPVY1UMJOGG' +
'A7VA1GMq1rawgQgCFQCVwdUD9QLFgbLIilV0teCGABFcPcRwoCxEM' +
'QBG91kH');

EDIT: Sin ninja'd me :/


he posted it 30 mins before you.
i don't think that's being ninja'd, that's being granny'd :P

Kyle Undefined

2012-03-05 18:41:01

Haha, I was looking at what size it needed to be. Plus, I'm at the office :p Mine fits in with the other sizes more than his does though ;)

footballjds

2012-03-05 18:41:43

From: Kyle Undefined
Haha, I was looking at what size it needed to be. Plus, I'm at the office :p Mine fits in with the other sizes more than his does though ;)


just laughed, hard

Sin

2012-03-05 18:49:05

From: footballjds
just laughed, hard


this!
@Kyle -
Not irl though ;)
Dissed by a 15 year old, //life

Yago

2012-03-05 20:16:38

From: Flight
I found bitmaps to not work so accurate for finding MM symbols. That's why I've been using my own dual-color searching for symbols. Coh3n, what happens when a symbol is obstructed by Players/NPCs/Items or even other symbols? (Some have priority and overlap other symbols)


What if there is a flag in front of your symbol? Any solution? :)

Coh3n

2012-03-05 20:25:10

I've added the Runecrafting symbol, but there's already 'summoning obelisk' and 'summoning store'.

Sin

2012-03-05 20:26:08

There's no obelisk :$

Coh3n

2012-03-05 20:34:31


'summoning obelisk':
begin
SymbolBitmap := BitmapFromString(15, 5, 'beNpj42Nm4zt87CwE2SVP1' +
'XaoKeidC0SeUTWfHj4AiixetgYoCCSBKuGKgSKVNc1AZXMO3AOpWf' +
'8EqBiiEaIFrhioEigCRJPnrAAqBqJjl98BEVAlxFigGmSTIVqAtgM' +
'VAI0FqgeSEBMwFQNVAo0FigPVgxjrnwB1Obj4IBQDAImMdLM=');
result:= 10325360;
end;
Line 632 of symbol.simba.

Sin

2012-03-05 20:39:49

eff, it wasn't there at the include :s

Coh3n

2012-03-05 20:41:12

From: Sin
eff, it wasn't there at the include :s
Huh? I got it from the include.

Flight

2012-03-05 21:32:37

From: Yago
What if there is a flag in front of your symbol? Any solution? :)


If just one of the inner-unique colors is found within a basic MM symbol then it's accurately found and sorted as it's own independent symbol.

I just personally see how bitmaps could easily be broken. Bitmaps search for a certain colors (with tolerance to each color) and, correct me if I'm wrong here, but those colors must exist at very specific coordinates. So what happens if a few of those colors are blocked by something else on the map? Coh3n, the tolerance you're talking about, is it directed only towards color tolerance or also amount of pixels matched to the original bitmap? If that's the case then I've never heard of bitmaps being located in such a way. That's closer to a DDTM if you ask me.

Nebula

2012-03-05 21:35:23

From: Coh3n
Huh? I got it from the include.


It's in the include, just not on the list of valid arguments.

Coh3n

2012-03-05 21:54:50

From: Flight
If just one of the inner-unique colors is found within a basic MM symbol then it's accurately found and sorted as it's own independent symbol.

I just personally see how bitmaps could easily be broken. Bitmaps search for a certain colors (with tolerance to each color) and, correct me if I'm wrong here, but those colors must exist at very specific coordinates. So what happens if a few of those colors are blocked by something else on the map? Coh3n, the tolerance you're talking about, is it directed only towards color tolerance or also amount of pixels matched to the original bitmap? If that's the case then I've never heard of bitmaps being located in such a way. That's closer to a DDTM if you ask me.
I'm not sure exactly. It uses FindDeformedBitmapToleranceIn, which returns an "accuracy" variable. It also has an "AllowPartialAccuracy" parameter. You'd have to look at the source to know for sure.

NCDS

2012-03-05 21:57:57

From: Nebula
It's in the include, just not on the list of valid arguments.


Fix'd.