SRL Archive - Help

What am I doing wrong?


wolffang92

2011-12-02 17:55:51

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

2011-12-02 17:57:23

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

2011-12-02 17:59:12

From: Camo Developer
What's the issue, exactly?


Sorry, was editing my post.

Kyle Undefined

2011-12-02 18:02:04

Look at my edited post.

wolffang92

2011-12-02 18:06:20

From: Camo Developer
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

2011-12-02 18:10:23

Are you selecting the RS client?

wolffang92

2011-12-02 18:12:48

If you mean dragging the crosshairs over the rs screen before starting the script then yes.

Kyle Undefined

2011-12-02 18:35:34

What about your graphics settings? I'm trying to think of every possibility.

wolffang92

2011-12-02 18:40:13

From: Camo Developer
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

2011-12-02 18:44:37

Hmm, is your SRL up to date?

wolffang92

2011-12-02 19:15:19

From: Camo Developer
Hmm, is your SRL up to date?


Yes, everything is up to date, I'm pretty sure I have everything set up correctly.