SRL Archive - Java Help and Tutorials

Faster mouse speed?


AttilaBilly

2015-03-03 19:10:35

I am very very very limited in my knowledge of Java. But I am wondering how I can I make the mouse speed for dropping items a lot faster?

program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}

procedure clickTree();
var
x, y: integer;
begin
if mainscreen.findObject(x, y, 925721, 11, ['illow'], MOUSE_RIGHT) then
begin
writeLn('We right clicked a tree!');
chooseOption.select(['hop down']);
tabBackPack.waitForShift(24000);
end;
end;

begin
clearDebug();
setupSRL();

repeat // Notice the 2 repeat loops (1 repeats the whole script, 1 the chop tree procedure only)

repeat
clickTree();
until tabBackPack.isFull();

tabBackPack.dropItems(DROP_PATTERN_SNAKE); // Once backpack is full, it will drop everything

until false; // Until false means it will repeat this loop forever

end.
Any help would be wonderful :)
p.s. this is code I learned from a tutorial here. The only thing I changed was for it to click on willow tree's instead of evergreens.
Thanks

AttilaBilly

2015-03-03 19:11:36

This is for RS3 btw.

Camel

2015-03-03 19:13:05

begin
clearDebug();
setupSRL();

mouseSpeed := 20; // <=== change this until its fast enough for you. I believe 20 is default.

repeat // Notice the 2 repeat loops (1 repeats the whole script, 1 the chop tree procedure only)

repeat
clickTree();
until tabBackPack.isFull();

tabBackPack.dropItems(DROP_PATTERN_SNAKE); // Once backpack is full, it will drop everything

until false; // Until false means it will repeat this loop forever

end.

AttilaBilly

2015-03-03 19:22:44

From: Camel
begin
clearDebug();
setupSRL();

mouseSpeed := 20; // <=== change this until its fast enough for you. I believe 20 is default.

repeat // Notice the 2 repeat loops (1 repeats the whole script, 1 the chop tree procedure only)

repeat
clickTree();
until tabBackPack.isFull();

tabBackPack.dropItems(DROP_PATTERN_SNAKE); // Once backpack is full, it will drop everything

until false; // Until false means it will repeat this loop forever

end.
Thanks, but i'm not sure that helped.. No matter how high I change that number I'm pretty sure the speed doesn't change. Any ideas?

The Mayor

2015-03-03 22:43:31

From: AttilaBilly
Thanks, but i'm not sure that helped.. No matter how high I change that number I'm pretty sure the speed doesn't change. Any ideas?


From: AttilaBilly
Thanks, but i'm not sure that helped.. No matter how high I change that number I'm pretty sure the speed doesn't change. Any ideas?


It probably doesn't increase in speed that much because .dropItems is coded to wait a little bit after each drop so it doesn't look botty. You could paste this override into your script and you can adjust the wait:


procedure TRSTabBackpack.dropItems(slotArr: TIntegerArray = DROP_PATTERN_REGULAR); override;
var
i: integer;
begin
if not self.open() then
exit();

for i := 0 to high(slotArr) do
if self.isItemInSlot(slotArr[i]) then
begin
self.mouseSlot(slotArr[i], MOUSE_RIGHT);
chooseOption.select(['Drop', 'drop', 'rop']);
wait(random(50, 100));
end;
end;

AttilaBilly

2015-03-03 22:55:16

From: The Mayor
It probably doesn't increase in speed that much because .dropItems is coded to wait a little bit after each drop so it doesn't look botty. You could paste this override into your script and you can adjust the wait:


procedure TRSTabBackpack.dropItems(slotArr: TIntegerArray = DROP_PATTERN_REGULAR); override;
var
i: integer;
begin
if not self.open() then
exit();

for i := 0 to high(slotArr) do
if self.isItemInSlot(slotArr[i]) then
begin
self.mouseSlot(slotArr[i], MOUSE_RIGHT);
chooseOption.select(['Drop', 'drop', 'rop']);
wait(random(50, 100));
end;
end;


Where do i put it? sorry i'm clueless :\ just trying to make a decent power chopper..

The Mayor

2015-03-04 14:22:59

From: AttilaBilly
Where do i put it? sorry i'm clueless :\ just trying to make a decent power chopper..


Somewhere in your script :)

Ross

2015-03-04 14:44:57

From: AttilaBilly
Where do i put it? sorry i'm clueless :\ just trying to make a decent power chopper..


Have you tried actionbar dropping?

Just put the log on your actionbar and do


procedure dropLogs();
begin
while (not tabBackPack.isEmpty()) do
sendKeys('1', 30, 100); //edit the '1' to be whatever key on your actionbar
end;

or something to that effect.

you could also do keyDown in the while loop and keyUp after, which would probably be less bot-like