Results 1 to 3 of 3

Thread: Help with repeat..until.

  1. #1
    Join Date
    Nov 2012
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with repeat..until.

    I'm trying to get it to repeat antiban until we either gain exp (crafting, but doesn't matter what xp) or 10 seconds pass. I can get it repeat..until for the 10 seconds, but I have no idea how to repeat..until xp is gained. Any help would be much appreciated

    line 86-102

  2. #2
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Simba Code:
    currentXp:= GetXpBar(); //or GetXpBarTotal for 1

    //some action that gains xp

    MarkTime();
    repeat
      Antiban;
      wait();
    until (TimeFromMark() > 10000) or (GetXpBar() >  currentXp);

  3. #3
    Join Date
    Nov 2012
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ---

    Simba Code:
    //Instructions:
    //1. Fill out information needed.
    //2. Start script.
    //3. Once logged in disable SMART and enable once at the loom.

    program King_Citadel;

    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$I SRL/SRL/Misc/Debug.Simba}

    const
      SRLStats_Username = '';//Leave blank if you please.
      SRLStats_Password = '';//Leave blank if you please.
      BreakEvery        = 11111111111;//Don't change.
      BreakFor          = 11111111111;//Don't change.
      Version           = '1.1';//Don't change.
      NumbOfPlayers     = 1; //Don't change.
      StartPlayer       = 0; //Don't change.
      Activity          = 0;
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;//Don't change.
      NumberOfPlayers(HowManyPlayers);//Don't change.
      CurrentPlayer := StartPlayer;//Don't change.

      Players[0].Name := '';//Enter your username.
      Players[0].Pass := '';//Enter your password.
      Players[0].Pin  := '';//Enter your PIN.
      Players[0].Active:=True;//Don't change.
    end;

    procedure StatsGuise(wat: string);
    begin
      Status(wat);
      Disguise(wat);
    end;

    procedure IntroChat;
    begin
      WriteLn('Thank you for using King Citadel by Elvis!');
    end;

    function CheckAndClick(UpText, option:string; X, Y:Integer; RClick:Boolean):Boolean;
    begin
      MMouse(x, y, 5, 5);
      If WaitUptext(UpText, 150) then
      begin
        Result:=True;
        GetMousePos(x, y);
        if RClick then
        begin
            Mouse(x, y, 0, 0, False);
            Result:= WaitOption(Option, 2000);
            If Result then FFlag(0);
        end else;
        begin
          Mouse(x, y, 0, 0,True);
          Wait(100+ Random(50));
          FFlag(0);
        end;
      end;
    end;

    procedure FailSafe(Reason: string);
    begin
      Players[CurrentPlayer].Loc:= Reason;
      Logout;
      Stats_Commit;
      //ProgressReport;
      TerminateScript;
    end;

    procedure AntiBan;
    begin
      case Random(225) of
        0: begin StatsGuise('AntiBan') SleepAndMoveMouse(randomrange(500, 4000)); end;
        1: begin StatsGuise('AntiBan') GameTab(tab_inv) ExamineInv; GameTab(28); end;
        2: begin StatsGuise('AntiBan') PickUpMouse; end;
        3: begin StatsGuise('AntiBan') MakeCompass('N'); end;
        4: begin StatsGuise('AntiBan') HoverSkill('Crafting', false); end;
        5: begin StatsGuise('AntiBan') RandomAngle(1); end;
      end;
    end;

    procedure WeaveLoom;
    var
      x, y, WithOutWoven: integer;
    begin
      if FindObjCustom(X, Y, ['weave', 'loom', 'eave', 'oom'], [12698576, 12040389, 12698320, 11514045, 10987957], 35) then
      begin
        GetMousePos(x, y);
        StatsGuise('Located Loom!');
        Mouse(x, y, 6, 6, true);
        StatsGuise('Spinning Cloth!');
        MarkTime(WithOutWoven);
      end;
      repeat
        AntiBan;
        Wait(100);
      until(TimeFromMark(WithOutWoven) > 10000);
    end;

    begin
      SRL_SixHourFix:= True;
      Smart_FixSpeed:= True;
      ClearDebug;
      IntroChat;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      case(activity)  of
      0: repeat
        WeaveLoom;
      until(false);
    end;
    end.
    Last edited by Hobbit; 12-01-2012 at 05:23 AM.

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
  •