Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // *Give credit to Max if used, also to Intel_iX for some script edits! Also Ian for some little snippets! And, UnknownOne for the dynamic league, attack, and proulette! And most of all, Blade, for just being awesome.* //
- ({
- serverStartUp : function() {
- this.init();
- }
- ,
- initVal : function(key,val) { // Astruvis' Edits - Required edit to variable structure
- if (typeof server[key] == 'undefined') {
- server[key] = val; }
- return; }
- ,
- 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;
- if (typeof server == 'undefined') {
- server = []; }
- script.initVal('pollmode',0);
- script.initVal('pollstr','');
- script.initVal('pollvotes',[]);
- battlesStopped = false;
- channelUsers = [];
- channelTopics = [];
- sys.setPA("forceSameTier");
- sys.setPA("megaUser");
- megausers = sys.getVal("megausers");
- sys.setPA ("impersonation");
- sys.setPA ("muted");
- sys.setPA("caps");
- sys.setPA("timeCount");
- sys.setPA("floodCount");
- }
- ,
- afterNewMessage : function (message) {
- if (message == "Script Check: OK") {
- sys.sendHtmlAll("<timestamp/><font color=black><b>Script Check</f></b>:<font color=green> OK");
- this.init();
- }
- }
- ,
- afterLogIn : function(src) {
- /* Hyperbeem */
- if (sys.ip(src).substr(0, 6) == "67.166.") {
- sys.kick(src);
- return;
- }
- sys.sendHtmlMessage(src, "<font color=limegreen><timestamp/><b>CommandBot</b>:</f> <font color=black>Use /commands to see the commands!");
- sys.sendHtmlMessage(src, "<font color=limegreen><timestamp/><b>LeagueBot</b>:</f> <font color=black>Use /league to see the league list!");
- sys.sendHtmlMessage(src, "<font color=limegreen><timestamp/><b>LotteryBot</b>:</f> <font color=black>Use /lotteryinfo to get the info about the lottery.");
- var Result = sys.rand(1, 9);
- var Result2 = sys.rand(1, 9);
- var Result3 = sys.rand(1, 9);
- var Result4 = sys.rand(1, 9);
- sys.sendHtmlMessage(src, "<font color=red><timestamp/><b>Your Lottery Ticket</b>: <font color=black>" + Result + Result2 + Result3 + Result4 + ".");
- sys.sendMessage(src, "");
- sys.sendMessage(src, "");
- sys.sendHtmlAll("<font color= " + sys.getColor(src) + "><timestamp/><b> " + sys.name(src) + "</b><font color=black> has joined Unova League!");
- 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);
- }
- this.afterChangeTeam(src);
- }
- ,
- beforeChatMessage: function(src, message) {
- if (sys.auth(src) < 4 && muted[src] == true) {
- sys.stopEvent();
- sys.sendHtmlMessage(src, "<font color=black><timestamp/><b>C<font color=blue>h<font color=red>a<font color=blue>t<font color=green>o<font color=orange>t:</b><font color=black> You were muted. If you think this is a problem, please talk about this to a moderator.");
- 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.sendMessge(src, msg, chan); }
- var userCommands = ({
- "usercommands" : function () {
- sys.sendMessage(src, "");
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=blue><timestamp/><b>*** User Commands ***</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/die <font color=limegreen>action</b></f>: <font color=black>die in your own special way</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/help</b></f>: <font color=black> show all possible arguments.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/lotteryinfo</b></f>: <font color=black> show the info on the lottery.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/me <font color=blue>message</b></f>: <font color=black>to speak with *** before its name</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/proulette</b></f>: <font color=black>to get a random pokemon team</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/quiz</b></f>: <font color=black>to take the Unova League Quiz!</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/disrespected <font color=red>person</b></f>: <font color=black>if you think a mute was unfair.</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/catch</b></f>: <font color=black>to catch a pokemon. It can be shiny!</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/authlist</b></f>: <font color=black>to show the authlist</f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/rules</b></f>: <font color=black>to show the 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>/league</f></b>: <font color=black>view the league list.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/torture <font color=red>person</f></b>: <font color=black>to torture someone, its fun too! if your a mod, it kicks the person!");
- 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=blue>quote</b></f>: <font color=black>be apart of the wonderful journal!");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/vote <font color=purple>option#</f></b>: <font color=black>to vote for an option during a poll.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/sendAll <font color=blue>message</f></b>: <font color=black>to send a message to everyone.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/sendHtmlAll <font color=blue>message</f></b>: <font color=black>to send a message to everyone using HTML.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/print <font color=blue>message</f></b>: <font color=black>print a message on the server screen.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/attack <font color=red>person</f></b>: <font color=black>attack someone with a Pokemon Move.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/changename <font color=blue>message</f></b>: <font color=black>change your name, keep your auth level.");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- ,
- commands: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=blue><timestamp/><b>*** Commands ***");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/usercommands</f></b>: <font color=black>for users");
- if (sys.auth(src) < 1) {
- return;
- }
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/modcommands</f></b>: <font color=black>for moderators");
- if (sys.auth(src) < 2) {
- return;
- }
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/admincommands</f></b>: <font color=black>for administrators");
- if (sys.auth(src) < 3) {
- return;
- }
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/ownercommands</f></b>: <font color=black>for owners");
- if (sys.auth(src) < 4) {
- return;
- }
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/invisiblecommands</f></b>: <font color=black>for invisible auth");
- sys.sendHtmlMessage(src, "<hr>");
- return; }
- ,
- help: function () {
- sys.sendHtmlMessage(src,"<hr>");
- sys.sendHtmlMessage(src,"<font color=green><timestamp/><b> *** Arguments List ***");
- sys.sendHtmlMessage(src,"<font color=black><timestamp/>- <b><font color=blue>Message</b><font color=black> is any text");
- sys.sendHtmlMessage(src,"<font color=black><timestamp/>- <b><font color=red>Person</b><font color=black> is any person on the server or existing");
- sys.sendHtmlMessage(src,"<font color=black><timestamp/>- <b><font color=limegreen>Action</b><font color=black> is any text");
- sys.sendHtmlMessage(src,"<font color=black><timestamp/>- <b><font color=purple>Option#</b><font color=black> is any available option number in a poll");
- sys.sendHtmlMessage(src,"<font color=black><timestamp/>- <b><font color=red>End</b><font color=black> is to end something");
- sys.sendHtmlMessage(src,"<font color=black><timestamp/>- <b><font color=purple>Question</b><font color=black> is any text ending in ':'");
- sys.sendHtmlMessage(src,"<font color=black><timestamp/>- <b><font color=red>Option</b><font color=black> is any text showing more than once divided by a ' / '");
- sys.sendHtmlMessage(src,"<font color=black><timestamp/>- <b><font color=orange>Un</b><font color=black> is to undo something");
- sys.sendHtmlMessage(src,"<font color=black><timestamp/>- <b><font color=gold>Panane</b><font color=black> is any PA");
- sys.sendHtmlMessage(src,"<font color=black><timestamp/>- <b><font color=cyan>String</b><font color=black> is any script line");
- sys.sendHtmlMessage(src,"<font color=black><timestamp/>- <b><font color=purple>S</b><font color=black> is to do the action silently ");
- sys.sendHtmlMessage(src,"<font color=black><timestamp/>- <b><font color=blue>Number</b><font color=black> is any number, usually a certain limit.");
- sys.sendHtmlMessage(src,"<hr>");
- return;
- }
- ,
- lotteryinfo: function () {
- sys.sendHtmlMessage(src, "<hr><font color=back><b>Lottery</b><font size=3><br><font color=cornflowerblue><b> Type /lottery to join!<br> WINNING NUMBERS: </b><font color=black>7463 <br> <font size=3><b><font color=red><b>1,000$: </b><font color=black>1 matching number <br> <font color=red><b>10,000$: </b><font color=black>2 matching numbers <br><font color=red><b>100,000$: </b><font color=black>3 matching numbers <br> <font color=red><b>1,000,000$: </b><font color=black>all matching numbers <hr>");}
- ,
- changename: function () {
- sys.changeName(src, commandData);
- sys.sendMessage(src, "~~Bot~~: Your name is now " + commandData);
- return;
- }
- ,
- vote: function () {
- if (!server.pollmode) {
- sys.sendMessage(src,'~~Bot~~: Error, no poll open.');
- return; }
- if (isNaN(mcmd[0]*1)) {
- sys.sendMessage(src,'~~Bot~~: Error, please use /vote option (where option is a number.)');
- return; }
- server.pollvotes[sys.ip(src)] = mcmd[0]*1;
- sys.sendAll('~~Bot~~: ' + sys.name(src) + ' has voted!');
- return; }
- ,
- print: function () {
- sys.sendAll("~~Bot~~: " + sys.name(src) + " has printed " + commandData + " on the server screen!");
- print(commandData);
- return;
- }
- ,
- attack: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "~~Bot~~: You fail. That person is either not on or does not exist");
- return;
- }
- var attack=Math.floor(401*Math.random());
- var attack=sys.move(attack);
- sys.sendAll("~~Bot~~: " + sys.name(src) + " has used " + attack + " on " + sys.name(tar) + "!");
- return;
- }
- ,
- undefined: function () {
- sys.sendMessage(src, "~~Bot~~: The command " + command + " doesnt exist");
- return;
- }
- ,
- disrespected: function () { // users
- if (tar == undefined) {
- sys.sendMessage(src, "~~Bot~~: That person doesnt exist!");
- return;
- }
- sys.sendMessage(src, "~~Bot~~: " + commandData + " will be unmute now.");
- muted[tar] == false;
- sys.sendAll("~~Bot~~: " + commandData + " was unmuted by " + sys.name(src) + ". If you think this is unfair, get Max. He will disable that person's use of this command.");
- return;
- }
- ,
- proulette: function () { // roulette snip made by UnknownOne
- var num=Math.floor(650*Math.random());
- var pokemon=sys.pokemon(num);
- var num2=Math.floor(650*Math.random());
- var pokemon2=sys.pokemon(num2);
- var num3=Math.floor(650*Math.random());
- var pokemon3=sys.pokemon(num3);
- var num4=Math.floor(650*Math.random());
- var pokemon4=sys.pokemon(num4);
- var num5=Math.floor(650*Math.random());
- var pokemon5=sys.pokemon(num5);
- var num6=Math.floor(650*Math.random());
- var pokemon6=sys.pokemon(num6);
- name = sys.name(src);
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendMessage(src, "*** Your Team ***");
- sys.sendMessage(src, "Pokemon 1: " + pokemon);
- sys.sendMessage(src, "Pokemon 2: " + pokemon2);
- sys.sendMessage(src, "Pokemon 3: " + pokemon3);
- sys.sendMessage(src, "Pokemon 4: " + pokemon4);
- sys.sendMessage(src, "Pokemon 5: " + pokemon5);
- sys.sendMessage(src, "Pokemon 6: " + pokemon6);
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- ,
- quiz: function () { // the script is NOT finished.
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=red><b> Question 1:</b><font color=black> What is the server named?");
- sys.sendMessage(src, "To answer, type /answer#");
- sys.sendMessage(src, "1: Unova");
- sys.sendMessage(src, "2: Unova League");
- sys.sendMessage(src, "3: Isshu League");
- sys.sendMessage(src, "4: Pokemon League");
- sys.sendHtmlMessage(src, "<hr>");}
- ,
- 1: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 2: function () {
- sys.sendMessage(src, "~~QuizBot~~: Correct answer! Type /question2 to move on!");}
- ,
- 3: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 4: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- question2: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=red><b> Question 2:</b><font color=black> What is the server owner named?");
- sys.sendMessage(src, "To answer, type /answer#");
- sys.sendMessage(src, "5: Max");
- sys.sendMessage(src, "6: Blade");
- sys.sendMessage(src, "7: Ian");
- sys.sendMessage(src, "8: NONE OF THE ABOVE");
- sys.sendHtmlMessage(src, "<hr>");}
- ,
- 6: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 5: function () {
- sys.sendMessage(src, "~~QuizBot~~: Correct answer! Type /question3 to move on!");}
- ,
- 7: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 8: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- question3: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=red><b> Question 3:</b><font color=black> What was the <b>ORIGINAL</b> name of the Server?");
- sys.sendMessage(src, "To answer, type /answer#");
- sys.sendMessage(src, "9: Pokemon Stadium");
- sys.sendMessage(src, "10: Isshu Flames");
- sys.sendMessage(src, "11: Isshu League");
- sys.sendMessage(src, "12: Unova League");
- sys.sendHtmlMessage(src, "<hr>");}
- ,
- 12: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 9: function () {
- sys.sendMessage(src, "~~QuizBot~~: Correct answer! Type /question4 to move on!");}
- ,
- 10: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 11: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- question4: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=red><b> Question 4:</b><font color=black> What is the first Pokemon in alphabetical order?");
- sys.sendMessage(src, "To answer, type /answer#");
- sys.sendMessage(src, "13: Bulbasaur");
- sys.sendMessage(src, "14: Abomnasnow");
- sys.sendMessage(src, "15: Alakazam");
- sys.sendMessage(src, "16: Gengar");
- sys.sendHtmlMessage(src, "<hr>");}
- ,
- 13: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 14: function () {
- sys.sendMessage(src, "~~QuizBot~~: Correct answer! Type /question5 to continue!");}
- ,
- 15: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 16: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- question5: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=red><b> Question 5:</b><font color=black> What type does Jacob use?");
- sys.sendMessage(src, "To answer, type /answer#");
- sys.sendMessage(src, "17: Fire");
- sys.sendMessage(src, "18: Water");
- sys.sendMessage(src, "19: Dragon");
- sys.sendMessage(src, "20: Ice");
- sys.sendHtmlMessage(src, "<hr>");}
- ,
- 18: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 17: function () {
- sys.sendMessage(src, "~~QuizBot~~: Correct answer! Type /question6 to continue!");}
- ,
- 19: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 20: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- question6: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=red><b> Question 6:</b><font color=black> Who is the Popular Dragon Tamer named?");
- sys.sendMessage(src, "To answer, type /answer#");
- sys.sendMessage(src, "21: Lance");
- sys.sendMessage(src, "22: Loreli");
- sys.sendMessage(src, "23: Steven");
- sys.sendMessage(src, "24: Wallace");
- sys.sendHtmlMessage(src, "<hr>");}
- ,
- 22: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 21: function () {
- sys.sendMessage(src, "~~QuizBot~~: Correct answer! Type /question7 to continue!");}
- ,
- 23: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 24: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- question7: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=red><b> Question 7:</b><font color=black> What type does Skyla use?");
- sys.sendMessage(src, "To answer, type /answer#");
- sys.sendMessage(src, "25: Rock");
- sys.sendMessage(src, "26: Flying");
- sys.sendMessage(src, "27: Steel");
- sys.sendMessage(src, "28: Rock");
- sys.sendHtmlMessage(src, "<hr>");}
- ,
- 25: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 26: function () {
- sys.sendMessage(src, "~~QuizBot~~: Correct answer! Type /question8 to continue!");}
- ,
- 27: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 28: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- question8: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=red><b> Question 8:</b><font color=black> What Pokemon does Ash first catch in Unova?");
- sys.sendMessage(src, "To answer, type /answer#");
- sys.sendMessage(src, "29: Boldore");
- sys.sendMessage(src, "30: Emolga");
- sys.sendMessage(src, "31: Pidove");
- sys.sendMessage(src, "32: Roggenrola");
- sys.sendHtmlMessage(src, "<hr>");}
- ,
- 29: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 31: function () {
- sys.sendMessage(src, "~~QuizBot~~: Correct answer! Quiz is still being worked on!");}
- ,
- 30: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- 32: function () {
- sys.sendMessage(src, "~~QuizBot~~: Wrong answer. Try again.");}
- ,
- me:function () {
- sys.sendHtmlAll("<font color=" + sys.getColor(src) + "><timestamp/><i> *** <b>" + sys.name(src) + "</b> " + commandData + " ***</i>"); }
- ,
- die:function () {
- sys.sendHtmlAll("<font color=" + sys.getColor(src) + "><timestamp/> ~ <b>" + sys.name(src) + "</b> " + commandData + " ~");
- sys.kick(src)
- return;
- }
- ,
- league: function () { // shows dynamic league list
- var gl1 = sys.getFileContent("gl1") // varibles (do not edit if you dont know what to do)
- var gl2 = sys.getFileContent("gl2")
- var gl3 = sys.getFileContent("gl3")
- var gl4 = sys.getFileContent("gl4")
- var gl5 = sys.getFileContent("gl5")
- var gl6 = sys.getFileContent("gl6")
- var gl7 = sys.getFileContent("gl7")
- var gl8 = sys.getFileContent("gl8")
- var e41 = sys.getFileContent("e41")
- var e42 = sys.getFileContent("e42")
- var e43 = sys.getFileContent("e43")
- var e44 = sys.getFileContent("e44")
- var e45 = sys.getFileContent("e45")
- var champion = sys.getFileContent("champion")
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendMessage(src, "*** Gym Leaders ***");
- sys.sendMessage(src, "- " + gl1 + ": Gym Leader #1"); // shows saved league list
- sys.sendMessage(src, "- " + gl2 + ": Gym Leader #2");
- sys.sendMessage(src, "- " + gl3 + ": Gym Leader #3");
- sys.sendMessage(src, "- " + gl4 + ": Gym Leader #4");
- sys.sendMessage(src, "- " + gl5 + ": Gym Leader #5");
- sys.sendMessage(src, "- " + gl6 + ": Gym Leader #6");
- sys.sendMessage(src, "- " + gl7 + ": Gym Leader #7");
- sys.sendMessage(src, "- " + gl8 + ": Gym Leader #8");
- sys.sendMessage(src, "*** Elite Five ***");
- sys.sendMessage(src, "-- " + e41 + ": Elite Five #1");
- sys.sendMessage(src, "-- " + e42 + ": Elite Five #2");
- sys.sendMessage(src, "-- " + e43 + ": Elite Five #3");
- sys.sendMessage(src, "-- " + e44 + ": Elite Five #4");
- sys.sendMessage(src, "-- " + e45 + ": Elite Five #5");
- sys.sendMessage(src, "*** Champion ***");
- sys.sendMessage(src, "--- " + champion + ": Champion");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- ,
- sendall: function () {
- sys.sendAll(commandData); }
- ,
- sendhtmlall : function () {
- sys.sendHtmlAll(commandData); }
- ,
- 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!";
- Links[2]="~~Bot~~: " + commandData + " has been picked up and chucked down a hole :D";
- Links[3]="~~Bot~~: " + commandData + " has been told to go to his room and died of bordum";
- Links[4]="~~Bot~~: " + commandData + " has had a heart attack and fell of the Grand Canyon";
- Links[5]="~~Bot~~: " + commandData + " got to gotten hit by a car and died in the hospital";
- var i = Math.floor(5*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 truly a rare event");
- }
- }
- ,
- rules : function () {
- sys.sendMessage(src, "*** Server Rules ***");
- sys.sendMessage(src, "Rule #1 - Do Not Abuse CAPS:");
- sys.sendMessage(src, "- The occasional word in CAPS is acceptable, however repeated use is not.");
- sys.sendMessage(src, "Rule #2 - No Flooding the Chat:");
- sys.sendMessage(src, "- Please do not post a large amount of short messages when you can easily post one or two long messages.");
- sys.sendMessage(src, "Rule #3 - Do not Challenge Spam:");
- sys.sendMessage(src, "- If a person refuses your challenge, this means they do not want to battle you. Find someone else to battle with.");
- sys.sendMessage(src, "Rule #4 - Don't ask for battles in the main chat:");
- sys.sendMessage(src, "- 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.");
- sys.sendMessage(src, "Rule #5 - No Trolling/Flaming/Insulting of Any kind:");
- sys.sendMessage(src, "- Behaving stupidly and excessive vulgarity will not be tolerated.");
- sys.sendMessage(src, "Rule #6 - Please only speak English:");
- sys.sendMessage(src, "- Most people speak a different language, which is ok. But please speak english.");
- sys.sendMessage(src, "Rule #7 - No Advertising:");
- sys.sendMessage(src, "- There will be absolutely no advertising on the server.");
- sys.sendMessage(src, "Rule #8 - No Obscene or Pornographic Content Allowed:");
- sys.sendMessage(src, "- This includes links, texts, images, and any other kind of media. This will result in a instant ban.");
- sys.sendMessage(src, "Rule #9 - Do not ask for Auth:");
- sys.sendMessage(src," - Authority is given upon merit. By asking you have pretty much eliminated your chances at becoming an Auth in the future.");
- sys.sendMessage(src,"Rule #10 - Do not Insult Auth:");
- sys.sendMessage(src, "- Insulting Auth will result in a instant ban.");
- sys.sendMessage(src,"Rule #11 - Do not Impersonate the Server or Any Owners:");
- sys.sendMessage(src, "- Impersonating them gets you at a high chance of a mute.");
- sys.sendMessage(src,"Rule #12 - Do not ask for the Server Scripts:");
- sys.sendMessage(src, "- Do NOT ask for the scripts. They are for certain people.");
- sys.sendMessage(src,"Rule #13 - Do not curse:");
- sys.sendMessage(src, "- Im serious. Dont. No one likes it. Hey, someone gets in lots of trouble for it, not my fault.");
- sys.sendMessage(src, "*** Site Rules ***");
- sys.sendMessage(src, "Rule #1 - Behave yourself, act appropriately:");
- sys.sendMessage(src, "- This is includes flaming, insulting, trolling of ANY KIND");
- sys.sendMessage(src,"Rule # 2 - Do not advertize:");
- sys.sendMessage(src,"- Do not advertize any other server or pages. Youtube or game, music pages are okay, but an excesive advertizing of them, could cause problems.");
- sys.sendMessage(src,"Rule #3 - No Obscene or Pornographic Content Allowed:");
- sys.sendMessage(src,"- This includes links, texts, images, and any other kind of obscene media. This will result in a instant ban.");
- sys.sendMessage(src,"Rule #4 - Do not ask for Auth:");
- sys.sendMessage(src,"- Authority is given upon merit. By asking you have pretty much eliminated your chances at becoming an Auth in the future.");
- }
- ,
- authlist : function () {
- var authlist = sys.dbAuths().sort()
- sys.sendMessage(src, "");
- if(commandData == "owners") {
- sys.sendHtmlMessage(src, "<font color=blue><timestamp/>*** Owners ***")
- for(var x in authlist) {
- if(sys.dbAuth(authlist[x]) == 3) {
- if(sys.id(authlist[x]) == undefined) {
- sys.sendHtmlMessage(src, "<timestamp/><img src=themes/classic/client/oAway.png> " + authlist[x] + " (Offline)")
- }
- if(sys.id(authlist[x]) !=undefined) {
- sys.sendHtmlMessage(src, '<timestamp/><img src=themes/classic/client/oAvailable.png> <font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
- }
- }
- }
- sendChanMessage(src, "");
- }
- if(commandData == "admins" || commandData == "administrators") {
- sys.sendHtmlMessage(src, "<font color=blue><timestamp/>*** Administrators ***")
- for(var x in authlist) {
- if(sys.dbAuth(authlist[x]) == 2) {
- if(sys.id(authlist[x]) == undefined) {
- sys.sendHtmlMessage(src, "<timestamp/><img src=themes/classic/client/aAway.png> " + authlist[x] + " (Offline)")
- }
- if(sys.id(authlist[x]) !=undefined) {
- sys.sendHtmlMessage(src, '<timestamp/><img src=themes/classic/client/aAvailable.png> <font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
- }
- }
- }
- sys.sendMessage(src, "");
- }
- if(commandData == "mods" || commandData == "moderators") {
- sys.sendHtmlMessage(src, "<font color=blue><timestamp/>*** Moderators ***")
- for(var x in authlist) {
- if(sys.dbAuth(authlist[x]) == 1) {
- if(sys.id(authlist[x]) == undefined) {
- sys.sendHtmlMessage(src, "<timestamp/><img src=themes/classic/client/mAway.png> " + authlist[x] + " (Offline)")
- }
- if(sys.id(authlist[x]) !=undefined) {
- sys.sendHtmlMessage(src, '<timestamp/><img src=themes/classic/client/mAvailable.png> <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.sendHtmlMessage(src, "<font color=blue><timestamp/>*** Owners ***")
- for (var x in authlist) {
- if (sys.dbAuth(authlist[x]) == 3) {
- if (sys.id(authlist[x]) == undefined) {
- sys.sendHtmlMessage(src, "<timestamp/><img src=themes/classic/client/oAway.png> " + authlist[x]+ " (Offline)")
- }
- if (sys.id(authlist[x]) != undefined) {
- sys.sendHtmlMessage(src,'<timestamp/><img src=themes/classic/client/oAvailable.png> <font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
- }
- }
- }
- sys.sendMessage(src, "");
- sys.sendHtmlMessage(src, "<font color=blue><timestamp/>*** Administrators ***")
- for( var x in authlist) {
- if (sys.dbAuth(authlist[x]) == 2) {
- if (sys.id(authlist[x]) == undefined) {
- sys.sendHtmlMessage(src, "<timestamp/><img src=themes/classic/client/aAway.png> " + authlist[x] + " (Offline)")
- }
- if (sys.id(authlist[x]) != undefined) {
- sys.sendHtmlMessage(src, '<timestamp/><img src=themes/classic/client/aAvailable.png> <font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
- }
- }
- }
- sys.sendMessage(src, "");
- sys.sendHtmlMessage(src, "<font color=blue><timestamp/>*** Moderators ***")
- for(x in authlist) {
- if(sys.dbAuth(authlist[x]) == 1) {
- if(sys.id(authlist[x]) == undefined) {
- sys.sendHtmlMessage(src, "<timestamp/><img src=themes/classic/client/mAway.png> " + authlist[x]+ " (Offline)")
- }
- if(sys.id(authlist[x]) != undefined) {
- sys.sendHtmlMessage(src,'<timestamp/><img src=themes/classic/client/mAvailable.png> <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="blue">*** The Unova Journal ***</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=blue><timestamp/><b>*** Mod Commands ***");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/imp <font color=red>thing</f></b>: <font color=black>to impersonate something");
- 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>/newpoll <font color=purple><b>question: <font color=red>option/option/option</f></b><font color=green></b>: </b><font color=black>start a new poll.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/pollclose</f></b>: <font color=black>to end a poll.");
- 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=green><timestamp/><b>/warn <font color=red>person<font color=black> : <font color=blue>reason</f></b>: <font color=black> to warn a user");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/<font color=orange>un<font color=green>mute <font color=red>person</f></b>: <font color=black>Mute/Unmute someone.");
- sys.sendHtmlMessage(src, "<hr>");
- return; }
- ,
- pollclose: function () {
- if (server.pollmode == 0) {
- sys.sendMessage(src, "~~Bot~~: Poll is already closed. ");
- return;}
- server.pollmode = 0;
- sys.sendHtmlAll("<timestamp/>Poll was closed by <b><font color =" + sys.getColor(src) + "> " + sys.name(src) + ".");
- var nu = [];
- var tally = [];
- for (var z in server.pollvotes) {
- if (tally[server.pollvotes[z]] == undefined) {
- tally[server.pollvotes[z]] = 1; }
- else {
- tally[server.pollvotes[z]] += 1; }
- }
- for (var z in tally) {
- if (server.polloptions[z - 1] != undefined) {
- sys.sendHtmlAll('<font color=limegreen><timestamp/><b> Votes for option #'+z+'('+ server.polloptions[z - 1] +') </b><font color=black>- ' + tally[z]); }
- }
- server.pollmode = 1;
- return; }
- ,
- newpoll: function () {
- if (mcmd[0] == undefined || mcmd[1] == undefined) {
- sys.sendMessage(src,'~~Bot~~: You fail.');
- return; }
- server.pollvotes = [];
- server.polloptions = mcmd[1].split('/');
- if (server.polloptions.length == 1) {
- sys.sendMessage(src,'~~Bot~~: Error.');
- return; }
- sys.sendHtmlAll('<hr>');
- sys.sendHtmlAll('<font color=red><timestamp/><b>Poll:</b><font color=black> ' + mcmd[0]);
- sys.sendHtmlAll('<timestamp/>Please vote! Use /vote <b><font color=purple>option');
- for ( var z in server.polloptions ) {
- sys.sendHtmlAll('<font color=limegreen><timestamp/><b>Option #'+(z*1+1)+':</b><font color=black> '+ server.polloptions[z]); }
- sys.sendHtmlAll('<hr>');
- server.pollmode = 1;
- return; }
- ,
- imp: function () {
- impersonation[src] = commandData;
- sys.sendMessage(src, "Bot: Now you are " + impersonation[src] +"!");
- 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!";
- Links[2]="~~Bot~~: " + commandData + " has been picked up and chucked down a hole :D";
- Links[3]="~~Bot~~: " + commandData + " has been told to go to his room and died of bordum";
- Links[4]="~~Bot~~: " + commandData + " has had a heart attack and fell of the Grand Canyon";
- Links[5]="~~Bot~~: " + commandData + " got to gotten hit by a car and died in the hospital";
- var i = Math.floor(5*Math.random())
- sys.sendAll(Links[i]);
- sys.kick(tar)
- return; }
- ,
- impoff : function () {
- delete impersonation[src];
- sys.sendMessage(src, "Bot: Now you are yourself!");
- return;
- }
- ,
- kick : function () {
- if (tar == undefined) {
- sys.sendMessage(src, "~~Bot~~: Not an existing player");
- return;
- }
- sys.kick(tar);
- sys.sendAll("~~Bot~~: " + sys.name(tar) + " was kicked by " + sys.name(src) +"!");
- return;
- }
- ,
- warn : function () {
- var data = commandData.split(' : ');
- if (data.length != 2) {
- sys.sendMessage(src, "+Bot: You need to give 2 parameters.");
- return;
- }
- var player = data[0];
- var reason = data[1];
- sys.sendHtmlAll("<hr>");
- sys.sendAll(player + " was warned by " + sys.name(src) + " for the following reason:");
- sys.sendHtmlAll("<font color=red><timestamp/><b>Reason</b>:<font color=black> " + reason);
- sys.sendHtmlAll("<hr>");
- return;
- }
- ,
- mute : function () {
- if (tar == undefined) {
- sys.sendMessage(src, "~~Bot~~: Not an existing player");
- return;
- }
- muted[tar] = true;
- sys.sendAll("~~Bot~~: " + sys.name(tar) + " was muted by " + sys.name(src) +"!");
- return;
- }
- ,
- unmute:function () {
- if (tar == undefined) {
- return;
- }
- sys.sendAll("Bot: " + 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 comamnds.");
- return;
- }
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=blue><timestamp/><b>*** Admin Commands ***");
- 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>/changeannouncement <font color=blue>message</f></b>: <font color=black>change announcement");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/setPA <font color=gold>paname</f></b>: <font color=black>to add a new pa");
- 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=orange>un<font color=green>ban <font color=red>person</f></b>: <font color=black>to ban/unban someone");
- 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>/resetannouncement</f></b>: <font color=black>reset announcement");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- ,
- reset : function () {
- this.serverStartUp();
- sys.sendAll("+Server: The server script variables were reset.");
- return;
- }
- ,
- changeannouncement: function () {
- sys.setAnnouncement(commandData);}
- ,
- resetannouncement: function () {
- sys.setAnnouncement("Announcement reset by<font color=" + sys.getColor(src) + "><b> " + sys.name(src));}
- ,
- changemotd:function () {
- Topic = commandData;
- sys.sendAll("The MOTD has been changed.");}
- ,
- ban: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;
- }
- }
- 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) {
- sys.sendMessage(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.sendMessage(src, "+Bot: You unbanned " + commandData + "!");
- sys.appendToFile('bans.txt', sys.name(src) + ' unbanned ' +commandData + "n")
- return;
- }
- }
- sys.sendMessage(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) + " 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>*** Owner Commands ***");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/silentkick<font color=red> person</f></b>: <font color=black>to silently kick someone");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/silentban<font color=red> person</f></b>: <font color=black>to silently ban someone");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/id <font color=red>person</f></b>: <font color=black>show the id of someone.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/authoptions</f></b>: <font color=black>see what you do to auth people.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/leagueoptions</f></b>: <font color=black>see what you do to the league.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/spambot</f></b>: <font color=black>activate the awesome spam bot made by <font color=darkblue><b>Blade</b>");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- ,
- authoptions: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=blue><timestamp/><b> *** Auth Options ***</b></f>");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b> /<font color=purple>s<font color=green>user <font color=red>person</f></b>: <font color=black> to user someone.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b> /<font color=purple>s<font color=green>mod <font color=red>person</f></b>: <font color=black> to mod someone.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b> /<font color=purple>s<font color=green>admin <font color=red>person</f></b>: </b><font color=black> to admin someone.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b> /<font color=purple>s<font color=green>owner <font color=red>person</f></b>:<font color=black> to owner someone.");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b> /<font color=purple>s<font color=green>invisible <font color=red>person</f></b>:<font color=black> to invisible someone.");
- sys.sendHtmlMessage(src, "<hr>");
- }
- ,
- id: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "~~Bot~~: That person doesnt exist or isnt on the Server!");
- return;
- }
- sys.sendMessage(src, sys.name(tar) + "s ID: " + tar);
- return;
- }
- ,
- leagueoptions: function () {
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=black><timestamp/><b> <font color=blue>***League Options <font color=black>***");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/changegl<font color=blue>Number <font color=red>Person</f></b>: <font color=black>to change a gl spot");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/changee4<font color=purple>Number<font color=red> Person</f></b>: <font color=black> to change an e4 spot");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/changechampion <font color=red>Person</f></b>: <font color=black>to change the champion spot.");
- sys.sendHtmlMessage(src, "<hr>");
- return;
- }
- ,
- changegl1: function () {
- if (commandData.length > 20){
- sys.stopEvent();
- sys.sendMessage(src, "~~Bot~~: Not a valid name.");
- return;
- }
- sys.writeToFile("gl1", commandData);
- sys.sendMessage(src, "~~Bot~~: You made " + commandData + " Gym leader 1!");
- return;
- }
- ,
- changegl2: function () {
- if (commandData.length > 20){
- sys.stopEvent();
- sys.sendMessage(src, "~~Bot~~: Not a valid name.");
- return;
- }
- sys.writeToFile("gl2", commandData);
- sys.sendMessage(src, "~~Bot~~: You made " + commandData + " Gym leader 2!");
- return;
- }
- ,
- changegl3: function () {
- if (commandData.length > 20){
- sys.stopEvent();
- sys.sendMessage(src, "~~Bot~~: Not a valid name.");
- return;
- }
- sys.writeToFile("gl3", commandData);
- sys.sendMessage(src, "~~Bot~~: You made " + commandData + " Gym leader 3!");
- return;
- }
- ,
- changegl4: function () {
- if (commandData.length > 20){
- sys.stopEvent();
- sys.sendMessage(src, "~~Bot~~: Not a valid name.");
- return;
- }
- sys.writeToFile("gl4", commandData);
- sys.sendMessage(src, "~~Bot~~: You made " + commandData + " Gym leader 4!");
- return;
- }
- ,
- changegl5: function () {
- if (commandData.length > 20){
- sys.stopEvent();
- sys.sendMessage(src, "~~Bot~~: Not a valid name.");
- return;
- }
- sys.writeToFile("gl5", commandData);
- sys.sendMessage(src, "~~Bot~~: You made " + commandData + " Gym leader 5!");
- return;
- }
- ,
- changegl6: function () {
- if (commandData.length > 20){
- sys.stopEvent();
- sys.sendMessage(src, "~~Bot~~: Not a valid name.");
- return;
- }
- sys.writeToFile("gl6", commandData);
- sys.sendMessage(src, "~~Bot~~: You made " + commandData + " Gym leader 6!");
- return;
- }
- ,
- changegl7: function () {
- if (commandData.length > 20){
- sys.stopEvent();
- sys.sendMessage(src, "~~Bot~~: Not a valid name.");
- return;
- }
- sys.writeToFile("gl7", commandData);
- sys.sendMessage(src, "~~Bot~~: You made " + commandData + " Gym leader 7!");
- return;
- }
- ,
- changegl8: function () {
- if (commandData.length > 20){
- sys.stopEvent();
- sys.sendMessage(src, "~~Bot~~: Not a valid name.");
- return;
- }
- sys.writeToFile("gl8", commandData);
- sys.sendMessage(src, "~~Bot~~: You made " + commandData + " Gym leader 8!");
- return;
- }
- ,
- changee41: function () {
- if (commandData.length > 20){
- sys.stopEvent();
- sys.sendMessage(src, "~~Bot~~: Not a valid name.");
- return;
- }
- sys.writeToFile("e41", commandData);
- sys.sendMessage(src, "~~Bot~~: You made " + commandData + " Elite Four 1!");
- return;
- }
- ,
- changee42: function () {
- if (commandData.length > 20){
- sys.stopEvent();
- sys.sendMessage(src, "~~Bot~~: Not a valid name.");
- return;
- }
- sys.writeToFile("e42", commandData);
- sys.sendMessage(src, "~~Bot~~: You made " + commandData + " Elite Four 2!");
- return;
- }
- ,
- changee43: function () {
- if (commandData.length > 20){
- sys.stopEvent();
- sys.sendMessage(src, "~~Bot~~: Not a valid name.");
- return;
- }
- sys.writeToFile("e43", commandData);
- sys.sendMessage(src, "~~Bot~~: You made " + commandData + " Elite Four 3!");
- return;
- }
- ,
- changee44: function () {
- if (commandData.length > 20){
- sys.stopEvent();
- sys.sendMessage(src, "~~Bot~~: Not a valid name.");
- return;
- }
- sys.writeToFile("e44", commandData);
- sys.sendMessage(src, "~~Bot~~: You made " + commandData + " Elite Four 4!");
- return;
- }
- ,
- changee45: function () {
- if (commandData.length > 20){
- sys.stopEvent();
- sys.sendMessage(src, "~~Bot~~: Not a valid name.");
- return;
- }
- sys.writeToFile("e45", commandData);
- sys.sendMessage(src, "~~Bot~~: You made " + commandData + " Elite Four 5!");
- return;
- }
- ,
- changechampion: function () {
- if (commandData.length > 20){
- sys.stopEvent();
- sys.sendMessage(src, "~~Bot~~: Not a valid name.");
- return;
- }
- sys.writeToFile("champion", commandData);
- sys.sendMessage(src, "~~Bot~~: You made " + commandData + " The Champion!");
- return;
- }
- ,
- spambot: function () {
- var name = sys.name(src)
- var color = sys.getColor(src)
- if (sys.auth(src) < 3) {
- sys.sendMessage(src, "You cannot use this command!");
- return;
- }
- sys.sendHtmlAll("<b><font color=" + color +">" + name + "</b><font color=black> has activated the Spam Bot!");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("<font color=red><timestamp/><font size=3>+<b><i>SpamBot: </b></i><font color=black>Spam");
- sys.sendHtmlAll("The Spam Bot has been de-activated!");
- return;
- }
- ,
- user: function () {
- if (tar == undefined) {
- sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
- return;
- }
- sys.sendAll("+Bot: " + commandData + " was usered.");
- 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.sendAll("+Bot: " + commandData + " was made a moderator.");
- 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.sendAll("+Bot: " + commandData + " is now an admin.");
- 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.sendAll("+Bot: " + commandData + " is now a server owner!");
- 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.sendAll("+Bot: " + commandData + " now has invisible authority!");
- 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;
- }
- ,
- clearpass: function () {
- if (sys.auth < 4) {
- sys.sendMessage(src, "~~Bot~~: You need to be an invisible authority to clear someones password.");
- return;
- }
- sys.clearPass(commandData);
- sys.sendAll("~~Bot~~: " + commandData + "'s password has been cleared by " + sys.name(src) + ".");
- return;
- }
- ,
- invisiblecommands : function () {
- if (sys.auth(src) < 4) {
- sys.sendMessage(src, "~~Bot~~: Sir these are NOT for you");
- return;
- }
- sys.sendHtmlMessage(src, "<hr>");
- sys.sendHtmlMessage(src, "<font color=blue><timestamp/><b>*** Invisible Commands ***");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/eval<font color=cyan> string</f></b>: <font color=black> evaluate a java script string");
- sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/clearpass<font color=red> person</f></b>: <font color=black> clear a password");
- sys.sendHtmlMessage(src, "<hr>");}
- ,
- eval: function () {
- sys.eval(commandData);}
- ,
- 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;
- }
- });
- 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: The command "+ 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) {
- sys.sendHtmlAll("<font color= " + sys.getColor(src) + "><timestamp/><b> " + sys.name(src) + "</b><font color=black> has left Unova League!");
- 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