Author Topic: sever bot script  (Read 936 times)

I want to make a bot script that says every fifteen minutes(Sever bot: Please don't spam.)

Easy
Code: [Select]
function serverBot()
{
 messageAll('',"\c3Botsname\c6: Don't spam!");
 schedule(900000,0,Serverbot);
}

Easy
Code: [Select]
function serverBot()
{
 messageAll('',"\c3Botsname\c6: Don't spam!");
 schedule(900000,0,Serverbot);
}
thank you

Not a advanced scripter, but I would have made it a package so I could disable it when needed.

No, you dont put things like that in a package. To stop it when needed just do something like $serverbot=schedule(900000,0,serverbot); so that you can do cancel($serverbot); to stop it.

No, you dont put things like that in a package. To stop it when needed just do something like $serverbot=schedule(900000,0,serverbot); so that you can do cancel($serverbot); to stop it.
Yea thats true you could also add this
commandToServer('ClearSpambricks'); to it

Yea thats true you could also add this
commandToServer('ClearSpambricks'); to it

I just want to make a simple script for practice.

No, you dont put things like that in a package. To stop it when needed just do something like $serverbot=schedule(900000,0,serverbot); so that you can do cancel($serverbot); to stop it.
Thank you.

Code: [Select]
function spamChatByAskingPeopleNotToSpam() {
   announce("DUN BE SPAMMIN ME BRO!");
   if($Pref::Server::spamMessageInterval < 1)
      $Pref::Server::spamMessageInterval = 1;
   if(!isEventPending($chatSpamSched))
      $chatSpamSched = schedule(60000 * $Pref::Server::spamMessageInterval, 0, spamChatByAskingPeopleNotToSpam)
}

function serverCmdHypocriteSpam(%client) {
   if(!%client.isAdmin)
      return false;
   if(isEventPending($chatSpamSched)) {
      messageClient(%client, 'messageBoxOK', "Awwww", "You hypocrite.");
      return false;
   }
   return true;
}