SRL Archive - General Botting Help

[Simple]RSPS Script won't click?


Volture

2014-01-20 06:08:15

Okay I'm brand new with simba, and I'm trying to just currently get this to work, pretty much just clicking an altar.

My code is this;

Program MouseMove;

begin
MoveMouse(287, 207);
end.
program ClickMouse;

var x, y: integer;

begin
ClickMouse(287, 207, mouse_Right);
end.

I use the mousemove to move to the altar, and then ClickMouse to click on the altar.
It'll move to over the altar but won't click it… Help?
I'm on a runescape private server called Roatz PK
Please don't troll me, I'm new to simba… Thanks

The Mayor

2014-01-20 06:17:42

From: Volture
Okay I'm brand new with simba, and I'm trying to just currently get this to work, pretty much just clicking an altar.

My code is this;

Program MouseMove;

begin
MoveMouse(287, 207);
end.
program ClickMouse;

var x, y: integer;

begin
ClickMouse(287, 207, mouse_Right);
end.

I use the mousemove to move to the altar, and then ClickMouse to click on the altar.
It'll move to over the altar but won't click it… Help?
I'm on a runescape private server called Roatz PK
Please don't troll me, I'm new to simba… Thanks



Ok, first of all you are confusing program with procedure. You only need ONE program (the name of the script at the top). Secondly you have two "main loops" notice how you have 2 end that have a period ( . ) not a semicolon ( ; ).


Program Altar;

procedure moveTheMouse;
begin
moveMouse(287, 207);
end;

procedure clickTheMouse;
begin
clickMouse(MOUSE_RIGHT);
end;


// the main loop is always at the bottom
begin
moveTheMouse;
clickTheMouse;
end.

But you could write this as:


Program Altar;

begin
moveMouse(287, 207);
clickMouse(MOUSE_RIGHT);
end.

Volture

2014-01-20 06:23:59

From: The Mayor
Ok, first of all you are confusing program with procedure. You only need ONE program (the name of the script at the top). Secondly you have two "main loops" notice how you have 2 end that have a period ( . ) not a semicolon ( ; ).


Program Altar;

procedure moveTheMouse;
begin
moveMouse(287, 207) MOUSE_RIGHT);
end;

procedure clickTheMouse;
begin
clickMouse(287, 207, MOUSE_RIGHT);
end;


// the main loop is always at the bottom
begin
moveTheMouse;
clickTheMouse;
end.

But you could write this as:


Program Altar;

begin
moveMouse(287, 207) MOUSE_RIGHT);
clickMouse(287, 207, MOUSE_RIGHT);
end.



Okay I get the part about program/procedure now.
And okay so only have 1 end?

I've put in what you said

Program Altar;

begin
moveMouse(287, 207) MOUSE_RIGHT);
clickMouse(287, 207, MOUSE_RIGHT);
end.

But I get this error
Exception in Script: Operator expected at line 4, column 23
But I don't see anything in line 4 that's wrong..

The Mayor

2014-01-20 06:27:47

From: Volture


But I get this error
Exception in Script: Operator expected at line 4, column 23
But I don't see anything in line 4 that's wrong..


Are you using SRL-OSR? I haven't used that in about a year and forgot the parameters :) See my edited post, see if that works

Volture

2014-01-20 06:31:54

From: The Mayor
Are you using SRL-OSR? I haven't used that in about a year and forgot the parameters :) See my edited post, see if that works


No I'm not using OSR, I've followed this;

Download and install Simba from here. If it gives you the option, download the 32-bit version (even if you are on a 64-bit machine).
Open Simba; go to View > Extensions.
Enable extensions.sex.
Click View > Extensions Menu.
Click Extensions > Check for Updates. Let it update.
Restart Simba.
Go to View > Extensions.
Enable srl.sex and associate.sex.
Click SRL > Check for Updates. Let the files download.
Click SPS > Check for Updates. Let the files download (this may take a few minutes).
Restart Simba.
Go to Script > Interpreter > Lape. VERY IMPORTANT! Scripts will not compile if Lape isn't selected as the interpreter.

Do you think that's why? And I used your edited code;
Nvm forgot to put Chords.
It moved mouse to the area, then clicked on it and worked.
I tried it again and moved to the area, but then it didn't click on the altar that time..
Sometimes it clicks, but sometimes it don't.
Any idea why?
Thanks so much.

I just want to say thanks though for trying to help me so far. Cheers

Hoodz

2014-01-20 06:32:34

From: Volture
Okay I get the part about program/procedure now.
And okay so only have 1 end?

I've put in what you said

Program Altar;

begin
moveMouse(287, 207) MOUSE_RIGHT);
clickMouse(287, 207, MOUSE_RIGHT);
end.

But I get this error
Exception in Script: Operator expected at line 4, column 23
But I don't see anything in line 4 that's wrong..


moveMouse(287, 207) MOUSE_RIGHT); <- MoveMouse(287, 207);


Program Altar;

procedure ClickAltar;
var
x, y: Integer;
begin
MoveMouse(287, 207);
Sleep(30 + Random(100));
ClickMouse(x, y, Mouse_Right); {or Mouse_Left}
Sleep(30 + Random(100));
end;

begin
{if you want to repeat your mainloop do this: repeat clickaltar; until (false);}
ClickAltar;
end.

Volture

2014-01-20 06:36:24

From: hoodz
moveMouse(287, 207) MOUSE_RIGHT); <- MoveMouse(287, 207);

Yeah actually I just figured that out right after I tried what he sent me.
I feel dumb..
IT WORKED
Sort of…
It moved mouse to the area, then clicked on it and worked.
I tried it again and moved to the area, but then it didn't click on the altar that time..
Sometimes it clicks, but sometimes it don't.
Any idea why?
Thanks so much.

Hoodz

2014-01-20 06:40:09

From: Volture
Yeah actually I just figured that out right after I tried what he sent me.
I feel dumb..
IT WORKED
Sort of…
It moved mouse to the area, then clicked on it and worked.
I tried it again and moved to the area, but then it didn't click on the altar that time..
Sometimes it clicks, but sometimes it don't.
Any idea why?
Thanks so much.

check my other post

Volture

2014-01-20 06:42:58

From: hoodz
check my other post


Omg you're a boss lol.
Awesome it worked..
Thanks so much.

Volture

2014-01-20 06:50:00

From: hoodz
check my other post


Can you tell me what you did though incase this happens to me in the future..
Like what does the sleep do?

Sjoe

2014-01-20 07:08:22

From: Volture
Can you tell me what you did though incase this happens to me in the future..
Like what does the sleep do?


Sleep = Wait
(in miliseconds)

Sleep(30 + Random(100))//wait 30 miliseconds, with a randomness of 100 ms

Volture

2014-01-20 07:09:51

From: Sjoe
Sleep = Wait


Thanks man, just joined and love the community you guys are so helpful.
So what's the numbers stand for? I'm guessing a time limit of how long it's waiting?
Sleep(30 + Random(100))
30= ?
100=?

Sjoe

2014-01-20 07:34:56

From: Volture
Thanks man, just joined and love the community you guys are so helpful.
So what's the numbers stand for? I'm guessing a time limit of how long it's waiting?
Sleep(30 + Random(100))
30= ?
100=?


Yeh, i explained it in the prev. post.

The time unit is in miliseconds so: 30 = 30 miliseconds plus random(100) (so an additional random generated number from 0-99)

Volture

2014-01-20 07:40:14

Okay thanks for the help man!