SRL Archive - First Scripts

First script ChickenHunter


H0ppy

2012-06-24 18:40:54

Hello,

This is my first script i made with simba.
I hope some people going to try it out and give me some tips and say whats not that good about it. i'll add some more stuff in futher if its necessary.

Greetz Hoppy

Just start the script at chickens. Make sure there is no chicken inside the house or outside the gate. You also can open the gate.

xNotorious

2012-06-24 23:25:13

Congrats on your first release bro :)

Nebula

2012-06-24 23:39:58

Looks nice for a first script!

Things to help you out…


function CheckClick(UpText, Option:String; X,Y:Integer; RClick:Boolean):Boolean;

begin
MMouse(x, y, 5, 5);
if WaitUptext(UpText, 50*Random(50)) then

begin
Result:=True; //not needed since you just end up changing the result later on
GetMousePos(x, y); //NOT needed, just use ClickMouse2(true) later on...
if RClick then

begin
Mouse(X, Y, 0, 0, false); // Put ClickMouse2(true) here instead.
Result:=WaitOption(Option, 500);
if Result then FFlag(0);

end else

begin
Mouse(x, y, 0, 0, true);
Wait(0 * Random(50)); //zero times any number is still zero...
FFlag(0);
end;
end;
end;

Rezozo

2012-06-24 23:45:10

Congratz on your first script!

H0ppy

2012-06-25 04:58:52

From: Nebula
Looks nice for a first script!

Things to help you out…


function CheckClick(UpText, Option:String; X,Y:Integer; RClick:Boolean):Boolean;

begin
MMouse(x, y, 5, 5);
if WaitUptext(UpText, 50*Random(50)) then

begin
Result:=True; //not needed since you just end up changing the result later on
GetMousePos(x, y); //NOT needed, just use ClickMouse2(true) later on...
if RClick then

begin
Mouse(X, Y, 0, 0, false); // Put ClickMouse2(true) here instead.
Result:=WaitOption(Option, 500);
if Result then FFlag(0);

end else

begin
Mouse(x, y, 0, 0, true);
Wait(0 * Random(50)); //zero times any number is still zero...
FFlag(0);
end;
end;
end;



Hey,

Tanks for helping out. I changed the random times now. the 0* 50 was probably missspelled!

i changed all intervals to this: Wait(1000 + Randomrange(100,500));
i think thats more accurate.

Thank you for the mouseclick2 i never saw it before so i didn't knew that!
I got a problem with picking up the feathers. if there are like 5 piles of drops he keeps clicken 2/5 piles and doesn't check the others. is there any way to let it know he already checked that pile?

greetz
Hoppy

Sir Ducksworthy

2012-06-25 05:24:43

Nice 2 see someone having a nice attempt at their first scripts, Good Job dude! It's pretty decent for a first go hey.

Nebula

2012-06-25 15:52:30

From: H0ppy
Hey,

Tanks for helping out. I changed the random times now. the 0* 50 was probably missspelled!

i changed all intervals to this: Wait(1000 + Randomrange(100,500));
i think thats more accurate.

Thank you for the mouseclick2 i never saw it before so i didn't knew that!
I got a problem with picking up the feathers. if there are like 5 piles of drops he keeps clicken 2/5 piles and doesn't check the others. is there any way to let it know he already checked that pile?

greetz
Hoppy


Check out FindObjTPA

H0ppy

2012-06-25 16:20:11

From: Nebula
Check out FindObjTPA


will do that!!

avalanch

2012-09-26 21:08:43

pretty good but it's a bit slow

(s)okkr7

2012-09-26 21:24:16

This wouldn't happen to be H0ppy from powerbot is it? ;) Used your astral crafter for a while when I couldn't get SRL to work :)