Does anyone have a script that will block all battles from being started? For use during DDoS attacks. Also, if possible, to have the server display a message to a user when a battle attempts to start>?
Code (JAVASCRIPT): //declare somewhere at top of script var battlesStopped = false; //place somewhere in your commands if (command == "stopbattles") { battlesStopped = !battlesStopped; if (battlesStopped) { sys.sendAll(""); sys.sendAll("*** ********************************************************************** ***"); sys.sendAll("The battles are now stopped. The server will restart soon."); sys.sendAll("*** ********************************************************************** ***"); sys.sendAll(""); } else { sys.sendAll("False alarm, battles may continue."); } return; } //place in events beforeChallengeIssued : function (src, dest, clauses, rated, mode, team, destTier) { if (battlesStopped) { sys.sendMessage(src, "Battles are now stopped as the server will restart soon."); sys.stopEvent(); return; } }, beforeBattleMatchup : function (src,dest,clauses,rated) { if (battlesStopped) { sys.stopEvent(); return; } } It's adapted from the PO scripts though, so you'll probably want to add your own improvements/touches to it, since this script is like 3 years old :o