Results 1 to 5 of 5

Thread: FightCavesRunner-CnrSport

  1. #1
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default FightCavesRunner-CnrSport

    Please post proggies..
    scar divi 306 srl 3.7 plus
    SCAR Code:
    {Have AutoReliate on...
    It can sleep for you set att mode style and
    run over night}


    program CaveFighter;
    {.include srl/srl.scar}
    {.include srl/srl/skill/fighting.scar}

    const
    CaveColor = 11579578;// No Need for touch.
    TakeSleeps= True; // For an over night thing//
    FightStyle = 'Def';//Type in Either atk/def/str.
    waittime = 400;//Leave it.
    Speed = 17 ; // Mouse speed.

    Var
     Start : Integer;
    procedure DeclarePlayers;
    begin
      HowManyPlayers:=2; // How many players, both active or not active
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].String1 :='attack';//Set fight mode here
      Players[0].Active :=True;

      Players[1].Name :='';
      Players[1].Pass :='';
      Players[1].Nick :='';
      Players[1].String1 :='attack';//Set fight mode here
      Players[1].Active :=False;

    end;

     function FindRandoms: Boolean;
    var
      i: Integer;
    begin
      for i := 1 to 14 do
      begin
        case I of
          1: CloseWindow;
          2: if FindTalk then
              Result := True;
          3: if FindMod then
              Result := True;
          4: if FindMime then
              Result := True;
          5: if FindMaze then
              Result := True;
          6: if FindQuiz then
              Result := True;
          7: if FindDemon then
              Result := True;
          8: if FindScapeRune then
              Result := True;
          9: if FindTalk then
              Result := True;
          10: if FindLamp(LampSkill) then
              Result := True;
          11: if (FindNewBox) then
            begin
              Result := True;
              if (UseBoxSolver) then
                SolveBox
              else
                GambleNewBox;
            end;

          12:
            begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;
              end;
            end;
          13: SaveToChatLog;
          14: if RC then
              Result := True;
        end;
      end;
      Wait(100);
    end;


    Procedure style;
    Begin
    Case lowercase(Players[CurrentPlayer].String1) Of
    'attack' : SetFightMode(1);
    'strength' : SetFightMode(2);
    'shared' : SetFightMode(3);
    'defense' : SetFightMode(4);
    End;
     WriteLn('Set fight mode');
    End;

    procedure entercave;
     begin
    If(FindColorSpiralTolerance(x,y,CaveColor,msx1,msy1,msx2,msy2,20))Then
      begin
      FindRandoms;
      MMouse(x,y,3,3);
      If(IsUpText('Enter'))Then
      Mouse(x,y,2,2,True);
      Wait(Waittime + Random(200))
    end;
    end;

    function DeadYet : boolean;
    begin
      wait(1500+random(1500));
      MakeCompass('S')
      LowestAngle;
      if(FindObjMultiText(x,y, 'entrance', 'Cave', 've', CaveColor, 15)) or (findsymbol(x,y,'minigame')) then
      Result:= True;
    end;

    procedure Fight;
    var
    CavesDone:integer;
    begin
    if not(infight) then
    begin
    MMouse(x,y,3,3);
    If(IsUpText('Enter'))Then
     Mouse(x,y,2,2,True);
    repeat
    wait (50000)
    until(Deadyet);
    end;
    CavesDone := (CavesDone + 1);
    end;



    Procedure ScriptReport;
    var
    cavesdone,sleepsdone:integer;
    Begin
    Writeln('|----Cnr Sports Auto Fight Caves Runner---------');
    Writeln('|----Caves done: ' + IntToStr(CavesDone));
    Writeln('|----Times slept: ' + IntToStr(SleepsDone));
    Writeln('|-----------------------------------------------');
    End;

    Procedure LogOutSleep(GoToBed : Integer);
    var
    TimesSlept,SleepsDone:integer;
    Begin
    LogOut;
    Wait(GoToBed+Random(50000));
    TimesSlept := (SleepsDone + 1);
    LoginPlayer;
    End;

          begin
          SetUpSrl;
          DeclarePlayers;
          NewLine := '';
           Repeat
          if (not (LoggedIn)) then Loginplayer;
          Style;
           MarkTime(Start);
           repeat
           Fight;
          Until(TimeFromMark(Start) >= 720000)
      If(TimeFromMark(Start) >= 720000)Then
    WriteLn('Going to sleep');
    LogOutSleep(360000);
    until (false)
    end.

  2. #2
    Join Date
    Mar 2007
    Posts
    562
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hmmm seems alright. i would put it into a file.


    haxor

  3. #3
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Haxor View Post
    hmmm seems alright. i would put it into a file.


    haxor
    thanks

  4. #4
    Join Date
    Mar 2007
    Posts
    562
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    also i would add findnormalrandoms; because if you dont you will get box and stuff and it wont be able to solve.

    haxor

  5. #5
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Haxor View Post
    also i would add findnormalrandoms; because if you dont you will get box and stuff and it wont be able to solve.

    haxor
    i only did it if it gets a random wile going into the cave.. it prob wont get one ..

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
  •