SCAR Code:
program AutoTalker;
{.include SRL/SRL.scar}
var
XDump, YDump, LoopInteger: Integer;
const
UseAutoResponder = True;
function IsChatTextUp(TheText: String): Boolean;
begin
Result := FindText(XDump, YDump, TheText, 3, 518, 478, 6, 344);
end;
procedure ChangeTab(TheTab: Integer);
begin
GameTab(TheTab);
LoopInteger := 0;
repeat
Wait(1000 + Random(1000));
LoopInteger := LoopInteger + 1;
if(LoopInteger >= 20)then
begin
Logout;
Break;
end;
until((GetCurrentTab = TheTab)or(not(LoggedIn)))
end;
function CombatSkills: String;
begin
case Random(15) of
0, 1, 2: Result := 'att';
3, 4, 5, 6: Result := 'str';
7, 8: Result := 'def';
9, 10: Result := 'attack';
11, 12: Result := 'strength';
13, 14: Result := 'defence';
end;
end;
function LevelText: String;
begin
case Random(6) of
0, 1, 2: Result := 'lvl';
3, 4: Result := 'lv';
5: Result := 'level';
end;
end;
function PunChance(PunText: String; Chance: Integer): String;
var
RandomNum: Integer;
begin
RandomNum := Random(Chance);
if((RandomNum <> 0)or(RandomNum <> 1)or(RandomNum <> 4)or(RandomNum <> 5))then
Result := '';
case RandomNum of
0, 1, 4, 5: Result := PunText;
end;
end;
function ToText: String;
begin
case Random(4) of
0, 1, 2: Result := 'to';
3: Result := '2';
end;
end;
function NoobCall: String;
begin
case Random(26) of
0, 1, 2, 3: Result := 'noob';
4, 5, 6: Result := 'n00b';
7: Result := 'noobster';
8, 9: Result := 'newbie';
10, 11, 12: Result := 'newb';
13, 14: Result := 'froob';
15, 16: Result := 'fr00b';
17: Result := 'choob';
18: Result := 'ch00b';
19, 20: Result := 'nooblet';
21, 22: Result := 'n00blet';
23, 24, 25: Result := 'nub';
end;
end;
function LaughText(UseHaHa: Boolean): String;
begin
case Random(17) of
0, 1, 2: Result := 'lol';
3, 4, 5: Result := 'lmao';
6: Result := 'roflmao';
7, 8, 9: Result := 'rofl';
10: Result := 'pmsl'
11, 12: Result := 'l0l';
13: if UseHaHa then Result := 'haha';
14: if UseHaHa then Result := 'hehe';
15, 16: if UseHaHa then Result := '^^';
end;
end;
procedure LevelAskRoutine(CombatSkill: String);
var
CombatSkillLevel: Integer;
begin
Wait(1000 + Random(1000));
ChangeTab(2);
CombatSkillLevel := GetSkillLevel(CombatSkill);
case Random(13) of
0, 1: TypeSend(IntToStr(CombatSkillLevel));
2, 3, 4: TypeSend(IntToStr(CombatSkillLevel)+'here'+ PunChance('.', 17));
5, 6: TypeSend(LevelText+' '+IntToStr(CombatSkillLevel)+ PunChance(',', 14)+' '+'you'+ PunChance('?', 8));
7, 8, 9: TypeSend(IntToStr(CombatSkillLevel)+ PunChance(',', 14)+' '+'you'+ PunChance('?', 8));
10, 11, 12: TypeSend(LevelText+' '+IntToStr(CombatSkillLevel)+PunChance('.', 17));
end;
end;
procedure AutoRespond;
begin
if not UseAutoResponder then
Exit;
//GREETINGS
if((IsChatTextUp('hello'))or(IsChatTextUp('hi'))or(IsChatTextUp('ello'))
or(IsChatTextUp('hey'))or(IsChatTextUp('yo'))or(IsChatTextUp('sup'))
or(IsChatTextUp('Hello'))or(IsChatTextUp('Hi'))or(IsChatTextUp('Ello'))
or(IsChatTextUp('Hey'))or(IsChatTextUp('Yo'))or(IsChatTextUp('Sup')))then
case Random(35) of
0, 1: TypeSend('sup'+ PunChance('.', 17));
2: TypeSend('yo'+ PunChance('.', 17));
3, 4, 5: TypeSend('hey'+ PunChance('.', 17));
6, 7: TypeSend('hello'+ PunChance('.', 17));
8, 9, 10, 11: TypeSend('hi'+ PunChance('.', 17));
12, 13: TypeSend('ello'+ PunChance('.', 17));
14: TypeSend('wats up'+ PunChance('?', 17));
15, 16:
begin
case Random(14) of
0, 1: TypeSend('sup'+ PunChance(',', 14) +' '+CombatSkills+' '+LevelText + PunChance('?', 8));
2: TypeSend('yo'+ PunChance(',', 14) +' '+CombatSkills+' '+LevelText + PunChance('?', 8));
3, 4, 5: TypeSend('hey'+ PunChance(',', 14) +' '+CombatSkills+' '+LevelText + PunChance('?', 8));
6, 7: TypeSend('hello'+ PunChance(',', 14) +' '+CombatSkills+' '+LevelText + PunChance('?', 8));
8, 9, 10, 11: TypeSend('hi'+ PunChance(',', 14) +' '+CombatSkills+' '+LevelText + PunChance('?', 8));
12, 13: TypeSend('ello'+ PunChance(',', 14) +' '+CombatSkills+' '+LevelText + PunChance('?', 8));
end;
end;
end;
Wait(1000 + Random(1000));
//NOOB CALLING/COMEBACKS
if((IsChatTextUp('noob'))or(IsChatTextUp('newbie'))or(IsChatTextUp('n00b'))or
(IsChatTextUp('newb'))or(IsChatTextUp('froob'))or(IsChatTextUp('choob'))or
(IsChatTextUp('fr00b'))or(IsChatTextUp('ch00b'))or(IsChatTextUp('nooblet'))or
(IsChatTextUp('n00blet'))or(IsChatTextUp('nub'))or(IsChatTextUp('Noob'))or
(IsChatTextUp('Newbie'))or(IsChatTextUp('N00b'))or(IsChatTextUp('Newb'))or
(IsChatTextUp('Froob'))or(IsChatTextUp('Choob'))or(IsChatTextUp('Fr00b'))or
(IsChatTextUp('Ch00b'))or(IsChatTextUp('Nooblet'))or(IsChatTextUp('N00blet'))or
(IsChatTextUp('Nub')))then
case Random(61) of
0, 1, 2: TypeSend(LaughText(False) + PunChance('?', 8));
3, 4: TypeSend('sozs'+ PunChance(',', 14) +' i dont talk '+ToText+' '+NoobCall+'s'+ PunChance('.', 17));
5, 6, 7: TypeSend('watever'+ PunChance(',', 14) +' '+NoobCall+ PunChance('.', 17));
8, 9, 10, 11: TypeSend('pathetic'+ PunChance('.', 17));
11, 12, 13, 14: TypeSend('...');
15, 16, 17: TypeSend(LaughText(False) +' '+NoobCall+ PunChance('.', 17));
18, 19: TypeSend('watch that mouth '+NoobCall+ PunChance('.', 17));
20, 21, 23: TypeSend('wot a '+NoobCall+ PunChance('.', 17));
24, 25, 26: TypeSend('-.-');
27, 28: TypeSend('>.>');
29: TypeSend('^^');
end;
Wait(1000 + Random(1000));
//Laughing
if((IsChatTextUp('hehe'))or(IsChatTextUp('^^'))or(IsChatTextUp('lol'))
or(IsChatTextUp('haha'))or(IsChatTextUp('lawl'))or(IsChatTextUp('lmao'))
or(IsChatTextUp('pmsl'))or(IsChatTextUp('rofl'))or(IsChatTextUp('l0l'))
or(IsChatTextUp('roflmao'))or(IsChatTextUp('Haha'))or(IsChatTextUp('Hehe'))
or(IsChatTextUp('Roflmao'))or(IsChatTextUp('Lol'))or(IsChatTextUp('L0l'))
or(IsChatTextUp('Lawl'))or(IsChatTextUp('Lmao'))or(IsChatTextUp('Pmsl'))
or(IsChatTextUp('Rofl')))then
case Random(25) of
1, 5, 16, 21: TypeSend(LaughText(True) + PunChance('.', 17));
end;
Wait(1000 + Random(1000));
//Level Asking (Attack)
if((IsChatTextUp('attack lv'))or(IsChatTextUp('attack level'))or(IsChatTextUp('attack lvl'))
or(IsChatTextUp('att lv'))or(IsChatTextUp('att lvl'))or(IsChatTextUp('att level'))
or(IsChatTextUp('Attack lv'))or(IsChatTextUp('Attack level'))or(IsChatTextUp('Attack lvl'))
or(IsChatTextUp('Att lv'))or(IsChatTextUp('Att lvl'))or(IsChatTextUp('Att level')))then
case Random(5) of
0: LevelAskRoutine('Attack');
end;
Wait(1000 + Random(1000));
//Level Asking (Strength)
if((IsChatTextUp('strength lv'))or(IsChatTextUp('strength level'))or(IsChatTextUp('strength lvl'))
or(IsChatTextUp('str lv'))or(IsChatTextUp('str lvl'))or(IsChatTextUp('str level'))
or(IsChatTextUp('Strength lv'))or(IsChatTextUp('Strength level'))or(IsChatTextUp('Strength lvl'))
or(IsChatTextUp('Str lv'))or(IsChatTextUp('Str lvl'))or(IsChatTextUp('Str level')))then
case Random(5) of
0: LevelAskRoutine('Strength');
end;
Wait(1000 + Random(1000));
//Level Asking (Defence)
if((IsChatTextUp('defence lv'))or(IsChatTextUp('defence level'))or(IsChatTextUp('defence lvl'))
or(IsChatTextUp('def lv'))or(IsChatTextUp('def lvl'))or(IsChatTextUp('def level'))
or(IsChatTextUp('Defence lv'))or(IsChatTextUp('Defence level'))or(IsChatTextUp('Defence lvl'))
or(IsChatTextUp('Def lv'))or(IsChatTextUp('Def lvl'))or(IsChatTextUp('Def level')))then
case Random(5) of
0: LevelAskRoutine('Defence');
end;
end;
begin
SetUpSRL;
repeat
Wait(2000);
AutoRespond;
until(False);
end.