Dezval
2013-05-31 18:13:39
Hey guys, I'm new here to the SRL forum, recently joined and started scripting with simba, and I have ran into a problem. I can't get the script to click on the tree :(
I've tried and tried with different ways to click, but it just bounces the cursor around.
So now i'm thinking that it's the FindObj line of code that isn't functioning properly. Don't know what it could be, I thought it'd be the tolerance, but i've decreased it plenty and the cursor still bounces around.
Can someone help me out. Please don't judge as I just started trying to script this yesterday night as my first script.
I've tried and tried with different ways to click, but it just bounces the cursor around.
So now i'm thinking that it's the FindObj line of code that isn't functioning properly. Don't know what it could be, I thought it'd be the tolerance, but i've decreased it plenty and the cursor still bounces around.
Can someone help me out. Please don't judge as I just started trying to script this yesterday night as my first script.
program Bennys_Script;
//{$DEFINE SMART8}
{$I SRL/SRL.Simba}
{$I P07Include.Simba}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1; //How many bots you are going to run
NumberOfPlayers(HowManyPlayers); //^
CurrentPlayer := 0; //Which char to start on
Players[0].Name :=''; //Username
Players[0].Pass :=''; //Password
Players[0].Nick :=''; //In-game name? <- Not too sure...
Players[0].Active:=True;
end;
Procedure ChopDown();
Var x, y: Integer;
Begin
Repeat
Begin
If FindObj(x, y, 'hop dow', 5210791, 5)=true Then // <--- ON THIS LINE, Just bounces around. is the tolerance too high?
Begin
writeln('Oak Tree Found!');
ClickMouse2(mouse_left);
//Mouse(x, y, 3, 4, true);
writeln('chopping the oak');
Repeat
If IsUpText('Chop') Then
Wait(RandomRange(1000, 3000));
Until(IsUpText('Walk'));
End;
End;
until(InvFull); // (not FindObjCustom(x, y, ['hop', 'own', 'ak'], [5210791], 5)=false)
End;
begin
ClearDebug;
SetupSRL;
writeln('Starting up yo!');
Repeat
ChopDown;
writeln('Did the chop Procedure'); //is for my personal reference.
Until(InvFull);
writeln('Yay! 1 Invtory Full!') ; //is for my personal reference.
end.