SRL Archive - RS3 Script Requests

script request to press spacebar


f1fanatic

2012-03-24 09:07:37

I need a script that works in smart (so I can use the script on more than one account on the same computer). When you press run I need it to continuously press the "space bar" key and "2" key and click the Left side of the mouse once every 4.1 seconds (doesn't have to be exactly 4.1s but would prefer it).

That is all that needs to be done.

Markus

2012-03-24 09:19:22


program new;
{$define SMART}
{$include srl/srl.simba}
begin
setupsrl;
repeat
TypeSend(' 2');
ClickMouse2(mouse_Left);
wait(4100);
until false;
end.

Paypal [email]markusjanse@gmail.com[/email] plzzzzz

No I don't actually want your money for 25 seconds of work ;-)

DemiseScythe

2012-03-24 09:26:17

Lol, thats good code

Markus

2012-03-24 12:32:51

Fits the requirements 100%. Works with SMART, presses space and 2 and clicks every 4.1 second ^-^

Texy

2012-03-24 12:37:30

:oooo Looks great to me :) I will definitely use this on my main :x

NKN

2012-03-25 00:06:51

Since when can you pay?
Everyone always got yelled at for it. o.O

bolshak25

2012-03-25 01:13:57

From: nkn
Since when can you pay?
Everyone always got yelled at for it. o.O


you cant. if you read the whole post he said hes not taking money for what he posted

f1fanatic

2012-03-25 05:52:28

hey I tried making this myself but it doesn't work for me so I need some help


WHAT I WANT IT TO DO
1)login to runescape by smart,
2)find the colour specified,
3)moves mouse to that colour,
4)clicks mouse on that colour,
5)presses "spacebar" and "2" 6 times
6)repeats steps 4 & 5 until I stop program or after 28 iterations (full inventory)

PROBLEMS WITH MY SCRIPT
Opens up smart but doesn't login (just presses spacebar and 2 keys in username and password),
I then pause program and login manually, I press run again and it just
presses spacebar and 2 keys over and over. The red dot is stuck in the top
left hand corner of smart and doesn't move or click.

I am using a laptop if that has anything to do with it.

MY SCRIPT
program mous;

{$i srl/srl/misc/smart.simba}
{$i SRL/SRL.simba}

var
x, y : Integer;

begin
setupsrl;


begin

wait(5000);

FindColor(x, y, 2255975,MSX1, MSY1, MSX2, MSY2)

MMouse(x, y, 4, 4)
repeat

Mouse(x, y, 4, 4,True)

TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');

until false;
end;


end.


anything to help me with it would be great or create it yourself if it won't take you that long thankyou :)

xtrapsp

2012-03-25 06:08:20

From: f1fanatic
hey I tried making this myself but it doesn't work for me so I need some help


WHAT I WANT IT TO DO
1)login to runescape by smart,
2)find the colour specified,
3)moves mouse to that colour,
4)clicks mouse on that colour,
5)presses "spacebar" and "2" 6 times
6)repeats steps 4 & 5 until I stop program or after 28 iterations (full inventory)

PROBLEMS WITH MY SCRIPT
Opens up smart but doesn't login (just presses spacebar and 2 keys in username and password),
I then pause program and login manually, I press run again and it just
presses spacebar and 2 keys over and over. The red dot is stuck in the top
left hand corner of smart and doesn't move or click.

I am using a laptop if that has anything to do with it.

MY SCRIPT
program mous;

{$i srl/srl/misc/smart.simba}
{$i SRL/SRL.simba}

var
x, y : Integer;

begin
setupsrl;


begin

wait(5000);
*
repeat
FindColor(x, y, 2255975,MSX1, MSY1, MSX2, MSY2)

MMouse(x, y, 4, 4)


Mouse(x, y, 4, 4,True)

TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');

until (false);
end;


end.


anything to help me with it would be great or create it yourself if it won't take you that long thankyou :)



program mous;

{$i srl/srl/misc/smart.simba}
{$i SRL/SRL.simba}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //Character Name
Pass := ''; //Character Pass
Pin := ''; //Pin for bank
Active := true;
end;
end;


var
x, y : Integer;

begin
Cleardebug;
Smart_Server := 10;
Smart_Members := false;
Smart_Signed := false;
Smart_SuperDetail := false;
SetupSRL;
DeclarePlayers;
LoginPlayer;
begin

wait(5000);

FindColor(x, y, 2255975,MSX1, MSY1, MSX2, MSY2)

MMouse(x, y, 4, 4)
repeat

Mouse(x, y, 4, 4,True)

TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');

until false;
end;



You didn't add the right procedures

f1fanatic

2012-03-25 06:43:35

program mous;

{$i srl/srl/misc/smart.simba}
{$i SRL/SRL.simba}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //Character Name
Pass := ''; //Character Pass
Pin := ''; //Pin for bank
Active := true;
end;
end;


var
x, y : Integer;

begin
Cleardebug;
Smart_Server := 10;
Smart_Members := false;
Smart_Signed := false;
Smart_SuperDetail := false;
SetupSRL;
DeclarePlayers;
LoginPlayer;
begin

wait(5000);

FindColor(x, y, 2255975,MSX1, MSY1, MSX2, MSY2)

MMouse(x, y, 4, 4)
repeat

Mouse(x, y, 4, 4,True)

TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');

until false;
end;



thanks it now logs in but the same still happens after that where the red dot goes to the top left hand corner and doesn't click. However is does still press the spacebar and 2 keys over and over. I just need the mouse to move to where I want and click on the colour first.

Imanoobbot

2012-03-25 07:42:12

From: f1fanatic
hey I tried making this myself but it doesn't work for me so I need some help


WHAT I WANT IT TO DO
1)login to runescape by smart,
2)find the colour specified,
3)moves mouse to that colour,
4)clicks mouse on that colour,
5)presses "spacebar" and "2" 6 times
6)repeats steps 4 & 5 until I stop program or after 28 iterations (full inventory)

PROBLEMS WITH MY SCRIPT
Opens up smart but doesn't login (just presses spacebar and 2 keys in username and password),
I then pause program and login manually, I press run again and it just
presses spacebar and 2 keys over and over. The red dot is stuck in the top
left hand corner of smart and doesn't move or click.

I am using a laptop if that has anything to do with it.

MY SCRIPT
program mous;

{$i srl/srl/misc/smart.simba}
{$i SRL/SRL.simba}

var
x, y : Integer;

begin
setupsrl;


begin

wait(5000);

FindColor(x, y, 2255975,MSX1, MSY1, MSX2, MSY2)

MMouse(x, y, 4, 4)
repeat

Mouse(x, y, 4, 4,True)

TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');
TypeSend(' 2');

until false;
end;


end.


anything to help me with it would be great or create it yourself if it won't take you that long thankyou :)


It is because you dont have telled the programm you account details. You should add a simple DeclarePlayers option in the beginning and I would make an MainLoop in the end where you can tell the script when it have to do what and how often.

program New;
{$i srl/srl.simba}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;

//<- Here you should describe the other functions and procedures of your script.

begin
SetUpSRL;
ActivateClient; //<-- Add the name of the functions and procedures here
end.

Hope it helped a bit im a beginner on myself and waked up like 5minutes ago.

68z35h9

2012-03-25 08:01:32

I noticed you might be trying to create a script that handles the conversation with a NPC. I would recommend using something like this:

program Talktoperson;

{$i srl/srl/misc/smart.simba}
{$i SRL/SRL.simba}

procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;

with Players[0] do
begin
Name :=''; // Username
Pass :=''; // Password
Active := True;
Pin := ''; // Leave blank if you have no pin.
end;
end;

procedure talktoperson;
var
x, y:integer;
begin
if (FindColor(x, y, 2255975,MSX1, MSY1, MSX2, MSY2)) then
begin
Mouse(x, y, 2, 2, mouse_left);
repeat
Wait(100+random(100));
until (ClickContinue(true, true));
repeat
Wait(100+random(100));
until (FindNPCChatText('textofoption', clickleft));
repeat
Wait(100+random(100));
until (FindNPCChatText('textofoption', clickleft));
end;
end;

begin
Smart_Server := 54;
Smart_Members := True;
SetupSRL;
Declareplayers;
if not (LoggedIn) then
LoginPlayer;
Repeat
talktoperson;
Until false;
end.

After clicking that color (your npc) it waits a few milliseconds and then it checks if the green [ > ] is present and if it is, it presses space bar and then goes onto the next step.
You will need to change 'textofoption' to the text of what it says (in your case, a small part of what option 2 says).
It will then again, of course wait a few milliseconds before checking if that option can be found on the screen and will continue onto the next step after it returns true.

f1fanatic

2012-03-25 09:51:02

thanks for the help everyone but i'm starting to get really frustrated with the colour picker because when I pick a colour from the login screen (the woman with the purpley fireball in her hand for example) everything works perfectly the mouse moves towards the colour and clicks it, but when I actually log in and pick the colour of the npc and run it nothing bloody happens the red dot just stays in the top left hand corner!!! arrgghghghh

help plz lol?

68z35h9

2012-03-25 10:00:07

Could you post the script that you are currently running? or maybe tell me what npc you're trying to talk with?

Runescape Pro

2012-03-25 10:29:27

Add tolerance to the color finding function… Findcolortolerance. Rs clors arent static. 3 tolerance should be good.