SCAR Code:
program ClanChat;
{.include SRL/SRL.scar}
{*******************************************************************************
function InClanChat: boolean;
By: akwardsaw, senrath shortened it.
Description: It checks if you are currently in a clan chat
*******************************************************************************}
function InClanChat: boolean;
begin
gametab(10);
result := (getcolor(571, 447) = 39935);
end;
{*******************************************************************************
Function FindCCTab: Boolean;
By: Akwardsaw, NaumanAkhlaQ made it better
Description: Just incase findtab(10) doesnt work,
this will open the clan chat tab.
*******************************************************************************}
Function FindCCTab: boolean;
begin
result := gametab(10); //gametab() has an inbuilt result
If result then exit;
begin
mousebox(953, 603, 981, 636, 1);
result:= (getuptext = 'Clan Chat');
end;
end;
{*******************************************************************************
procedure GetInChat(channel: string);
By: Akwardsaw
Description: It will get you into a Clan Chat channel, if it exists.
If no Specific Channel, leave as GetInChannel('');
*******************************************************************************}
procedure GetInChat(channel: string);
var channelarray: tstringarray;
begin
if not FindCCTab then exit;
if not inclanchat then
begin
begin
Mousebox(571, 438, 625, 453, 1);
wait(100);
end;
if channel = '' then
begin
channelarray:= ['dewll dragon', 'spaderdabomb', 'Strings Mas',
'Zeth317', '0wn3d xx', 'Miljaker', 'Trawler Fish', 'Sir Nrop',
'Diy Chat', 'Seraphyna', 'zach5433', 'Cake753', 'World65edge',
'Mr Sniper1', 'Jsen', 'Quirk_X', 'Sworddude247', 'munyacct5',
'ashcon4', 'Gastrophete', 'Ot Chatroom', 'Meimaskiller',
'Xhuntahx'];
Typesend(channelarray[Random(Length(channelarray))]);
end else typesend(channel);
while inclanchat = false do wait(100);
end;
end;
{*******************************************************************************
procedure TalkinCC(text: string; true: boolean; mistake: integer;);
By: Akwardsaw, Home fixed
Description: text = text you want it to say
true = say random sentences, false if
you just want it to say that one sentence.
mistake = chance of it making a mistake. 1 = 100%, 2= 50%, 0 = 0%
*******************************************************************************}
Procedure TalkInCC(Text :String; TalkRandom: Boolean; Mistake: Integer);
var
YourMessage: TStringArray;
begin
{if InClanchat then }
begin
if TalkRandom then
begin
YourMessage:= ['heya', 'heya whats up', 'whats up', 'hola', 'hi',
'im bored', Text, 'hiya', 'im sooo bored', 'whats new',
'whats new guys'];
Typesend('/' + AddMistakes(YourMessage[Random(Length(YourMessage))],Mistake))
end else
Typesend(Text);
end;
end;
{*******************************************************************************
procedure LeaveCC(text: string; true: boolean);
By: Akwardsaw, NaumanAkhlaQ suggesting to add mistakes and tstringarray
Description: text = Text you want to say before you leave(leave blank if you
don't want it to say anything.
true = If you want to say a random sentence before leaving, if false
it says what you want it to say.
It says nothing if text is blank.
mistake = the chance of it making a mistake. 1= 100%, 2 = 50%, 0= 0%
*******************************************************************************}
procedure LeaveCC(text: string; true: boolean; mistake: integer);
var leavemessage: tstringarray;
begin
if inclanchat then
begin
if true then
begin
leavemessage:= ['cya guys', 'alright, im gonna go',
'adios', 'im gonna take a nap :P cya',
'yawn, imma go to bed', 'ffs lag', 'need to take a break',
'bleh, gonna restart my computer', 'moms calling -.-', 'brb',
'phone call, bbl', 'bbl', 'gonna go get something to eat'];
Typesend('/' + AddMistakes(leavemessage[Random(Length(leavemessage))],Mistake))
end else typesend('/' + addmistakes(text, mistake));
wait(600+random(400));
Mousebox(571, 438, 625, 453, 1);
end;
end;