SRL Archive - SRL Archives

Kamanja road color finder


solemn wishes

2006-03-28 07:50:34

hi guys,

well my latest script is based in kamanja and it is my first srl script, Fakawi know's what it is but i dont wanna tell anyone until its flawless. The function bellow is one of a few that i made for the script and i can tell you that im working on a wide range of kamanji scripts like fishers, miners auto fighters ect ect.


o ya and btw i tried to use "standards" :D





Function KamanjaRoadColor: boolean;
var C, TX ,TY, kamanjaroad : integer;

begin
kamanjaroad := BitmapFromString(10, 2, 'z78DA33304000572737' +
'235747032200A64A52F50200A8431815');

begin
repeat
c:=c+1;
If FindBitMapspiralTolerance(kamanjaroad,TX,TY,580,7,718,155,c) then
begin
Kroad:=GetColor(TX+8,TY);
Players[CurrentPlayer].Loc:='Kamanja';
writeln('RoadColor '+inttostr(kroad))
Result:=true;
break;
end;
wait(50+random(50))
until(result)or(c=25)

if kroad=0 then writeln('RoadColor NOT Found');
FreeBitMap(kamanjaroad);
end;
end;

XxKanexX

2006-03-28 08:31:22

Put the FreeBitmap before the last end. That will only be free'd if it's found. ;)

Thanks for attempting standards, makes things so much more legible.

WT-Fakawi

2006-03-28 08:45:16

Solemn….

You are making me happy :)

Wizzup?

2006-03-28 08:58:27

It's Karamja, if that is what you ment…

Good Job!

Sdcit

2006-03-28 10:53:14

Great job :)