stu
2014-04-17 05:56:46
Hey guys,
I'm currently trying to make a script that powerchops arctic pines.
I want it to cut the trees, then burn/drop the inventory of logs (using the action bar) when the invent is full.
However I've barely even attempted a simba script since I wrote a couple of basic ones in 2011, and can't figure out what's wrong with mine. I want it to start a timer when it clicks a tree, and for that timer to reset every time the backpack fills up by 1 (log), and if it goes 10 seconds without a new log it will click a tree again. but mine just clicks a tree every 10 seconds regardless of how many logs I get, and if i remove the second "logTimer.start()" then it just spam clicks the trees.
It's probably something really obvious but I can't figure it out :(
Also, this is my drop procedure (mostly taken from KeepBotting's powerminer)
I was trying to use keydown(2)…keyup(2) in the procedure, but that didn't seem to work. However what I currently have seems to press the 2 key every couple of seconds instead of holding it down, which isn't fast enough, and doesnt seem to know when to stop.
How would you fix this?
Any help would be greatly appreciated
Stu.
I'm currently trying to make a script that powerchops arctic pines.
I want it to cut the trees, then burn/drop the inventory of logs (using the action bar) when the invent is full.
However I've barely even attempted a simba script since I wrote a couple of basic ones in 2011, and can't figure out what's wrong with mine. I want it to start a timer when it clicks a tree, and for that timer to reset every time the backpack fills up by 1 (log), and if it goes 10 seconds without a new log it will click a tree again. but mine just clicks a tree every 10 seconds regardless of how many logs I get, and if i remove the second "logTimer.start()" then it just spam clicks the trees.
It's probably something really obvious but I can't figure it out :(
procedure cutSomeLogs;
var
x, y, plusOne, logCounter:integer;
logTimer:TTimeMarker;
begin
begin
plusOne := tabBackpack.count() + 1;
if (mainscreen.findObject(x, y, 5464913, 23, colorSetting(2, 0.07, 0.15), mainscreen.playerPoint, 30, 50, 50, ['rctic', 'pine'], MOUSE_LEFT)) then
end;
begin
logTimer.start();
if (tabBackpack.count() = plusOne) then
logTimer.start();
repeat
until (logTimer.getTime() > 10000 + random(1000)) or (tabBackpack.isFull);
end;
end;Also, this is my drop procedure (mostly taken from KeepBotting's powerminer)
procedure dropThoseLogs;
var
timesTried:integer;
begin
repeat
typeSend('2', false);
wait(randomRange(100, 300));
until chatbox.findAnyText(['have any lef']) or chatbox.findAnyText(['fire her'])
end; I was trying to use keydown(2)…keyup(2) in the procedure, but that didn't seem to work. However what I currently have seems to press the 2 key every couple of seconds instead of holding it down, which isn't fast enough, and doesnt seem to know when to stop.
How would you fix this?
Any help would be greatly appreciated
Stu.