SCAR Code:
Function GetChatMessage(Text: String): Boolean;
Var
TX, TY: Integer;
Chat: String;
Begin
If(IsTextInAreaEx(40, 415, 130, 415, TX, TY, ':', 0, SmallChars, False, True, 0, 0, 0))then
Begin
Chat:= Lowercase(Trim(GetTextAtEx(TX + 8, 415, 0, SmallChars, False, False, 0, 1, 16711680, 40, False, TR_AllChars)));
If(Pos(Text, Chat) <> 0)then
Begin
Result:= True;
end;
end;
end;
{*************************************************************************]
[=========================================================================]
[*************************************************************************}
Function GetChatName(Name: String): Boolean;
Var
I: Integer;
Begin
ChatName:= Lowercase(Trim(GetTextAtEx(21, 415, 0, SmallChars, False, False, 0, 0, 0, 50, False, TR_AllChars)));
I:= Pos(':', ChatName);
If(I <> 0)then
Begin
Delete(ChatName, I, I);
end;
If(Pos(Name, ChatName) <> 0)then
Begin
Result:= True;
end;
end;
{*************************************************************************]
[=========================================================================]
[*************************************************************************}
procedure AutoRespond;
var
Response, Level: String;
TheReply: Integer;
begin
if(GetChatMessage(Players[CurrentPlayer].Name))then
begin
AutoRespondCount := AutoRespondCount + 1;
TheReply := Random(3) + 1;
case (TheReply) of
0 : Response := ('ya?');
1 : Response := ('what?');
2 : Response := ('yeah');
end;
TypeSend(Response);
end;
if(GetChatMessage('lol'))
or (GetChatMessage('ha'))
or (GetChatMessage('haha'))
or (GetChatMessage('rofl'))
or (GetChatMessage('lmao'))
or (GetChatMessage('lmfao'))then
begin
AutoRespondCount := AutoRespondCount + 1;
TheReply := Random(9) + 1;
case (TheReply) of
0 : Response := ('lol');
1 : Response := ('haha');
2 : Response := ('rofl');
3 : Response := ('lmao');
4 : Response := ('lolz');
5 : Response := ('roflz');
6 : Response := ('hehe');
7 : Response := ('ha');
8 : Response := ('lols');
9 : Response := ('rofls');
end;
TypeSend(Response);
end;
if(GetChatMessage('wc'))
or (GetChatMessage('woodcutting'))
or (GetChatMessage('wcing'))
or (GetChatMessage('cutting'))
and (GetChatMessage('lvl'))
or (GetChatMessage('level'))
or (GetChatMessage('lvls'))
or (GetChatMessage('lvlz'))
or (GetChatMessage('stats'))
or (GetChatMessage('levels'))then
begin
AutoRespondCount := AutoRespondCount + 1;
Level := IntToStr(GetSkillLevel('woodcutting'));
Response:= ('My lvl is ' + Level);
TypeSend(Response);
end;
if(GetChatMessage('fm'))
or (GetChatMessage('firemaking'))
or (GetChatMessage('fming'))
and (GetChatMessage('lvl'))
or (GetChatMessage('level'))
or (GetChatMessage('lvls'))
or (GetChatMessage('lvlz'))
or (GetChatMessage('levels'))then
begin
AutoRespondCount := AutoRespondCount + 1;
Level := IntToStr(GetSkillLevel('firemaking'));
Response:= ('My lvl is ' + Level);
TypeSend(Response);
end;
if(GetChatMessage('fish'))
or (GetChatMessage('fishing'))
or (GetChatMessage('fishin'))
and (GetChatMessage('lvl'))
or (GetChatMessage('level'))
or (GetChatMessage('lvls'))
or (GetChatMessage('lvlz'))
or (GetChatMessage('stats'))
or (GetChatMessage('levels'))then
begin
AutoRespondCount := AutoRespondCount + 1;
Level := IntToStr(GetSkillLevel('fishing'));
Response:= ('My lvl is ' + Level);
TypeSend(Response);
end;
if(GetChatMessage('what'))
or (GetChatMessage('wut'))
or (GetChatMessage('wat'))
and (GetChatMessage('doing'))
or (GetChatMessage('doin'))
or (GetChatMessage('happening')) then
begin
AutoRespondCount := AutoRespondCount + 1;
TheReply := Random(4) + 1;
case (TheReply) of
0 : Response := ('hello');
1 : Response := ('watz up');
2 : Response := ('wat up');
3 : Response := ('whats up');
4 : Response := ('what up');
end;
TypeSend(Response);
end;
end;
function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;
{*************************************************************************]
[=========================================================================]
[*************************************************************************}
procedure Randoms;
begin
FindNormalRandoms;
FindFastRandoms;
AutoRespond;
if (FindFight) then
begin
Status('Running...');
RunAwayDirection('N');
Wait(8500 + random(3500));
RunBack;
end;
end;