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!!