Log in

View Full Version : Please HELP me with GetSymbolColor



Xx pk xX
04-26-2007, 07:26 PM
How can i make procedure to move from Al-kahrid bank to kebab shop?
I want start in middle of bank (picture), and i want move to kebab shop. I want use getsymbolcolor. So please say me how i can make getsymbolcolor + walk there.

http://img86.imageshack.us/img86/5958/untitled1oz2.jpg (http://imageshack.us)

Thank You

JuKKa
04-26-2007, 07:43 PM
why? cant u just pick it manually?

well u could use a combination of findsymbol and a small piece of the kebab symbol and then get the color

Pentti
04-26-2007, 07:54 PM
Like this:
program New;
{.include srl/srl.scar}

procedure Walk;
begin
if(GetSymbolColor(x,y,'Kebab shop')<>0)then
begin
Writeln('Found kebab shop')
Mouse(x,y,5,5,True)
Flag;
End
else
begin
if(FindMMColorTol(x,y,21593,10))then
begin
Mouse(x,y,5,5,True)
Flag;
end;
end;
end;

begin
SetUpSRL;
Walk;
end.

Jason2gs
04-26-2007, 08:43 PM
Pentti,

May I ask why you check to make sure the symbol color isn't equal to zero?

Pentti
04-27-2007, 11:12 AM
Pentti,

May I ask why you check to make sure the symbol color isn't equal to zero?
When it doesn't find the symbol, result is 0. and when result is NOT 0 it will click on symbol.
If result is 0, it will find color matching with Kebab symbol color and then click on it. :D

Xx pk xX
04-27-2007, 06:29 PM
Penti, thank You very mutch, You helped me.
But i have another (maybe stupid) question: Why when i will start it, it will only write this:

SRL Compiled in 60msec.
Successfully executed

Thanks

Jason2gs
04-27-2007, 08:07 PM
When it doesn't find the symbol, result is 0. and when result is NOT 0 it will click on symbol.
If result is 0, it will find color matching with Kebab symbol color and then click on it. :D

Ahh, didn't know that :)

Pentti
04-28-2007, 07:22 AM
Penti, thank You very mutch, You helped me.
But i have another (maybe stupid) question: Why when i will start it, it will only write this:

SRL Compiled in 60msec.
Successfully executed

Thanks
Umm... When you are in the bank, the kebab symbol may be too far in the minimap and you cant see it on there so you should add it to walk a bit closer to the kebab symbol before you try to search it.
Maybe something like that:
program New;
{.include srl/srl.scar}

Const
FailSafeSymbolColor=21593; //Pick up here kebab symbol color on minimap.

procedure Walk;
begin
Mouse(MMCX+20,MMCY-20,5,-5,True)
Flag;
if(GetSymbolColor(x,y,'Kebab shop')<>0)then
begin
Writeln('Found kebab shop')
Mouse(x,y,5,5,True)
End
else
if(FindMMColorTol(x,y,FailSafeSymbolColor,10))then
Mouse(x,y,5,5,True)
Flag;
end;

begin
SetUpSRL;
Walk;
end.