MasterKill
2009-11-20 13:06:16
Hmm, I found this script between some old files (the never judged auto responder script).
I tested it and it seems like it still works.
Just paste it all over your CAutoRespond.scar (includes/srl/srl/core), and the setup will automatically run with srl and the responding with the "FindNormalRandoms".
If you have any feedback on it, please post it here ;)
If I get a lot of positive feedback I'll make an official release.
Version 2:
I tested it and it seems like it still works.
Just paste it all over your CAutoRespond.scar (includes/srl/srl/core), and the setup will automatically run with srl and the responding with the "FindNormalRandoms".
If you have any feedback on it, please post it here ;)
If I get a lot of positive feedback I'll make an official release.
Version 2:
Type
TRespond = Record
Q, A: Array Of String;
End;
Function InputQA(AorQ: String): String; Forward;
Var
Responder: Array of TRespond;
MK_frmDesign, InvoerForm: TForm;
ResponderActive, QAdded, AAdded: Boolean;
List: Array [0..2] Of TListBox;
But: Array [0..10] Of TButton;
Txt: Array [0..4] Of TLabel;
Shape: Array [0..2] Of TShape;
QAlabel: TLabel;
InsertL: TRichEdit;
InsertTimer: TTimer;
InsertBox: TComboBox;
FormSave: TSaveDialog;
FormOpen: TOpenDialog;
OK: TButton;
HowManyResponds, LastTIMEresponded, RespondsMade, CurrentForm: Integer;
LastRespond, QorA, QAOutput: String;
UseAutoResponder: boolean;
Procedure MK_TimerLoop(Sender: TObject);
Var
MK, A: Integer;
Bold: Array Of String;
Begin
Case QorA Of
'Q': Bold := ['$nick'];
'A': Bold := ['$attack', '$strength', '$defence', '$range', '$prayer',
'$magic', '$runecrafting', '$hitpoints', '$agility', '$herblore',
'$thieving', '$crafting', '$fletching', '$slayer', '$mining',
'$smithing', '$fishing', '$cooking', '$firemaking', '$woodcutting',
'$farming', '$chatter'];
End;
If (Pos(#13, InsertL.Text) <> 0) Then
Begin
InsertL.Text := Replace(InsertL.Text, #13, '');
InsertL.Text := Replace(InsertL.Text, #10, '');
QAOutput := InsertL.Text;
invoerform.ModalResult:= mrOk;
End;
InsertL.SelStart := 0;
InsertL.SelLength := Length(InsertL.Text);
InsertL.SelAttributes.Style := [];
InsertL.SelAttributes.Color := clBlack;
InsertL.SelStart := Length(InsertL.Text);
For MK := 0 To GetArrayLength(Bold) - 1 Do
Begin
A := Pos(Bold[MK], InsertL.Text);
If (A > 0) Then
Begin
InsertL.SelStart := A - 1;
InsertL.SelLength := Length(Bold[MK]);
InsertL.SelAttributes.Style := [fsBold];
InsertL.SelAttributes.Color := clRed;
InsertL.SelStart := Length(InsertL.Text);
End;
End;
End;
Procedure MK_LoadSet(ArrayNumber: Integer; new: Boolean);
Var
MK, Hold, Holder: Integer;
Begin
For MK := 1 To 2 Do
List[MK].Clear;
If New Then
Begin
QAdded := False;
AAdded := False;
SetArrayLength(Responder[ArrayNumber].Q, 0);
SetArrayLength(Responder[ArrayNumber].A, 0);
End;
If (GetArrayLength(Responder[ArrayNumber].Q) = 0) Then
But[5].Enabled := False
Else
Begin
For MK := 0 To GetArrayLength(Responder[ArrayNumber].Q) - 1 Do
List[1].Items.Add(Responder[ArrayNumber].Q[MK]);
But[5].Enabled := True;
End;
If (GetArrayLength(Responder[ArrayNumber].A) = 0) Then
But[7].Enabled := False
Else
Begin
For MK := 0 To GetArrayLength(Responder[ArrayNumber].A) - 1 Do
List[2].Items.Add(Responder[ArrayNumber].A[MK]);
But[7].Enabled := True;
End;
List[0].Clear;
For MK := 0 To High(Responder) Do
Begin
If (GetArrayLength(Responder[MK].Q) = 0)
Or (GetArrayLength(Responder[MK].A) = 0) Then
List[0].Items.Add('[Error] not done')
Else
List[0].Items.Add(Responder[MK].Q[0]);
End;
List[0].ItemIndex := ArrayNumber;
If (GetArrayLength(Responder) = 1) Then
But[1].Enabled := False
Else
But[1].Enabled := True;
If Not (GetArrayLength(Responder) = 0) Then
Begin
But[4].Enabled := True;
But[6].Enabled := True;
But[2].Enabled := True;
But[10].Enabled := True;
For MK := 0 To HowManyResponds - 1 Do
If (GetArrayLength(Responder[MK].Q) > 0)
And (GetArrayLength(Responder[MK].A) > 0) Then
Hold := Hold + 1;
But[8].Caption := 'START with ' + IntToStr(Hold) + ' respond(s)';
If (Hold > 0) Then
But[8].Enabled := True
Else
But[8].Enabled := False;
End Else
But[10].Enabled := False;
End;
Procedure MK_ButtonClick(Sender: TObject);
Var
MK, MK2, Holder, Holder2: Integer;
SubString: String;
SaveF, LoadF: TStringList;
TempResp: Array of TRespond;
Begin
Case Sender Of
OK: Begin
QAOutput := InsertL.Text;
invoerform.ModalResult:= mrOk;
End;
InsertBox: Begin
Case QorA Of
'Q': Begin
Case InsertBox.ItemIndex Of
0: InsertL.Text := InsertL.Text + '$nick';
End;
End;
'A': Begin
Case InsertBox.ItemIndex Of
0: InsertL.Text := InsertL.Text + '$attack';
1: InsertL.Text := InsertL.Text + '$strength';
2: InsertL.Text := InsertL.Text + '$defence';
3: InsertL.Text := InsertL.Text + '$range';
4: InsertL.Text := InsertL.Text + '$prayer';
5: InsertL.Text := InsertL.Text + '$magic';
6: InsertL.Text := InsertL.Text + '$runecrafting';
7: InsertL.Text := InsertL.Text + '$hitpoints';
8: InsertL.Text := InsertL.Text + '$agility';
9: InsertL.Text := InsertL.Text + '$herblore';
10: InsertL.Text := InsertL.Text + '$thieving';
11: InsertL.Text := InsertL.Text + '$crafting';
12: InsertL.Text := InsertL.Text + '$fletching';
13: InsertL.Text := InsertL.Text + '$slayer';
14: InsertL.Text := InsertL.Text + '$mining';
15: InsertL.Text := InsertL.Text + '$smithing';
16: InsertL.Text := InsertL.Text + '$fishing';
17: InsertL.Text := InsertL.Text + '$cooking';
18: InsertL.Text := InsertL.Text + '$firemaking';
19: InsertL.Text := InsertL.Text + '$woodcutting';
20: InsertL.Text := InsertL.Text + '$farming';
21: InsertL.Text := InsertL.Text + '$chatter';
End;
End;
End;
InsertBox.Text := 'Add replacement';
End;
But[0]: Begin
HowManyResponds := HowManyResponds + 1;
SetArrayLength(Responder, HowManyResponds);
MK_LoadSet(HowManyResponds - 1, True);
List[0].ItemIndex := HowManyResponds - 1;
End;
But[1]: Begin
If (List[0].ItemIndex = -1) Then
Begin
ShowMessage('Please select the respond you want to delete.');
End Else
Begin
Holder := List[0].ItemIndex;
If (Holder + 1 = HowManyResponds) Then
Holder := Holder - 1
Else
If (Holder + 2 = HowManyResponds) Then
Responder[Holder] := Responder[Holder + 1]
Else
For MK := Holder To HowManyResponds - 2 Do
Responder[MK] := Responder[MK + 1];
HowManyResponds := HowManyResponds - 1;
SetArrayLength(Responder, HowManyResponds);
MK_LoadSet(Holder, False);
End;
End;
But[2]: Begin
FormSave.Filter := '.respond';
FormSave.ExeCute;
SaveF := TStringList.Create;
SaveF.Add('**SRL_AUTORESPOND_FILE**DO_NOT_EDIT**');
SaveF.Add(IntToStr(HowManyResponds));
For MK := 0 To HowManyResponds - 1 Do
Begin
SaveF.Add(IntToStr(GetArrayLength(Responder[MK].Q)));
If (GetArrayLength(Responder[MK].Q) > 0) Then
For MK2 := 0 To GetArrayLength(Responder[MK].Q) - 1 Do
SaveF.Add(Responder[MK].Q[MK2]);
SaveF.Add(IntToStr(GetArrayLength(Responder[MK].A)));
If (GetArrayLength(Responder[MK].A) > 0) Then
For MK2 := 0 To GetArrayLength(Responder[MK].A) - 1 Do
SaveF.Add(Responder[MK].A[MK2]);
End;
SaveToFile(SaveF, FormSave.FileName);
End;
But[3]: Begin
FormOpen.Filter := '.respond';
FormOpen.ExeCute;
LoadF := TStringList.Create;
If (FormOpen.FileName = '') Then Exit;
Try
If LoadFromFile(LoadF, FormOpen.FileName) then
Begin
If Not (LoadF.Strings[0] = '**SRL_AUTORESPOND_FILE**DO_NOT_EDIT**')
Then Begin
ShowMessage('The respond file has been editted or damaged. Co' +
'uldn''t load.');
Exit;
End;
HowManyResponds := StrToInt(LoadF.Strings[1]);
Holder := 2;
SetArrayLength(Responder, HowManyResponds);
For MK := 0 To HowManyResponds - 1 Do
Begin
SetArrayLength(Responder[MK].Q, StrToInt(LoadF.Strings[Holder]));
If Not (GetArrayLength(Responder[MK].Q) = 0) Then
For MK2 := 0 To GetArrayLength(Responder[MK].Q) - 1 Do
Responder[MK].Q[MK2] := LoadF.Strings[Holder + MK2 + 1];
Holder := Holder + GetArrayLength(Responder[MK].Q) + 1;
SetArrayLength(Responder[MK].A, StrToInt(LoadF.Strings[Holder]));
If Not (GetArrayLength(Responder[MK].A) = 0) Then
For MK2 := 0 To GetArrayLength(Responder[MK].A) - 1 Do
Responder[MK].A[MK2] := LoadF.Strings[Holder + MK2 + 1];
Holder := Holder + GetArrayLength(Responder[MK].A) + 1;
End;
End Else
Begin
ShowMessage('Couldn''t find the file, you might have moved or ' +
'deleted it.');
Exit;
End;
Except
ShowMessage('Load failed, the file might be dammaged.');
Finally
MK_LoadSet(0, False);
End;
End;
But[4]: Begin
SubString := InputQA('Q');
If (SubString = '') Then
Begin
ShowMessage('No question was found!');
Exit;
End;
Holder := GetArrayLength(Responder[List[0].ItemIndex].Q);
SetArrayLength(Responder[List[0].ItemIndex].Q, Holder + 1);
Responder[List[0].ItemIndex].Q[Holder] := SubString;
MK_LoadSet(List[0].ItemIndex, False);
List[1].ItemIndex := Holder;
End;
But[5]: Begin
If (List[1].ItemIndex = -1) Then
Begin
ShowMessage('Please select the responding question you want to ' +
'delete.');
End Else
Begin
Holder := List[1].ItemIndex;
Holder2 := GetArrayLength(Responder[List[0].ItemIndex].Q);
If (Holder + 1 = Holder2) Then
Holder := Holder - 1
Else
If (Holder + 2 = Holder2) Then
Responder[List[0].ItemIndex].Q[Holder] := Responder[List[0].ItemIndex].Q[Holder + 1]
Else
For MK := Holder To Holder2 - 2 Do
Responder[List[0].ItemIndex].Q[MK] := Responder[List[0].ItemIndex].Q[MK + 1];
SetArrayLength(Responder[List[0].ItemIndex].Q, Holder2 - 1);
MK_LoadSet(List[0].ItemIndex, False);
End;
End;
But[6]: Begin
SubString := InputQA('A');
If (SubString = '') Then
Begin
ShowMessage('No awnser was found!');
Exit;
End;
Holder := GetArrayLength(Responder[List[0].ItemIndex].A);
SetArrayLength(Responder[List[0].ItemIndex].A, Holder + 1);
Responder[List[0].ItemIndex].A[Holder] := SubString;
MK_LoadSet(List[0].ItemIndex, False);
List[2].ItemIndex := Holder;
End;
But[7]: Begin
If (List[2].ItemIndex = -1) Then
Begin
ShowMessage('Please select the responding awnser you want to delete.');
End Else
Begin
Holder := List[2].ItemIndex;
Holder2 := GetArrayLength(Responder[List[0].ItemIndex].A);
If (Holder + 1 = Holder2) Then
Holder := Holder - 1
Else
If (Holder + 2 = Holder2) Then
Responder[List[0].ItemIndex].A[Holder] := Responder[List[0].ItemIndex].A[Holder + 1]
Else
For MK := Holder To Holder2 - 2 Do
Responder[List[0].ItemIndex].A[MK] := Responder[List[0].ItemIndex].A[MK + 1];
SetArrayLength(Responder[List[0].ItemIndex].A, Holder2 - 1);
MK_LoadSet(List[0].ItemIndex, False);
End;
End;
But[8]: Begin
MK_LoadSet(List[0].ItemIndex, False);
For MK := 0 To GetArrayLength(Responder) - 1 Do
Begin
If (GetArrayLength(Responder[MK].Q) = 0)
Or (GetArrayLength(Responder[MK].A) = 0) Then
Begin
ShowMessage('Please delete the "not done" responds first.');
Exit;
End;
End;
ResponderActive := True;
MK_frmDesign.ModalResult:= mrOk;
End;
But[9]: MK_frmDesign.ModalResult:= mrOk;
But[10]: Begin
SetArrayLength(Responder, 0);
HowManyResponds := 0;
For MK := 0 To 2 Do
List[MK].Clear;
For MK := 4 To 7 Do
But[MK].Enabled := False;
For MK := 1 To 2 Do
But[MK].Enabled := False;
But[8].Enabled := False;
But[10].Enabled := False;
ShowMessage('All clear!');
End;
List[0]: Begin
If Not (List[0].ItemIndex = -1) Then
MK_LoadSet(List[0].ItemIndex, False);
End;
End;
End;
procedure MK_InitForm;
Var
MK: Integer;
begin
Case CurrentForm Of
0: Begin
MK_frmDesign := CreateForm;
MK_frmDesign.Left := 100;
MK_frmDesign.Top := 100;
MK_frmDesign.Width := 710;
MK_frmDesign.Height := 530;
MK_frmDesign.Caption := 'SARS - SRL''s Auto Responder Source - by MasterKill';
MK_frmDesign.Color := clwhite;
MK_frmDesign.Font.Color := clWindowText;
MK_frmDesign.Font.Height := -11;
MK_frmDesign.Font.Style := [];
MK_frmDesign.Visible := False;
MK_frmDesign.PixelsPerInch := 96;
For MK := 0 To 2 Do
Begin
Shape[MK] := TShape.Create(MK_frmDesign);
Shape[MK].Parent := MK_frmDesign;
Shape[MK].Brush.Color := 11842740;
Shape[MK].Pen.Color := 11842740;
End;
Shape[0].Left := 10;
Shape[0].Top := 70;
Shape[0].Height := 350;
Shape[0].Width := 230;
Shape[1].Top := 70;
Shape[1].Left := 250;
Shape[1].Width := 430;
Shape[1].Height := 350;
Shape[2].Left := 10;
Shape[2].Top := 430;
Shape[2].Height := 50;
Shape[2].Left := 10;
Shape[2].Width := 670;
For MK := 0 To 2 Do
Begin
List[MK] := TListBox.Create(MK_frmDesign);
List[MK].Parent := MK_frmDesign;
End;
List[0].Left := 20;
List[0].Top := 80;
List[0].Height := 330;
List[0].Width := 100;
List[0].OnClick := @MK_ButtonClick;
For MK := 1 To 2 Do
Begin
List[MK].Left := 260;
List[MK].Top := 80 + 180 * (MK - 1);
List[MK].Width := 300;
List[MK].Height := 150;
End;
For MK := 0 To 4 Do
Begin
Txt[MK] := TLabel.Create(MK_frmDesign);
Txt[MK].Parent := MK_frmDesign;
Txt[MK].Font.Name := 'Constantia';
End;
Txt[0].Top := 5;
Txt[0].Left := 160;
Txt[0].Caption := 'SRL''s auto responder';
Txt[0].Font.Size := 30;
Txt[1].Top := 45;
Txt[1].Left := 410;
Txt[1].Caption := 'by MasterKill';
For MK := 0 To 10 Do
Begin
But[MK] := TButton.Create(MK_frmDesign);
But[MK].Parent := MK_frmDesign;
But[MK].OnClick := @MK_ButtonClick;
But[MK].Width := 100;
But[MK].Height := 30;
End;
For MK := 0 To 3 Do
Begin
But[MK].Top := 170 + 40 * MK;
But[MK].Left := 130;
End;
For MK := 4 To 7 Do
Begin
Case MK Of
4, 5: But[MK].Top := 120 + 40 * (MK - 4);
6, 7: But[MK].Top := 300 + 40 * (MK - 6);
End;
But[MK].Left := 570;
End;
For MK := 8 To 10 Do
Begin
But[MK].Width := 200;
But[MK].Left := 20 + 225 * (MK - 8);
But[MK].Top := 440;
End;
But[0].Caption := 'Add respond';
But[1].Caption := 'Delete selected';
But[2].Caption := 'Save this list';
But[3].Caption := 'Load respond list';
But[4].Caption := 'Add question [Q]';
But[5].Caption := 'Delete selected Q';
But[6].Caption := 'Add awnser [A]';
But[7].Caption := 'Delete selected A';
But[8].Caption := 'START, use responder';
But[9].Caption := 'START, don''t use responder';
But[10].Caption := 'Clear all fields';
For MK := 4 To 7 Do
But[MK].Enabled := False;
For MK := 1 To 2 Do
But[MK].Enabled := False;
SetArrayLength(Responder, 0);
But[8].Enabled := False;
But[10].Enabled := False;
FormSave := TSaveDialog.Create(MK_frmDesign);
FormOpen := TOpenDialog.Create(MK_frmDesign);
End;
1: Begin
InvoerForm := CreateForm;
InvoerForm.Left := 259;
InvoerForm.Top := 132;
InvoerForm.Width := 495;
InvoerForm.Height := 110;
InvoerForm.Color := clBtnFace;
InvoerForm.Font.Color := clWindowText;
InvoerForm.Font.Height := -11;
InvoerForm.Font.Name := 'MS Sans Serif';
InvoerForm.Font.Style := [];
InvoerForm.Visible := False;
InvoerForm.PixelsPerInch := 96;
OK := TButton.Create(InvoerForm);
OK.OnClick:= @MK_ButtonClick;
OK.Parent := InvoerForm;
OK.Left := 420;
OK.Top := 40;
OK.Width := 50;
OK.Height := 20;
OK.Caption := 'OK';
QALabel := TLabel.Create(InvoerForm);
QALabel.Parent := InvoerForm;
QALabel.Left := 10;
QALabel.Top := 12;
InsertBox := TComboBox.Create(InvoerForm);
InsertBox.Parent := InvoerForm;
InsertBox.Top := 10;
InsertBox.Left := 170;
InsertBox.Width := 300;
InsertBox.OnClick := @MK_ButtonClick;
InsertBox.Font.Name := 'Courier';
InsertBox.Text := 'Add replacement';
InsertL := TRichEdit.Create(InvoerForm);
InsertL.Parent := InvoerForm;
InsertL.Left := 10;
InsertL.Width := 400;
InsertL.Top := 40;
InsertL.Height := 20;
InsertTimer := TTimer.Create(InvoerForm);
InsertTimer.Interval := 1000;
InsertTimer.Enabled := True;
InsertTimer.OnTimer := @MK_TimerLoop;
Case QorA Of
'Q': Begin
InsertBox.Items.Add('$nick your players nickname');
InvoerForm.Caption := 'Add an question';
QALabel.Caption := 'Add an [Q]uestion';
End;
'A': Begin
InsertBox.Items.Add('$attack your attack level');
InsertBox.Items.Add('$strength your strength level');
InsertBox.Items.Add('$defence your defence level');
InsertBox.Items.Add('$range your range level');
InsertBox.Items.Add('$prayer your prayer level');
InsertBox.Items.Add('$magic your magic level');
InsertBox.Items.Add('$runecrafting your RC level');
InsertBox.Items.Add('$hitpoints your HP level');
InsertBox.Items.Add('$agility your agility level');
InsertBox.Items.Add('$herblore your herblore level');
InsertBox.Items.Add('$thieving your thieving level');
InsertBox.Items.Add('$crafting your crafting level');
InsertBox.Items.Add('$fletching your fletching level');
InsertBox.Items.Add('$slayer your slayer level');
InsertBox.Items.Add('$mining your mining level');
InsertBox.Items.Add('$smithing your smitting level');
InsertBox.Items.Add('$fishing your fishing level');
InsertBox.Items.Add('$cooking your cooking level');
InsertBox.Items.Add('$firemaking your FM level');
InsertBox.Items.Add('$woodcutting your WC level');
InsertBox.Items.Add('$farming your farming level');
InsertBox.Items.Add('$chatter The player questioning');
InvoerForm.Caption := 'Add an awnser';
QALabel.Caption := 'Add an [A]wnser';
End;
End;
End;
End;
end;
procedure SafeMK_InitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('MK_InitForm', v);
end;
procedure MK_ShowFormModal;
begin
Case CurrentForm Of
0: MK_frmDesign.ShowModal;
1: InvoerForm.ShowModal;
End;
end;
procedure MK_MK_ShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('MK_ShowFormModal', v);
end;
Procedure ShowForm(WhatForm: Integer);
Begin
CurrentForm := WhatForm;
SafeMK_InitForm;
MK_MK_ShowFormModal;
End;
Function InputQA(AorQ: String): String;
Begin
QorA := AorQ;
ShowForm(1);
Result := QAOutput;
End;
Procedure SetupSRLAutoResponder;
Begin
Try
//GetSelf.Hide;
ShowForm(0);
Except
ResponderActive := False;
srl_Warn('Setup_Responds_Form', 'Form did not work correctly.',
warn_AllVersions);
//GetSelf.Show;
Finally
WriteLn('STARTING, using auto responder: ' + BoolToStr(ResponderActive) +
'.');
//GetSelf.Show;
End;
End;
Function AutoRespond(LastLines: Integer): Boolean;
Var
MK, I, x, y, QIndex, TsysTime: Integer;
ChatText, ChatName, FinalRespond: String;
TempRespond: Array Of TRespond;
Skill: Array Of String;
P: TPoint;
Begin
If Not ResponderActive Then Exit;
If (LastLines < 1) Or (LastLines > 8) Then
Begin
srl_Warn('Fuction_AutoRespond()', 'Wrong "LastLines" amoult has been ' +
'enterd!', warn_AllVersions);
Exit;
End;
TsysTime := GetSystemTime;
For MK := 8 DownTo 9 - LastLines Do
Begin
P := TextCoords(MK);
If findcolor(x, y, clBlue, P.x, P.y, P.x + 200, P.y + 14) Then
Begin
ChatText := LowerCase(GetChatBoxText(MK, clBlue));
ChatName := LowerCase(GetChatBoxText(MK, clMessage));
If (ChatText = '') Then Exit;
If (Pos(Players[CurrentPlayer].Nick, ChatName) <> 0) Then Exit;
If (LastRespond = ChatText) Then
If (GetSystemTime - LastTIMEresponded < 60000) Then Exit;
Result := True;
Break;
End
End;
If Not Result Then Exit;
TempRespond := Responder;
QIndex := -1;
For MK := 0 To High(Responder) Do
Begin
For I := 0 To High(Responder[MK].Q) Do
Begin
TempRespond[MK].Q[I] := Replace(TempRespond[MK].Q[I], '$nick',
Players[CurrentPlayer].Nick);
If (Pos(Responder[MK].Q[I], ChatText) <> 0) Then
Begin
FinalRespond := Responder[MK].A[Random(GetArrayLength(
TempRespond[MK].A))];
QIndex := 100;
Break;
End;
End;
If (QIndex > -1) Then Break;
End;
If (QIndex = -1) Then
Begin
Result := False;
Exit;
End;
ChatName := Replace(ChatName, ':', '');
FinalRespond := Replace(FinalRespond, '$chatter', ChatName);
Skill := [':)', 'attack', 'strength', 'defence', 'range', 'prayer', 'magic',
'runecrafting', 'hitpoints', 'agility', 'herblore', 'thieving',
'crafting', 'fletching', 'slayer', 'mining', 'smithing', 'fishing',
'cooking', 'firemaking', 'woodcutting', 'farming'];
For MK := 1 To 21 Do
Begin
If (Players[CurrentPlayer].level[MK] = 0) Then
GetAllLevels;
FinalRespond := Replace(FinalRespond, '$'+Skill[MK],
IntToStr(Players[CurrentPlayer].Level[MK]));
End;
WriteLn(ChatName + ' says: ' + ChatText + '. ' + Players[CurrentPlayer].Name +
' responds with: ' + FinalRespond + ' (' + IntToStr(GetSystemTime - TsysTime)
+ ' ms.)');
TypeSend(FinalRespond);
RespondsMade := RespondsMade + 1;
End;
Procedure Respond;
Begin
AutoRespond(3);
End;