The recent talks about autotalking/responding has led me to make this thread.
This is the PotatoResponder. I have released this code a month ago, leech free. I didnt get the responce I was hoping for, so here it is explained. Please study it carefully.
Based upon the same principle are parts of our own private library, including the mysterious AutoResponder everybody has been bothering me about :)
Its engine is fairly simple, based on something I saw ages ago, made by the RSCI devs. A function that grabs the last line of chat and compares it to predefined strings. So ((inChat('what') or inChat('wat')) and (inChat('doi') or inChat('oin'))) evaluates to a combination of 'what' or 'wat' and 'doi' or 'oin', meaning in normal english "what are you doing? The PotatoResponder would then respond with one of of 10 rotating responces:
PotatoeText[1] := 'I am picking potatoes';
PotatoeText[2] := 'I just love potatoes';
PotatoeText[3] := 'I am the potatoepicker';
PotatoeText[4] := 'making stews.';
PotatoeText[5] := 'yummie potatoes. I pick m';
PotatoeText[6] := 'potatoes are easy to get.';
PotatoeText[7] := 'making french fries';
PotatoeText[8] := 'i am the potatoeking.';
PotatoeText[9] := 'look, potatoes everywhere.';
So this is nice. We are no longer a bot. It gets even better, because next we check for this: if (inChat('hah') or inChat('heh') or inChat('lol') or inChat('lmao'))
PoatoRespond responds with:
PotatoeText[10] := 'lolol';
PotatoeText[11] := 'lol';
PotatoeText[12] := 'haha';
PotatoeText[13] := 'hihi';
PotatoeText[14] := 'ghehe';
PotatoeText[15] := 'lmao';
PotatoeText[16] := 'lmfao';
PotatoeText[17] := 'rofls';
PotatoeText[18] := 'fun';
PotatoeText[19] := 'nice';
Works 90% of the time. I hope that at least some of you apprecciate it's posibilities, and realise this "hidden" potential. Easy enough to build a gigantic library.
andPHP Code://----------------------------------------------------------------------------//
procedure PotatoeRespond;
var
TheResponce : String;
begin
OldLine := TheLine;
TheName := lowercase(trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 0, 40, True, tr_NormalChars)));
TheLine := lowercase(trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 16711680, 40, False, tr_NormalChars)));
NewLine := TheLine;
if OldLine <> NewLine then
if (pos('yo', TheName) <> 0) or (pos(Players[CurrentPlayer].Nick, TheName) <> 0) then
begin
end // skip our own text! and "you have etc...."
else
begin
if ((inChat('what') or inChat('wat')) and (inChat('doi') or inChat('oin'))) then
begin
TheResponce := PotatoeText[what + 1];
Wait(1000);
TypeSend(TheResponce + ' ' + TheName)
what := what + 1;
if what > 10 then
what := 1;
end;
if (inChat('hah') or inChat('heh') or inChat('lol') or inChat('lmao')) then
begin
TheResponce := PotatoeText[10 + lol];
TypeSend(TheResponce);
lol := lol + 1;
if lol > 10 then
lol := 1;
end;
end;
end;
{*******************************************************************************
function InChat(Text : String) : Boolean;
By:WT-Fakawi
Description: Returns True if Text is in last Chat Message.
*******************************************************************************}
function InChat(Text : String) : Boolean;
begin
if (pos(Text, TheLine) <> 0) then
Result := True
else
Result := False;
end;
P.S.PHP Code:PotatoeText[1] := 'I am picking potatoes'; // respond to doing & what
PotatoeText[2] := 'I just love potatoes';
PotatoeText[3] := 'I am the potatoepicker';
PotatoeText[4] := 'making stews.';
PotatoeText[5] := 'yummie potatoes. I pick m';
PotatoeText[6] := 'potatoes are easy to get.';
PotatoeText[7] := 'making french fries';
PotatoeText[8] := 'i am the potatoeking.';
PotatoeText[9] := 'look, potatoes everywhere.';
PotatoeText[10] := 'lolol'; // lol
PotatoeText[11] := 'lol';
PotatoeText[12] := 'haha';
PotatoeText[13] := 'hihi';
PotatoeText[14] := 'ghehe';
PotatoeText[15] := 'lmao';
PotatoeText[16] := 'lmfao';
PotatoeText[17] := 'rofls';
PotatoeText[18] := 'fun';
PotatoeText[19] := 'nice';
Have you noticed that the PotatoRespond splits up chattext into TheName and TheLine? Realise that you can speak out the legit players name? :)

