Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ({
- serverStartUp : function() {
- this.init();
- }
- ,
- init : function() {
- lastMemUpdate = 0;
- key = function(a,b) {
- return a + "*" + sys.name(b);
- }
- semiUbers = [];
- var tempU = new Array(150,249,250,382,383,384,483,484,487,505);
- for (x in tempU) {
- semiUbers[tempU[x]] = true;
- }
- saveKey = function(thing, id, val) {
- sys.saveVal(key(thing,id), val);
- }
- getKey = function(thing, id) {
- return sys.getVal(key(thing,id));
- }
- hasBan = function(id, poke) {
- return clauses[id].indexOf("*" + poke + "*") != -1;
- }
- cmp = function(a, b) {
- return a.toLowerCase() == b.toLowerCase();
- }
- if (typeof(varsCreated) != 'undefined')
- return;
- battlesStopped = false;
- channelUsers = [];
- channelTopics = [];
- sys.setPA("forceSameTier");
- sys.setPA("touruser");
- sys.setPA("rangebans");
- sys.setPA("tourmod");
- sys.setPA("tourowner");
- sys.setPA("megaUser");
- megausers = sys.getVal("megausers");
- siggamute = (sys.getVal("SiggaMute") == "1");
- siggaban = (sys.getVal("SiggaBan") == "1");
- muteall = false;
- sys.setPA ("impersonation");
- sys.setPA ("muted");
- sys.setPA("caps");
- sys.setPA("timeCount");
- sys.setPA("floodCount");
- sys.setPA("joinoff");
- maxPlayersOnline = 0;
- if (sys.existChannel("RP Channel")) {
- rpchannel = sys.channelId("RP Channel");
- } else {
- rpchannel = sys.createChannel("RP Channel");
- }
- if (sys.existChannel("RP Channel")== false) {
- sys.createChannel("RP Channel");
- }
- if (sys.existChannel("League")) {
- leaguechannel = sys.channelId("League");
- } else {
- leaguechannel = sys.createChannel("League");
- }
- if (sys.existChannel("League")== false) {
- sys.createChannel("League");
- }
- if (sys.existChannel("Staff Channel")) {
- staffchannel = sys.channelId("Staff Channel");
- } else {
- staffchannel = sys.createChannel("Staff Channel");
- }
- if (sys.existChannel("Staff Channel")== false) {
- sys.createChannel("Staff Channel");
- }
- if (sys.existChannel("Scripting School")) {
- sschannel = sys.channelId("Scripting School");
- } else {
- sschannel = sys.createChannel("Scripting School");
- }
- if (sys.existChannel("Scripting School")== false) {
- sys.createChannel("Scripting School");
- }
- if (sys.existChannel("Scripting Room")) {
- srchannel = sys.channelId("Scripting Room");
- } else {
- srchannel = sys.createChannel("Scripting Room");
- }
- if (sys.existChannel("Scripting Room")== false) {
- sys.createChannel("Scripting Room");
- }
- }
- ,
- afterNewMessage : function (message) {
- if (message == "Script Check: OK") {
- sys.sendHtmlAll("<timestamp/><font color=orange><b>~~Server~~</f></b>:<font color=black> Script Check: <font color=black>Scripts were updated by the server!</f>");
- this.init();
- }
- }
- ,
- afterLogIn : function(src) {
- /* Welcome TUO*/
- if (sys.name(src) == "TheUnknownOne") {
- sys.sendHtmlAll("<font color=red><b>~~Server~~</b>: <font color=black>Please welcome the server co-owner <b>" + sys.name(src) + "</b>!");
- sys.changeAuth(src, 3);
- return;
- }
- /* Welcome Darkness*/
- if (sys.name(src) == "Darkness") {
- sys.sendHtmlAll("<font color=black><b>~~Server~~</b>: <font color=black>Please welcome one of the site owners <b>Darkness</b>!");
- return;
- }
- /* Welcome Coyotte508*/
- if (sys.name(src) == "coyotte508") {
- sys.sendHtmlAll("<font color=green><b>~~Server~~</b>: <font color=black>Please welcome the head programmer of PO <b>coyotte508</b>!");
- return;
- }
- /* Welcome Crystal Moogle*/
- if (sys.name(src) == "Crystal Moogle") {
- sys.sendHtmlAll("<font color=pink><b>~~Server~~</b>: <font color=black>Please welcome one of the site owners <b>Crystal Moogle</b>!");
- return;
- }
- sys.sendHtmlMessage(src, "<font color=green><b>+CommandBot</b>:</f> <font color=black>Use /commands or !commands to see the commands!");
- if (sys.auth(src) == 0) {
- sys.sendHtmlAll("<font color=green><timestamp/><b>~~Server~~:</font></b> Please welcome <b>" + sys.name(src) + "</font></b>!");
- }
- if (sys.auth(src) == 1) {
- sys.sendHtmlAll("<font color=blue><timestamp/>~~Server~~:</font><b> Please welcome moderator <b>" + sys.name(src) + "</font></b>!");
- }
- if (sys.auth(src) == 2) {
- sys.sendHtmlAll("<font color=orange><timestamp/><b>~~Server~~:</font><b> Please welcome administrator <b>" + sys.name(src) + "</font></b>!");
- }
- if (sys.auth(src) == 3) {
- sys.sendHtmlAll("<font color=red><timestamp/><b>~~Server~~:</font><b> Please welcome owner <b>" + sys.name(src) + "</font></b>!");
- }
- if (sys.auth(src) == 4) {
- sys.sendHtmlAll("<font color=LimeGreen><timestamp/><b>~~Server~~:</font><b> Please welcome Hidden Auth <b>" + sys.name(src) + "</font></b>!");
- }
- if (sys.getVal("muted*" + sys.ip(src)) == "true")
- muted[src] = true;
- if (sys.numPlayers() > maxPlayersOnline) {
- maxPlayersOnline = sys.numPlayers();
- }
- if (maxPlayersOnline > sys.getVal("MaxPlayersOnline")) {
- sys.saveVal("MaxPlayersOnline", maxPlayersOnline);
- }
- if (!Topic) {Topic = sys.getFileContent("topic.txt");}
- sys.sendHtmlMessage(src,'<b><font color=limegreen>±Motd:<font color=black> </b>' + Topic);
- sys.sendMessage(src,"");
- sys.sendMessage(src, "");
- this.afterChangeTeam(src);
- }
- ,
- beforeChatMessage: function(src, message) {
- if (sys.auth(src) < 3 && muted[src] == true) {
- sys.stopEvent();
- sys.sendMessage(src, "~~Server~~: Sorry you have been muted for breaking the rules!");
- return;
- }
- if ((message[0] == '/' || message[0] == '!') && message.length > 1) {
- if (parseInt(sys.time()) - lastMemUpdate > 500) {
- sys.clearChat();
- lastMemUpdate = parseInt(sys.time());
- }
- print("Command -- " + sys.name(src) + ": " + message);
- sys.stopEvent();
- var command;
- var commandData;
- var pos = message.indexOf(' ');
- var mcmd = [];
- if (pos != -1) {
- command = message.substring(1, pos).toLowerCase();
- commandData = message.substr(pos+1);
- mcmd = commandData.split(':');
- } else {
- command = message.substr(1).toLowerCase();
- }
- var tar = sys.id(commandData);
- function sendChanMessage(src, msg) {
- sys.sendMessage(src, msg, chan); }
- var userCommands = ({
- "usercommands" : function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=cornflowerblue><timestamp/><b>*** <font color=black>User Commands <font color=cornflowerblue>***</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/catch</b></f>: <font color=black>to catch a pokemon. Theres a small chance you get a <font color=gold><b>Shiny</b><font color=black>, if you do be sure to put it in the journal!</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/auth <font color=red>Name</b></f>: <font color=black>to show the server authlist</f>");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Name<font color=black> is either Mods, Admins or Owners, if you leave the <font color=green>Auth<font color=black> blank it shows all server auth.</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/rules</b></f>: <font color=black>to show the server rules</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/players</f></b>: <font color=black>to get the number of players online");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/torture <font color=red>Person</b></f> : <font color=black>to torture someone, its fun too! It gets a random result é.é");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Person<font color=black> is any online person on the server.</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/credits</b></f>: <font color=black>to view the credits and how to get these scripts.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/viewjournal</b></f>: <font color=black>to view the book of wonderful comments");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/signjournal <font color=red> Quote/Message</b></f>: <font color=black>be apart of the wonderful journal!");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Quote/Message</f><font color=black> is any quote or message you would like to share.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/joinchannel <font color=red> Name</b></f>: <font color=black>to make a channel");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Name</f><font color=black> is any not used name.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/quit <font color=red> Optional Reason</b></f>: <font color=black>to leave the server, you may give a reason");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Optional Reason</f><font color=black> is any text, HTML Allowed.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/unregister </b></f>: <font color=black>to clear your own password");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- ,
- joinchannel : function () {
- sys.createChannel(commandData);
- return;
- }
- ,
- unregister : function () {
- sys.clearPass(src);
- return;
- }
- ,
- quit : function () {
- if (commandData == undefined) {
- sys.kick(src)
- return;
- }
- sys.kick(src)
- sys.sendHtmlAll("<timestamp/><b>" + sys.name(src) + "</b> has quit with the following reason:<b> " + commandData + ".");
- return;
- }
- ,
- imgoptions : function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>*** IMG Options ***");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/burn <font color=red> Person</b></f>: <font color=black>to burn someone for fun");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/sleep <font color=red> Person</b></f>: <font color=black>to make someone asleep for fun");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/freeze <font color=red> Person</b></f>: <font color=black>to freeze someone for fun");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/poison <font color=red> Person</b></f>: <font color=black>to poison someone for fun");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/thunder <font color=red> Person</b></f>: <font color=black>to summon a thunder on someone for fun");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/pbme <font color=red>Message</b><font color=black>: to send a message to everyone with a pokeball before your name</f>");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message, HTML Allowed</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/authme <font color=red>Message</b><font color=black>: to send a message to everyone with a pokeball based on your auth before your name</f>");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message, HTML Allowed</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/accept <font color=red>Person</b><font color=black>: to accept a challenge</f>");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Person<font color=black> is any online player</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/decline <font color=red>Person</b><font color=black>: to decline a challenge</f>");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Person<font color=black> is any online player</f>");
- if (sys.auth(src) < 1) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b> <font color=black>Sorry but to the see other commands you need auth.</f>.");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/sburn <font color=red> Person</b></f>: <font color=black>to burn someone for fun, without showing your name");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/ssleep <font color=red> Person</b></f>: <font color=black>to make someone asleep for fun, without showing your name");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/sfreeze <font color=red> Person</b></f>: <font color=black>to freeze someone for fun, without showing your name");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/spoison <font color=red> Person</b></f>: <font color=black>to poison someone for fun, without showing your name");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/sthunder <font color=red> Person</b></f>: <font color=black>to summon a thunder on someone for fun, without showing your name");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<hr>");
- return; }
- ,
- pbme:function () {
- sys.sendHtmlAll("<img src='themes/classic/status/status0.png'> <b>" + sys.name(src) + "</b> " + commandData);
- return;
- }
- ,
- authme:function () {
- if (sys.auth(src) == 0) {
- sys.sendHtmlAll("<img src='themes/classic/client/UAvailable.png'> <b>" + sys.name(src) + "</b> " + commandData + " <img src='themes/classic/client/UAvailable.png'>");
- return;
- }
- if (sys.auth(src) == 1) {
- sys.sendHtmlAll("<img src='themes/classic/client/MAvailable.png'> <b>" + sys.name(src) + "</b> " + commandData + " <img src='themes/classic/client/MAvailable.png'>");
- return;
- }
- if (sys.auth(src) == 2) {
- sys.sendHtmlAll("<img src='themes/classic/client/AAvailable.png'> <b>" + sys.name(src) + "</b> " + commandData + " <img src='themes/classic/client/AAvailable.png'>");
- return;
- }
- if (sys.auth(src) == 3) {
- sys.sendHtmlAll("<img src='themes/classic/client/OAvailable.png'> <b>" + sys.name(src) + "</b> " + commandData + " <img src='themes/classic/client/OAvailable.png'>");
- return;
- }
- if (sys.auth(src) == 4) {
- sys.sendHtmlAll("<img src='themes/classic/client/UAvailable.png'> <b>" + sys.name(src) + "</b> " + commandData + " <img src='themes/classic/client/UAvailable.png'>");
- return;
- }
- }
- ,
- decline:function () {
- if (tar == undefined) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b></font> Well you fail, either you didnt type the persons name right or that person isnt on");
- return;
- }
- sys.sendHtmlMessage(tar, "<b>" + sys.name(src) + "</b> has <img src='themes/classic/Challenge Window/Buttons/DeclineButtonGlow.png'> on your challenge");
- return;
- }
- ,
- accept:function () {
- if (tar == undefined) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b></font> Well you fail, either you didnt type the persons name right or that person isnt on");
- return;
- }
- sys.sendHtmlMessage(tar, "<b>" + sys.name(src) + "</b> has <img src='themes/classic/Challenge Window/Buttons/AcceptButtonGlow.png'> your challenge");
- return;
- }
- ,
- burn : function () {
- if (tar == undefined) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b></font> Well you fail, either you didnt type the persons name right or that person isnt on");
- return;
- }
- sys.sendHtmlAll("<timestamp/><img src='themes/classic/status/battle_status4.png'><b> " + sys.name(tar) + " has been burned in <font color=red>hot lava</u></font> by " + sys.name(src) + " <img src='themes/classic/status/battle_status4.png'></b>");
- return;
- }
- ,
- poison : function () {
- if (tar == undefined) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b></font> Well you fail, either you didnt type the persons name right or that person isnt on");
- return;
- }
- sys.sendHtmlAll("<timestamp/><img src='themes/classic/status/battle_status5.png'><b> " + sys.name(tar) + " has been poisoned after <font color=purple>drinking a poisoned drink</u></font> by " + sys.name(src) + " <img src='themes/classic/status/battle_status5.png'></b>");
- return;
- }
- ,
- thunder : function () {
- if (tar == undefined) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b></font> Well you fail, either you didnt type the persons name right or that person isnt on");
- return;
- }
- sys.sendHtmlAll("<timestamp/><img src='themes/classic/status/battle_status1.png'><b> " + sys.name(tar) + " has been <font color=gold>hitted by thunder</u></font> by " + sys.name(src) + " <img src='themes/classic/status/battle_status1.png'></b>");
- return;
- }
- ,
- sleep : function () {
- if (tar == undefined) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b></font> Well you fail, either you didnt type the persons name right or that person isnt on");
- return;
- }
- sys.sendHtmlAll("<timestamp/><img src='themes/classic/status/battle_status2.png'><b> " + sys.name(tar) + " has been <font color=gray> put to sleep</u></font> by " + sys.name(src) + " <img src='themes/classic/status/battle_status2.png'></b>");
- return;
- }
- ,
- commands: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=limegreen><timestamp/><b>*** Commands ***");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/UserCommands</f></b>: <font color=green>For Users");
- sys.sendHtmlMessage(src, "<font color=purple><timestamp/><b>/HtmlCommands</f></b>: <font color=purple>For HTML Commands");
- sys.sendHtmlMessage(src, "<font color=gold><timestamp/><b>/TourCommands</f></b>: <font color=gold>For Tour Commands");
- if (sys.auth(src) < 1) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~</f></b>: <font color=black>Sorry but you need auth if you want to see the other commands.");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- sys.sendHtmlMessage(src, "<font color=blue><timestamp/><b>/ModCommands</f></b>: <font color=blue>For Moderators");
- if (sys.auth(src) < 2) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~</f></b>: <font color=black>Sorry but you need higher auth if you want to see the other commands.");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>/AdminCommands</f></b>: <font color=orange>For Administrators");
- if (sys.auth(src) < 3) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~</f></b>: <font color=black>Sorry but you need higher auth if you want to see the other commands.");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- sys.sendHtmlMessage(src, "<font color=red><timestamp/><b>/OwnerCommands</f></b>: <font color=red>For Owners");
- sys.sendHtmlMessage(src, "<hr>");
- return; }
- ,
- me:function () {
- sys.sendAll("*** " + sys.name(src) + " " + commandData); }
- ,
- htmlme:function () {
- sys.sendHtmlAll("<font color=fuchsia><timestamp/>*** </font> <b>" + sys.name(src) + "</b> " + commandData); }
- ,
- htmlcommands: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=red><timestamp/><b>*** <font color=black>Html Commands <font color=red>***</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/sendAll <font color=red>Message<font color=black></b> : <font color=black>to send a message to everyone</f>.");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message.</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/sendmessage <font color=red>Message<font color=black></b> : <font color=black>to send a message to yourself.");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message.</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/sendHtmlAll <font color=red>Message<font color=black></b> : <font color=black>to send a message to everyone using HTML.");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message, HTML Allowed</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/sendHtmlMessage <font color=red>Message<font color=black></b> : <font color=black>to send a message to yourself using HTML.");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message, HTML Allowed</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/me <font color=red>Message</b><font color=black>: to send a message to everyone with *** before your name</f>");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message.</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/htmlme <font color=red>Message</b><font color=black>: to send a message to everyone with *** before your name</f>");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message, HTML Allowed</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/imgoptions <font color=black>:</b><font color=black> to see all options with img, mostly fun based</f>");
- sys.sendHtmlMessage(src, "<hr>");
- return; }
- ,
- tourcommands: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=gold><timestamp/><b>*** <font color=black>Tour Commands <font color=gold>***</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/join <font color=black></b> : <font color=black>to join the tour</f>.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/leave <font color=black></b> : <font color=black>to leave the tour</f>.");
- if (sys.auth(src) < 1) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b> <font color=black>Sorry but to the see other commands you need auth.</f>.");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/settier <font color=red>Tier<font color=black></b> : <font color=black>to send a the message what the tier is</f>.");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Tier<font color=black> is any message, if you want a falid tour put a tier that exists.</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/setpeople <font color=red>People<font color=black></b> : <font color=black>to send the message that shows how many people may join the tour.");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> People<font color=black> is any number of people, for a falid tour put numbers.</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/tour <font color=black></b> : <font color=black>to show that a tour is about to start.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/round <font color=red>Number<font color=black></b> : <font color=black>to show the current round.");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Number<font color=black> is any number</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/round<font color=red>1/2/3/4/5</b><font color=black>: to show the current round</f>");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> 1/2/3/4/5<font color=black> is the current round, must be placed like /round1 to work and this only works for numbers 1 to 5.</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/joinon <font color=black></b> : <font color=black>to start the signups</f>.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/joinoff <font color=black></b> : <font color=black>to end the signups</f>.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/massdq <font color=black></b> : <font color=black>to DQ all people in the tour.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/endtour <font color=black></b> : <font color=black>to end the current tour.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/push <font color=red>Person<font color=black></b> : <font color=black>to put someone in the tour.");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Person<font color=black> is any online player.</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/dq <font color=red>Person<font color=black></b> : <font color=black>to DQ someone from the tour.");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Person<font color=black> is any online player.</f>");
- if (sys.auth(src) < 3) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b> <font color=black>Sorry but to the see other commands you need higher auth.</f>.");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/<font color=blue>AuthName<font color=red> Person</f></b>: <font color=black>give someone tour auth.");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=blue> TourAuthName</f><font color=black> is any tourauthname, <font color=red>Person<font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/tourauthnames</f></b>: <font color=black>view authnames for the /TourAuthName.");
- sys.sendHtmlMessage(src, "<hr>");
- return; }
- ,
- join : function () {
- sys.sendHtmlAll("<font color=orange><timestamp/><b>~~Bot~~:</font></b> </b>" + sys.name(src) + "</b> has joined the tour</font></b>!");
- return; }
- ,
- leave : function () {
- sys.sendHtmlAll("<font color=orange><timestamp/><b>~~Bot~~:</font></b> </b>" + sys.name(src) + "</b> has left the tour</font></b>!");
- return; }
- ,
- dq : function () {
- if (sys.auth(src) < 1) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b> <font color=black>Sorry but to use this command you need auth.</f>.");
- return;
- }
- if (tar == undefined) {
- return;
- }
- sys.sendHtmlAll("<font color=orange><timestamp/><b>~~Bot~~:</font></b> </b>" + commandData + "</b> has been DQed by " + sys.name(src) + "</font></b>!");
- sys.sendHtmlMessage(tar, "<font color=orange><timestamp/><b>~~Bot~~:</font></b> You have been DQed from the tour by " + sys.name(src) + "</font></b>!");
- return; }
- ,
- push : function () {
- if (sys.auth(src) < 1) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b> <font color=black>Sorry but to use the command you need auth.</f>.");
- return;
- }
- if (tar == undefined) {
- return;
- }
- sys.sendHtmlAll("<font color=orange><timestamp/><b>~~Bot~~:</font></b> </b>" + commandData + "</b> has been pushed in the tour by " + sys.name(src) + "</font></b>!");
- sys.sendHtmlMessage(tar, "<font color=orange><timestamp/><b>~~Bot~~:</font></b> You have been pushed in the tour by " + sys.name(src) + "</font></b>!");
- return; }
- ,
- massdq : function () {
- if (sys.auth(src) < 1) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b> <font color=black>Sorry but to use this command you need auth.</f>.");
- return;
- }
- sys.sendHtmlAll("<font color=orange><timestamp/><b>~~Bot~~:</font></b> </b>All people who joined have been DQed by" + sys.name(src) + "</font></b>!");
- return; }
- ,
- sendmessage : function () {
- sys.sendMessage(src, commandData); }
- ,
- sendhtmlmessage : function () {
- sys.sendHtmlMessage(src, commandData); }
- ,
- sendall : function () {
- sys.sendAll(commandData); }
- ,
- sendhtmlall : function () {
- sys.sendHtmlAll(commandData); }
- ,
- credits:function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<timestamp/><b><font color=skyblue><font size=3>Max for making the basic of these scripts!");
- sys.sendHtmlMessage(src, "<timestamp/><b><font color=red><font size=3>TheUnknownOne for adding commands and the tour script also for the editing!");
- sys.sendHtmlMessage(src, "<timestamp/><b><font color=darkblue><font size=3>Arceus for the catch command!");
- sys.sendHtmlMessage(src, "<timestamp/><b><font color=green><font size=3>Intel_iX for the editing and speeding the scripts up!");
- sys.sendHtmlMessage(src, "<timestamp/><b><font color=blue><font size=3>Ian for the clearchat command and the MOTD!");
- sys.sendHtmlMessage(src, "<timestamp/><b><font color=black><font size=3>If you want these scripts ask TheUnknownOne or Email <TheUnknownOne25@gmail.com>");
- sys.sendHtmlMessage(src, "<hr>");
- return; }
- ,
- torture : function () {
- if (tar == undefined) {
- sys.sendMessage(src, "~~Bot~~: You fail. That person is either not on or does not exist");
- return;
- }
- var Links=new Array();
- Links[1]="~~Bot~~: " + commandData + " has died from a falling meteorite by " + sys.name(src) + "!";
- Links[2]="~~Bot~~: " + commandData + " has been picked up and chucked down a hole by " + sys.name(src) + ".";
- Links[3]="~~Bot~~: " + commandData + " has been told to go to his room and die of bordum by " + sys.name(src) + ".";
- Links[4]="~~Bot~~: " + commandData + " had a heart attack and fell of the Grand Canyon by " + sys.name(src) + ".";
- Links[5]="~~Bot~~: " + commandData + " got hit by a car and died in the hospital by " + sys.name(src) + ".";
- Links[6]="~~Bot~~: " + commandData + " was made to smell spygirl's underwhere by " + sys.name(src) + ".";
- var i = Math.floor(6*Math.random())
- sys.sendAll(Links[i]);
- return; }
- ,
- 'catch' : function () {
- var num=Math.floor(650*Math.random());
- var pokemon=sys.pokemon(num);
- var nature=Math.floor(25*Math.random());
- var nature=sys.nature(nature);
- var shiny=Math.floor(8192*Math.random());
- var hpiv=Math.floor(32*Math.random());
- var spaiv=Math.floor(32*Math.random());
- var atkiv=Math.floor(32*Math.random());
- var defiv=Math.floor(32*Math.random());
- var spdiv=Math.floor(32*Math.random());
- var speiv=Math.floor(32*Math.random());
- if (shiny!=8191)
- {
- sys.sendAll("~~CaptureBot~~: " + sys.name(src) + " has caught a " +pokemon + " with a " + nature + " nature!");
- sys.sendAll("~~CaptureBot~~: " + pokemon + " has the following IVs:");
- sys.sendAll("~~CaptureBot~~: HP: " + hpiv + " Atk: " + atkiv + " Def: " + defiv + " SpA: " + spaiv + " SpD: " + spdiv + " Spe: " + speiv + ".");
- }
- if (shiny==8191)
- {
- sys.sendAll("~~CaptureBot~~: " + sys.name(src) + " has caught a shiny " + pokemon + " with a " + nature + " nature!");
- sys.sendAll("~~CaptureBot~~: " + pokemon + " has the following IVs:");
- sys.sendAll("~~CaptureBot~~: HP: " + hpiv + " Atk: " + atkiv + " Def: " + defiv + " SpA: " + spaiv + " SpD: " + spdiv + " Spe: " + speiv + ".");
- sys.sendAll("~~CaptureBot~~: This is a rare event");
- }
- }
- ,
- rules : function () {
- sys.sendHtmlMessage(src, "<br>");
- sys.sendHtmlMessage(src, "<font color=red>*** <font color=black><b>Server Rules</b> <font color=black>***</f></b>");
- sys.sendHtmlMessage(src, "<b><font color=red>Rule #1<font color=black> - Do Not Abuse CAPS:</f></b>");
- sys.sendHtmlMessage(src, "- <b>The occasional word in CAPS is acceptable, however repeated use is not.</b>");
- sys.sendHtmlMessage(src, "<b><font color=red>Rule #2 - No Flooding the Chat:</f></b>");
- sys.sendHtmlMessage(src, "- <b>Please do not post a large amount of short messages when you can easily post one or two long messages.</f></b>");
- sys.sendHtmlMessage(src, "<b><font color=red>Rule #3 - Do not Challenge Spam:</f></b>");
- sys.sendHtmlMessage(src, "- <b>If a person refuses your challenge, this means they do not want to battle you. Find someone else to battle with.</f></b>");
- sys.sendHtmlMessage(src, "<b><font color=red>Rule #4 - Don't ask for battles in the main chat:</f></b>");
- sys.sendHtmlMessage(src, "- <b>There is a 'Find Battle' tab that you can use to find a battle immediately. If after a while you cannot find a match, then you can ask for one in the chat.</f></b>");
- sys.sendHtmlMessage(src, "<b><font color=red>Rule #5 - No Trolling/Flaming/Insulting of Any kind:</f></b>");
- sys.sendHtmlMessage(src, "- <b>Behaving stupidly and excessive vulgarity will not be tolerated</f></b>.");
- sys.sendHtmlMessage(src, "<b><font color=red>Rule #6 - Please only speak English:</f></b>");
- sys.sendHtmlMessage(src, "- <b>Most people speak a different language, which is ok. But please speak english</f></b>.");
- sys.sendHtmlMessage(src, "<b><font color=red>Rule #7 - No Advertising:");
- sys.sendHtmlMessage(src, "- <b>There will be absolutely no advertising on the server</f></b>.");
- sys.sendHtmlMessage(src, "<b><font color=red>Rule #8 - No Obscene or Pornographic Content Allowed:</f></b>");
- sys.sendHtmlMessage(src, "- <b>This includes links, texts, images, and any other kind of media. This will result in a instant ban.</f></b>");
- sys.sendHtmlMessage(src, "<b><font color=red>Rule #9 - Do not ask for Auth:</f></b>");
- sys.sendHtmlMessage(src," - <b>Authority is given upon merit. By asking you have pretty much eliminated your chances at becoming an Auth in the future.</f></b>");
- sys.sendHtmlMessage(src,"<b><font color=red>Rule #10 - Do not Insult Auth:</f></b>");
- sys.sendHtmlMessage(src, "- <b>Insulting Auth will result in immediate punishment.</f></b>");
- sys.sendHtmlMessage(src, "<br>");
- if (sys.auth(src) < 1) {
- return;
- }
- sys.sendHtmlMessage(src, "<br>");
- sys.sendHtmlMessage(src, "<font color=black>*** <font color=blue><b>Auth Rules</b> <font color=black>***</f></b>");
- sys.sendHtmlMessage(src, "<b><font color=red>Rule #1 - Behave yourself, act appropriately:");
- sys.sendHtmlMessage(src, "- <b>This is includes flaming, insulting, trolling of ANY KIND");
- sys.sendHtmlMessage(src,"<b><font color=red>Rule # 2 - Do not advertize:</f></b>");
- sys.sendHtmlMessage(src,"- <b>Do not advertize any other server or pages. Youtube or game, music pages are okay, but an excesive advertizing of them, could cause problems.</f></b>");
- sys.sendHtmlMessage(src,"<b><font color=red>Rule #3 - No Obscene or Pornographic Content Allowed:");
- sys.sendHtmlMessage(src,"- <b>This includes links, texts, images, and any other kind of obscene media. This will result in a instant ban.</f></b>");
- sys.sendHtmlMessage(src,"<b><font color=red>Rule #4 - Do not ask for Auth:</f></b>");
- sys.sendHtmlMessage(src,"- <b>Authority is given upon merit. By asking you have pretty much eliminated your chances at becoming an Auth in the future.</f></b>");
- sys.sendHtmlMessage(src, "<b><font color=red>Rule #5 - Do not Challenge Spam:</f></b>");
- sys.sendHtmlMessage(src, "- <b>If a person refuses your challenge, this means they do not want to battle you. Find someone else to battle with.</f></b>");
- sys.sendHtmlMessage(src, "<br>");
- }
- ,
- auth : function () {
- var authlist = sys.dbAuths().sort()
- sys.sendMessage(src, "");
- if(commandData == "owners") {
- sys.sendMessage(src, "*** Owners ***")
- for(var x in authlist) {
- if(sys.dbAuth(authlist[x]) == 3) {
- if(sys.id(authlist[x]) == undefined) {
- sys.sendMessage(src, authlist[x] + " (Offline)")
- }
- if(sys.id(authlist[x]) !=undefined) {
- sys.sendHtmlMessage(src, '<timestamp/><font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
- }
- }
- }
- sys.sendMessage(src, "");
- }
- if(commandData == "admins" || commandData == "Administrators") {
- sys.sendMessage(src, "*** Administrators ***")
- for(var x in authlist) {
- if(sys.dbAuth(authlist[x]) == 2) {
- if(sys.id(authlist[x]) == undefined) {
- sys.sendMessage(src, authlist[x] + " (Offline)")
- }
- if(sys.id(authlist[x]) !=undefined) {
- sys.sendHtmlMessage(src, '<timestamp/><font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
- }
- }
- }
- sys.sendMessage(src, "");
- }
- if(commandData == "mods" || commandData == "Moderators") {
- sys.sendMessage(src, "*** Moderators ***")
- for(var x in authlist) {
- if(sys.dbAuth(authlist[x]) == 1) {
- if(sys.id(authlist[x]) == undefined) {
- sys.sendMessage(src, authlist[x] + " (Offline)")
- }
- if(sys.id(authlist[x]) !=undefined) {
- sys.sendHtmlMessage(src, '<timestamp/><font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
- }
- }
- }
- sys.sendMessage(src, "");
- }
- if(commandData != "moderators" && commandData != "mods" &&commandData != "administrators" && commandData != "admins" && commandData != "owners") {
- sys.sendMessage(src, "*** Owners ***")
- for (var x in authlist) {
- if (sys.dbAuth(authlist[x]) == 3) {
- if (sys.id(authlist[x]) == undefined) {
- sys.sendMessage(src, authlist[x]+ " (Offline)")
- }
- if (sys.id(authlist[x]) != undefined) {
- sys.sendHtmlMessage(src,'<timestamp/><font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
- }
- }
- }
- sys.sendMessage(src, "");
- sys.sendMessage(src, "*** Administrators ***")
- for( var x in authlist) {
- if (sys.dbAuth(authlist[x]) == 2) {
- if (sys.id(authlist[x]) == undefined) {
- sys.sendMessage(src, authlist[x] + " (Offline)")
- }
- if (sys.id(authlist[x]) != undefined) {
- sys.sendHtmlMessage(src, '<timestamp/><font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
- }
- }
- }
- sys.sendMessage(src, "");
- sys.sendMessage(src, "*** Moderators ***")
- for(x in authlist) {
- if(sys.dbAuth(authlist[x]) == 1) {
- if(sys.id(authlist[x]) == undefined) {
- sys.sendMessage(src, authlist[x]+ " (Offline)")
- }
- if(sys.id(authlist[x]) != undefined) {
- sys.sendHtmlMessage(src,'<timestamp/><font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
- }
- }
- }
- }
- return;
- }
- ,
- players: function () {
- sys.sendMessage(src, "+CountBot: There are " + sys.numPlayers() +" players online.");
- return;
- }
- ,
- viewjournal : function (){
- sys.sendHtmlMessage(src, "");
- sys.sendHtmlMessage(src, '<timestamp/> <font color="red">*** The Guest Book ***</font>');
- sys.sendHtmlMessage(src, "");
- var get = sys.getFileContent("gb").split("*");
- for(x in get){
- sys.sendHtmlMessage(src,get[x]);
- }
- return; }
- ,
- signjournal : function () {
- if (commandData == undefined) {
- var get = sys.getFileContent("gb");
- sys.writeToFile("gb",get + sys.name(src) + "*");
- sys.sendAll(sys.name(src) + " " + "signed the guest book!");
- return;
- }
- var qu = commandData.match(/<(\w+)[^>]*>/g);
- if (qu) {
- for (var x in qu) {
- commandData+= qu[x].replace(/<(\w+)[^>]*>/g,'</$1>'); }
- }
- if (message.search(/[\u202E\u202D]/) != -1) {
- return; }
- var get = sys.getFileContent("gb");
- sys.writeToFile("gb",get + sys.name(src) + " - " + commandData +"*");
- sys.sendAll(sys.name(src) + " " + "signed the guest book!");
- return; }
- });
- var modCommands = ({
- modcommands: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>*** <font color=black>Mod Commands <font color=orange>***");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/imp <font color=red>Person</f></b> : <font color=black>to impersonate someone");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is either an online player or any name.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/impOff</f></b> : <font color=black>to stop impersonating.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/kick <font color=red>Person</f></b> :<font color=black> to kick someone");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/<font color=blue>Mute/Unmute <font color=red>Person</f></b> : <font color=black>to Mute/Unmute someone.");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=blue>Mute/Unmute</f><font color=black> is to Mute(shut someone up) or Unmute(to allow that person to talk again),<font color=red> Person<font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/changemotd <font color=red>Message</f></b> : <font color=black>to change MOTD.");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Message</f><font color=black> is any message for people to see if they log on, HTML Allowed.");
- sys.sendHtmlMessage(src, "<hr>");
- return; }
- ,
- sburn : function () {
- if (tar == undefined) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b></font> Well you fail, either you didnt type the persons name right or that person isnt on");
- return;
- }
- sys.sendHtmlAll("<timestamp/><img src='themes/classic/status/battle_status4.png'><b> " + sys.name(tar) + " has been burned in <font color=red>hot lava</u></font> <img src='themes/classic/status/battle_status4.png'></b>");
- return;
- }
- ,
- spoison : function () {
- if (tar == undefined) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b></font> Well you fail, either you didnt type the persons name right or that person isnt on");
- return;
- }
- sys.sendHtmlAll("<timestamp/><img src='themes/classic/status/battle_status5.png'><b> " + sys.name(tar) + " has been poisoned after <font color=purple>drinking a poisoned drink</u></font> <img src='themes/classic/status/battle_status5.png'></b>");
- return;
- }
- ,
- sthunder : function () {
- if (tar == undefined) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b></font> Well you fail, either you didnt type the persons name right or that person isnt on");
- return;
- }
- sys.sendHtmlAll("<timestamp/><img src='themes/classic/status/battle_status1.png'><b> " + sys.name(tar) + " has been <font color=gold>hitted by thunder</u></font> <img src='themes/classic/status/battle_status1.png'></b>");
- return;
- }
- ,
- ssleep : function () {
- if (tar == undefined) {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b></font> Well you fail, either you didnt type the persons name right or that person isnt on");
- return;
- }
- sys.sendHtmlAll("<timestamp/><img src='themes/classic/status/battle_status2.png'><b> " + sys.name(tar) + " has been <font color=gray> put to sleep</u></font> <img src='themes/classic/status/battle_status2.png'></b>");
- return;
- }
- ,
- imp: function () {
- impersonation[src] = commandData;
- sys.sendMessage(src, "+Bot: Now you are " + impersonation[src] +"!");
- return;
- }
- ,
- changemotd: function () {
- Topic = commandData;
- sys.sendHtmlAll("<font color=red>+Bot: The MOTD has been changed.");
- }
- ,
- joinon: function () {
- joinoff[src]=false
- sys.sendHtmlAll("<font color=orange><b><font size=3>~~Bot~~:</b></font> The signups have been started by " + sys.name(src) + ", type <b>/join</b> to join the tour!</f>");
- return;
- }
- ,
- joinoff: function () {
- joinoff[src]=true
- sys.sendHtmlAll("<font color=orange><b><font size=3>~~Bot~~:</b></font> The signups have been ended by " + sys.name(src) + ".</f>");
- return;
- }
- ,
- endtour: function () {
- sys.sendHtmlAll("<font color=orange><b><font size=3>~~Bot~~:</b></font> The Tour has been ended by " + sys.name(src) + ".</f>");
- return;
- }
- ,
- tour: function () {
- sys.sendHtmlAll("<hr>");
- sys.sendHtmlAll("<timestamp/><font color=red><b>*** TOURNAMENT ***</f></b></font>");
- sys.sendHtmlAll("<timestamp/><font color=blue><b>*** The tier will be decided when you see the message</f></b></font>");
- sys.sendHtmlMessage(src,"<timestamp/><font color=orange><b>~~Bot~~:</f></b><font color=black> Type /settier to set the tier</f>");
- sys.sendHtmlAll("<timestamp/><font color=blue><b>*** The amount of people will be decided when you see the message</f></b></font>");
- sys.sendHtmlMessage(src, "<timestamp/><font color=orange><b>~~Bot~~:</f></b><font color=black> Type /setpeople to set the amount of players");
- sys.sendHtmlAll("<timestamp/><font color=orange><b>~~Bot~~:</f></b><font color=black> Type /join to join the tour!");
- sys.sendHtmlAll("<timestamp/><font color=orange><b>~~Bot~~:</f></b><font color=black> Type /leave to leave the tour!");
- sys.sendHtmlAll("<hr>");
- return;
- }
- ,
- settier : function () {
- sys.sendHtmlAll("<b><font size=5><font color=red>A(n) " + commandData + " Tour has been started by " + sys.name(src) + "!</font></b></f>");
- return;
- }
- ,
- setpeople : function () {
- sys.sendHtmlAll("<b><font size=5><font color=red>The Number of players allowed for the tour are: " + commandData + "!</font></f></b>");
- return;
- }
- ,
- round1 : function () {
- sys.sendHtmlAll("<b><font size=5><font color=red>Round 1 has been started by " + sys.name(src) + " !</font></f></b>");
- return;
- }
- ,
- round2 : function () {
- sys.sendHtmlAll("<b><font size=5><font color=red>Round 2 has been started by " + sys.name(src) + " !</font></f></b>");
- return;
- }
- ,
- round3: function () {
- sys.sendHtmlAll("<b><font size=5><font color=red>Round 3 has been started by " + sys.name(src) + " !</font></f></b>");
- return;
- }
- ,
- round4: function () {
- sys.sendHtmlAll("<b><font size=5><font color=red>Round 4 has been started by " + sys.name(src) + " !</font></f></b>");
- return;
- }
- ,
- round5: function () {
- sys.sendHtmlAll("<b><font size=5><font color=red>Round 5 has been started by " + sys.name(src) + " !</font></f></b>");
- return;
- }
- ,
- round: function () {
- sys.sendHtmlAll("<b><font size=5><font color=red>Round " + commandData + " has been started by " + sys.name(src) + " !</font></f></b>");
- return;
- }
- ,
- impoff : function () {
- delete impersonation[src];
- sys.sendMessage(src, "+Bot: Now you are yourself!");
- return;
- }
- ,
- kick : function () {
- if (tar == undefined) {
- return;
- }
- sys.sendHtmlAll("<font color=red><b>+KickBot:</b> " + commandData + " Was kicked for something by " +sys.name(src) + "!");
- sys.kick(tar);
- return;
- }
- ,
- mute: function () {
- if (tar == undefined) {
- return;
- }
- if (sys.auth(tar) >= sys.auth(src)) {
- sys.sendMessage("+Bot: you dont have sufficient auth to mute " + commandData + ".");
- return;
- }
- sys.sendHtmlAll("<font color=blue><b>+MuteBot:</b> " + commandData + " Was muted by " +sys.name(src) + "!");
- muted[tar] = true;
- return
- }
- ,
- unmute:function () {
- if (tar == undefined) {
- return;
- }
- sys.sendHtmlAll("<font color=green><b>+MuteBot:</b> " + commandData + " Was unmuted by " +sys.name(src) + "!");
- muted[tar] = false;
- return;
- }
- })
- var adminCommands = ({
- admincommands : function () {
- if (sys.auth(src) < 2) {
- sys.sendMessage(src, "+CommandBot: Your are not of the right authority to view these commands.");
- return;
- }
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=red><timestamp/><b>*** <font color=black>Admin Commands <font color=red>***</b></f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/reset</f></b>: <font color=black>to reset the server variables");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/masskick</f></b>: <font color=black>to clean up the server");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/setPA <font color=red>Paname</f></b>: <font color=black>to add a new pa");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Paname</f><font color=black> is a PA to put in the scripts, be carefull as this can make an error.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/clearjournal</f></b>: <font color=black>to clear the journal");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/<font color=blue>Ban/Unban</f><font color=red> Person</b>: <font color=black>to ban/unban someone");
- sys.sendHtmlMessage(src, "<font color=blue>°<b>Note: <font color=black>To <font color=blue>Ban<font color=black>(keep there IP from entering the server) and <font color=blue>Unban<font color=black>(let a banned person get in the server again),<font color=red> Person</f><font color=black> is any online or offline player in the members database.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/clearchat</f></b>: <font color=black>to clear the chat");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/<font color=blue>forcerule</f><font color=red> Rule</b>: <font color=black>to show a rule to everyone");
- sys.sendHtmlMessage(src, "<font color=blue>°<b>Note: <Font color=red>Rule<font color=black> is rule 1-10.");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- ,
- forcerule: function () {
- if (commandData == undefined) {
- sys.sendMessage(src, "~~Bot~~:Not a valid rule");
- return;
- }
- if (commandData == 1) {
- sys.sendAll("Rule #1 - Do Not Abuse CAPS:");
- sys.sendAll("- The occasional word in CAPS is acceptable, however repeated use is not.");
- return;
- }
- if (commandData == 2) {
- sys.sendAll("Rule #2 - No Flooding the Chat:");
- sys.sendAll("- Please do not post a large amount of short messages when you can easily post one or two long messages.");
- return;
- }
- if (commandData == 3) {
- sys.sendAll("Rule #3 - Do not Challenge Spam:");
- sys.sendAll("- If a person refuses your challenge, this means they do not want to battle you. Find someone else to battle with.");
- return;
- }
- if (commandData == 4) {
- sys.sendAll("Rule #4 - Don't ask for battles in the main chat:");
- sys.sendAll("- There is a 'Find Battle' tab that you can use to find a battle immediately. If after a while you cannot find a match, then you can ask for one in the chat.");
- return;
- }
- if (commandData == 5) {
- sys.sendAll("Rule #5 - No Trolling/Flaming/Insulting of Any kind:");
- sys.sendAll("- Behaving stupidly and excessive vulgarity will not be tolerated.");
- return;
- }
- if (commandData == 6) {
- sys.sendAll("Rule #6 - Please only speak English:");
- sys.sendAll("- Most people speak a different language, which is ok. But please speak english.");
- return;
- }
- if (commandData == 7) {
- sys.sendAll("Rule #7 - No Advertising:");
- sys.sendAll("- There will be absolutely no advertising on the server.");
- return;
- }
- if (commandData == 8) {
- sys.sendAll("Rule #8 - No Obscene or Pornographic Content Allowed:");
- sys.sendAll("- This includes links, texts, images, and any other kind of media. This will result in a instant ban.");
- return;
- }
- if (commandData == 9) {
- sys.sendAll("Rule #9 - Do not ask for Auth:");
- sys.sendAll(" - Authority is given upon merit. By asking you have pretty much eliminated your chances at becoming an Auth in the future.");
- return;
- }
- if (commandData == 10) {
- sys.sendAll("Rule #10 - Do not Insult Auth:");
- sys.sendAll("- Insulting Auth will result in immediate punishment.");}
- return;
- }
- ,
- reset : function () {
- this.serverStartUp();
- sys.sendAll("~~Server~~: The server script variables were reset.");
- return;
- }
- ,
- changeannouncement: function () {
- if (sys.auth(src) < 3) {
- return;
- }
- sys.setAnnouncement(commandData);}
- ,
- resetannouncement: function () {
- if (sys.auth(src) < 3) {
- return;
- }
- sys.setAnnouncement("Announcement reset by<font color=fuchsia> " + sys.name(src));}
- ,
- changemotd:function () {
- Topic = commandData;
- sys.sendAll("The MOTD has been changed.");}
- ,
- ban:function () {
- if(sys.dbIp(commandData) == undefined) {
- sendChanMessage(src, "+Bot: No player exists by this name!");
- return;
- }
- if (sys.maxAuth(sys.ip(tar))>=sys.auth(src)) {
- sendChanMessage(src, "+Bot: Can't do that to higher auth!");
- return;
- }
- var ip = sys.dbIp(commandData);
- var alias=sys.aliases(ip)
- var y=0;
- var z;
- for(var x in alias) {
- z = sys.dbAuth(alias[x])
- if (z > y) {
- y=z
- }
- }
- if(y>=sys.auth(src)) {
- sendChanMessage(src, "+Bot: Can't do that to higher auth!");
- return;
- }
- var banlist=sys.banList()
- for(a in banlist) {
- if(sys.dbIp(commandData) == sys.dbIp(banlist[a])) {
- sendChanMessage(src, "+Bot: He/she's already banned!");
- return;
- }
- }
- sys.sendHtmlAll('<b><font color=red>' + commandData + ' was banned by ' + sys.name(src) + '!</font></b>');
- if(tar != undefined) {
- sys.kick(tar)
- }
- sys.ban(commandData)
- sys.appendToFile('bans.txt', sys.name(src) + ' banned ' +commandData + "n")
- return;
- }
- ,
- unban: function () {
- if(sys.dbIp(commandData) == undefined) {
- sendChanMessage(src, "+Bot: No player exists by this name!");
- return;
- }
- var banlist=sys.banList()
- for(a in banlist) {
- if(sys.dbIp(commandData) == sys.dbIp(banlist[a])) {
- sys.unban(commandData)
- sys.sendHtmlAll('<b><font color=red>' + commandData + ' was unbanned by ' + sys.name(src) + '!</font></b>');
- sys.appendToFile('bans.txt', sys.name(src) + ' unbanned ' +commandData + "n")
- return;
- }
- }
- sendChanMessage(src, "+Bot: He/she's not banned!");
- return;
- }
- ,
- silentkick : function () {
- if (sys.auth(src) < 3) {
- return;
- }
- if (tar == undefined) {
- return;
- }
- sys.kick(tar);
- return;
- }
- ,
- clearchat:function () {
- var c;
- for (c=0;c<2999;c++) {
- sys.sendAll("");
- }
- sys.clearChat();
- sys.sendAll(sys.name(src) + " Has Cleared the chat!");
- return;
- }
- ,
- setpa:function () {
- sys.setPA(commandData);
- sys.sendMessage(src, "Bot: -" + commandData + "- was set!");
- return;
- }
- ,
- clearjournal:function () {
- var get = sys.getFileContent("gb");
- sys.deleteFile("gb");
- sys.sendAll("The guest book was cleared!");
- sys.writeToFile("gb","This is the guest book. Comments are listed below:<br><br>");
- return;
- }
- ,
- masskick:function () {
- for (var i = 1; i < 200 && sys.numPlayers() > 0; i++) {
- if (sys.loggedIn(i)) {
- sys.kick(i);
- }
- }
- return;
- }
- });
- var ownerCommands = ({
- ownercommands : function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=blue><timestamp/><b>*** <font color=black>Owner Commands <font color=blue>***</b></f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/resetannouncement</f></b>: <font color=black>to reset the announcement(clear it)");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/changeannouncement <font color=red>Message</f></b>: <font color=black>change announcement");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Message</f><font color=black> is any message for people to see if they log on , HTML Allowed.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/silentkick</f><font color=red> Person</b></f>: <font color=black>to silently kick someone");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/<font color=blue>SilentMute/SilentUnmute <font color=red>Person</f></b> : <font color=black>to silenly Mute/Unmute someone.");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=blue>SilentMute</f><font color=black> is to Silently(do it without people seeing it)Mute(shut someone up)or Unmute(to allow that person to talk again),<font color=red> Person<font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/<font color=green>SilentBan/SilentUnban</f></b>: <font color=black>to silently ban someone");
- sys.sendHtmlMessage(src, "<font color=blue>°<b>Note: <font color=black>To <font color=blue>SilentBan<font color=black>(do it without people seeing it)(keep there IP from entering the server) and <font color=blue>SilentUnban<font color=black>(do it without people seeing it)(let a banned person get in the server again),<font color=red> Person</f><font color=black> is any online or offline player in the members database.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/<font color=indigo>S<font color=blue>AuthName<font color=red> Person</f></b>: <font color=black>give someone auth."); // you use the 's' if you want to do it SILENTLY //
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=indigo>S<font color=black> is optional, it can be used to silently give auth ,<font color=blue> AuthName</f><font color=black> is any authname, <font color=red>Person<font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/authnames</f></b>: <font color=black>view authnames for the /AuthName.");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- ,
- clearpass: function () {
- sys.clearPass(commandData);
- sys.sendHtmlMessage(src, "<timestamp/><font color=orange><b>~~Bot~~:</b></font> You cleared " + commandData + "'s password.<f>");
- sys.sendHtmlMessage(tar, "<timestamp/><font color=orange><b>~~Bot~~:</b></font> Your Password has been cleared by " + sys.name(src) + ".<f>");
- return;
- }
- ,
- alias: function () {
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</font></b> The aliases for the IP " + commandData + " are: " + sys.aliases(commandData) + ".");
- return;
- }
- ,
- authnames: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=purple><timestamp/> *** Auth Names ***</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/> 0 Auth = <b> User</f>"); // */user* //
- sys.sendHtmlMessage(src, "<font color=blue><timestamp/> 1 Auth = <b> Mod</f>"); // */mod* //
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/> 2 Auth = <b> Admin</f>"); // */admin*//
- sys.sendHtmlMessage(src, "<font color=red><timestamp/> 3 Auth = <b> Owner</f>"); // */owner* //
- sys.sendHtmlMessage(src, "<font color=cornflowerblue><timestamp/> 4 Auth = <b> Invisible</f>"); // */invisible* //
- sys.sendHtmlMessage(src, "<hr>");
- }
- ,
- tourauthnames: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=purple><timestamp/> *** Auth Names ***</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/> 0 TourAuth = <b> TourUser</f>"); // */touruser* //
- sys.sendHtmlMessage(src, "<font color=blue><timestamp/> 1 TourAuth = <b> TourMod</f>"); // */tourmod* //
- sys.sendHtmlMessage(src, "<font color=orange><timestamp/> 2 TourAuth = <b> TourAdmin</f>"); // */touradmin*//
- sys.sendHtmlMessage(src, "<font color=red><timestamp/> 3 TourAuth = <b> TourOwner</f>"); // */tourowner* //
- sys.sendHtmlMessage(src, "<hr>");
- }
- ,
- secretcommands : function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=black><timestamp/><b>*** <font color=black>Secret Commands <font color=black>***</b></f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/eval <font color=skyblue>String</f></b>: <font color=black>to use any js string");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=skyblue>String</f><font color=black> is any valid javascript string, doesnt save in the script, use this only if you know how to script.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/clearpass</f><font color=red> Person</b></f>: <font color=black>to clear someones password");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any player that has a pass and is in the members database.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/showteam</f><font color=red> Person</b></f>: <font color=black>to show someones team");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/alias</f><font color=orange> IP</b></f>: <font color=black>to show someones alieses on there IP");
- sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>IP</f><font color=black> is any registerd IP in the database.");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- ,
- silentmute: function () {
- if (tar == undefined) {
- return;
- }
- muted[tar] = true;
- return
- }
- ,
- touruser: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " has been given Tour-User by " + sys.name(src) + ".");
- return;
- }
- ,
- tourmod: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " has been given Tour-Mod by " + sys.name(src) + ".");
- return;
- }
- ,
- touradmin: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " has been given Tour-Admin by " + sys.name(src) + ".");
- return;
- }
- ,
- tourowner: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " has been given Tour-Owner by " + sys.name(src) + ".");
- return;
- }
- ,
- silentunmute: function () {
- if (tar == undefined) {
- return;
- }
- muted[tar] = false;
- return
- }
- ,
- showteam: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.sendMessage(src, "");
- for (var i = 0; i < 6; i+=1) {sys.sendMessage(src, sys.pokemon(sys.teamPoke(tar, i)) + " @ " + sys.item(sys.teamPokeItem(tar, i)));
- for (var j = 0; j < 4; j++) {sys.sendMessage(src, '- ' + sys.move(sys.teamPokeMove(tar, i, j)));}}
- sys.sendMessage(src, "");
- return;
- }
- ,
- user: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " has been usered by " + sys.name(src) + ".");
- sys.changeAuth(tar, 0);
- return;
- }
- ,
- mod: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " was been made a mod by " + sys.name(src) + ".");
- sys.changeAuth(tar, 1);
- return;
- }
- ,
- admin: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " was been made an admin by " + sys.name(src) + ".");
- sys.changeAuth(tar, 2);
- }
- ,
- owner: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " was made an owner by " + sys.name(src) + ".");
- sys.changeAuth(tar, 3);
- }
- ,
- invisible: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " was made an invisible auth by " + sys.name(src) + ".");
- sys.changeAuth(tar, 4);
- return;
- }
- ,
- suser: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.changeAuth(tar, 0);
- }
- ,
- smod: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.changeAuth(tar, 1);
- }
- ,
- sadmin: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.changeAuth(tar, 2);
- }
- ,
- sowner: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.changeAuth(tar, 3);
- return;
- }
- ,
- sinvisible: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.changeAuth(tar, 4);
- return;
- }
- ,
- eval: function () {
- sys.eval(commandData);
- return;
- }
- ,
- silentban:function () {
- if(sys.dbIp(commandData) == undefined) {
- sys.sendMessage(src, "+Bot: No player exists by this name!");
- return;
- }
- if (sys.maxAuth(sys.ip(tar))>=sys.auth(src)) {
- sys.sendMessage(src, "+Bot: Can't do that to higher auth!");
- return;
- }
- var ip = sys.dbIp(commandData);
- var alias=sys.aliases(ip)
- var y=0;
- var z;
- for(var x in alias) {
- z = sys.dbAuth(alias[x])
- if (z > y) {
- y=z
- }
- }
- if(y>=sys.auth(src)) {
- sys.sendMessage(src, "+Bot: Can't do that to higher auth!");
- return;
- }
- var banlist=sys.banList()
- for(a in banlist) {
- if(sys.dbIp(commandData) == sys.dbIp(banlist[a])) {
- sys.sendMessage(src, "+Bot: He/she's already banned!");
- return;
- }
- }
- if(tar != undefined) {
- sys.kick(tar)
- }
- sys.ban(commandData)
- sys.appendToFile('bans.txt', sys.name(src) + ' banned ' +commandData + "n")
- return;
- }
- ,
- silentunban: function () {
- if(sys.dbIp(commandData) == undefined) {
- sendChanMessage(src, "+Bot: No player exists by this name!");
- return;
- }
- var banlist=sys.banList()
- for(a in banlist) {
- if(sys.dbIp(commandData) == sys.dbIp(banlist[a])) {
- sys.unban(commandData)
- sys.appendToFile('bans.txt', sys.name(src) + ' unbanned ' +commandData + "n")
- return;
- }
- }
- sendChanMessage(src, "+Bot: He/she's not banned!");
- return;
- }
- ,
- });
- var getCommand = ({
- '0': function (name) {
- if (name in userCommands) {
- return userCommands[name]; }
- }
- ,
- '1': function (name) {
- if (name in modCommands) {
- return modCommands[name]; }
- else if (name in userCommands) {
- return userCommands[name]; }
- }
- ,
- '2' : function (name) {
- if (name in adminCommands) {
- return adminCommands[name]; }
- else if (name in modCommands) {
- return modCommands[name]; }
- else if (name in userCommands) {
- return userCommands[name]; }
- }
- ,
- '3' : function (name) {
- if (name in ownerCommands) {
- return ownerCommands[name]; }
- else if (name in adminCommands) {
- return adminCommands[name]; }
- else if (name in modCommands) {
- return modCommands[name]; }
- else if (name in userCommands) {
- return userCommands[name]; }
- }
- ,
- '4' : function (name) {
- if (name in ownerCommands) {
- return ownerCommands[name]; }
- else if (name in adminCommands) {
- return adminCommands[name]; }
- else if (name in modCommands) {
- return modCommands[name]; }
- else if (name in userCommands) {
- return userCommands[name]; }
- }
- });
- var cmd = getCommand[sys.auth(src)](command);
- if (!cmd) {
- sys.sendMessage(src, getCommand[3](command) ? "+Bot: You aren't allowed to use that command." : "+Bot: That command doesn't exist." );
- return; }
- cmd();
- return;
- }
- if (typeof impersonation[src] != 'undefined') {
- sys.stopEvent();
- sys.sendAll(impersonation[src] + ": " + message);
- return;
- }
- }
- ,
- beforeChallengeIssued : function (src, dest, clauses) {
- /* Challenge Cup Clause */
- if (clauses[7] == 1)
- return;
- if (clauseOn[dest] == true) {
- for (var i = 0; i < 6; i++) {
- if (hasBan(dest, sys.teamPoke(src,i))) {
- sys.sendMessage(src, "ClauseBot: Your opponent is afraid of " + sys.pokemon(sys.teamPoke(src,i)));
- sys.stopEvent();
- return;
- }
- }
- }
- if (clauseOn[src] == true) {
- for (var i = 0; i < 6; i++) {
- if (hasBan(src, sys.teamPoke(dest,i))) {
- sys.sendMessage(src, "ClauseBot: You are afraid of some pokemon of the opponent, so I won't let you challenge them.");
- sys.stopEvent();
- return;
- }
- }
- }
- /* Regular tier checks that can't be made using the built-in server tier system */
- if (sys.tier(src) == "LittleCup" && sys.tier(dest) == "LittleCup") {
- if (sys.hasTeamMove(src, sys.moveNum("SonicBoom")) ||sys.hasTeamMove(src, sys.moveNum("Dragon Rage"))) {
- sys.sendMessage(src, "+Bot: SonicBoom and Dragon Rage are banned in Little Cup!");
- sys.stopEvent();
- }
- if (sys.hasTeamMove(dest, sys.moveNum("SonicBoom")) ||sys.hasTeamMove(dest, sys.moveNum("Dragon Rage"))) {
- sys.sendMessage(src, "+Bot: Your opponent has banned moves SonicBoom or Dragon Rage in Little Cup tier!");
- sys.stopEvent();
- }
- if (sys.hasTeamItem(src, sys.itemNum("Berry Juice"))) {
- sys.sendMessage(src, "+Bot: Berry Juice is banned in Little Cup!");
- sys.stopEvent();
- }
- if (sys.hasTeamItem(dest, sys.itemNum("Berry Juice"))) {
- sys.sendMessage(src, "+Bot: Berry Juice is banned in Little Cup and your opponent has it!");
- sys.stopEvent();
- }
- }
- }
- ,
- beforeBattleMatchup : function(src,dest,clauses)
- {
- if (clauseOn[dest] == true) {
- for (var i = 0; i < 6; i++) {
- if (hasBan(dest, sys.teamPoke(src,i))) {
- sys.stopEvent();
- return;
- }
- }
- }
- if (clauseOn[src] == true) {
- for (var i = 0; i < 6; i++) {
- if (hasBan(src, sys.teamPoke(dest,i))) {
- sys.stopEvent();
- return;
- }
- }
- }
- /* Regular tier checks that can't be made using the built-in server tier system */
- if (sys.tier(src) == "LittleCup" && sys.tier(dest) == "LittleCup") {
- if (sys.hasTeamMove(src, sys.moveNum("SonicBoom")) ||sys.hasTeamMove(src, sys.moveNum("Dragon Rage"))) {
- sys.stopEvent();
- }
- if (sys.hasTeamMove(dest, sys.moveNum("SonicBoom")) ||sys.hasTeamMove(dest, sys.moveNum("Dragon Rage"))) {
- sys.stopEvent();
- }
- if (sys.hasTeamItem(src, sys.itemNum("Berry Juice"))) {
- sys.stopEvent();
- }
- if (sys.hasTeamItem(dest, sys.itemNum("Berry Juice"))) {
- sys.stopEvent();
- }
- }
- }
- ,
- beforeBattleStarted : function(src, dest) {
- /* If this is little cup, the levels are changed to be level 5 */
- if (sys.tier(src) == "LittleCup" && sys.tier(dest) == "LittleCup") {
- lilCupLevels[src] = [sys.teamPokeLevel(src, 0), sys.teamPokeLevel(src,1), sys.teamPokeLevel(src, 2), sys.teamPokeLevel(src, 3), sys.teamPokeLevel(src, 4),sys.teamPokeLevel(src, 5)];
- lilCupLevels[dest] = [sys.teamPokeLevel(dest, 0),sys.teamPokeLevel(dest, 1), sys.teamPokeLevel(dest, 2), sys.teamPokeLevel(dest, 3),sys.teamPokeLevel(dest, 4), sys.teamPokeLevel(dest, 5)];
- for (var i = 0; i < 6; i+=1) {
- if (sys.teamPokeLevel(src, i) > 5)
- sys.changePokeLevel(src, i, 5);
- if (sys.teamPokeLevel(dest, i) > 5)
- sys.changePokeLevel(dest, i, 5);
- }
- }
- }
- ,
- afterBattleEnded: function(src, dest) {
- /* If this is little cup, the levels are to be changed back! */
- if (sys.tier(src) == "LittleCup" && sys.tier(dest) == "LittleCup" && lilCupLevels[src]!= undefined && lilCupLevels[dest] != undefined) {
- for (var i = 0; i < 6; i+=1) {
- if (sys.teamPokeLevel(src, i) != lilCupLevels[src][i])
- sys.changePokeLevel(src, i,lilCupLevels[src][i]);
- if (sys.teamPokeLevel(dest, i) != lilCupLevels[dest][i])
- sys.changePokeLevel(dest, i,lilCupLevels[dest][i]);
- }
- }
- }
- ,
- beforeLogOut : function (src) {
- if (muted[src] == true) {
- sys.saveVal("muted*" + sys.ip(src), "true");
- } else {
- sys.removeVal("muted*" + sys.ip(src));
- }
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement