SRL Archive - S.M.A.R.T.

Bit confused.


David92

2013-03-25 22:40:42

Just compiled my first script, it runs fine, in Smart, the cursor goes over the desired NPC, however, it doesn't click? it just keeps selecting different targets which is not what I want, I want it to click on the target however it does not even click.

I believe I'm supposed to use:

"begin
ClickMouse2(mouse_left);"

right? or is it different in SMART8?

Sawyer

2013-03-25 22:51:51

Can you post more of the code for us to see where the error is occuring?

David92

2013-03-27 20:10:32

From: Sawyer
Can you post more of the code for us to see where the error is occuring?


Sure thing, It's

program Sets;

{$I SRL/SRL.Simba}
{$I P07Include.Simba}
{$DEFINE SMART8}

var
x,y: Integer;

procedure Kill;
begin
If P07_FindObjCustom(x, y, ['ttack', 'hicken'], [4565179, 5161689, 5029589, 857967, 858747, 9417929], 5) Then
begin
ClickMouse2(mouse_left);
Wait(RandomRange(1,1))
end;
end;

procedure Pickup;
begin
If P07_FindObjCustom(x, y, ['ake', 'eather'], [9728], 5) Then
begin
ClickMouse2(mouse_left);
Wait(RandomRange(1,1))
end;
end;

begin
SetupSRL;
SetupP07Include;
repeat
Kill;
P07_MakeCompassNorth;
Pickup;
until(false);
end.

Sjoe

2013-03-27 20:17:40

Is it hovering the chickens? try shortening your uptext parts to smaller portions
eg: ['att', 'ack', 'hick', cken']

David92

2013-03-27 21:19:38

From: Sjoekeloe
Is it hovering the chickens? try shortening your uptext parts to smaller portions
eg: ['att', 'ack', 'hick', cken']


Yeah, I notice the red dot on SMART goes to each individual chicken, but then it just switches targets.

I'll try your suggestion and get back to you :)

Sawyer

2013-03-27 23:20:03

Maybe declare the variables x and y as local variables instead of global ones, but that might not make a difference.