Script Problem

I can't seem to get a check text function working.
Like if I say "AFK" there is a message saying "Dark Dragon DX has gone AFK!".
This is what I tried -_-'


function afk(%args){
%arg1=getword(%args,0);
if (%arg1 $="test"){
messageall('MsgAdminForce', "\c5XD");
}
}

Comments

  • KrashKrash Neptune Sleeps
    Where exactly is this giving you trouble? Looks to me like the function itself would work as far as sending that messageall if 'test' is the first word in a string, though it does look a bit longer than need be.
    Myself I wouldn't bother making a whole new function for something that short to catch text, unless I was going to use it for quite a few things, would probably just stick a line or two in chatMessageAll.
This discussion has been closed.