Results 1 to 4 of 4

Thread: login players and changing

  1. #1
    Join Date
    Jan 2007
    Posts
    268
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    login players and changing

    hi it's because i have a problem/question.
    i have modified this banking procedure so the player can logout and then the next player will log if he has not find bank screen. so here it is:

    procedure BankOpen;
    var
    Tries :integer;

    begin
    MakeCompass('E');
    if not (BankScreen) then
    repeat
    if(FindObj(x,y,'ank',607067,10))then
    Mouse(x,y,4,4,false)
    else if(FindObj(x,y,'ank',608095,10))then
    Mouse(x,y,4,4,false)
    Wait(250);
    if(ClickOption('uickly', 1))then
    begin
    Tries := Tries+1;
    Flag;
    end;
    until(BankScreen) or (Tries=10);
    if(BankScreen)then
    begin
    StoreAllToBank2;
    end;
    if(Tries=10)then
    begin
    LogOut;
    NextPlayer(False);
    end;
    begin
    CloseBank;
    MakeCompass('N');
    Loads:=Loads+1;
    Trips:=Trips+1;
    Players[CurrentPlayer].Banked:= Players[CurrentPlayer].Banked+1;

    End;

    End;

    as u can see i did:

    if(Tries=10)then
    begin
    LogOut;
    NextPlayer(False);
    end;

    will it works??????????????????

    when it moves the mouse to find the bankboth is it considered as 1 trie? because i was watchin it goes and it was lost then it was searching for bankboth and it was moving the mouse on people and then it stop and it doesnt do nothin and it logged out and it was lagging but none players have re-logged in so i had to stop it

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

    Default

    You need to set a starting value for Tries. Make sure it is before the Repeat though, otherwise it will keep getting reset Then you have yourself an endless loop.

    SCAR Code:
    begin
    Tries:=0;
    MakeCompass('E');
    if not (BankScreen) then
    repeat

    Also, you don't need the LogOut rightbefore NextPlayer, since NextPlayer will logout the current player automatically.

  3. #3
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I thought 0 was the default value anyway? :-\

  4. #4
    Join Date
    Feb 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It should go to 0 by default, but it's always good to make sure it's at 0.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Changing IP
    By Home in forum Computer Help and Tutorials
    Replies: 21
    Last Post: 02-22-2009, 09:46 PM
  2. Login Players
    By cathering_ in forum OSR Help
    Replies: 6
    Last Post: 07-30-2007, 12:46 AM
  3. IP Changing
    By Hey321 in forum SRL Site Discussion
    Replies: 7
    Last Post: 03-27-2007, 11:35 PM
  4. players login out
    By macromacro123 in forum OSR Help
    Replies: 10
    Last Post: 03-01-2007, 10:56 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
  •