Is there a procedure like if someone says in the chat box 'sup' then you can have scar typesend('nm you?') or something like that? if so can someone tell me.
Thank you
~lVlaverick~
Is there a procedure like if someone says in the chat box 'sup' then you can have scar typesend('nm you?') or something like that? if so can someone tell me.
Thank you
~lVlaverick~
yes there is.
InChat(Text: String): Boolean;
If inchat('sup') then
typesend('stfu');
Blank!
Yes, there is, the function is called "InChat".
(I'm glad you're interested in scripting already from your first post)
Anyway, using it in a script would be something like this:
SCAR Code:procedure Respond;
begin
if InChat('hai') or InChat('hello') then
TypeSend('o hai der');
end;
Just PM me if you need more help.
Edit: Waddo..?
Scripts: Varrock Smither! | Fight Caves Runner! | Kebab Buyer! | L.A.M.E. (Outdated)
Tutorials: SRL user-defined procedures | JaGex UID files | Printing your scripts
Applications: StartUp Notepad | SCAR Assistant
Misc: FREE Delphi 7 v2 | Official SRL Graphics
Thanks evilchicken! i have another question for you if you don't mind :P like i made this
Can i make it like someone get my current Wc lvl then typesend it?SCAR Code:Procedure Respond3;
begin
if inchat('Wc lvl?') or inchat('Woodcutting lvl?') or inchat('Wc lvl') then
begin
end;
end;
~lVlaverick~
EEEEEEEEEEEEEEKKKKKKKKK No No
Im not shouting just advising
double post means posting twice it does not mean posting the same thing twice
delete your second post and use the edit button
Blank!
SCAR Code:Procedure Respond3;
var WcLv: Integer
begin
if inchat('Wc lvl?') or inchat('Woodcutting lvl?') or inchat('Wc lvl') then
begin
WcLv := GetSkillLevel('woodcutting');
TypeSend(IntToStr(WcLv) + ', you?');
end;
end;
yeah its also good if you use a case random of eg
edit and if you used declareplayers you could use the players nick in the responder egSCAR Code:Procedure Respond3;
var WcLv: Integer
begin
if inchat('Wc lvl?') or inchat('Woodcutting lvl?') or inchat('Wc lvl') then
begin
case random(2) of
1:begin
WcLv := GetSkillLevel('woodcutting');
TypeSend(IntToStr(WcLv) + ', you?');
end;
2:typesend('meh not very good lolz');
end;
footnote:you only need begin and end in a case pf if its more than 1 line you need it to doSCAR Code:Procedure Respond3;
var WcLv: Integer
begin
if inchat((players[currentplayer].nick)) then
begin
case random(2) of
1:typesend('sup');
2:typesend('yeah?');
end;
There are currently 1 users browsing this thread. (0 members and 1 guests)