Results 1 to 15 of 15

Thread: I've got a small problem...

  1. #1
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default I've got a small problem...

    Ok...

    I decided to mark my own procedure down in the Login procedures found in the "core" file of SRL.

    This is the procedure:

    SCAR Code:
    procedure LogMeOut;
    begin
      wait(500+random(200));
     if(InChat('pullout'))then
      begin
       Logout;
      end;
    end;

    This is the procedure in action:

    SCAR Code:
    program New;
    {.include SRl/SRL.scar}
    begin
    SetupSRL;
     repeat
      LogMeOut;
       wait(500+random(200));
     until(false)
    end.

    What my script SHOULD do:

    Scan the last chat message area every 500-700 MiliSeconds for the word "pullout." Then it will log the character out.

    What my script does:

    Only scans the last chat message area on startup, and won't scan again unless I stop and start the script again.

    Please help me

  2. #2
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    *sees orange lettering*

    Help is on the way!

    EDIT: Perhaps not =/

  3. #3
    Join Date
    Dec 2006
    Location
    Ky
    Posts
    390
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think yours should work but try this..

    SCAR Code:
    procedure LogMeOut;
    begin
    repeat
      wait(500+random(200));
     if(InChat('pullout'))then
      begin
       Logout;
      end;
    until(LogedOutScreen)//not the right function but you can find
    end;


    program New;
    {.include SRl/SRL.scar}
    begin
    SetupSRL;
    LogMeOut;
    end.
    SUMMER BREAK be back when I want to

  4. #4
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Your's doesnt' seem to work either.

    Would you mind testing mine real quick?

  5. #5
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    try this

    if(InChat('ullout')) then

  6. #6
    Join Date
    Dec 2006
    Location
    Ky
    Posts
    390
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If the first letter in the message is caps then it may not work try what Omg posted..
    SUMMER BREAK be back when I want to

  7. #7
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Alrigh. Lemme check.

  8. #8
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Not working =/

    WHY WON'T IT REPEAT!!!

  9. #9
    Join Date
    Sep 2006
    Posts
    916
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    PHP Code:
    program New;
    {.include 
    SRl/SRL.scar}

    procedure LogMeOut;
    begin
      wait
    (500+random(200));
     if(
    InChat('pullout'))then
      begin
       Logout
    ;
      
    end;
    end;

    begin
    SetupSRL
    ;
     
    repeat
      LogMeOut
    ;
      
    WriteLn('12');
       
    wait(500+random(200));
     
    until(false)
    end
    That works. I added the writeln to make sure it was repeating.

  10. #10
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Thanks, Hey =)

  11. #11
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    You dont even need the extra procedure in there. This is a slightly more efficient way of doing what you wanted to do

    PHP Code:
    Program New;

    Begin
      Repeat
        
    If not(LoggedInthen TerminateScript;
        
    Wait(500);
      
    until (InChat('ullout'))
      
    Logout;
    end
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  12. #12
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by hey321 View Post
    SCAR Code:
    program New;
    {.include SRl/SRL.scar}

    procedure LogMeOut;
    begin
      wait(500+random(200));
     if(InChat('pullout'))then
      begin
       Logout;
      end;
    end;

    begin
    SetupSRL;
     repeat
      LogMeOut;
      WriteLn('12');
       wait(500+random(200));
     until(false)
    end.

    That works. I added the writeln to make sure it was repeating.
    *is embarrassed*

    So it was working like it should have the whole time? Oops

  13. #13
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    So I'm unable to add my own procedure? It works when I put the whole procedure in the script, but not when I place the procedure in the Login file of SRL/core, and call it up in the main loop.

    Is there a way I can go around doing this? I'd really like to be able to set up my own private procedures

  14. #14
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    You shouldn't place anything into the SRL files. If you create new procedures, always keep them in your own script.
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  15. #15
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Darn

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Small Problem
    By lilpaintballer in forum OSR Help
    Replies: 9
    Last Post: 09-27-2008, 10:04 PM
  2. small problem not sure how to fix it
    By shaheerpak in forum OSR Help
    Replies: 3
    Last Post: 01-02-2008, 04:41 AM
  3. small problem. Need help.
    By One Leeter in forum OSR Help
    Replies: 8
    Last Post: 06-15-2007, 09: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
  •