Results 1 to 15 of 15

Thread: Help with my SecurityStronghold DoorSolver!!

  1. #1
    Join Date
    Dec 2007
    Location
    Colombia. Bogotá D.C
    Posts
    720
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Help with my SecurityStronghold DoorSolver!!

    Im making this Secutiry Stronghold Door Solver , but it laggs a lot , it freezes when its trying to find the question and the answer, Ive tried with Case, If but both lagg the same,
    Here Ill post all the codes Ive tried , but all of them give me the same lagg

    I didnt wanted to ask for help to release my script , but oh well I had no other option since Ive tried everything I can think of to do that, maybe if any of you can give me a hand?
    Would be Very Cool

    USING IF IN JUST ONE PROCEDURE:
    SCAR Code:
    program SimpleSSDoorSolver;
    {.include srl/srl.scar}

    Procedure FindQ;
     Var
       Answer : String;
    begin
     if(FindNPCChatText('answer me',Nothing)) then
      begin
       WriteLn('Found ToPass');
       If FindNPCChatText('agex block', Nothing) Then Answer := 'No';
       If FindNPCChatText('enter my', Nothing) Then Answer := 'Only on';
       If FindNPCChatText('my recovery', Nothing) Then Answer := 'Lost Password';
       If FindNPCChatText('good bank', Nothing) Then Answer := 'famous person';
       If FindNPCChatText('Who can I give', Nothing) Then Answer := 'Nobody';
       If FindNPCChatText('password or recoveries', Nothing) Then Answer := 'Abuse report';
       If FindNPCChatText('moderator asks', Nothing) Then Answer := 'button';
       If FindNPCChatText('should be', Nothing) Then Answer := 'emorable';
       If FindNPCChatText('often', Nothing) Then Answer := 'couple';
       If FindNPCChatText('cheats for', Nothing) Then Answer := 'owhere';
       If FindNPCChatText('dIfficult quest', Nothing) Then Answer := 'give him';
       If FindNPCChatText('the room', Nothing) Then Answer := 'No';
       If FindNPCChatText('type in', Nothing) Then Answer := 'stolen';
       If FindNPCChatText('website says', Nothing) Then Answer := 'inform Jagex';
       If FindNPCChatText('keylogger', Nothing) Then Answer := 'Virus scan';
       If FindNPCChatText('friend uses', Nothing) Then Answer := 'might steal';
       If FindNPCChatText('I set', Nothing) Then Answer := 'any banker';
       If FindNPCChatText('used for', Nothing) Then Answer := 'stolen';
       If FindNPCChatText('ottery', Nothing) Then Answer := 'button';
       If FindNPCChatText('contact me', Nothing) Then Answer := 'Game Inbox';
       If FindNPCChatText('member for', Nothing) Then Answer := 'button';
       If FindNPCChatText('share my', Nothing) Then Answer := 'obody';

       If Not (Answer = '') then WriteLn('Found question');
       Wait(100 + Random(200));
       ClickToContinue;
       Wait(800 + Random(200));
       end;
       if(FindNPCChatText(Answer,ClickLeft)) then
       WriteLn('Found it all!');
       Wait(800 + Random(200));
       ClickToContinue;
    end;

    begin
      SetupSrl;
      //if(FindNPCChatText('Answer',Move)) then
       WriteLn('Found it all!');
       FindQ;
    end.

    USING CASE:
    SCAR Code:
    program New;
    {.include srl/srl.scar}

    function GetSolution(number: integer; which: Boolean): String;
    begin
     Case number of
      0 :begin
          if (which)then
            result := 'agex block';
          if not(which)then
            result := 'No'; //Tested
          end;
      1 :begin
          if (which)then
            result := 'enter my';
          if not(which)then
            result := 'Only on'; //Tested
          end;
      2 :begin
          if (which)then
            result := 'my recovery';
          if not(which)then
            result := 'Lost Password';//Tested
          end;
      3 :begin
          if (which)then
            result := 'good bank';
          if not(which)then
            result := 'famous person';//Tested
          end;
      4 :begin
          if (which)then
            result := 'Who can I give';
          if not(which)then
            result := 'Nobody'; //Tested
          end;
      5 :begin
          if (which)then
            result := 'password or recoveries';
          if not(which)then
            result := 'Abuse report';//Tested
          end;
      6 :begin
          if (which)then
            result := 'moderator asks';
          if not(which)then
            result := 'button.';//Tested
          end;
      7 :begin
          if (which)then
            result := 'should be';
          if not(which)then
            result := 'emorable';//Tested
          end;
      8 :begin
          if (which)then
            result := 'often';
          if not(which)then
            result := 'couple';//Tested
          end;
      9 :begin
          if (which)then
            result := 'cheats for';
          if not(which)then
            result := 'owhere';//Tested
          end;
      10 :begin
          if (which)then
            result := 'difficult quest';
          if not(which)then
            result := 'give him';//Tested
          end;
      11 :begin
          if (which)then
            result := 'the room';
          if not(which)then
            result := 'No'; //Tested
          end;
      12:begin
          if (which)then
            result := 'type in';
          if not(which)then
            result := 'stolen';//Tested
          end;
      13:begin
          if (which)then
            result := 'website says';
          if not(which)then
            result := 'inform Jagex';//Tested
          end;
      14:begin
          if (which)then
            result := 'keylogger';
          if not(which)then
            result := 'Virus scan';//Tested
          end;
      15:begin
          if (which)then
            result := 'friend uses';
          if not(which)then
            result := 'might steal';//Tested
          end;
      16:begin
          if (which)then
            result := 'I set';
          if not(which)then
            result := 'any banker';//Tested
          end;
      17:begin
          if (which)then
            result := 'used for';
          if not(which)then
            result := 'stolen';//Tested
          end;
      18:begin
          if (which)then
            result := 'ottery';
          if not(which)then
            result := 'button';//Tested
          end;
      19:begin
          if (which)then
            result := 'contact me';
          if not(which)then
            result := 'Game Inbox';//Tested
          end;
      20:begin
          if (which)then
            result := 'member for';
          if not(which)then
            result := 'button';//Tested
          end;
      21:begin
          if (which)then
            result := 'share my';
          if not(which)then
            result := 'obody';//Tested
          end;
         end;
    end;

    Function ScanQuestion : Integer;
    Var
     i , found: Integer;
    begin
       for i := 0 to 21 do
       begin
        if(FindNPCChatText(GetSolution(i,True), nothing))then
         begin
            break;
            Result := i;
            found := found + 1;
            WriteLn('Found: '+IntToStr(found));
            WriteLn('Question is # ' + IntToStr(i));
            WriteLn(GetSolution(i,True));
         end;
         if not(FindNPCChatText(GetSolution(i,True), nothing))then
         begin
          WriteLn('It Isnt Solution: '+ IntToStr(i));
         end;
       end;
    end;

    function PassDoor : Boolean;
    Var
     Question : Integer;
     Door : String;
    begin
        Result := false;
        Door := 'Rickety Door';
        if(FindNPCChatText(Door,Nothing)) then
         begin
          WriteLn('Found Rickety Door');
          if(FindNPCChatText(' underestimate',Nothing)) then
           begin
             WriteLn('Found Underestimate');
             ClickToContinue;
             Wait(800+Random(200));
           end;
          if(FindNPCChatText('To pass answer',Nothing)) then
            WriteLn('Found Pass Answer');
            Question := ScanQuestion;
            WriteLn('Scanned Question');
            Wait(800+Random(200));
            ClickToContinue;
            Wait(800+Random(200));
         end;
        if(FindNPCChatText('Select an Option', Nothing))then
         begin
          WriteLn('Found Select an Option');
           if( FindNPCChatText(GetSolution(Question,False), ClickLeft))then
              WriteLn('The Answer is: ' + GetSolution(Question,False));
           end;
        Wait(800+Random(200));
        if(FindNPCChatText('Correct', Nothing))then
         begin
          Wait(800+Random(200));
          WriteLn('Found Correct');
          Wait(500+Random(200));
          ClickToContinue;
          Result := True;
          WriteLn('Got through door!!');
          Wait(500+Random(100));
         end;
    end;

    begin
      SetupSrl;
      PassDoor;
    end.

    USING IF SPREAD PROCEDURES:
    SCAR Code:
    program New;
    {.include srl/srl.scar}

    Procedure GetSolution;
     Var
       Answer : String;
    Begin
       If FindNPCChatText('agex block', Nothing) Then Answer := 'No';
       If FindNPCChatText('enter my', Nothing) Then Answer := 'Only on';
       If FindNPCChatText('my recovery', Nothing) Then Answer := 'Lost Password';
       If FindNPCChatText('good bank', Nothing) Then Answer := 'famous person';
       If FindNPCChatText('Who can I give', Nothing) Then Answer := 'Nobody';
       If FindNPCChatText('password or recoveries', Nothing) Then Answer := 'Abuse report';
       If FindNPCChatText('moderator asks', Nothing) Then Answer := 'button';
       If FindNPCChatText('should be', Nothing) Then Answer := 'emorable';
       If FindNPCChatText('often', Nothing) Then Answer := 'couple';
       If FindNPCChatText('cheats for', Nothing) Then Answer := 'owhere';
       If FindNPCChatText('dIfficult quest', Nothing) Then Answer := 'give him';
       If FindNPCChatText('the room', Nothing) Then Answer := 'No';
       If FindNPCChatText('type in', Nothing) Then Answer := 'stolen';
       If FindNPCChatText('website says', Nothing) Then Answer := 'inform Jagex';
       If FindNPCChatText('keylogger', Nothing) Then Answer := 'Virus scan';
       If FindNPCChatText('friend uses', Nothing) Then Answer := 'might steal';
       If FindNPCChatText('I set', Nothing) Then Answer := 'any banker';
       If FindNPCChatText('used for', Nothing) Then Answer := 'stolen';
       If FindNPCChatText('ottery', Nothing) Then Answer := 'button';
       If FindNPCChatText('contact me', Nothing) Then Answer := 'Game Inbox';
       If FindNPCChatText('member for', Nothing) Then Answer := 'button';
       If FindNPCChatText('share my', Nothing) Then Answer := 'obody';

       Wait(800+Random(200));
       ClickToContinue;
       If(FindNPCChatText('Select an Option', Nothing))Then
        Begin
          WriteLn('Found Select an Option');
          Wait(800+Random(200));
          WriteLn('The Answer Is: ' + Answer);
          FindNPCChatText(Answer,ClickLeft);
         End;
    End;

    function PassDoor : Boolean;
    Var
     Door : String;
    Begin
        Door := 'Rickety Door';
        If(FindNPCChatText(Door,Nothing)) Then
         Begin
          WriteLn('Found Rickety Door');
          If(FindNPCChatText(' underestimate',Nothing)) Then
           Begin
             WriteLn('Found Underestimate');
             ClickToContinue;
             Wait(800+Random(200));
           End;
          If(FindNPCChatText('To pass',Nothing)) Then
            Begin
             WriteLn('Found To Pass Answer');
             GetSolution;
            End;
         End;
        If(FindNPCChatText('Correct', Nothing))Then
         Begin
          Wait(800+Random(200));
          WriteLn('Found Correct');
          Wait(500+Random(200));
          ClickToContinue;
          Result := True;
          Wait(500+Random(100));
         End;
    End;

    Begin
      SetupSrl;
      If (PassDoor) Then WriteLn('Succesfully passed!');
    End.

    HELP MEEE!!
    -------------------------------------------------------------------


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

    Default

    Use Pos() on the NPC Chat text Read a tut on Pos() it is quite easy once you get the hang of it. It lags because of the NPCChatText being loaded and freeded so many times.

    And also for a bit faster replace ClickToContinue; with ClickContinue(True,True);


    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!

  3. #3
    Join Date
    Dec 2007
    Location
    Colombia. Bogotá D.C
    Posts
    720
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok dude thanks a lot for the advices , I was searching and couldnt find anything that explains how to use pos or its description, I just found its complete name function pos(substr, s: string): Longint;

    EDIT: WOOT! 500 POSTS!
    -------------------------------------------------------------------


  4. #4
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Pos returns the position of a substring in the string you're searching in. ie. if I was searching for 'el' in 'hello', it would return 2. Pos also returns 0 if the substring is not in the string so if you can somehow get the line in the chatbox into a string, you can use Pos to check for the existance of each question. Once you have the question you can find the answer.

  5. #5
    Join Date
    Dec 2007
    Location
    Colombia. Bogotá D.C
    Posts
    720
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)
    Quote Originally Posted by ZephyrsFury View Post
    Pos returns the position of a substring in the string you're searching in. ie. if I was searching for 'el' in 'hello', it would return 2. Pos also returns 0 if the substring is not in the string so if you can somehow get the line in the chatbox into a string, you can use Pos to check for the existance of each question. Once you have the question you can find the answer.
    OMG, its a honour to have a post of you, thanks a lot for the help man, Ill get working on it right now, I really needed that explanation
    -------------------------------------------------------------------


  6. #6
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think you're well liked Zephyer's.

  7. #7
    Join Date
    Dec 2007
    Location
    Colombia. Bogotá D.C
    Posts
    720
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)
    Quote Originally Posted by itschris917 View Post
    I think you're well liked Zephyr's.
    Hehe , I hope so
    -------------------------------------------------------------------


  8. #8
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    It hapens to me aswell . The ChatText lags i think

  9. #9
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Add something like
    If Not Answer = '' Then exit else
    If FindNPCChatText('agex block', Nothing) Then Answer := 'No';
    If Not Answer = '' Then exit else
    If FindNPCChatText('agex block', Nothing) Then Answer := 'No';

    Use something like that else it will keep searching and that will cause freezing also, not add answer := ''; at the begin so it allways will start with ''
    ~Hermen

  10. #10
    Join Date
    Dec 2007
    Location
    Colombia. Bogotá D.C
    Posts
    720
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for all the help guys , I didnt think I would have as many responses It happened to my other threads , hehe like 4 replies and died
    Thank!!
    -------------------------------------------------------------------


  11. #11
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol, i swear this guy is obsessed with my flesh crawler script, he is trying to repair it ill do it for him cause he loves it so much.
    ~ Metagen

  12. #12
    Join Date
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you can just press on the door until it doesnt ask anymore questions =)

  13. #13
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    This is the gate solver that I used when I made my KYAB minotaur killer script...

    should still work:

    SCAR Code:
    Function AnswerGateQuestion: Boolean;
    var
      i,x,z: Integer;
      Answer: TStringArray;
    begin
      x := GetSystemTime;
      if(not(LoggedIn))then
      Exit;
      begin
        Answer := ['body','No','irus scan','nker','ecove','onths','amous','buse r','nly on the',
        'port A','owhere','nbox','my pass','emora'];
        if FindNPCChatText('timate') then
        while ClickToContinue do
          Wait(1);
        ClickToContinue;
        for i := 0 to 13 do
        if ClickNPCChatText(Answer[i],True) then
        begin
          repeat
            Wait(10);
          until(ClickToContinue);
          z := GetSystemTime;
          Result := True;
          Writeln('question took ' + IntToStr((z - x)/1000)
          + ' seconds');
          Exit;
        end;
      end;
    end;
    METAL HEAD FOR LIFE!!!

  14. #14
    Join Date
    Dec 2007
    Location
    Colombia. Bogotá D.C
    Posts
    720
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol , thanks! , And , well Metagen is gonna help me with it , thanks to veryone for the help, thanks gerauchet for the solver , Mine freezed so much , hehe well , thats all for now.
    -------------------------------------------------------------------


  15. #15
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Dracody read your private messages, and add me on msn or xfire or something (xfire is 50karat)
    ~ Metagen

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
  •