SRL Archive - RS3 Script Requests

Still having trouble! Help Needed with my script


7x7x

2012-09-29 09:45:01

Ok so ive been trying to do this myself, once again by watching tutorials and i still cant figure it out lol. So now i would like to request a script:

My Request:
If you take a look at the bottom i have colored Red the things in the script i want to be randomized, and thats it lol So basically i want the script to Randomize: The speeds in between lines without me increasing and decreasing manually
I need to randomize:Red: , Green: , Cyan: , purple: , White , Glow1: , Glow2: , GLow3: , Flash1: , Flash2: , FLash3: With different messages every time it repeats.

Heres an Example:



Const
Message0=('cyan:Message Here'); <—- I dont want Message0 to be cyan: all the time, i want it to be a different color the next time it repeats and comes back to this message. Same goes for the rest of the messages.
Message1=('red:Message Here');
Message2=('purple:Message Here');
Message3=('White:Message Here');
Message4=('glow1:Message Here');

begin
ClearDebug();
SetupSRL();
Repeat
wait(3000+Random(50)); <— This is what i dont want to keep doing for every line.
TypeSend(Message0);
wait(4000+Random(50));
TypeSend(Message1); <— I need this to NOT always be the first message, i want it to randomize so that sometimes its the last message or the second message etc.
wait(5000+Random(50));
TypeSend(Message2);
wait(3000+Random(50));
TypeSend(Message3);
wait(4000+Random(50));
TypeSend(Message4);
Until(false)
end.

(s)okkr7

2012-09-29 09:52:58

Use a:

case Random(X amount of lines you have here);

Here's an example:

case Random(35) of
0..2: PickUpMouse;
3..5: ExamineInv;
6..8: begin
HoverSkill('agility',false);
Wait(750+Random(1500));
GameTab(Tab_Inv);
end;
9..11: BoredHuman;
12..14: begin
GameTab(RandomRange(tab_Combat, tab_Notes));
Wait(750+Random(1500));
GameTab(Tab_Inv);
end;
15..17: RandomRClick;
18..20: RandomAngle(true);
21..23: RandomMovement;
24..26: begin
HoverSkill('fishing',false);
Wait(1000+Random(2500));
GameTab(Tab_Inv);
end;
27..29: PickUpMouse;
30..33: begin
HoverSkill('strength',false);
Wait(1000+Random(4000));
GameTab(Tab_Inv);
end;
34: begin
case Random(6) of
0: Wait(250 + Random(125));
1: Wait(625 + Random(350));
2: Wait(750 + Random(250));
3: Wait(275 + Random(115));
4: Wait(140 + Random(65));
5: Wait(290 + Random(170));

7x7x

2012-09-29 10:17:20

From: (s)okkr7
Use a:

case Random(X amount of lines you have here);

Here's an example:

case Random(35) of
0..2: PickUpMouse;
3..5: ExamineInv;
6..8: begin
HoverSkill('agility',false);
Wait(750+Random(1500));
GameTab(Tab_Inv);
end;
9..11: BoredHuman;
12..14: begin
GameTab(RandomRange(tab_Combat, tab_Notes));
Wait(750+Random(1500));
GameTab(Tab_Inv);
end;
15..17: RandomRClick;
18..20: RandomAngle(true);
21..23: RandomMovement;
24..26: begin
HoverSkill('fishing',false);
Wait(1000+Random(2500));
GameTab(Tab_Inv);
end;
27..29: PickUpMouse;
30..33: begin
HoverSkill('strength',false);
Wait(1000+Random(4000));
GameTab(Tab_Inv);
end;
34: begin
case Random(6) of
0: Wait(250 + Random(125));
1: Wait(625 + Random(350));
2: Wait(750 + Random(250));
3: Wait(275 + Random(115));
4: Wait(140 + Random(65));
5: Wait(290 + Random(170));


I need every line to be a different text speed at every repeat, r u saying if i use case random , it will do that?

(s)okkr7

2012-09-29 15:18:46

From: 7x7x
I need every line to be a different text speed at every repeat, r u saying if i use case random , it will do that?


Look at what I provided you.. I don't see why you couldn't do so! :P

Do either a different
wait(time + random(time));

or:
use something a bit more complicated to schnazz it up a bit!

Roflme

2012-09-29 15:51:44

From: 7x7x
I need every line to be a different text speed at every repeat, r u saying if i use case random , it will do that?


I'll try to explain as best as I can.




If you use case random to do different text speed (you mean the time between messages?) with varying text styles…

I'd separate the cases into different procedures.

This is a VERY basic one:

const
Message0=('Message');
Message1=('Here');

procedure FirstMessage;
begin
case Random(3) of //3 can be changed for however many cases you want Remember you begin counting at 0.
0: TypeSend('Red:' + Message0); //Change the red, cyan, blue to whatever
1: TypeSend('Cyan:' + Message0); // you want the animation to be.
2: TypeSend('Blue:' + Message0);
end;
end;

procedure SecondMessage;
begin
case Random(3) of
0: TypeSend('White:' + Message1);
1: TypeSend('Wave2:' + Message1);
2: TypeSend('Glow1:' + Message1);
end;
end;


begin
repeat
FirstMessage;
// You can add a wait here, or in the procedures. Whichever you prefer.
SecondMessage;
// Wait here as well, or in procedure. Depends on preference.
until(false);
end.

Repeat that for other messages. Change Red, Cyan, Blue with whatever you would like, whether it be a chat animation (scroll, wave, shake) or other colors/glow.

What that will do is send your first message with a random animation (depending on the choices you give it) and then do the same for the second message. And it will repeat the first and second message until you stop the script.

Now, of course you can't copy and paste this into simba and run it. You'd need to SetupSRL and all of that good stuff. The script above is just an example of using Case Random for your purpose.


Now you wanted it to make sure it didn't send the same color the next time the particular message is chatted. Well this doesn't guarantee that but there's a small chance you'll be using two 'Red', 'Cyan', etc. in a row. But if you add enough choices it should rarely repeat itself.


Just imagine case random like… picking a card from a deck. You don't know what card you'll get; it's random. Once you draw a card and see which one you get, you put it back and shuffle it up again. You COULD get the card again, or you could get a different card. Whatever card you get is a random choice.

Understand this is a big wall of text but hope it helped! If you are still confused and my post didn't help at all, PM me and I'll help you make your own script (since this is a rather easy script to make I’d suggest making it with guidance rather than just being handed it. I mean, I’ve practically given you the script. You just have to make a few changes to my samba code above and you’ve got yourself an autotyper. Just… I’d suggest not using it because they’re rather easy to detect and are being cracked down fast with Botany Bay out (well they were detected easily beforehand).

P1ng

2012-09-29 20:34:14

Make two separate string arrays and then put them together in the typesend.

So -
procedure Talking;
var
Colour, Words: TStringArray;
i: Integer;
begin
Colour := ['Cyan:', 'White:', 'Red:', 'Blue:'];
Words := ['Message1', 'Message2', 'Message3', 'Message4'];

repeat
TypeSend(Colour[RandomRange(0, High(Colour))] + Words[RandomRange(0, High(Colour))]);
Inc(i);
Wait(RandomRange(800, 1200));
until(i > 10);
end;

Output -
Cyan:Message2
White:Message1
Red:Message1
White:Message2
Cyan:Message1
Cyan:Message2
Red:Message1
Red:Message2
White:Message3
Cyan:Message2
Red:Message2

7x7x

2012-09-30 03:50:48

From: Roflme
I'll try to explain as best as I can.




If you use case random to do different text speed (you mean the time between messages?) with varying text styles…

I'd separate the cases into different procedures.

This is a VERY basic one:

const
Message0=('Message');
Message1=('Here');

procedure FirstMessage;
begin
case Random(3) of //3 can be changed for however many cases you want Remember you begin counting at 0.
0: TypeSend('Red:' + Message0); //Change the red, cyan, blue to whatever
1: TypeSend('Cyan:' + Message0); // you want the animation to be.
2: TypeSend('Blue:' + Message0);
end;
end;

procedure SecondMessage;
begin
case Random(3) of
0: TypeSend('White:' + Message1);
1: TypeSend('Wave2:' + Message1);
2: TypeSend('Glow1:' + Message1);
end;
end;


begin
repeat
FirstMessage;
// You can add a wait here, or in the procedures. Whichever you prefer.
SecondMessage;
// Wait here as well, or in procedure. Depends on preference.
until(false);
end.

Repeat that for other messages. Change Red, Cyan, Blue with whatever you would like, whether it be a chat animation (scroll, wave, shake) or other colors/glow.

What that will do is send your first message with a random animation (depending on the choices you give it) and then do the same for the second message. And it will repeat the first and second message until you stop the script.

Now, of course you can't copy and paste this into simba and run it. You'd need to SetupSRL and all of that good stuff. The script above is just an example of using Case Random for your purpose.


Now you wanted it to make sure it didn't send the same color the next time the particular message is chatted. Well this doesn't guarantee that but there's a small chance you'll be using two 'Red', 'Cyan', etc. in a row. But if you add enough choices it should rarely repeat itself.


Just imagine case random like… picking a card from a deck. You don't know what card you'll get; it's random. Once you draw a card and see which one you get, you put it back and shuffle it up again. You COULD get the card again, or you could get a different card. Whatever card you get is a random choice.

Understand this is a big wall of text but hope it helped! If you are still confused and my post didn't help at all, PM me and I'll help you make your own script (since this is a rather easy script to make I’d suggest making it with guidance rather than just being handed it. I mean, I’ve practically given you the script. You just have to make a few changes to my samba code above and you’ve got yourself an autotyper. Just… I’d suggest not using it because they’re rather easy to detect and are being cracked down fast with Botany Bay out (well they were detected easily beforehand).


I appreciate you explaining everything to me, and i actually put it together myself and its very very very close, all it needs is for the message Order to be random for example(How it normally Works): Message0 is the first line message1 is the second line and message2 is the third line and after it finishes with message2 it goes back to message0

How i want it to work, Example: Message0 is the first line message1 is the second line and message2 is the third line and after it finishes with message2 it will randomly choose message0,message1, or message2 to be first,second, or third instead of message0 being first again. Hope that was understanding lol

Roflme

2012-09-30 08:49:55

You can add another case random:


procedure ChatMessages
begin
case Random(3) of
0: FirstMessage;
1: SecondMessage;
2: ThirdMessage;
end;
end;

This will randomly run the procedures, which will have a random chat effect. So message0, message1, message2 will be in a random order. Unfortunately it could send message0 twice in a row, or it could skip over a message. You could also do:


procedure ChatMessages
begin
case Random(3) of
0: FirstMessage;
//Wait
SecondMessage;
//Wait
ThirdMessage;
//Wait
1: SecondMessage;
//Wait
ThirdMessage;
//Wait
FirstMessage;
//Wait
2: ThirdMessage;
//Wait
FirstMessage;
//Wait
SecondMessage;
//Wait
end;
end;
(You can add more numbers for different scenarios; don't limit yourself to 3 options!

Which will randomly choose what order to do the message in, but in this case it will say each message once before choosing what order to go in again. The difference between this one and the above procedure is that the above procedure randomizes the individual message said (message0, 1, 0, 0, 2, 1, 2, 0, 1, etc.) and the second one mixes up the order so that each message is sad once and you will not, for example, say message0 three times before saying message 2.

7x7x

2012-09-30 13:27:01

Its almost complete

7x7x

2012-09-30 13:56:57

From: P1ng
Make two separate string arrays and then put them together in the typesend.

So -
procedure Talking;
var
Colour, Words: TStringArray;
i: Integer;
begin
Colour := ['Cyan:', 'White:', 'Red:', 'Blue:'];
Words := ['Message1', 'Message2', 'Message3', 'Message4'];

repeat
TypeSend(Colour[RandomRange(0, High(Colour))] + Words[RandomRange(0, High(Colour))]);
Inc(i);
Wait(RandomRange(800, 1200));
until(i > 10);
end;

Output -
Cyan:Message2
White:Message1
Red:Message1
White:Message2
Cyan:Message1
Cyan:Message2
Red:Message1
Red:Message2
White:Message3
Cyan:Message2
Red:Message2


HI! can you tell me what i need to take out of my script above to replace for yours? because i tried doing it my self and running it but i couldn't get it to work. and also can you tell me what the lines mean by putting //(what line means here), please? if its not to much. i appreciate you helping me aswell

bs merchants

2012-09-30 14:13:41

I have left something for you to change to get this working properly; but it works fully.


program autotalk;
{$DEFINE SMART}
{$DEFINE SRL5}
{$I SRL/SRL.simba}

//Written by P1ng, amended by bsmerchants
//Simple auto typer script

Procedure DeclarePlayers; //Declares all of your players' stats/info.
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers)
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //Runescape Username
Pass := ''; //Runescape Password
Nick := ''; //3-4 lowercase letters from username; used for random event detection
end;
end;

var
Colour, Words: TStringArray;
i: Integer;
begin
{$IFDEF SMART}
SRL_SIXHOURFIX := TRUE;
SMART_FIXSPEED := TRUE;
{$ENDIF}
SetupSRL;

loginplayer;

Colour := ['Cyan:', 'White:', 'Red:', 'Blue:'];
Words := ['Message1', 'Message2', 'Message3', 'Message4'];

For i:=0 to 0 do begin
TypeSend(Colour[RandomRange(0, High(Colour))] + Words[RandomRange(0, High(Colour))]);
Inc(i);
Wait(RandomRange(800, 1200));
End;
end.


credit to p1ng for the actual code

7x7x

2012-09-30 14:45:51

From: bs merchants
I have left something for you to change to get this working properly; but it works fully.


program autotalk;
{$DEFINE SMART}
{$DEFINE SRL5}
{$I SRL/SRL.simba}

//Written by P1ng, amended by bsmerchants
//Simple auto typer script

Procedure DeclarePlayers; //Declares all of your players' stats/info.
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers)
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //Runescape Username
Pass := ''; //Runescape Password
Nick := ''; //3-4 lowercase letters from username; used for random event detection
end;
end;

var
Colour, Words: TStringArray;
i: Integer;
begin
{$IFDEF SMART}
SRL_SIXHOURFIX := TRUE;
SMART_FIXSPEED := TRUE;
{$ENDIF}
SetupSRL;

loginplayer;

Colour := ['Cyan:', 'White:', 'Red:', 'Blue:'];
Words := ['Message1', 'Message2', 'Message3', 'Message4'];

For i:=0 to 0 do begin
TypeSend(Colour[RandomRange(0, High(Colour))] + Words[RandomRange(0, High(Colour))]);
Inc(i);
Wait(RandomRange(800, 1200));
End;
end.


credit to p1ng for the actual code


i ran the script and this came up: http://puu.sh/1a7C8

P1ng

2012-10-03 04:03:40

Below is a complete and working script.
Now, to elaborate on the only thing I didn't write in the comments.

TypeSend(Colour[RandomRange(0, High(Colour))]);

So first off, "Colour" is a string array (declared as TStringArray).
This means that the variable "Colour" is holding a whole bunch of different strings in it, it can hold any number of different strings and they don't all have to be different.

Each of these will correspond with a number. So if I wanted to write "Cyan:" I would put
TypeSend(Colour[0]);
Because this is the very first string in our array and we all know that arrays begin from 0.

Now High(Colour) this creates an integer based on the highest number in our array. So pretty much this little bit of code will go and count how many strings are in our TStringArray called "Colour" and then subtract 1.

So By writing Colour[RandomRange(0, High(Colour))]; we are saying to the script
Type a string from the array called "Colour". The particular string we want you to write is anywhere randomly from the first one(0) all the way up to the last one ( High(Colour) ).

I hope this explains to you what's going on and hopefully you can learn a thing or two from reading through my explanation and the code with it's comments :)

program PTalker;     //Program name
{$DEFINE SMART} //Comment out if not using SMART
{$i SRL/SRL.Simba} //Declaration of SRL

(* Declares the player you want to use
- only need to fill in if you want the script to log you in *)

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

with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Active := True; // Is Player To Be Used?
end;
end;

(* I use this procedure to begin all my scripts
- Just sets up smart and logs the player in if needed *)

procedure SetupLogin;
begin
ClearDebug; //Clears the debug box
Status('SetupLogin'); //I use this to debug where scripts fail - Not necessary

{$IFDEF SMART} //Sets up SMART if it's used
SRL_SixHourFix := True;
Smart_FixSpeed := True;
{$ENDIF}

SetupSRL; //Sets up SRL
DeclarePlayers; //Calls DeclarePlayers procedure

ActivateClient; //Makes target client the active window
if not LoggedIn then //Checks to see if the player is already logged in
LoginPlayer; //If not it will log the player in
end;

(* Generates and writes the random message *)

procedure Talking; //Defines a new procedure called "Talking"
var //Allows you to declare variables local to the "Talking" procedure
Colour, Words: TStringArray; //Declares the colour and messages as string arrays
begin
Colour := ['Cyan:', 'White:', 'Red:', 'Blue:']; //Enter the different colours etc into the string array here
Words := ['Message1', 'Message2', 'Message3', 'Message4']; //Enter your messages into the string array here

(* The line below will type a random message with a random colour *)
TypeSend(Colour[RandomRange(0, High(Colour))] + Words[RandomRange(0, High(Colour))]);
end;

(* MainLoop *)
begin
SetupLogin; //Sets up SMART and SRL, etc

repeat
Talking; //Calls the procedure "Talking"
Wait(RandomRange(2000, 6000)); //Then wait anywhere between 2-6sec
until(False); //Will repeat this forever
end.

7x7x

2012-10-03 15:59:51

From: P1ng
Below is a complete and working script.
Now, to elaborate on the only thing I didn't write in the comments.

TypeSend(Colour[RandomRange(0, High(Colour))]);

So first off, "Colour" is a string array (declared as TStringArray).
This means that the variable "Colour" is holding a whole bunch of different strings in it, it can hold any number of different strings and they don't all have to be different.

Each of these will correspond with a number. So if I wanted to write "Cyan:" I would put
TypeSend(Colour[0]);
Because this is the very first string in our array and we all know that arrays begin from 0.

Now High(Colour) this creates an integer based on the highest number in our array. So pretty much this little bit of code will go and count how many strings are in our TStringArray called "Colour" and then subtract 1.

So By writing Colour[RandomRange(0, High(Colour))]; we are saying to the script
Type a string from the array called "Colour". The particular string we want you to write is anywhere randomly from the first one(0) all the way up to the last one ( High(Colour) ).

I hope this explains to you what's going on and hopefully you can learn a thing or two from reading through my explanation and the code with it's comments :)

program PTalker;     //Program name
{$DEFINE SMART} //Comment out if not using SMART
{$i SRL/SRL.Simba} //Declaration of SRL

(* Declares the player you want to use
- only need to fill in if you want the script to log you in *)

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

with Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Active := True; // Is Player To Be Used?
end;
end;

(* I use this procedure to begin all my scripts
- Just sets up smart and logs the player in if needed *)

procedure SetupLogin;
begin
ClearDebug; //Clears the debug box
Status('SetupLogin'); //I use this to debug where scripts fail - Not necessary

{$IFDEF SMART} //Sets up SMART if it's used
SRL_SixHourFix := True;
Smart_FixSpeed := True;
{$ENDIF}

SetupSRL; //Sets up SRL
DeclarePlayers; //Calls DeclarePlayers procedure

ActivateClient; //Makes target client the active window
if not LoggedIn then //Checks to see if the player is already logged in
LoginPlayer; //If not it will log the player in
end;

(* Generates and writes the random message *)

procedure Talking; //Defines a new procedure called "Talking"
var //Allows you to declare variables local to the "Talking" procedure
Colour, Words: TStringArray; //Declares the colour and messages as string arrays
begin
Colour := ['Cyan:', 'White:', 'Red:', 'Blue:']; //Enter the different colours etc into the string array here
Words := ['Message1', 'Message2', 'Message3', 'Message4']; //Enter your messages into the string array here

(* The line below will type a random message with a random colour *)
TypeSend(Colour[RandomRange(0, High(Colour))] + Words[RandomRange(0, High(Colour))]);
end;

(* MainLoop *)
begin
SetupLogin; //Sets up SMART and SRL, etc

repeat
Talking; //Calls the procedure "Talking"
Wait(RandomRange(2000, 6000)); //Then wait anywhere between 2-6sec
until(False); //Will repeat this forever
end.


==============================================

Wow! P1ng, thanks so much for all the help! your the reason i started scripting did you know that? every time i needed help you actually helped without giving me grief. I mean i havent been scripting for long, but from day 1 you where there man, i honestly started scripting so i can help others the way you helped me.

The Killer

2012-10-03 16:18:34

Why is P1ng banned?

Ian

2012-10-03 16:24:49

Is he? his name is the banned colour and he is now a "community member", but he still has his cups so Idk, maybe on request like with Shay?

masterBB

2012-10-03 16:53:21

My method would be similar to p1ng his method, but I won't take a random message. His method could repeat the same message multiple times.

procedure SendMessages;
var
effects, msgs: Array of String;
i: Integer;
begin
effects := ['cyan:', 'red:', 'purple:', 'white:', 'glow1']; //store the effects in an array
msgs := ['this is message one', 'this is the second message']; //Store the messages in an array

for(i := 0 to High(msgs)) do //increase i with one till we got the last message
begin
TypeSend(effects[Random(length(effects))] + msgs[i]); //pick one random effect and add the message
wait(500 + random(200)); //wait a bit after typing
end;
end;

But since you wanted to randomize the messages too:

procedure SendMessages;
var
effects, msgs: Array of String;
i: Integer;
pickedMessage: Integer;
begin
effects := ['cyan:', 'red:', 'purple:', 'white:', 'glow1'];
msgs := ['this is message one', 'this is the second message'];

while(High(msgs) > 0) do //while we got messages
begin
pickedMessage := Random(length(msgs)); //fixed a bug here
TypeSend(effects[Random(length(effects))] + msgs[pickedMessage]);

msgs[pickedMessage] := msgs[High(msgs)]; //puts the last message at the picked message its spot

SetLength(msgs, length(msgs) - 1); //removes the last message from the array

wait(500 + random(200));
end;
end;

7x7x

2012-10-03 16:53:34

P1ng

Ok so i added extra colors and this message came up: http://puu.sh/1b6QR

any idea what i did wrong?

masterBB

2012-10-03 16:57:16

From: 7x7x
P1ng

Ok so i added extra colors and this message came up: http://puu.sh/1b6QR

any idea what i did wrong?


replace that line with:
  TypeSend(Colour[RandomRange(0, High(Colour))] + Words[RandomRange(0, High(Words))]);

7x7x

2012-10-03 17:07:00

From: masterBB
replace that line with:
  TypeSend(Colour[RandomRange(0, High(Colour))] + Words[RandomRange(0, High(Words))]);



Nice! works fine now, thanks for the help =)

masterBB

2012-10-03 17:08:53

From: 7x7x
Nice! works fine now, thanks for the help =)


No problem, I love people starting to program.

*still thinks his code was better :redface: *

7x7x

2012-10-08 19:29:44

Text Speed wont increase or decrease?

ok so i added: Talking;
Wait(RandomRange(5000, 8000));


and the speeds wont inrease or decrease no matter how many times i change the 5000 or 8000…

and suggestions?

P1ng

2012-10-09 01:51:02

Wait(RandomRange(5000, 8000)); simply means that it will type the message, then wait between 5-8sec before writing the next message.

I'm not sure how/why you would go about alterring the speed you type the message. AFAIK TypeSend already has a bit of randomness in it so that it is more human-like.

Don't worry MasterBB, I like your method too ;)

xtrapsp

2012-10-09 04:14:22

just add a wait random before and after the talking :) that will generate 2 random times.


or if you want to mega randomise it use a case :)

case Random(10) of
0: Wait(RandomRange(32000, 56000)); // AFK
1..4: Wait(RandomRange(2000, 6000)); // General chit chat
5: Wait(RandomRange(2000, 6000)); // Pain in wrist typing slow
6..10: Wait(RandomRange(1000, 60000));

Pretty much instead of going extremely complicated because your slightly new to this why not take baby steps :)