Results 1 to 6 of 6

Thread: Stronghold security door solver bugged!?

  1. #1
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Stronghold security door solver bugged!?

    SCAR Code:
    program New;
    {.Include SRL\SRL\Misc\Smart.Scar}
    {.Include SRL\SRL.Scar}
    {.Include SRL\SRL\Reflection\Reflection.Scar}

    var
      t:integer;
    Procedure DeclarePlayers;
    Begin

      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;

    end;

    function LoadPath: TPointArray;
    begin
      SetLength(Result, 15);
      Result[0] := Point(3184, 3435);
      Result[1] := Point(3177, 3429);
      Result[2] := Point(3168, 3427);
      Result[3] := Point(3163, 3421);
      Result[4] := Point(3157, 3418);
      Result[5] := Point(3149, 3416);
      Result[6] := Point(3141, 3416);
      Result[7] := Point(3131, 3415);
      Result[8] := Point(3123, 3415);
      Result[9] := Point(3118, 3419);
      Result[10] := Point(3111, 3420);
      Result[11] := Point(3101, 3420);
      Result[12] := Point(3095, 3419);
      Result[13] := Point(3087, 3420);
      Result[14] := Point(3081, 3421);
    end;

    Procedure WalkThePath(Tobank:boolean);
    Var
      I: Integer;
      Path: TPointArray;
    Begin
      Path := LoadPath;
      if Tobank then
      begin
        for i := ((High(Path))-1) Downto 0 do
          WalkToTile(Path[i], 3, 0);
        Wait(500+Random(300));
      end else
      begin
        for i := 1 to (High(Path)) do
          WalkToTile(Path[i], 3, 0);
        Wait(500+Random(300));
      end;
    end;

    function FindObjectPvH(ID,decreasey:integer): boolean;
    var
      xx : TPoint;
    begin
      if FindObject(xX,ID) then
      begin
        Result:= True;
        XX:= TileToMS(XX, 0);
        Mouse(xX.x,(xX.y-decreasey),4,4,true);
        FindNormalRandoms;
        fflag(0);
      end else writeln('Failed to find the object...');
    end;

    procedure SetupSmart;
    begin
      SmartSetup('world55', True, True, false);
      Wait(1000);
      SetTargetDC(SmartGetDC);
    end;

    function InDungeon:boolean;
    begin
      Result := CountColor(65536,mmx1,mmy1,mmx2,mmy2) > 3000;
    end;

    function Enterdungeon:boolean;
    begin
      if not FindObjectPvH(16154,0) then exit; //Enters the dungeon...
      repeat
        wait(700+random(1000));
        Marktime(t);
        if InDungeon then Result:=true;
      until (result) or (timefrommark(t) > (3000+random(2000)))
      if not result then
      begin
        writeln('Failed to enter the dungeon...');
        logout;
        exit;
      end;
    end;

    function LoadPath2: TPointArray;
    begin
      SetLength(Result, 1);
      Result[0]:= Point(1863, 5239);
    end;

    function TeleportToRoom1:boolean;
    var
      Path: TPointArray;
      I : integer;
    begin
      Path := LoadPath2;
      for i := 0 to (High(Path)) do
        WalkToTile(Path[i], 3, 0);
      Wait(200+Random(300));
      if not FindObjectPvH(16150,0) then  //Enters the dungeon...
      begin
        writeln('Failed to teleport to room 1');
        logout;
        exit;
      end;
      wait(500+random(1000));
      Result:=true;
    end;

    function LoadMinotaurPath:TPointArray;
    begin
      SetLength(Result, 2);
      Result[0]:= Point(1912, 5212);
      Result[1]:= Point(1907, 5203);
    end;

    Function SolveDoor: Boolean;
    var
      I, Doortime: Integer;
      QuestionAnswer: TStringArray;
    begin
      if not loggedin then exit;
      wait(2000+random(2000));
      if not FindObjectPvH(16123,7) then  //Clicks the door...
      begin
        writeln('Failed to get trough the door...');
        logout;
        exit;
      end;
      wait(2000+random(1000));
      Marktime(Doortime);
      QuestionAnswer := ['No','nly on the','ost Password','amous','obody','Report','utton','emorable','ouple',
                         'owhere','tolen','nform','Virus scan','teal', 'anker' , 'nbox', 'y password'];
      repeat
        while ClickContinue(True,True) do
          Wait(100+random(300));
        if not ClickContinue(True,True) then
        begin
          Result:=True;
          exit;
        end;
        wait(1000+random(1200));
        for i := 0 to (high(QuestionAnswer)) do
        begin
          if FindNPCChatText(QuestionAnswer[i],ClickLeft) then
          begin
            repeat
              Wait(100+random(300));
            until(ClickContinue(True,True));
            ClickContinue(True,True);
            Writeln('Getting trough the door took ' + IntToStr((Timefrommark(Doortime))/1000) + ' seconds!');
            wait(500+random(1000));
            Result := True;
          end else
          begin
            writeln('trying to solve the door again...');
            SolveDoor;
          end;
        end;
      until not(ClickContinue(True,True)) or not(FindNPCChatText(QuestionAnswer[i],ClickLeft))
    end;

    function WalktoMinotaurs:boolean;
    var
      Path: TPointArray;
      I , T: integer;
    begin
      Path := LoadMinotaurPath;
      for i := 0 to ((High(Path))-1) do
        WalkToTile(Path[i], 2, 0);
        repeat
          if not Solvedoor then
          begin
            writeln('Failed to get trough the door...');
            logout;
            exit;
          end;
          inc(T);
        until (T >= 2)
      Wait(500+Random(1000));
      for i := 1 to (High(Path)) do
        WalkToTile(Path[i], 2, 0);
      makecompass('e');
      repeat
        if not Solvedoor then
        begin
          writeln('Failed to get trough the door...');
          logout;
          exit;
        end;
        inc(T);
      until (T >= 2)
      Result:=true;
    end;

    begin
      SetupSRL;
      Declareplayers;
      SetupSmart;
      loginplayer;
      Makecompass('n');
      setangle(true);
      {if not FindObjectPvH(16154,0) then terminatescript; //Enters the dungeon...
      if random(4) <= 1 then ClickContinue(True,True);
      if not TeleportToRoom1 then terminatescript;     }

      if not WalktoMinotaurs then terminatescript;
    end.

    Thats my source...
    I made the door solver a while ago..and it worked flawless.. maybe I am calling it wrong?
    Maybe I do anything else wrong?
    It clicks the door.. clicks to continue...
    Than it clicks the door again.. sometimes starts walking..
    I have NO idea whats wrong

    Please help me out, so I can finish my Security Stronghold fighter
    I'll rep++ you

    Thanks a lot, PvH

  2. #2
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    I see a lot of writeln's. When you run it, is it writing anything in there about where it failed?

    The best bet would be to debug all important steps, and then see what it writes, then fix that, and then fix the next thing that it writes, and so on, until everything works.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  3. #3
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    I see a lot of writeln's. When you run it, is it writing anything in there about where it failed?

    The best bet would be to debug all important steps, and then see what it writes, then fix that, and then fix the next thing that it writes, and so on, until everything works.
    It doesn't write down anything... :/

    PvH

  4. #4
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    I would add tons more writeln's then. Just figure out what is messing up.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  5. #5
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    while ClickContinue(True,True) do
    Wait(100+random(300));
    if not ClickContinue(True,True) then
    begin
    Result:=True;
    exit;
    end;
    The while makes it click forever until the Click to Continue disaprears.. so you gotta do

    ClickContinue(True,True);
    wait(200+Random(300));
    if not ClickContinue(True,True) then
    begin
    Result:=True;
    exit;
    end;
    Now it should work.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  6. #6
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Hy71194 View Post
    The while makes it click forever until the Click to Continue disaprears.. so you gotta do


    Now it should work.
    I'll try that...
    *tries*
    If that was my mistake...
    Dang.. I'm so dumb XD

    *edits later*

    EDIT:
    Here's the promised award...
    REP++ FOR YOU MY HERO:d:d:d:d:d:d

    Thanks a lot

    PvH

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. S.O.S. Fighter (Stronghold of Security)
    By Cazax in forum RS3 Outdated / Broken Scripts
    Replies: 40
    Last Post: 04-03-2009, 03:43 PM
  2. Stronghold security fighter needs suggestions!
    By PvH in forum RS3 Outdated / Broken Scripts
    Replies: 22
    Last Post: 12-13-2008, 02:16 AM
  3. SolveSecurityGate [Security Stronghold]
    By benjaa in forum Research & Development Lounge
    Replies: 9
    Last Post: 12-11-2008, 11:08 PM
  4. Stronghold Of Security Glitch :).
    By Ultra in forum RuneScape News and General
    Replies: 14
    Last Post: 04-08-2008, 09:54 PM
  5. Stronghold of security?
    By GoF in forum Bot Information and Spottings
    Replies: 6
    Last Post: 10-10-2007, 05:44 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
  •