Well, my script is not related to RuneScape, but hopefully, it'll still serve its intentions. I'm working on a script that puts out numbers for one to remember. Then it takes the numbers out of view and asks you to enter them. After that, Scar reads the input and hopefully will be able to determine whether the input was right or wrong. This is my script so far. (I received major help from JAD.)
I'm having trouble with the 'if', 'then', 'else' part. Even if I enter the correct number, 82905, the message that Scar chooses to type is 'You Have Entered An Incorrect Answer!' It seems like it only chooses the 'else' part and ignores the 'then' part. I was thinking maybe it's because I've used 's' as a string and a variable, but I don't know how to have it read an input unless it is a string.Code:program Memorization; const Message1=('Please remember these numbers:'); Procedure Whatever; var a,b,c,d,e,f,g,h: Integer; s:String; begin a:= 0; b:= 8; c:= 2; d:= 9; e:= 0; f:= 5; Cleardebug; Writeln(Message1 +IntToStr(b) +IntToStr(c) +IntToStr(d) +IntToStr(e) +IntToStr(f) ); Wait(3000); repeat a:= a + 1; Writeln('|'); until(a >=10); Wait(3000); s:=readln('Enter Previous Number Here:'); Writeln('The Correct Answer Was:' +IntToStr(b) +IntToStr(c) +IntToStr(d) +IntToStr(e) +IntToStr(f) ); end; procedure WhatEverA; var s:Integer; begin if s=82905 then Writeln('You Have Entered The Correct Answer!') else Writeln('You Have Entered An Incorrect Answer!'); Wait(7000); end; procedure WhatEverB; var a,b,c,d,e,f,g,h: Integer; begin a:= 0; b:= 2; c:= 7; d:= 4; e:= 0; f:= 1; g:= 8; h:= 3; Cleardebug; Writeln(Message1 +IntToStr(b) +IntToStr(c) +IntToStr(d) +IntToStr(e) +IntToStr(f) +IntToStr(g) +IntToStr(h) ); Wait(3000); repeat a:= a + 1; Writeln('|'); until(a >=10); end; begin Whatever; WhateverA; WhateverB; end.
I hope some one will be able to help me. Thanks to all the people that have answered my questions earlier, and thanks to the people that will answer questions in the future.


If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your signature!
Reply With Quote
:






