SRL Archive - Research & Development Lounge

[SRL] Some fast drop log procedures


smitteh

2007-08-22 21:03:31

You need to use SRL for these to work.


Drop all logs in inventory.




{.include SRL/SRL.scar}

procedure DropLogs;
var
I: integer;
Vec : TPoint;
begin
I := 1;
GameTab( 4 );
repeat
Vec := ItemCoords( I );
MMouse( Vec.X, Vec.Y, 2, 2 );
If( IsUpText( 'ogs' ) ) then
begin
Mouse( Vec.X, Vec.Y, 2, 2, False );
Wait( 500 + random ( 100 ) );
ChooseOption( Vec.X, Vec.Y, 'Drop' );
end;
I := I + 1;
until( I > 28 )
end;


Drops all of a certain log type.


{.include SRL/SRL.scar}

procedure DropLogsType( Log : String );
var
I: integer;
Vec : TPoint;
LogName : String;
begin
I := 1;
GameTab( 4 );
case LowerCase( Log ) of
'normal': LogName := 'Logs';
'oak': LogName := 'Oak logs';
'willow': LogName := 'Willow logs';
'maple': LogName := 'Maple logs';
'yew': LogName := 'Yew logs';
'magic': LogName := 'Magic logs';
end;
repeat
Vec := ItemCoords( I );
MMouse( Vec.X, Vec.Y, 2, 2 );
If( IsUpText( LogName ) ) then
begin
Mouse( Vec.X, Vec.Y, 2, 2, False );
Wait( 500 + random ( 100 ) );
ChooseOption( Vec.X, Vec.Y, 'Drop' );
end;
I := I + 1;
until( I > 28 )
end;

TOB

2007-08-22 22:02:09

OCD time: Standards are 2 spaces per indent not 4 as they are in other languages. :)

smitteh

2007-08-22 23:14:32

From: TOB
OCD time: Standards are 2 spaces per indent not 4 as they are in other languages. :)


Oh. well sorry, ahahaha :P Programmed c++ for a year, used to the 4 space tab.

ShowerThoughts

2007-08-23 03:47:22

looks nice for a 2 posts user if i believe that you did 1 year c++(wat i do)
then your not really a beginner anymore :P