Results 1 to 7 of 7

Thread: Chat Box

  1. #1
    Join Date
    Sep 2008
    Location
    Earth
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Chat Box

    Is there a procedure like if someone says in the chat box 'sup' then you can have scar typesend('nm you?') or something like that? if so can someone tell me.


    Thank you
    ~lVlaverick~

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

    Default

    yes there is.
    InChat(Text: String): Boolean;

    If inchat('sup') then
    typesend('stfu');
    Blank!

  3. #3
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes, there is, the function is called "InChat".

    (I'm glad you're interested in scripting already from your first post)

    Anyway, using it in a script would be something like this:

    SCAR Code:
    procedure Respond;
    begin
      if InChat('hai') or InChat('hello') then
        TypeSend('o hai der');
    end;

    Just PM me if you need more help.


    Edit: Waddo..?

  4. #4
    Join Date
    Sep 2008
    Location
    Earth
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks evilchicken! i have another question for you if you don't mind :P like i made this
    SCAR Code:
    Procedure Respond3;
    begin
     if inchat('Wc lvl?') or inchat('Woodcutting lvl?') or inchat('Wc lvl') then
      begin
     
      end;
    end;
    Can i make it like someone get my current Wc lvl then typesend it?

    ~lVlaverick~

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

    Default

    EEEEEEEEEEEEEEKKKKKKKKK No No

    Im not shouting just advising

    double post means posting twice it does not mean posting the same thing twice

    delete your second post and use the edit button
    Blank!

  6. #6
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Procedure Respond3;
    var WcLv: Integer
    begin
     if inchat('Wc lvl?') or inchat('Woodcutting lvl?') or inchat('Wc lvl') then
      begin
        WcLv := GetSkillLevel('woodcutting');
        TypeSend(IntToStr(WcLv) + ', you?');
      end;
    end;

  7. #7
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah its also good if you use a case random of eg
    SCAR Code:
    Procedure Respond3;
    var WcLv: Integer
    begin
     if inchat('Wc lvl?') or inchat('Woodcutting lvl?') or inchat('Wc lvl') then
      begin
        case random(2) of
        1:begin
             WcLv := GetSkillLevel('woodcutting');
             TypeSend(IntToStr(WcLv) + ', you?');
           end;
        2:typesend('meh not very good lolz');
    end;
    edit and if you used declareplayers you could use the players nick in the responder eg
    SCAR Code:
    Procedure Respond3;
    var WcLv: Integer
    begin
     if inchat((players[currentplayer].nick)) then
      begin
        case random(2) of
        1:typesend('sup');      
        2:typesend('yeah?');
    end;
    footnote:you only need begin and end in a case pf if its more than 1 line you need it to do


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Quick Chat: the demise of free chat?
    By gillian in forum RuneScape News and General
    Replies: 28
    Last Post: 06-08-2008, 06:03 PM

Posting Permissions

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