Results 1 to 8 of 8

Thread: Simple Autotalker

  1. #1
    Join Date
    Jul 2013
    Posts
    1
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default Simple Autotalker

    Extremely simple but it works.

    Code:
    program AutoTalker;
    {$i SRL\SRL.simba}
    
    
    var
      Text, TextColor, TextEffect: string;
      SayTimes, TimeBetween: Integer;
    
    procedure Talk;
    
    var
     b: Integer;
    begin
    
      SayTimes := 10;
      Text := 'Buying 10k lobsters, 400 gp ea!';
      TextEffect := 'wave1: ';
      TextColor := 'red:';
      TimeBetween := 700;
    
      for b := 0 to (SayTimes) do
      begin
        TypeSend((TextColor)+(TextEffect)+(Text));
        Wait (TimeBetween);
      end;
    
    end;
    
    
    begin
      SetupSRL;
      ActivateClient;
      Talk;
    end.
    What I want to add:

    * Multi-messages
    * GUI
    * Other stuff I can find useful
    Last edited by proalex; 07-25-2013 at 05:03 PM.

  2. #2
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    Try adding your things to constants so it's easier to edit for people:

    Code:
    program AutoTalker;
    {$i SRL\SRL.simba}
    
    const 
     ver = 1.0; //VERSION NUMBER - NO REAL MEANING
     WHATTOSAY = ''; //What should we type?
     TIMESTOSAY = 10; //how many times should we repeat this?
     EFFECT1 = ''; //What effect should we apply to the text?
     EFFECT2 = ''; //Secondary effect
     REPEATTIME = 1000; //how quickly should we repeat the message in ms? (1000 = 1 second)
    
    var
      Text, TextColor, TextEffect: string;
      SayTimes, TimeBetween: Integer;
    
    procedure Talk;
    
    var
     b: Integer;
    begin
    
      SayTimes := TIMESTOSAY;
      Text := WHATTOSAY;
      TextEffect := EFFECT1;
      TextColor := EFFECT2;
      TimeBetween := REPEATTIME;
    
      for b := 0 to (SayTimes) do
      begin
        TypeSend((TextColor)+(TextEffect)+(Text));
        Wait (TimeBetween);
      end;
    
    end;
    
    
    begin
      SetupSRL;
      ActivateClient;
      Talk;
    end.

  3. #3
    Join Date
    Jan 2012
    Location
    127.0.0.1
    Posts
    702
    Mentioned
    11 Post(s)
    Quoted
    76 Post(s)

    Default

    Slightly Cleaner like this:
    Simba Code:
    program AutoTalker;
    {$i SRL\SRL.simba}

    Const
      SayTimes = 10;
      Text = 'Buying 10k lobsters, 400 gp ea!';
      TextEffect = 'wave1: ';
      TextColor = 'red:';
      TimeBetween = 700;

    procedure Talk;

    var
     b: Integer;
    begin
      for b := 0 to (SayTimes) do
      begin
        TypeSend((TextColor)+(TextEffect)+(Text));
        Wait(TimeBetween);
      end;
    end;


    begin
      SetupSRL;
      ActivateClient;
      Talk;
    end.
    Edit: also use [simba] tags , as that way, it is formatted for PascalScript

  4. #4
    Join Date
    Jul 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Why this autotalker is typing messages in simba script screen?

  5. #5
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    Quote Originally Posted by lukase48 View Post
    Why this autotalker is typing messages in simba script screen?
    Lol, select a different window.

  6. #6
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Quote Originally Posted by lukase48 View Post
    Why this autotalker is typing messages in simba script screen?
    This script doesn't use SMART, so you have to open RS in your browser and target the client, unless you add SMART yourself.

    @proalex, grats on the first script. I remember my first script was a talker. Keep it up
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  7. #7
    Join Date
    Jul 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    So I can use only one autotalker?

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

    Default

    Quote Originally Posted by lukase48 View Post
    So I can use only one autotalker?
    Just define SMART at the top of the script.
    Working on: Tithe Farmer

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
  •