Fizzi
2007-09-27 14:14:54
I notice there is a bolded word GoTo in SCAR and I have heard it mentioned briefly. I really have not seen it used much in scripts at all, so I was wondering. What does it do and how is it used?
2007-09-27 14:14:54
2007-09-27 14:41:02
Function Responder: Boolean;
Var
Responce: Array [0..9] of String;
NewLine: String;
Label
ResponceLabel;
Begin
If(Not Loggedin)Then Exit;
If(Not UseResponder)Then Exit;
If(TimeFromMark(ResponceTime)<1000)Then Exit;
MarkTime(ResponceTime);
If(Not LastChatter(LastChatterString))Then Exit;
If(InString(LastChatterString, Players[CurrentPlayer].Nick))Then Exit;
OldLine:= TheLine;
GetLastChatText(TheLine);
NewLine:= TheLine;
If(OldLine = TheLine)Then Exit;
If(InString(TheLine, 'hi')) Or (InString(TheLine, 'ello')) Or (InString(TheLine, 'yo'))Then
Begin
Responce[0]:= 'Hi';
Responce[1]:= 'Hello';
Responce[2]:= 'ello';
Responce[3]:= 'hi lol';
Responce[4]:= 'Hi there';
Responce[5]:= 'yo';
Responce[6]:= 'hi there!';
Responce[7]:= 'Yo wazzap';
Responce[8]:= 'lol hi';
Responce[9]:= 'Hi there';
Result:= True;
GoTo ResponceLabel;
End;
If(InString(TheLine, 'mining lvl')) Or (InString(TheLine, 'mining lev')) Or (InString(TheLine, 'mining lv'))Then
Begin
Responce[0]:= IntToStr(Players[CurrentPlayer].Level[15]);
Responce[1]:= IntToStr(Players[CurrentPlayer].Level[15]) +', You?';
Responce[2]:= IntToStr(Players[CurrentPlayer].Level[15])+ ' lol';
Responce[3]:= 'Currently ' +IntToStr(Players[CurrentPlayer].Level[15]);
Responce[4]:= 'right now ' +IntToStr(Players[CurrentPlayer].Level[15]);
Responce[5]:= 'soon ' +IntToStr(Players[CurrentPlayer].Level[15]+1);
Responce[6]:= 'very soon ' +IntToStr(Players[CurrentPlayer].Level[15]+1);
Responce[7]:= 'secret';
Responce[8]:= 'ask me later';
Responce[9]:= 'ill tell when i get level';
Result:= True;
GoTo ResponceLabel;
End;
ResponceLabel:
If(Result)Then
Begin
Writeln('Responded: '+Responce[CurrentResponce]+' To: '+ TheLine);
TypeSend(Responce[CurrentResponce]);
CurrentResponce:= CurrentResponce + 1;
RespondedTimes:= RespondedTimes + 1;
TRespond:= TRespond + 1;
If(CurrentResponce = 9)Then
CurrentResponce:= 0;
End;
End;
2007-09-27 14:57:53
repeat
if FindObject(...........) then
begin
if(GasCheck(x,y)) then
begin
FTWait(80);
Goto EOLoop;
end;
HitTheRock(x, y);
EOLoop:
end else FailedToFind := FailedToFind + 1;
until(InvFull);
2007-09-27 15:17:05
Label
ResponceLabel;
Begin
WriteLn('lol');
GoTo ResponceLabel;
WriteLn('this wont be executed');
ResponceLabel:
WriteLn('this will be executed');
End.
2007-09-27 15:21:14
2007-09-27 15:54:15
2007-09-27 16:04:45