SRL Archive - Research & Development Lounge

Test this in GE please


JuKKa

2008-04-24 12:47:03

Test this little piece of script in general exchange and tell me what it says..

program New;

{.Include SRL/SRL.Scar}

Function FindGERoadColor: Integer;
Var
L, A, GC, TestColor, Red, Green, Blue : integer;
P: TPointArray;
Begin
GC := 6515307;
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 60);
L := High(P);
For a := 0 To L Do
Begin
If(Not rs_OnMinimap(p[a].x, p[a].y))Then Continue;
TestColor := GetColor(P[a].X, P[a].Y);
If(Not SimilarColors(TestColor, GC, 50))Then Continue;
Red := (TestColor mod 256);
Green := ((TestColor / 256) mod 256);
Blue := ((TestColor / 256) / 256);
If(Red - Green < 10)Then //1 - always. 10 is just a fail safe.
If(Red - Blue < 15)Then // below 10 pretty often has once been 11.
If(Green - Blue < 15)Then //varies between 8 - 11
Begin
Result := TestColor;
Writeln('GE floor color = ' +
IntToStr(Result));
Exit;
End;
End;
Writeln('Could not find GE floor color!');
Result := 0;
End;

var
T: Integer;

Begin
SetupSRL;
ActivateClient;
Wait(300);
T := GetSystemTime;
FindGERoadColor;
Writeln('Took = ' + IntToStr( GetSystemTime - T)+ ' msec');
End.

Stand in middle of general exchange at the bankers and run this script. This wont move ur mouse at all, I just wanna see how well it works.

PvH

2008-04-24 13:16:35

ill test it in a sec;)
will edit

EDIT:

Successfully compiled (2745 ms)
File access error
SRL Compiled in 16 msec
GE floor color = 6844527
Took = 15 msec
Successfully executed

JuKKa

2008-04-24 13:56:25

From: pvh
ill test it in a sec;)
will edit

EDIT:

Successfully compiled (2745 ms)
File access error
SRL Compiled in 16 msec
GE floor color = 6844527
Took = 15 msec
Successfully executed


thank you ;)

ShowerThoughts

2008-04-24 13:59:51

Fast :D

JuKKa

2008-04-24 14:04:29

From: Hermpie
Fast :D

Well.. Test it for me :D

PvH

2008-04-24 14:06:44

what are you going to use this for?
were you bored?
or are you making a selling script at g.e.?
or a yew tree killer at g.e.?
im curious
it works good:)

JuKKa

2008-04-24 14:07:55

From: pvh
what are you going to use this for?
were you bored?
or are you making a selling script at g.e.?
or a yew tree killer at g.e.?
im curious
it works good:)

actually 2 scripts. both includes logs. Thats my only 2 hints :P

2pacfan

2008-04-24 15:25:40

danm im curious:)

Santa_Clause

2008-04-27 04:26:55

Simply put, these always fail after a while. I'll test it later though.