SRL Archive - SRL Archives

ChickenObj


The Prince of Randomness?

2006-04-18 18:40:36



:eek:
i Just Caught the evil chicken!

Anyway i made a Random Function for Scuney
its like FindObj but if it doesnt find the obj it looks for it with a Random tolerance
it also moves the mouse to it with a Random tolerance here it is :eek:
(its kinda lame)

function ChickenObj(var SSI, Squig: Integer; ObjText: string; ColoringInPencils, Tollipop:Longint):Boolean; 
begin
if(FindObj(SSI, Squig, ObjText, ColoringInPencils, Tollipop))then
begin
Result:= True;
Mouse(SSI, Squig, 5+ Random(5), 5 + Random(5), True);
Flag;
end else
if(FindObj(SSI, Squig, ObjText, ColoringInPencils, tollipop + Random 6))then
begin
Result:= True;
Mouse(SSI, Squig, 5+Random(5), 5+Random(5), True);
flag;
end else
begin
Result:= False;
end;
end;
end;

Me steals Pwnds standards but i have learnt yay!

Pwnd

2006-04-18 18:50:27

Everyone is taking my awesome "Make shitty names for your variables" scheme. I hate you all :'(

Mutant Squirrle

2006-04-18 19:02:21

Sorry prince its good but idk

Its a pretty good idea though mind if i Upgrade it a lil?

Edit: Random Tolerance? more like random Randomness

The Prince of Randomness?

2006-04-18 19:05:19

Go ahead but its made by me and you :p

EDIT:its called ChickenObj cause chickens run away in random circles..
this has nothing to do with chasing chickens on ScuneRape

To chase chickens on ScuneRape you use

If FindColorTolerance(x,y,chickencolor,0,0,1023,767,10)) then
begin
Mouse(X,y,10,10,true);
Mouse(X,y,10,5,true);
end;
end;

Well thats how i do it anyway.