Results 1 to 4 of 4

Thread: Where to put this timer?

  1. #1
    Join Date
    Mar 2012
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Where to put this timer?

    I have built a screen timer but I dont know where to put him because it stop
    the script

    Code:
    Procedure Timer;
    var
    text: String;
    begin
    text:='Running Time:';
        while (LoggedIn) do
       SMART_DrawTextMulti(True,False,[text+MsToTime(GetTimeRunning, Time_Bare)],Point(50, 50),UpChars,clOlive) ;
     end;

  2. #2
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    First of all it shouldn't stop the script

    Secondly, I guess you could just place this procedure near the top of your script and then at the start of all your other function/procedures - you could call it.

  3. #3
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    Post more of your script that your trying to add it to.
    Or try place in your main loop

  4. #4
    Join Date
    Mar 2012
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I tried to call it in the main loop but it just stuck the other calls.
    here is my script:

    Code:
    program MorWillowsChopper;
    
     {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    
    {$IFDEF SMART}
        {$i srl/srl/misc/paintsmart.simba}
    {$ENDIF}
    
    
    
    Procedure DeclarePlayers;
    begin
      HowManyPlayers:=1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:=0;
     //--------------------
     //Pleas fill the form:
     //-------------------
      Players[0].Name:='';
      Players[0].Pass:='';
      Players[0].Active:=True;
    end;
    
    
    //----------------------------------------------
    //Pleas don't touch the next part of the script
    //---------------------------------------------
    
    
    
    procedure AntiBan();
    begin
      if(not(LoggedIn))then
      Exit;
      FindNormalRandoms;
      case Random(8) of
       0:
       begin
         HoverSkill('Woodcutting', false);
         wait(2453+Random(432));
       end;
       1: PickUpMouse;
       2:
       begin
         MakeCompass('S');
         wait(50+random(133));
         MakeCompass('N');
         FindNormalRandoms;
       end;
      end;
    end;
    
    
    Procedure Timer;
    var
    text: String;
    begin
    text:='Running Time:';
        while (LoggedIn) do
       SMART_DrawTextMulti(True,False,[text+MsToTime(GetTimeRunning, Time_Bare)],Point(50, 50),UpChars,clOlive) ;
     end;
    
    
    
    
     procedure DropLogs;
    var
      i: Integer;
    begin
      Writeln('Dropping');
      if not (LoggedIn) then
        Exit;
      if(InvFull) then
      for i := 1 to 28 do
      begin
        if ExistsItem(i) then
          DropItem(i);
          wait(50+random(80));
      end;
    end;
    
    
    
    Procedure ChopTree;
      var x,y:integer;
    begin
     repeat
     FindNormalRandoms;
     if FindObj(x,y,'hop',1120020,40)then
     Mouse(x, y, 1, 1, false);
        ChooseOption('hop');
        AntiBan;
        repeat
         Wait(1200+random(250));
        Until not IsUpText('illow') or (InvFull);
        Until (InvFull);
     end;
    
    
    
    procedure MainLoop;
    begin
     repeat
      ChopTree;
      DropLogs;
      Until not(LoggedIn);
    end;
    
    
    
    begin
      {$IFDEF SMART}
        Smart_Server := 0;
        Smart_Members := True;
        Smart_Signed := True;
        Smart_SuperDetail := False;
      {$ENDIF}
      SetUpSRL();
      ActivateClient();
      DeclarePlayers();
      LoginPlayer();
      MainLoop();
    end.

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
  •