SRL Archive - Test corner

Autodrop


Negaal

2007-12-08 05:26:59

Umm someone from junior members requested superfast autodropper…
if using dtm and some waittime mouse may click on same item twice or more…
happened to me a lot while testing powerscripts…
So made one dropper… what you guys think?

EDIT: This one give best result on powerchoppers or miner, won't click same items more than 1 time

program Drop;
{.include srl/srl.scar}

const mousesped = 25;
const ItemToDrop = 'Ore';

procedure drop(dropitem : string);
var
bx, by, timeout, thing, itemc, itemc2 : Integer;
begin
case dropitem of
'Log' : thing := DTMFromString('78DA632C60626060636440068D29B60CFF813' +
'448F43F1030A6304179C880118904D2E94035A204D45403D5F010' +
'50530654C34A404D2C500D1F7E3500DACE0904');

'Ore' : thing := DTMFromString('78DA633CC4C4C0F0940105F4343532FC07D28' +
'C40FC1F08183702D53C6340038C48249006A9794340CD5EA09A4F' +
'04D41C04AA794740CD69A09AE704D49C07AAB94F40CD51A09A1B0' +
'4D4EC04AAB9875F0D00E1B81584');


end;
if not loggedin then exit;
GameTab(4);
begin
repeat
Try
if not (FindDTM(thing, bx, by, MIX1, MIY1, MIX2, MIY2)) then break;
except
begin
writeln('ERROR - Item to drop can only be Log or Ore, don''t forget big capitals');
Exit;
end;
end;
itemc := getcolor(bx, by);
Mouse(bx, by, 10, 10, false)
ChooseOption('Drop')
wait(10);
marktime(timeout);
repeat
wait(10);
itemc2 := getcolor(bx, by);
if itemc <> itemc2 then break;
until(timefrommark(timeout)>2000);
until (false)
end;
end;


begin
SetupSRL
mousespeed:=mousesped;
Drop(ItemToDrop);
end.

JuKKa

2007-12-08 05:59:37

it shouldnt Terminatescript; but Exit;

Negaal

2007-12-08 06:37:19

From: JuKKa
it shouldnt Terminatescript; but Exit;

Yah right, fixed

R0b0t1

2007-12-08 11:50:52

Instead of having the user need to put in capitals, do this:


case LowerCase(variablehere) of
'lol': Writeln('lol');
'lawl: Writeln('lawl');
end;

and variablehere wouldn't need to be anything special, they could type in this for example:


program New;
const
variablehere = 'LoL';

begin
case LowerCase(variablehere) of
'lol': WriteLn('lol');
else Writeln('Unmatched');
end;
end.

//Output: 'lol'

Negaal

2007-12-08 16:44:55

thx for advice but i made only on request, main purpose was to make it drop fast as possible w/o getting banned:)

who want can add
lowercase
by himself or just type correct

R0b0t1

2007-12-08 22:54:25

Killjoy :p