Results 1 to 9 of 9

Thread: bitmaps and time

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

    Default bitmaps and time

    hi i just wanted to know if its possible to use bitmap for a walking procedure such as banking because in my varrok yew cutter when it looks for bank symbol its unable to find it because there is people in bank and they r white dots in map so it cant find symbol so i wondered if i used a bitmap of the varrok eastbank it would work to the player to walk to the bank... do anyone have a link of a good bitmap program post it here please!

    and i was wondering if like when the player is bankin there is any way of doing it search for bankboth for some mins and then if dont find to log out?..is it possible??..

    i tough something like that:

    var

    time:integer;

    begin
    time:=120000
    BankOpen;
    if(time)then
    NextPlayer(false);

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

    Default

    I don't think a regular Findbitmap would work for the banking, but using one of the variations that allow for more tolerance might.

    You can do a time thing like this.

    SCAR Code:
    var
    TheTime:Integer;

    begin
     MarkTime(Time);//Starts the timer
     BankOpen;
     if (TimeFromMark(Time)>120000) then //checks to see if time has passed 2 minutes
      NextPlayer(false);
    end.

  3. #3
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well for the banking I made this and commented on what it does.

    SCAR Code:
    program Testing;

    {.include SRL/SRL.scar}

    Procedure Bank;
    var
      BankTime : Integer;
    begin
      if(not(LoggedIn))then Exit; // If not logged in exits procedure.
      begin
        MarkTime(BankTime); // Start time marker with BankTime.
        repeat // Start loop.
          OpenBankGlass('veb', True, True); // Uses OpenBankGlass to open, VEB = Varrock East Bank.
          FTWait(5 + Random(5)); // Finds talking randoms and wait.
        until(BankScreen)or(TimeFromMark(BankTime) >= Seconds(10)) // Repeats until bank is open or after ten second.
      end;
      if(BankScreen)then // Banking worked.
      begin
        // Your stuff here.
      end;
      if(TimeFromMark(BankTime) >= Seconds(10))then // Banking failed.
      begin
        NextPlayer(False); // Switch players and set current player false.
        FTWait(5 + Random(5)); // Finds talking randoms and wait.
        Exit; // Exit because new player has logged in.
      end;
    end;
         
    begin
      Bank;
    end.

    Hope this helps.

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

    Default

    thx but why u use ''Exit;'' on most of stuff like when u do

    if(not(LoggedIn))then Exit;

    why dont u use

    if(not(LoggedIn))then
    NextPlayer(False);

    ?

  5. #5
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Because if you are not logged in it won't even start the procedure, normally you would have that in all your procedure's so it skips all off them until you get to the bit in the main loop where it says "if(not(LoggedIn))then NextPlayer(False);. At least thats how I do it, your way would work too.

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

    Default

    lol my way doesnt work

  7. #7
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by macromacro123 View Post
    lol my way doesnt work
    Your way should work:

    SCAR Code:
    if(not(LoggedIn))then
    NextPlayer(False);

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

    Default

    i did somehthing like that and it works but when it logs in the other player it logs out lol:

    procedure BankOpen;
    begin
    if(not(LoggedIn))then
    Exit;
    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);
    ClickOption('uickly', 1);
    until(BankScreen) or (Time);
    if(BankScreen)then
    begin
    StoreAllToBank2;
    end;
    if(Time)then
    begin
    NextPlayer(False);
    FTWait(5 + Random(5));
    Exit;
    end;
    begin
    CloseBank;
    MakeCompass('N');
    Loads:=Loads+1;
    Trips:=Trips+1;
    Players[CurrentPlayer].Banked:= Players[CurrentPlayer].Banked+1;

    End;

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

    Default

    shouldn't it be

    if(mARKTIME OR WHTVER
    begin
    exit;
    nextplayer(false)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 67
    Last Post: 03-25-2009, 10:32 AM
  2. FindAnimation <--Finds a series of bitmaps or DTMs within a given time!
    By Macrosoft in forum Research & Development Lounge
    Replies: 7
    Last Post: 12-02-2007, 05:18 PM
  3. This time... a different run time error...
    By uber jesus in forum OSR Help
    Replies: 4
    Last Post: 02-09-2007, 01:01 AM
  4. Long time listener...first time caller
    By Ransom in forum Who Are You ? Who ? Who ?
    Replies: 0
    Last Post: 11-04-2006, 02:05 AM

Posting Permissions

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