Pheter
2009-02-14 21:34:40
Hi,
Was power woodcutting and was getting fed up with having to drop each individual item so I opened up SCAR and wrote a script to do it for me.
I know that I could use a SRL procedure that already exists but I couldn't be bothered to find what procedure to use and also wanted to have the fun of writting my own script.
Originaly the script had a list of x and y co-ordinate pairs and I had repeated lots of code so I changed it to use fewer variables by using individual x and y co-ordinates and combining them together to target all inventory slots, instead of using absolute variables. I then changed the script to use a loop reducing the code significatly (something that I should have done in the first place).
Anyway, I don't really see how this will be of any use to anyone other than me when I want to autodrop items.. this code could be built into a power leveling script but it would make more sence to use an existing SRL procedure.
I thought I would let you guys take it appart and criticise it anyway :P
Please suggest any ways in which I can optimise this code.
Thanks!
Edit: I just want to say that it works in RuneScape HD.. not that it wouldn't seeing how it is just a co-ordinate clicker essentially lol. I needed it to work in HD mode as it is intended to save me a few seconds clicking when playing and NOT auto'ing.
Was power woodcutting and was getting fed up with having to drop each individual item so I opened up SCAR and wrote a script to do it for me.
I know that I could use a SRL procedure that already exists but I couldn't be bothered to find what procedure to use and also wanted to have the fun of writting my own script.
Originaly the script had a list of x and y co-ordinate pairs and I had repeated lots of code so I changed it to use fewer variables by using individual x and y co-ordinates and combining them together to target all inventory slots, instead of using absolute variables. I then changed the script to use a loop reducing the code significatly (something that I should have done in the first place).
Anyway, I don't really see how this will be of any use to anyone other than me when I want to autodrop items.. this code could be built into a power leveling script but it would make more sence to use an existing SRL procedure.
I thought I would let you guys take it appart and criticise it anyway :P
{ + -- Pheter's AutoDropper --------------------------------- + }
{ + ========================================================== + }
{ + + }
{ ++ Description: ------------------------------------------- + }
{ + - Drops all items in inventory. + }
{ + - Inventory must be open. + }
{ + - EVERYTHING will be dropped.. + }
{ + - Therefore tools MUST be wielded. + }
{ + ========================================================== + }
{ + ---------------------------------------------------------- + }
program AutoDropper;
{.include srl/srl.scar}
var
x : array [1..4] of integer;
y : array [1..7] of integer;
xcol :integer;
yrow :integer;
k :integer;
procedure DropItems;
begin
x[1] := 1520; { coords of 1st column of inventory }
x[2] := 1560; { coords of 2st column of inventory }
x[3] := 1600; { coords of 3st column of inventory }
x[4] := 1640; { coords of 4st column of inventory }
y[1] := 750; { coords of 1st row of inventory }
y[2] := 785; { coords of 2st row of inventory }
y[3] := 820; { coords of 3st row of inventory }
y[4] := 855; { coords of 4st row of inventory }
y[5] := 890; { coords of 5st row of inventory }
y[6] := 925; { coords of 6st row of inventory }
y[7] := 965; { coords of 7st row of inventory }
xcol := 1;
yrow := 1;
k := 1;
repeat
ClickMouse(x[xcol], y[yrow], False);
wait(130+random(20));
ChooseOption('rop');
wait(60+random(20));
Inc(k);
Inc(xcol);
if (xcol = 5)then xcol := 1;
if (yrow * 4 + 1 = k)then Inc(yrow);
until(yrow = 8)
end;
begin
setupsrl;
ClearDebug;
Writeln('Starting Item Dropping');
Writeln('Please Wait..');
Writeln('');
DropItems;
Writeln('Items Dropped!');
end.Please suggest any ways in which I can optimise this code.
Thanks!
Edit: I just want to say that it works in RuneScape HD.. not that it wouldn't seeing how it is just a co-ordinate clicker essentially lol. I needed it to work in HD mode as it is intended to save me a few seconds clicking when playing and NOT auto'ing.