Results 1 to 9 of 9

Thread: Check if logged out and if logged out log back in procedure

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

    Default Check if logged out and if logged out log back in procedure

    Hi all,

    Relatively new to this programming language, could someone possibly provide me with a procedure to check if account is not logged in, and if so, to log back in and resume.

    Thanks for any help I receive.

    W0ah

  2. #2
    Join Date
    Apr 2013
    Posts
    395
    Mentioned
    1 Post(s)
    Quoted
    177 Post(s)

    Default

    If not LoggedIn then
    LoginPlayer;

  3. #3
    Join Date
    Apr 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Will this procedure work on 07?

  4. #4
    Join Date
    Apr 2013
    Posts
    395
    Mentioned
    1 Post(s)
    Quoted
    177 Post(s)

    Default

    Probably. You can test it out yourself. It's not actually a procedure, but you can call it inside most of your functions or procedures to check if you're logged in.

  5. #5
    Join Date
    Apr 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    And where in a script would the best place to put this? In each procedure? I am editing a source code and it already has it in the main method but can not handle the 6 hour logout.

    if (not LoggedIn) then
    begin
    LogInPlayer;
    wait(750);
    end;

    Thanks!

  6. #6
    Join Date
    Apr 2013
    Posts
    395
    Mentioned
    1 Post(s)
    Quoted
    177 Post(s)

    Default

    Probably a repeat loop that might fail your script if you're logged out. Sometimes script writer choose to terminate script when some part of the script fails. You can check if character is logged out before terminating the script, if it is then login back, if its not then terminate the script.

  7. #7
    Join Date
    Apr 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sorry i dont understand 100%, your saying that if the scripter has added a condition where if a event occurs the script will log you off and end.

    By adding this code that will tell the script to log back in it may cause a log in-log out repeat which will go on continuously.

    Im not sure where i could put an if statement within the code to cover this, as it dont want it to be stuck in a loop. I suppose adding it to a few methods will work - albeit untidy?

  8. #8
    Join Date
    Apr 2013
    Posts
    395
    Mentioned
    1 Post(s)
    Quoted
    177 Post(s)

    Default

    Not really sure how can I explain it clearly with words. But I think you could just put that code in a procedure where character will most likely logout while doing the procedure. Or put it in most part of the script just to be safe.

  9. #9
    Join Date
    Apr 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Okay, will give that a go, cheers for your help.

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
  •