Originally Posted by
Bridpkz Dennis
so i want to add an ::afk command.
And it shouldwork like, if u type ::afk your character automaticly writes a message like all 5 seconds "im afk, dont write to me" or something.
I dont know how to make him repeat the sentence:L
that's what i have so far
Use this. It won't send the message 5 times a second, but it will make you sit on a chair with zzz coming out of you to make you look like you're afk.
Code:
if (playerCommand.equalsIgnoreCase("afk"))
{
if (c.inWild())
{
c.sendMessage("You cannot use this in the wilderness11.");
return;
}
c.forcedText = "I'm AFK, don't talk to me";
c.forcedChatUpdateRequired = true;
c.updateRequired = true;
c.startAnimation(1353);
c.updateRequired = true;
c.appearanceUpdateRequired = true;
c.sendMessage("You now relax");
c.sendMessage("Type in ::afkoff to undo it");
}
if (playerCommand.equalsIgnoreCase("afkoff"))
{
if (c.inWild())
{
c.sendMessage("You cannot use this in the wilderness12.");
return;
}
c.forcedText = "I'm back!";
c.forcedChatUpdateRequired = true;
c.updateRequired = true;
c.startAnimation(6);
c.updateRequired = true;
c.appearanceUpdateRequired = true;
c.sendMessage("You wake up.");
}