View Full Version : What am I doing wrong?
wolffang92
12-02-2011, 10:55 PM
I'm attempting to make a teak cutting script using Griff's tree guide, when I try to run this the log just says successfully executed and the script stops...
program New;
{.include srl/srl.scar}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
procedure ChopTree;
var x, y: integer;
begin
repeat
if FindObj(x, y, 'hop', 4548989, 35) then
Mouse(x, y, 0, 0, false);
ChooseOption('hop');
repeat
wait(1200+random(250));
Until not IsUpText('eak') or (InvFull);
until(InvFull);
end;
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
ChopTree;
end.
Kyle Undefined
12-02-2011, 10:57 PM
What's the issue, exactly?
EDIT: Nvm, you took out your credentials.
EDIT2: Try this?
procedure ChopTree;
var x, y: integer;
begin
repeat
begin
if FindObj(x, y, 'hop', 4548989, 35) then
begin
Mouse(x, y, 5, 5, false);
Wait(RandomRange(250, 750));
ChooseOption('hop');
repeat
wait(1200+random(250));
until not IsUpText('eak') or (InvFull);
end;
end;
until(InvFull);
end;
wolffang92
12-02-2011, 10:59 PM
What's the issue, exactly?
Sorry, was editing my post.
Kyle Undefined
12-02-2011, 11:02 PM
Look at my edited post.
wolffang92
12-02-2011, 11:06 PM
What's the issue, exactly?
EDIT: Nvm, you took out your credentials.
EDIT2: Try this?
procedure ChopTree;
var x, y: integer;
begin
repeat
begin
if FindObj(x, y, 'hop', 4548989, 35) then
begin
Mouse(x, y, 5, 5, false);
Wait(RandomRange(250, 750));
ChooseOption('hop');
repeat
wait(1200+random(250));
until not IsUpText('eak') or (InvFull);
end;
end;
until(InvFull);
end;
Ok, I tried running that and the mouse moved over the rs window then to the bottom right corner of my computer screen, then the script stopped and opened a new tab labeled Inventory with this highlighted:
Result := FindColor(x, y, srl_outline_black, TB.x1, TB.y1, TB.x2, TB.y2);
and this was in the log:
Exception: Range check error at line 201
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap] :fiery:
Kyle Undefined
12-02-2011, 11:10 PM
Are you selecting the RS client?
wolffang92
12-02-2011, 11:12 PM
If you mean dragging the crosshairs over the rs screen before starting the script then yes.
Kyle Undefined
12-02-2011, 11:35 PM
What about your graphics settings? I'm trying to think of every possibility.
wolffang92
12-02-2011, 11:40 PM
What about your graphics settings? I'm trying to think of every possibility.
Yes I have my graphics set to low and fixed, in safe mode with brightness all the way up. >.<
Kyle Undefined
12-02-2011, 11:44 PM
Hmm, is your SRL up to date?
wolffang92
12-03-2011, 12:15 AM
Hmm, is your SRL up to date?
Yes, everything is up to date, I'm pretty sure I have everything set up correctly.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.