Results 1 to 24 of 24

Thread: Still having trouble! Help Needed with my script

  1. #1
    Join Date
    Sep 2012
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Still having trouble! Help Needed with my script

    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.

  2. #2
    Join Date
    May 2012
    Location
    Chaaaaiir
    Posts
    376
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Use a:

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

    Here's an example:

    Simba Code:
    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));

  3. #3
    Join Date
    Sep 2012
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by (s)okkr7 View Post
    Use a:

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

    Here's an example:

    Simba Code:
    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?

  4. #4
    Join Date
    May 2012
    Location
    Chaaaaiir
    Posts
    376
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by 7x7x View Post
    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
    Simba Code:
    wait(time + random(time));

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

  5. #5
    Join Date
    Dec 2009
    Posts
    380
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by 7x7x View Post
    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:
    Simba Code:
    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).
    Currently: Playing OSRS legit until I get bored

  6. #6
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

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

    So -
    Simba Code:
    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

  7. #7
    Join Date
    Sep 2012
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Roflme View Post
    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:
    Simba Code:
    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

  8. #8
    Join Date
    Dec 2009
    Posts
    380
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    You can add another case random:

    Simba Code:
    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:

    Simba Code:
    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.
    Currently: Playing OSRS legit until I get bored

  9. #9
    Join Date
    Sep 2012
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Its almost complete
    Last edited by 7x7x; 09-30-2012 at 06:05 PM.

  10. #10
    Join Date
    Sep 2012
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by P1ng View Post
    Make two separate string arrays and then put them together in the typesend.

    So -
    Simba Code:
    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

  11. #11
    Join Date
    Oct 2010
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

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

    Code:
    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
    Last edited by bs merchants; 09-30-2012 at 06:20 PM.

  12. #12
    Join Date
    Sep 2012
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by bs merchants View Post
    I have left something for you to change to get this working properly; but it works fully.

    Code:
    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
    Last edited by 7x7x; 10-01-2012 at 03:44 PM.

  13. #13
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    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

    Simba Code:
    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.

  14. #14
    Join Date
    Sep 2012
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by P1ng View Post
    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

    Simba Code:
    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.

  15. #15
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

    Why is P1ng banned?

  16. #16
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    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?

  17. #17
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    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.

    Simba Code:
    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:

    Simba Code:
    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;
    Last edited by masterBB; 10-03-2012 at 08:55 PM. Reason: fixed a bug
    Working on: Tithe Farmer

  18. #18
    Join Date
    Sep 2012
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    P1ng

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

    any idea what i did wrong?

  19. #19
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by 7x7x View Post
    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:
    Simba Code:
    TypeSend(Colour[RandomRange(0, High(Colour))] + Words[RandomRange(0, High(Words))]);
    Working on: Tithe Farmer

  20. #20
    Join Date
    Sep 2012
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    replace that line with:
    Simba Code:
    TypeSend(Colour[RandomRange(0, High(Colour))] + Words[RandomRange(0, High(Words))]);

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

  21. #21
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by 7x7x View Post
    Nice! works fine now, thanks for the help =)
    No problem, I love people starting to program.

    *still thinks his code was better *
    Working on: Tithe Farmer

  22. #22
    Join Date
    Sep 2012
    Posts
    111
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    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?
    Last edited by 7x7x; 10-08-2012 at 11:47 PM.

  23. #23
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    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

  24. #24
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default

    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

    Simba Code:
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •