SRL Archive - OSR Help

YoHoJo's powercutter not working


Runehack123

2012-10-24 13:18:42

Dear Simba community,

So I went through YoHoJo's woodcutter guide on youtube and I did exactly the same procedure he did! (ChopDown function)
However, my mouse just randomly moves around and doesn't click and just keeps moving rapidly around!
What's going wrong here? Please help me..

Can't even press the stop button anymore because it moves so fast! (CTRL+ALT+S and F2 doesn't work even using FN keys.. if you have the answer to this please post on another thread I made:
http://villavu.com/forum/showthread.php?p=1116643#post1116643)


program WillowChopBurn;


{$define srl5}
{$loadlib sps}
//{$define smart}
{$i srl/srl.simba}
{$i sps/sps.simba}

const
BreakEvery = 120; //how many mins to break after
BreakFor = 5; //how many mins to break for
Version = '1.0';
NumOfPlayers = 1; //how many players are you using
StartPlayer = 0; //Player to start autoing with (0 means first char)




Procedure DeclarePlayers;

var i:integer;

begin
NumberOfPlayers(1); //how many players?
CurrentPlayer := StartPlayer;
for i := 0 to 1-1 do //put whatever you put in NumberOfPlayers into x-1
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'cal', 'une', 'oins'];

with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
Active := True;
end;
end;

Procedure StatsGuise(wat:String);
begin
Status(wat);
Disguise(wat);
end;

Function CheckAndClick(UpText, Option:String; X,Y:Integer; RClick:Boolean):Boolean;
begin
MMouse(x, y, 5, 5);
If WaitUptext(UpText, 1500+Random(500)) Then
begin
Result:=True;
GetMousePos(x, y);
If RClick Then
begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option, 2000);
If Result Then FFlag(0);
end Else
begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
end;
end;
end;

Procedure Antiban;
begin
Case Random(250) Of
0: begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Woodcutting', False) GameTab(28) end;
1: begin StatsGuise('AntiBan') SleepAndMoveMouse(6000 + Random(1500)); end;
2: begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); end;
3: begin StatsGuise('AntiBan') RandomAngle(1); end;
4: begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); end;
5: begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); end;
6: begin Wait(500 + Random(500)) end;
end;
end;

Procedure FailSafe(Reason:String);
begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
end;

Function ChopDown:Boolean;
var
seX, seY, PlusOne, TreeCounter: Integer;
begin
PlusOne:= InvCount +1;
If FindObjCustom(seX, seY, ['Chop', 'down', 'p do'], [2371119, 2239276, 3293250, 2766391], 10) Then
begin
StatsGuise('Yay, just spotted a tree!');
GetMousePos(sex, sey);

case Random(2) Of
0: Mouse(seX, seY, 5, 5, True);
1: begin
Mouse(seX, seY, 5, 5, False);
WaitOption('Chop', 500);
end;
end;

repeat
MarkTime(TreeCounter);
Antiban;
Wait(100);
If InvCount=Plusone Then
Writeln('We got one');
until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7000)

end;
end;


begin
SetupSRL;
DeclarePlayers;
repeat
ChopDown;
Wait(3000);
until(false);
end.

Mr[S]

2012-10-24 13:50:05

When did you make this? If you have done everything correctly it might be due to runescape being updated and some colours might have changed

The Killer

2012-10-24 14:17:06

hmm use smart and then it's much eaiser to stop and it doesn't control your mouse :d

Runehack123

2012-10-24 23:34:34

I made this yesterday while I was on runescape and there wasn't an update.
EDIT: also tested it yesterday and made this thread

EtherFreak

2012-10-24 23:42:38

A couple of questions. Have you used any other scripts in the public script section without problems? Are you trying to make a woodcutting script for learning, or use?

I know I sometimes have issues with using the ctrl alt S combo, and I never have had the f keys work to start stop scripts. I also know what kind of learning curve it can take right off the bat to get a working script. At the end of the day, there is nothing more satisfying then seeing a script you wrote, work…

Runehack123

2012-10-25 02:31:06

Well I have never used any public script and right now I'm learning how to script so its for learning purposes, but would be nice to see if I can actually use it. :)

EtherFreak

2012-10-25 17:03:36

Maybe you could take a step back, and try basic commands, and see where that gets you.


program learning;
{$i srl/srl.simba}

Const
testcolor= 0;//could be the color of a tree, or log. pick with eyedropper in simba

Var
x,y:integer;

begin
setupsrl;
if findcolortolerance(x,y,testcolor,MSX1,MSY1,MSX2,MSY2,4) then
begin
writeln('Found the color');
mmouse(x,y,5,5);
if isuptext('test') then //could be tree, or maple. I recommend using caps, so ree, or aple
begin
writeln('Found uptext');
getmousepos(x,y);
mouse(x,y,1,1,true);
end else
writeln('Did not see uptext');
end;
writeln(invcount);//counts the items in the inv
invmouse(1,1);//clicks the first inv item
end.

also, you can ctrl click on srl includes to see more about them, so try clicking on "invmouse" and see what it consists of, and you can then see everything related to inv includes.

Also, feel free to pm me if you have any questions, and I will do my best to answer them. We all look forward to those that want to learn to script around here.