Results 1 to 12 of 12

Thread: Need some help with a script

  1. #1
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    93
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need some help with a script

    Hello i have maked a script but its not working right..
    it doenst respond

    Code:
    program Auto_Responder;
    {.include srl/srl.scar}
    
    var text,ghostly018:string;
    begin
    SetupSRL;
    text :=(GetTextAtEx(18, 415, 7, SmallChars, False, False, 0, 0, 0, 50, False, tr_allChars));
    if(text=ghostly018)then
    begin
    if (InChat('Hi'))then
    typeSend('ahsdhdfd');
    end;
    
    end.
    so could some one help me with this ?

  2. #2
    Join Date
    May 2007
    Location
    Canada
    Posts
    261
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, I havn't tested the script if it worked ingame, but here is the fixed script:
    SCAR Code:
    program Auto_Responder;
    {.include srl/srl.scar}

    var text,ghostly018:string;

    procedure Respond;
    begin
     text :=(GetTextAtEx(18, 415, 7, SmallChars, False, False, 0, 0, 0, 50, False, tr_allChars));
     if(text=ghostly018)then
      begin
       if (InChat('Hi'))then
       typeSend('ahsdhdfd');
      end;
    end;

    begin;
    SetupSRL;
    repeat
     Respond;
    until(false);
    end.

    Your problems:
    You didn't make a procedure, you forgot a end, you forgot a begin in the main loop, you didn't put SetupSRL; in the right place.

  3. #3
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    93
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well, the script looks better ty but it doesnt work yet

  4. #4
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    93
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    if the account ghostly018 says hi the script wont respond

  5. #5
    Join Date
    May 2007
    Location
    Canada
    Posts
    261
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Umm, try
    SCAR Code:
    program Auto_Responder;
    {.include srl/srl.scar}
     
     
    procedure Respond;
    begin
       if (InChat('Hi'))then
        begin
         TypeSend('Ello');
       end;
    end;
     
    begin;
    SetupSRL;
    repeat
     Respond;
    until(false);
    end.

  6. #6
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    93
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    doesnt work...

  7. #7
    Join Date
    May 2007
    Location
    Canada
    Posts
    261
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Are you sure you are selecting the RS window with the crosshair button?

    Taken from "Setting up SCAR so that you can auto properly".

    - - - - Dragging crosshair onto the Runescape Window - - - - -
    This is so Scar knows the boundaries of the RuneScape screen so that you can auto properly.
    Drag the crosshair symbol onto the runescape screen.
    You must drag the symbol every time you open up scar, or change world!
    A huge box will appear around the Selected Client and shrink to fit it. A new message will appear on the debug box saying:

    Code:
    'User specified a new RS window'

    If the message comes up, but the box doesn't, drag the crosshair again and repeat until the message and shrinking box both appear.

  8. #8
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    93
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yes i know how it works i use it almost everyday 1 month long
    so i think that the script is not working yet...

    User specified a new RS window
    Successfully compiled
    Line 174: [Hint] (182:43): Variable 'NEWLINE' never used in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Globals.scar
    SRL Compiled in 235msec.

  9. #9
    Join Date
    Apr 2007
    Location
    California
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program Auto_Responder;
    {.include srl/srl.scar}

    procedure Respond;
    begin
       if (InChat('Hi'))then
        begin
         TypeSend('Ello');
       end;
    end;
    begin;
    SetupSRL;
    repeat
     Respond;
    until(false);
    end.
    If i understand correctly that would only work for public chat stuff, while it seems he wants private messaging. (Not sure if it works for private messaging if it's not set to split thought.)

    Honestly i can't help you as i know nothing of that sort of thing, but i just wanted to point out why the above probably didn't work

    Edit: Sorry, nevermind lol. I think i must have read another post shortly before reading this about RC Master (which i though had to do with private messaging) and mixed up the two.

  10. #10
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    93
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    uhm, no i dont want to use it for priviate message on runescape.
    just for the public chat
    i just want that the bot only respond to 1 spec person.

  11. #11
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    InChat is the function you want to use This function check if the last chat text message. It branches from this one:


    {************************************************* ******************************
    function GetLastChatText(var chat: String): Boolean;
    By: masquerader
    Description:
    ************************************************** *****************************}

    function GetLastChatText(var chat: string): Boolean;
    var
    textx, texty: Integer;
    begin
    if (IsTextInAreaEx(40, 415, 130, 415, textx, texty, ':', 0, smallchars, False,
    True, 0, 0, 0)) then
    begin
    chat := LowerCase(Trim(GetTextAtEx(textx + 8, 415, 0, SmallChars, False,
    False, 0, 1, 16711680, 40, False, tr_allChars)));
    Result := True;
    end;
    end;



    I believe that is what you are looking for?

    BTW: Its all inside SRL/text.scar
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  12. #12
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    yea...but that wont check who its by will it? just the blue text? i'd use GetTextAtEx to make sure its him...then do inchat, but i think itd be too slow to find it before someone else typed
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


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
  •