SRL Archive - First Scripts

My First Script, A PowerChopper!(no bank)


HyperSecret

2007-09-29 13:01:38

// Made By OPTiPLEX
// First Script!

program PowerChopper;
{.include SRL\SRL.SCAR}

var x,y: integer;

Const
Tree = 3116158;


begin
SetupSRL;
repeat
if InvFull = true then
begin
writeln('Its full!');
dropAll;
wait(5000);
end else
writeln('Hmm not full yet, lets get Chopping!');
begin
if FindObj(x, y, 'hop', Tree, 30) then
begin
MMouse(x, y, 1, 1);
Mouse(x, y, 1, 1, true);
writeln('Yeah Chop Chop Chop!');
wait(5000);
end else
begin
writeln('Nothing Found :(!');
wait(5000);
end;
end;
until(false);
end.

first off standards…^^ those are correct standards…

begin
MMouse(x, y, 1, 1);
Mouse(x, y, 1, 1, true);
writeln('Yeah Chop Chop Chop!');
wait(5000);
end

2nd off you dont need MMouse then Mouse b/c Mouse moves the mouse and clicks…

if FindObj(x, y, 'hop', Tree, 30) then
begin
MMouse(x, y, 1, 1);
Mouse(x, y, 1, 1, true);
writeln('Yeah Chop Chop Chop!');
wait(5000);
end

instead of doing that^^… i would use an uptext also just to make sure you wanna chop it…

if FindObj(x, y, 'Tree', Tree, 30) then
begin
MMouse(x, y, 1, 1);
if IsUpText('Chop Down') then
Mouse(x, y, 1, 1, true);
writeln('Yeah Chop Chop Chop!');
wait(5000);
end

or something of that sort….

also waits need to be randomized…like so….

wait(5000 + random(200);

or some other random milliseconds…or you could use FTWait….but that it alittle different and if you dont know it then you wouldnt understand it…

there are quite a few more things i would change to make it better, but this is the basic things…add me on msn if you want more suggestions…

dritar

2007-10-01 15:26:50

Well, here is my opinion. Its pretty easy to do but its great for first script cause how you see i didnt make any scripts yet.

matt_093

2007-10-01 18:05:16

great script, however the genies get annoying

Sgt Soul

2007-10-07 03:06:41

hmm, i need to know how to actually make scripts i just dont get it =P

tymu888

2007-10-07 03:21:31

i try it.