Results 1 to 5 of 5

Thread: how would i fix this...

  1. #1
    Join Date
    Apr 2008
    Location
    Northwest england
    Posts
    1,179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default how would i fix this...

    heres the start of my auto responder
    how do i patch up the second line
    *i cant seem to get it to work with all the words on the same line

    Code:
    procedure autoresponder;
    begin
      if inchat('Hi'or'Hey'or'Sup'or'ello'or'hiya'or'yer'or'good day'or'yo'or'Hello') then
      wait(random(500));
      ts:= Random(9);
      case ts of
        0:typesend('Hi');
    
        1:typesend('Hey');
    
        2:typesend('Sup');
    
        3:typesend('ello');
    
        4:typesend('hiya');
    
        5:typesend('yer');
    
        6:typesend('good day');
    
        7:typesend('yo');
    
        8:typesend('Hello');
      end;
    end;
    ty for the help
    Blank!

  2. #2
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    add a begin after your if () then and an end after your case.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  3. #3
    Join Date
    Apr 2008
    Location
    Northwest england
    Posts
    1,179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by mixster View Post
    add a begin after your if () then and an end after your case.
    Code:
    procedure autoresponder;
    begin
      if inchat('Hi'or'Hey'or'Sup'or'ello'or'hiya'or'yer'or'good day'or'yo'or'Hello') then
      begin
      wait(random(500));
      ts:= Random(9);
      case ts of
        0:typesend('Hi');
    
        1:typesend('Hey');
    
        2:typesend('Sup');
    
        3:typesend('ello');
    
        4:typesend('hiya');
    
        5:typesend('yer');
    
        6:typesend('good day');
    
        7:typesend('yo');
    
        8:typesend('Hello');
      end;
      end;
    end;
    nope stil doesnt work

    also if this helps
    Failed when compiling
    Line 232: [Error] (15336:22): Type mismatch in script D:\Program Files\SCAR 3.15\Scripts\my scripts\scripts\auto miner v1.2.scar

    line 232:= if inchat('Hi'or'Hey'or'Sup'or'ello'or'hiya'or'yer'or 'good day'or'yo'or'Hello') then
    Blank!

  4. #4
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    How about...

    SCAR Code:
    Var
      Words: Array[0..8] Of String;
      Answers: Array[0..8] Of String;

    Procedure LoadStuff;
    Begin
      Words[0] := 'Hi';
      Words[1] := 'Hey';
      Words[2] := 'Sup';
      Words[3] := 'ello';
      Words[4] := 'hiya';
      Words[5] := 'yer';
      Words[6] := 'good day';
      Words[7] := 'yo';
      Words[8] := 'Hello';
      Answers[0] := 'Hi';
      Answers[1] := 'Whats Zup';
      Answers[2] := 'Nutin Much';
      Answers[3] := 'Aloha!';
      Answers[4] := 'Hia';
      Answers[5] := 'Yup';
      Answers[6] := 'Yes it is';
      Answers[7] := 'Wizzup';
      Answers[8] := 'Hia';
    End;

    Procedure AutoResponder;
    Var
      I: Integer;
      S: String;
    Begin
      If (Words[0] = '') Then
        LoadStuff;
      GetLastChatText(S);
      For I := 0 To 8 Do
        If (Pos(Words[I], S) <> 0) Then
        Begin
          TypeSend(Answers[I]);
          Wait(2000 + Random(500));
          Exit;
        End;
    End;

  5. #5
    Join Date
    Apr 2008
    Location
    Northwest england
    Posts
    1,179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Timer View Post
    How about...

    SCAR Code:
    Var
      Words: Array[0..8] Of String;
      Answers: Array[0..8] Of String;

    Procedure LoadStuff;
    Begin
      Words[0] := 'Hi';
      Words[1] := 'Hey';
      Words[2] := 'Sup';
      Words[3] := 'ello';
      Words[4] := 'hiya';
      Words[5] := 'yer';
      Words[6] := 'good day';
      Words[7] := 'yo';
      Words[8] := 'Hello';
      Answers[0] := 'Hi';
      Answers[1] := 'Whats Zup';
      Answers[2] := 'Nutin Much';
      Answers[3] := 'Aloha!';
      Answers[4] := 'Hia';
      Answers[5] := 'Yup';
      Answers[6] := 'Yes it is';
      Answers[7] := 'Wizzup';
      Answers[8] := 'Hia';
    End;

    Procedure AutoResponder;
    Var
      I: Integer;
      S: String;
    Begin
      If (Words[0] = '') Then
        LoadStuff;
      GetLastChatText(S);
      For I := 0 To 8 Do
        If (Pos(Words[I], S) <> 0) Then
        Begin
          TypeSend(Answers[I]);
          Wait(2000 + Random(500));
          Exit;
        End;
    End;
    thanks timer that works ive changed wizzup to wazzup tho

    some people migt recognize the name wizup andtry stat a convo with me
    and then report
    Blank!

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
  •