Advertisement
Guest User

Untitled

a guest
Aug 7th, 2017
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 114.30 KB | None | 0 0
  1. ({
  2. serverStartUp : function() {
  3. this.init();
  4. }
  5. ,
  6. init : function() {
  7. lastMemUpdate = 0;
  8.  
  9. key = function(a,b) {
  10. return a + "*" + sys.name(b);
  11. }
  12.  
  13. semiUbers = [];
  14.  
  15. var tempU = new Array(150,249,250,382,383,384,483,484,487,505);
  16. for (x in tempU) {
  17. semiUbers[tempU[x]] = true;
  18. }
  19.  
  20. saveKey = function(thing, id, val) {
  21. sys.saveVal(key(thing,id), val);
  22. }
  23.  
  24. getKey = function(thing, id) {
  25. return sys.getVal(key(thing,id));
  26. }
  27.  
  28. hasBan = function(id, poke) {
  29. return clauses[id].indexOf("*" + poke + "*") != -1;
  30. }
  31.  
  32. cmp = function(a, b) {
  33. return a.toLowerCase() == b.toLowerCase();
  34. }
  35.  
  36. if (typeof(varsCreated) != 'undefined')
  37. return;
  38.  
  39. battlesStopped = false;
  40. channelUsers = [];
  41. channelTopics = [];
  42.  
  43. sys.setPA("forceSameTier");
  44. sys.setPA("touruser");
  45. sys.setPA("rangebans");
  46. sys.setPA("tourmod");
  47. sys.setPA("tourowner");
  48. sys.setPA("megaUser");
  49. megausers = sys.getVal("megausers");
  50.  
  51. siggamute = (sys.getVal("SiggaMute") == "1");
  52. siggaban = (sys.getVal("SiggaBan") == "1");
  53.  
  54.  
  55. muteall = false;
  56.  
  57. sys.setPA ("impersonation");
  58. sys.setPA ("muted");
  59. sys.setPA("caps");
  60. sys.setPA("timeCount");
  61. sys.setPA("floodCount");
  62. sys.setPA("joinoff");
  63. maxPlayersOnline = 0;
  64.  
  65. if (sys.existChannel("RP Channel")) {
  66. rpchannel = sys.channelId("RP Channel");
  67. } else {
  68. rpchannel = sys.createChannel("RP Channel");
  69. }
  70. if (sys.existChannel("RP Channel")== false) {
  71. sys.createChannel("RP Channel");
  72. }
  73. if (sys.existChannel("League")) {
  74. leaguechannel = sys.channelId("League");
  75. } else {
  76. leaguechannel = sys.createChannel("League");
  77. }
  78. if (sys.existChannel("League")== false) {
  79. sys.createChannel("League");
  80. }
  81. if (sys.existChannel("Staff Channel")) {
  82. staffchannel = sys.channelId("Staff Channel");
  83. } else {
  84. staffchannel = sys.createChannel("Staff Channel");
  85. }
  86. if (sys.existChannel("Staff Channel")== false) {
  87. sys.createChannel("Staff Channel");
  88. }
  89. if (sys.existChannel("Scripting School")) {
  90. sschannel = sys.channelId("Scripting School");
  91. } else {
  92. sschannel = sys.createChannel("Scripting School");
  93. }
  94. if (sys.existChannel("Scripting School")== false) {
  95. sys.createChannel("Scripting School");
  96. }
  97. if (sys.existChannel("Scripting Room")) {
  98. srchannel = sys.channelId("Scripting Room");
  99. } else {
  100. srchannel = sys.createChannel("Scripting Room");
  101. }
  102. if (sys.existChannel("Scripting Room")== false) {
  103. sys.createChannel("Scripting Room");
  104. }
  105.  
  106. }
  107.  
  108. ,
  109.  
  110.  
  111. afterNewMessage : function (message) {
  112. if (message == "Script Check: OK") {
  113. 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>");
  114. this.init();
  115. }
  116. }
  117.  
  118. ,
  119.  
  120. afterLogIn : function(src) {
  121. /* Welcome TUO*/
  122. if (sys.name(src) == "TheUnknownOne") {
  123. sys.sendHtmlAll("<font color=red><b>~~Server~~</b>: <font color=black>Please welcome the server co-owner <b>" + sys.name(src) + "</b>!");
  124. sys.changeAuth(src, 3);
  125. return;
  126. }
  127. /* Welcome Darkness*/
  128. if (sys.name(src) == "Darkness") {
  129. sys.sendHtmlAll("<font color=black><b>~~Server~~</b>: <font color=black>Please welcome one of the site owners <b>Darkness</b>!");
  130. return;
  131. }
  132. /* Welcome Coyotte508*/
  133. if (sys.name(src) == "coyotte508") {
  134. sys.sendHtmlAll("<font color=green><b>~~Server~~</b>: <font color=black>Please welcome the head programmer of PO <b>coyotte508</b>!");
  135. return;
  136. }
  137. /* Welcome Crystal Moogle*/
  138. if (sys.name(src) == "Crystal Moogle") {
  139. sys.sendHtmlAll("<font color=pink><b>~~Server~~</b>: <font color=black>Please welcome one of the site owners <b>Crystal Moogle</b>!");
  140. return;
  141. }
  142. sys.sendHtmlMessage(src, "<font color=green><b>+CommandBot</b>:</f> <font color=black>Use /commands or !commands to see the commands!");
  143.  
  144. if (sys.auth(src) == 0) {
  145. sys.sendHtmlAll("<font color=green><timestamp/><b>~~Server~~:</font></b> Please welcome <b>" + sys.name(src) + "</font></b>!");
  146. }
  147. if (sys.auth(src) == 1) {
  148. sys.sendHtmlAll("<font color=blue><timestamp/>~~Server~~:</font><b> Please welcome moderator <b>" + sys.name(src) + "</font></b>!");
  149. }
  150. if (sys.auth(src) == 2) {
  151. sys.sendHtmlAll("<font color=orange><timestamp/><b>~~Server~~:</font><b> Please welcome administrator <b>" + sys.name(src) + "</font></b>!");
  152. }
  153. if (sys.auth(src) == 3) {
  154. sys.sendHtmlAll("<font color=red><timestamp/><b>~~Server~~:</font><b> Please welcome owner <b>" + sys.name(src) + "</font></b>!");
  155. }
  156. if (sys.auth(src) == 4) {
  157. sys.sendHtmlAll("<font color=LimeGreen><timestamp/><b>~~Server~~:</font><b> Please welcome Hidden Auth <b>" + sys.name(src) + "</font></b>!");
  158. }
  159.  
  160. if (sys.getVal("muted*" + sys.ip(src)) == "true")
  161. muted[src] = true;
  162.  
  163. if (sys.numPlayers() > maxPlayersOnline) {
  164. maxPlayersOnline = sys.numPlayers();
  165. }
  166.  
  167. if (maxPlayersOnline > sys.getVal("MaxPlayersOnline")) {
  168. sys.saveVal("MaxPlayersOnline", maxPlayersOnline);
  169. }
  170.  
  171. if (!Topic) {Topic = sys.getFileContent("topic.txt");}
  172. sys.sendHtmlMessage(src,'<b><font color=limegreen>±Motd:<font color=black> </b>' + Topic);
  173. sys.sendMessage(src,"");
  174.  
  175. sys.sendMessage(src, "");
  176.  
  177. this.afterChangeTeam(src);
  178. }
  179.  
  180. ,
  181.  
  182. beforeChatMessage: function(src, message) {
  183. if (sys.auth(src) < 3 && muted[src] == true) {
  184. sys.stopEvent();
  185. sys.sendMessage(src, "~~Server~~: Sorry you have been muted for breaking the rules!");
  186. return;
  187. }
  188.  
  189. if ((message[0] == '/' || message[0] == '!') && message.length > 1) {
  190. if (parseInt(sys.time()) - lastMemUpdate > 500) {
  191. sys.clearChat();
  192. lastMemUpdate = parseInt(sys.time());
  193. }
  194. print("Command -- " + sys.name(src) + ": " + message);
  195. sys.stopEvent();
  196. var command;
  197. var commandData;
  198. var pos = message.indexOf(' ');
  199. var mcmd = [];
  200.  
  201. if (pos != -1) {
  202. command = message.substring(1, pos).toLowerCase();
  203. commandData = message.substr(pos+1);
  204. mcmd = commandData.split(':');
  205. } else {
  206. command = message.substr(1).toLowerCase();
  207. }
  208. var tar = sys.id(commandData);
  209.  
  210. function sendChanMessage(src, msg) {
  211. sys.sendMessage(src, msg, chan); }
  212.  
  213. var userCommands = ({
  214. "usercommands" : function () {
  215. sys.sendHtmlMessage(src, "<hr>");
  216. sys.sendHtmlMessage(src, "<font color=cornflowerblue><timestamp/><b>*** <font color=black>User Commands <font color=cornflowerblue>***</f>");
  217. 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>");
  218. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/auth <font color=red>Name</b></f>: <font color=black>to show the server authlist</f>");
  219. 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>");
  220. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/rules</b></f>: <font color=black>to show the server rules</f>");
  221. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/players</f></b>: <font color=black>to get the number of players online");
  222. 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 é.é");
  223. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Person<font color=black> is any online person on the server.</f>");
  224. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/credits</b></f>: <font color=black>to view the credits and how to get these scripts.");
  225. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/viewjournal</b></f>: <font color=black>to view the book of wonderful comments");
  226. 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!");
  227. 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.");
  228. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/joinchannel <font color=red> Name</b></f>: <font color=black>to make a channel");
  229. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Name</f><font color=black> is any not used name.");
  230. 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");
  231. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Optional Reason</f><font color=black> is any text, HTML Allowed.");
  232. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/unregister </b></f>: <font color=black>to clear your own password");
  233. sys.sendHtmlMessage(src, "<hr>");
  234. return;
  235. }
  236. ,
  237. joinchannel : function () {
  238. sys.createChannel(commandData);
  239. return;
  240. }
  241. ,
  242. unregister : function () {
  243. sys.clearPass(src);
  244. return;
  245. }
  246. ,
  247. quit : function () {
  248. if (commandData == undefined) {
  249. sys.kick(src)
  250. return;
  251. }
  252. sys.kick(src)
  253. sys.sendHtmlAll("<timestamp/><b>" + sys.name(src) + "</b> has quit with the following reason:<b> " + commandData + ".");
  254. return;
  255. }
  256. ,
  257. imgoptions : function () {
  258. sys.sendHtmlMessage(src, "<hr>");
  259. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>*** IMG Options ***");
  260. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/burn <font color=red> Person</b></f>: <font color=black>to burn someone for fun");
  261. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
  262. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/sleep <font color=red> Person</b></f>: <font color=black>to make someone asleep for fun");
  263. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
  264. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/freeze <font color=red> Person</b></f>: <font color=black>to freeze someone for fun");
  265. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
  266. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/poison <font color=red> Person</b></f>: <font color=black>to poison someone for fun");
  267. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
  268. 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");
  269. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
  270. 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>");
  271. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message, HTML Allowed</f>");
  272. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/accept <font color=red>Person</b><font color=black>: to accept a challenge</f>");
  273. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Person<font color=black> is any online player</f>");
  274. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/decline <font color=red>Person</b><font color=black>: to decline a challenge</f>");
  275. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Person<font color=black> is any online player</f>");
  276. if (sys.auth(src) < 1) {
  277. sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b> <font color=black>Sorry but to the see other commands you need auth.</f>.");
  278. sys.sendHtmlMessage(src, "<hr>");
  279. return;
  280. }
  281. 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");
  282. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
  283. 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");
  284. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
  285. 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");
  286. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
  287. 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");
  288. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
  289. 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");
  290. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
  291. sys.sendHtmlMessage(src, "<hr>");
  292. return; }
  293.  
  294. ,
  295. pbme:function () {
  296. sys.sendHtmlAll("<img src='themes/classic/status/status0.png'> <b>" + sys.name(src) + "</b> " + commandData);
  297. return;
  298. }
  299. ,
  300. decline:function () {
  301. if (tar == undefined) {
  302. 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");
  303. return;
  304. }
  305. sys.sendHtmlMessage(tar, "<b>" + sys.name(src) + "</b> has <img src='themes/classic/Challenge Window/Buttons/DeclineButtonGlow.png'> on your challenge");
  306. return;
  307. }
  308. ,
  309. accept:function () {
  310. if (tar == undefined) {
  311. 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");
  312. return;
  313. }
  314. sys.sendHtmlMessage(tar, "<b>" + sys.name(src) + "</b> has <img src='themes/classic/Challenge Window/Buttons/AcceptButtonGlow.png'> your challenge");
  315. return;
  316. }
  317. ,
  318. burn : function () {
  319. if (tar == undefined) {
  320. 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");
  321. return;
  322. }
  323. 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>");
  324. return;
  325. }
  326. ,
  327. poison : function () {
  328. if (tar == undefined) {
  329. 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");
  330. return;
  331. }
  332. 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>");
  333. return;
  334. }
  335. ,
  336. thunder : function () {
  337. if (tar == undefined) {
  338. 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");
  339. return;
  340. }
  341. 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>");
  342. return;
  343. }
  344. ,
  345. sleep : function () {
  346. if (tar == undefined) {
  347. 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");
  348. return;
  349. }
  350. 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>");
  351. return;
  352. }
  353. ,
  354. commands: function () {
  355. sys.sendHtmlMessage(src, "<hr>");
  356. sys.sendHtmlMessage(src, "<font color=limegreen><timestamp/><b>*** Commands ***");
  357. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/UserCommands</f></b>: <font color=green>For Users");
  358. sys.sendHtmlMessage(src, "<font color=purple><timestamp/><b>/HtmlCommands</f></b>: <font color=purple>For HTML Commands");
  359. sys.sendHtmlMessage(src, "<font color=gold><timestamp/><b>/TourCommands</f></b>: <font color=gold>For Tour Commands");
  360. if (sys.auth(src) < 1) {
  361. 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.");
  362. sys.sendHtmlMessage(src, "<hr>");
  363. return;
  364. }
  365. sys.sendHtmlMessage(src, "<font color=blue><timestamp/><b>/ModCommands</f></b>: <font color=blue>For Moderators");
  366. if (sys.auth(src) < 2) {
  367. 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.");
  368. sys.sendHtmlMessage(src, "<hr>");
  369. return;
  370. }
  371. sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>/AdminCommands</f></b>: <font color=orange>For Administrators");
  372. if (sys.auth(src) < 3) {
  373. 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.");
  374. sys.sendHtmlMessage(src, "<hr>");
  375. return;
  376. }
  377. sys.sendHtmlMessage(src, "<font color=red><timestamp/><b>/OwnerCommands</f></b>: <font color=red>For Owners");
  378. sys.sendHtmlMessage(src, "<hr>");
  379. return; }
  380. ,
  381. me:function () {
  382. sys.sendAll("*** " + sys.name(src) + " " + commandData); }
  383. ,
  384. htmlme:function () {
  385. sys.sendHtmlAll("<font color=fuchsia><timestamp/>*** </font> <b>" + sys.name(src) + "</b> " + commandData); }
  386. ,
  387. htmlcommands: function () {
  388. sys.sendHtmlMessage(src, "<hr>");
  389. sys.sendHtmlMessage(src, "<font color=red><timestamp/><b>*** <font color=black>Html Commands <font color=red>***</f>");
  390. 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>.");
  391. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message.</f>");
  392. 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.");
  393. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message.</f>");
  394. 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.");
  395. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message, HTML Allowed</f>");
  396. 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.");
  397. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message, HTML Allowed</f>");
  398. 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>");
  399. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message.</f>");
  400. 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>");
  401. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Message<font color=black> is any message, HTML Allowed</f>");
  402. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/imgoptions <font color=black>:</b> to see all options with img, mostly fun based</f>");
  403. sys.sendHtmlMessage(src, "<hr>");
  404. return; }
  405. ,
  406. tourcommands: function () {
  407. sys.sendHtmlMessage(src, "<hr>");
  408. sys.sendHtmlMessage(src, "<font color=gold><timestamp/><b>*** <font color=black>Tour Commands <font color=gold>***</f>");
  409. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/join <font color=black></b> : <font color=black>to join the tour</f>.");
  410. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/leave <font color=black></b> : <font color=black>to leave the tour</f>.");
  411. if (sys.auth(src) < 1) {
  412. sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b> <font color=black>Sorry but to the see other commands you need auth.</f>.");
  413. sys.sendHtmlMessage(src, "<hr>");
  414. return;
  415. }
  416. 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>.");
  417. 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>");
  418. 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.");
  419. 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>");
  420. 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.");
  421. 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.");
  422. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Number<font color=black> is any number</f>");
  423. 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>");
  424. 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>");
  425. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/joinon <font color=black></b> : <font color=black>to start the signups</f>.");
  426. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/joinoff <font color=black></b> : <font color=black>to end the signups</f>.");
  427. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/massdq <font color=black></b> : <font color=black>to DQ all people in the tour.");
  428. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/endtour <font color=black></b> : <font color=black>to end the current tour.");
  429. 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.");
  430. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Person<font color=black> is any online player.</f>");
  431. 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.");
  432. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note:<font color=red> Person<font color=black> is any online player.</f>");
  433. if (sys.auth(src) < 3) {
  434. 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>.");
  435. sys.sendHtmlMessage(src, "<hr>");
  436. return;
  437. }
  438. 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.");
  439. 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.");
  440. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/tourauthnames</f></b>: <font color=black>view authnames for the /TourAuthName.");
  441. sys.sendHtmlMessage(src, "<hr>");
  442. return; }
  443. ,
  444. join : function () {
  445. sys.sendHtmlAll("<font color=orange><timestamp/><b>~~Bot~~:</font></b> </b>" + sys.name(src) + "</b> has joined the tour</font></b>!");
  446. return; }
  447. ,
  448. leave : function () {
  449. sys.sendHtmlAll("<font color=orange><timestamp/><b>~~Bot~~:</font></b> </b>" + sys.name(src) + "</b> has left the tour</font></b>!");
  450. return; }
  451. ,
  452. dq : function () {
  453. if (sys.auth(src) < 1) {
  454. sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b> <font color=black>Sorry but to use this command you need auth.</f>.");
  455. return;
  456. }
  457. if (tar == undefined) {
  458. return;
  459. }
  460. sys.sendHtmlAll("<font color=orange><timestamp/><b>~~Bot~~:</font></b> </b>" + commandData + "</b> has been DQed by " + sys.name(src) + "</font></b>!");
  461. sys.sendHtmlMessage(tar, "<font color=orange><timestamp/><b>~~Bot~~:</font></b> You have been DQed from the tour by " + sys.name(src) + "</font></b>!");
  462. return; }
  463. ,
  464. push : function () {
  465. if (sys.auth(src) < 1) {
  466. sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b> <font color=black>Sorry but to use the command you need auth.</f>.");
  467. return;
  468. }
  469. if (tar == undefined) {
  470. return;
  471. }
  472. 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>!");
  473. sys.sendHtmlMessage(tar, "<font color=orange><timestamp/><b>~~Bot~~:</font></b> You have been pushed in the tour by " + sys.name(src) + "</font></b>!");
  474. return; }
  475. ,
  476. massdq : function () {
  477. if (sys.auth(src) < 1) {
  478. sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</b> <font color=black>Sorry but to use this command you need auth.</f>.");
  479. return;
  480. }
  481. sys.sendHtmlAll("<font color=orange><timestamp/><b>~~Bot~~:</font></b> </b>All people who joined have been DQed by" + sys.name(src) + "</font></b>!");
  482. return; }
  483. ,
  484. sendmessage : function () {
  485. sys.sendMessage(src, commandData); }
  486. ,
  487. sendhtmlmessage : function () {
  488. sys.sendHtmlMessage(src, commandData); }
  489. ,
  490. sendall : function () {
  491. sys.sendAll(commandData); }
  492. ,
  493. sendhtmlall : function () {
  494. sys.sendHtmlAll(commandData); }
  495. ,
  496.  
  497. credits:function () {
  498. sys.sendHtmlMessage(src, "<hr>");
  499. sys.sendHtmlMessage(src, "<timestamp/><b><font color=skyblue><font size=3>Max for making the basic of these scripts!");
  500. sys.sendHtmlMessage(src, "<timestamp/><b><font color=red><font size=3>TheUnknownOne for adding commands and the tour script also for the editing!");
  501. sys.sendHtmlMessage(src, "<timestamp/><b><font color=darkblue><font size=3>Arceus for the catch command!");
  502. sys.sendHtmlMessage(src, "<timestamp/><b><font color=green><font size=3>Intel_iX for the editing and speeding the scripts up!");
  503. sys.sendHtmlMessage(src, "<timestamp/><b><font color=blue><font size=3>Ian for the clearchat command and the MOTD!");
  504. sys.sendHtmlMessage(src, "<timestamp/><b><font color=black><font size=3>If you want these scripts ask TheUnknownOne or Email <TheUnknownOne25@gmail.com>");
  505. sys.sendHtmlMessage(src, "<hr>");
  506. return; }
  507. ,
  508. torture : function () {
  509. if (tar == undefined) {
  510. sys.sendMessage(src, "~~Bot~~: You fail. That person is either not on or does not exist");
  511. return;
  512. }
  513.  
  514. var Links=new Array();
  515. Links[1]="~~Bot~~: " + commandData + " has died from a falling meteorite by " + sys.name(src) + "!";
  516. Links[2]="~~Bot~~: " + commandData + " has been picked up and chucked down a hole by " + sys.name(src) + ".";
  517. Links[3]="~~Bot~~: " + commandData + " has been told to go to his room and die of bordum by " + sys.name(src) + ".";
  518. Links[4]="~~Bot~~: " + commandData + " had a heart attack and fell of the Grand Canyon by " + sys.name(src) + ".";
  519. Links[5]="~~Bot~~: " + commandData + " got hit by a car and died in the hospital by " + sys.name(src) + ".";
  520. Links[6]="~~Bot~~: " + commandData + " was made to smell spygirl's underwhere by " + sys.name(src) + ".";
  521. var i = Math.floor(6*Math.random())
  522. sys.sendAll(Links[i]);
  523. return; }
  524. ,
  525. 'catch' : function () {
  526. var num=Math.floor(650*Math.random());
  527. var pokemon=sys.pokemon(num);
  528. var nature=Math.floor(25*Math.random());
  529. var nature=sys.nature(nature);
  530. var shiny=Math.floor(8192*Math.random());
  531. var hpiv=Math.floor(32*Math.random());
  532. var spaiv=Math.floor(32*Math.random());
  533. var atkiv=Math.floor(32*Math.random());
  534. var defiv=Math.floor(32*Math.random());
  535. var spdiv=Math.floor(32*Math.random());
  536. var speiv=Math.floor(32*Math.random());
  537. if (shiny!=8191)
  538. {
  539. sys.sendAll("~~CaptureBot~~: " + sys.name(src) + " has caught a " +pokemon + " with a " + nature + " nature!");
  540. sys.sendAll("~~CaptureBot~~: " + pokemon + " has the following IVs:");
  541. sys.sendAll("~~CaptureBot~~: HP: " + hpiv + " Atk: " + atkiv + " Def: " + defiv + " SpA: " + spaiv + " SpD: " + spdiv + " Spe: " + speiv + ".");
  542. }
  543. if (shiny==8191)
  544. {
  545. sys.sendAll("~~CaptureBot~~: " + sys.name(src) + " has caught a shiny " + pokemon + " with a " + nature + " nature!");
  546. sys.sendAll("~~CaptureBot~~: " + pokemon + " has the following IVs:");
  547. sys.sendAll("~~CaptureBot~~: HP: " + hpiv + " Atk: " + atkiv + " Def: " + defiv + " SpA: " + spaiv + " SpD: " + spdiv + " Spe: " + speiv + ".");
  548. sys.sendAll("~~CaptureBot~~: This is a rare event");
  549. }
  550. }
  551. ,
  552. rules : function () {
  553. sys.sendHtmlMessage(src, "<br>");
  554. sys.sendHtmlMessage(src, "<font color=red>*** <font color=black><b>Server Rules</b> <font color=black>***</f></b>");
  555. sys.sendHtmlMessage(src, "<b><font color=red>Rule #1<font color=black> - Do Not Abuse CAPS:</f></b>");
  556. sys.sendHtmlMessage(src, "- <b>The occasional word in CAPS is acceptable, however repeated use is not.</b>");
  557. sys.sendHtmlMessage(src, "<b><font color=red>Rule #2 - No Flooding the Chat:</f></b>");
  558. 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>");
  559. sys.sendHtmlMessage(src, "<b><font color=red>Rule #3 - Do not Challenge Spam:</f></b>");
  560. 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>");
  561. sys.sendHtmlMessage(src, "<b><font color=red>Rule #4 - Don't ask for battles in the main chat:</f></b>");
  562. 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>");
  563. sys.sendHtmlMessage(src, "<b><font color=red>Rule #5 - No Trolling/Flaming/Insulting of Any kind:</f></b>");
  564. sys.sendHtmlMessage(src, "- <b>Behaving stupidly and excessive vulgarity will not be tolerated</f></b>.");
  565. sys.sendHtmlMessage(src, "<b><font color=red>Rule #6 - Please only speak English:</f></b>");
  566. sys.sendHtmlMessage(src, "- <b>Most people speak a different language, which is ok. But please speak english</f></b>.");
  567. sys.sendHtmlMessage(src, "<b><font color=red>Rule #7 - No Advertising:");
  568. sys.sendHtmlMessage(src, "- <b>There will be absolutely no advertising on the server</f></b>.");
  569. sys.sendHtmlMessage(src, "<b><font color=red>Rule #8 - No Obscene or Pornographic Content Allowed:</f></b>");
  570. sys.sendHtmlMessage(src, "- <b>This includes links, texts, images, and any other kind of media. This will result in a instant ban.</f></b>");
  571. sys.sendHtmlMessage(src, "<b><font color=red>Rule #9 - Do not ask for Auth:</f></b>");
  572. 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>");
  573. sys.sendHtmlMessage(src,"<b><font color=red>Rule #10 - Do not Insult Auth:</f></b>");
  574. sys.sendHtmlMessage(src, "- <b>Insulting Auth will result in immediate punishment.</f></b>");
  575. sys.sendHtmlMessage(src, "<br>");
  576. if (sys.auth(src) < 1) {
  577. return;
  578. }
  579. sys.sendHtmlMessage(src, "<br>");
  580. sys.sendHtmlMessage(src, "<font color=black>*** <font color=blue><b>Auth Rules</b> <font color=black>***</f></b>");
  581. sys.sendHtmlMessage(src, "<b><font color=red>Rule #1 - Behave yourself, act appropriately:");
  582. sys.sendHtmlMessage(src, "- <b>This is includes flaming, insulting, trolling of ANY KIND");
  583. sys.sendHtmlMessage(src,"<b><font color=red>Rule # 2 - Do not advertize:</f></b>");
  584. 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>");
  585. sys.sendHtmlMessage(src,"<b><font color=red>Rule #3 - No Obscene or Pornographic Content Allowed:");
  586. 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>");
  587. sys.sendHtmlMessage(src,"<b><font color=red>Rule #4 - Do not ask for Auth:</f></b>");
  588. 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>");
  589. sys.sendHtmlMessage(src, "<b><font color=red>Rule #5 - Do not Challenge Spam:</f></b>");
  590. 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>");
  591. sys.sendHtmlMessage(src, "<br>");
  592. }
  593. ,
  594. auth : function () {
  595. var authlist = sys.dbAuths().sort()
  596. sys.sendMessage(src, "");
  597. if(commandData == "owners") {
  598. sys.sendMessage(src, "*** Owners ***")
  599. for(var x in authlist) {
  600. if(sys.dbAuth(authlist[x]) == 3) {
  601. if(sys.id(authlist[x]) == undefined) {
  602. sys.sendMessage(src, authlist[x] + " (Offline)")
  603. }
  604. if(sys.id(authlist[x]) !=undefined) {
  605. sys.sendHtmlMessage(src, '<timestamp/><font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
  606. }
  607. }
  608. }
  609. sys.sendMessage(src, "");
  610. }
  611. if(commandData == "admins" || commandData == "Administrators") {
  612. sys.sendMessage(src, "*** Administrators ***")
  613. for(var x in authlist) {
  614. if(sys.dbAuth(authlist[x]) == 2) {
  615. if(sys.id(authlist[x]) == undefined) {
  616. sys.sendMessage(src, authlist[x] + " (Offline)")
  617. }
  618. if(sys.id(authlist[x]) !=undefined) {
  619. sys.sendHtmlMessage(src, '<timestamp/><font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
  620. }
  621. }
  622. }
  623. sys.sendMessage(src, "");
  624. }
  625. if(commandData == "mods" || commandData == "Moderators") {
  626. sys.sendMessage(src, "*** Moderators ***")
  627. for(var x in authlist) {
  628. if(sys.dbAuth(authlist[x]) == 1) {
  629. if(sys.id(authlist[x]) == undefined) {
  630. sys.sendMessage(src, authlist[x] + " (Offline)")
  631. }
  632. if(sys.id(authlist[x]) !=undefined) {
  633. sys.sendHtmlMessage(src, '<timestamp/><font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
  634. }
  635. }
  636. }
  637. sys.sendMessage(src, "");
  638. }
  639.  
  640. if(commandData != "moderators" && commandData != "mods" &&commandData != "administrators" && commandData != "admins" && commandData != "owners") {
  641.  
  642. sys.sendMessage(src, "*** Owners ***")
  643. for (var x in authlist) {
  644. if (sys.dbAuth(authlist[x]) == 3) {
  645. if (sys.id(authlist[x]) == undefined) {
  646. sys.sendMessage(src, authlist[x]+ " (Offline)")
  647. }
  648. if (sys.id(authlist[x]) != undefined) {
  649. sys.sendHtmlMessage(src,'<timestamp/><font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
  650. }
  651. }
  652. }
  653. sys.sendMessage(src, "");
  654. sys.sendMessage(src, "*** Administrators ***")
  655. for( var x in authlist) {
  656. if (sys.dbAuth(authlist[x]) == 2) {
  657. if (sys.id(authlist[x]) == undefined) {
  658. sys.sendMessage(src, authlist[x] + " (Offline)")
  659. }
  660. if (sys.id(authlist[x]) != undefined) {
  661. sys.sendHtmlMessage(src, '<timestamp/><font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
  662. }
  663. }
  664. }
  665. sys.sendMessage(src, "");
  666. sys.sendMessage(src, "*** Moderators ***")
  667. for(x in authlist) {
  668. if(sys.dbAuth(authlist[x]) == 1) {
  669. if(sys.id(authlist[x]) == undefined) {
  670. sys.sendMessage(src, authlist[x]+ " (Offline)")
  671. }
  672. if(sys.id(authlist[x]) != undefined) {
  673. sys.sendHtmlMessage(src,'<timestamp/><font color = "green">' + sys.name(sys.id(authlist[x])) + ' (Online)</font>')
  674. }
  675. }
  676. }
  677. }
  678. return;
  679. }
  680. ,
  681. players: function () {
  682. sys.sendMessage(src, "+CountBot: There are " + sys.numPlayers() +" players online.");
  683. return;
  684. }
  685.  
  686. ,
  687. viewjournal : function (){
  688. sys.sendHtmlMessage(src, "");
  689. sys.sendHtmlMessage(src, '<timestamp/> <font color="red">*** The Guest Book ***</font>');
  690. sys.sendHtmlMessage(src, "");
  691. var get = sys.getFileContent("gb").split("*");
  692. for(x in get){
  693. sys.sendHtmlMessage(src,get[x]);
  694. }
  695. return; }
  696. ,
  697. signjournal : function () {
  698. if (commandData == undefined) {
  699. var get = sys.getFileContent("gb");
  700. sys.writeToFile("gb",get + sys.name(src) + "*");
  701. sys.sendAll(sys.name(src) + " " + "signed the guest book!");
  702. return;
  703. }
  704. var qu = commandData.match(/<(\w+)[^>]*>/g);
  705. if (qu) {
  706. for (var x in qu) {
  707. commandData+= qu[x].replace(/<(\w+)[^>]*>/g,'</$1>'); }
  708. }
  709. if (message.search(/[\u202E\u202D]/) != -1) {
  710. return; }
  711. var get = sys.getFileContent("gb");
  712. sys.writeToFile("gb",get + sys.name(src) + " - " + commandData +"*");
  713. sys.sendAll(sys.name(src) + " " + "signed the guest book!");
  714. return; }
  715. });
  716.  
  717. var modCommands = ({
  718. modcommands: function () {
  719. sys.sendHtmlMessage(src, "<hr>");
  720. sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>*** <font color=black>Mod Commands <font color=orange>***");
  721. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/imp <font color=red>Person</f></b> : <font color=black>to impersonate someone");
  722. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is either an online player or any name.");
  723. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/impOff</f></b> : <font color=black>to stop impersonating.");
  724. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/kick <font color=red>Person</f></b> :<font color=black> to kick someone");
  725. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
  726. 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.");
  727. 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.");
  728. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/changemotd <font color=red>Message</f></b> : <font color=black>to change MOTD.");
  729. 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.");
  730. sys.sendHtmlMessage(src, "<hr>");
  731. return; }
  732. ,
  733. sburn : function () {
  734. if (tar == undefined) {
  735. 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");
  736. return;
  737. }
  738. 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>");
  739. return;
  740. }
  741. ,
  742. spoison : function () {
  743. if (tar == undefined) {
  744. 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");
  745. return;
  746. }
  747. 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>");
  748. return;
  749. }
  750. ,
  751. sthunder : function () {
  752. if (tar == undefined) {
  753. 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");
  754. return;
  755. }
  756. 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>");
  757. return;
  758. }
  759. ,
  760. ssleep : function () {
  761. if (tar == undefined) {
  762. 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");
  763. return;
  764. }
  765. 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>");
  766. return;
  767. }
  768. ,
  769. imp: function () {
  770. impersonation[src] = commandData;
  771. sys.sendMessage(src, "+Bot: Now you are " + impersonation[src] +"!");
  772. return;
  773. }
  774. ,
  775. changemotd: function () {
  776. Topic = commandData;
  777. sys.sendHtmlAll("<font color=red>+Bot: The MOTD has been changed.");
  778. }
  779.  
  780. ,
  781. joinon: function () {
  782. joinoff[src]=false
  783. 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>");
  784. return;
  785. }
  786. ,
  787. joinoff: function () {
  788. joinoff[src]=true
  789. sys.sendHtmlAll("<font color=orange><b><font size=3>~~Bot~~:</b></font> The signups have been ended by " + sys.name(src) + ".</f>");
  790. return;
  791. }
  792. ,
  793. endtour: function () {
  794. sys.sendHtmlAll("<font color=orange><b><font size=3>~~Bot~~:</b></font> The Tour has been ended by " + sys.name(src) + ".</f>");
  795. return;
  796. }
  797. ,
  798. tour: function () {
  799. sys.sendHtmlAll("<hr>");
  800. sys.sendHtmlAll("<timestamp/><font color=red><b>*** TOURNAMENT ***</f></b></font>");
  801. sys.sendHtmlAll("<timestamp/><font color=blue><b>*** The tier will be decided when you see the message</f></b></font>");
  802. sys.sendHtmlMessage(src,"<timestamp/><font color=orange><b>~~Bot~~:</f></b><font color=black> Type /settier to set the tier</f>");
  803. sys.sendHtmlAll("<timestamp/><font color=blue><b>*** The amount of people will be decided when you see the message</f></b></font>");
  804. sys.sendHtmlMessage(src, "<timestamp/><font color=orange><b>~~Bot~~:</f></b><font color=black> Type /setpeople to set the amount of players");
  805. sys.sendHtmlAll("<timestamp/><font color=orange><b>~~Bot~~:</f></b><font color=black> Type /join to join the tour!");
  806. sys.sendHtmlAll("<timestamp/><font color=orange><b>~~Bot~~:</f></b><font color=black> Type /leave to leave the tour!");
  807. sys.sendHtmlAll("<hr>");
  808. return;
  809. }
  810. ,
  811. settier : function () {
  812. sys.sendHtmlAll("<b><font size=5><font color=red>A(n) " + commandData + " Tour has been started by " + sys.name(src) + "!</font></b></f>");
  813. return;
  814. }
  815. ,
  816. setpeople : function () {
  817. sys.sendHtmlAll("<b><font size=5><font color=red>The Number of players allowed for the tour are: " + commandData + "!</font></f></b>");
  818. return;
  819. }
  820. ,
  821. round1 : function () {
  822. sys.sendHtmlAll("<b><font size=5><font color=red>Round 1 has been started by " + sys.name(src) + " !</font></f></b>");
  823. return;
  824. }
  825. ,
  826. round2 : function () {
  827. sys.sendHtmlAll("<b><font size=5><font color=red>Round 2 has been started by " + sys.name(src) + " !</font></f></b>");
  828. return;
  829. }
  830.  
  831. ,
  832. round3: function () {
  833. sys.sendHtmlAll("<b><font size=5><font color=red>Round 3 has been started by " + sys.name(src) + " !</font></f></b>");
  834. return;
  835. }
  836. ,
  837. round4: function () {
  838. sys.sendHtmlAll("<b><font size=5><font color=red>Round 4 has been started by " + sys.name(src) + " !</font></f></b>");
  839. return;
  840. }
  841. ,
  842. round5: function () {
  843. sys.sendHtmlAll("<b><font size=5><font color=red>Round 5 has been started by " + sys.name(src) + " !</font></f></b>");
  844. return;
  845. }
  846. ,
  847. round: function () {
  848. sys.sendHtmlAll("<b><font size=5><font color=red>Round " + commandData + " has been started by " + sys.name(src) + " !</font></f></b>");
  849. return;
  850. }
  851. ,
  852. impoff : function () {
  853. delete impersonation[src];
  854. sys.sendMessage(src, "+Bot: Now you are yourself!");
  855. return;
  856. }
  857. ,
  858. kick : function () {
  859. if (tar == undefined) {
  860. return;
  861. }
  862. sys.sendHtmlAll("<font color=red><b>+KickBot:</b> " + commandData + " Was kicked for something by " +sys.name(src) + "!");
  863. sys.kick(tar);
  864. return;
  865. }
  866. ,
  867. mute: function () {
  868. if (tar == undefined) {
  869. return;
  870. }
  871. if (sys.auth(tar) >= sys.auth(src)) {
  872. sys.sendMessage("+Bot: you dont have sufficient auth to mute " + commandData + ".");
  873. return;
  874. }
  875. sys.sendHtmlAll("<font color=blue><b>+MuteBot:</b> " + commandData + " Was muted by " +sys.name(src) + "!");
  876. muted[tar] = true;
  877. return
  878. }
  879. ,
  880. unmute:function () {
  881. if (tar == undefined) {
  882. return;
  883. }
  884. sys.sendHtmlAll("<font color=green><b>+MuteBot:</b> " + commandData + " Was unmuted by " +sys.name(src) + "!");
  885. muted[tar] = false;
  886. return;
  887. }
  888. })
  889. var adminCommands = ({
  890. admincommands : function () {
  891. if (sys.auth(src) < 2) {
  892. sys.sendMessage(src, "+CommandBot: Your are not of the right authority to view these commands.");
  893. return;
  894. }
  895.  
  896. sys.sendHtmlMessage(src, "<hr>");
  897. sys.sendHtmlMessage(src, "<font color=red><timestamp/><b>*** <font color=black>Admin Commands <font color=red>***</b></f>");
  898. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/reset</f></b>: <font color=black>to reset the server variables");
  899. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/masskick</f></b>: <font color=black>to clean up the server");
  900. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/setPA <font color=red>Paname</f></b>: <font color=black>to add a new pa");
  901. 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.");
  902. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/clearjournal</f></b>: <font color=black>to clear the journal");
  903. 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");
  904. 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.");
  905. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/clearchat</f></b>: <font color=black>to clear the chat");
  906. 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");
  907. sys.sendHtmlMessage(src, "<font color=blue>°<b>Note: <Font color=red>Rule<font color=black> is rule 1-10.");
  908. sys.sendHtmlMessage(src, "<hr>");
  909. return;
  910. }
  911. ,
  912. forcerule: function () {
  913. if (commandData == undefined) {
  914. sys.sendMessage(src, "~~Bot~~:Not a valid rule");
  915. return;
  916. }
  917. if (commandData == 1) {
  918. sys.sendAll("Rule #1 - Do Not Abuse CAPS:");
  919. sys.sendAll("- The occasional word in CAPS is acceptable, however repeated use is not.");
  920. return;
  921. }
  922. if (commandData == 2) {
  923. sys.sendAll("Rule #2 - No Flooding the Chat:");
  924. sys.sendAll("- Please do not post a large amount of short messages when you can easily post one or two long messages.");
  925. return;
  926. }
  927. if (commandData == 3) {
  928. sys.sendAll("Rule #3 - Do not Challenge Spam:");
  929. sys.sendAll("- If a person refuses your challenge, this means they do not want to battle you. Find someone else to battle with.");
  930. return;
  931. }
  932. if (commandData == 4) {
  933. sys.sendAll("Rule #4 - Don't ask for battles in the main chat:");
  934. 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.");
  935. return;
  936. }
  937. if (commandData == 5) {
  938. sys.sendAll("Rule #5 - No Trolling/Flaming/Insulting of Any kind:");
  939. sys.sendAll("- Behaving stupidly and excessive vulgarity will not be tolerated.");
  940. return;
  941. }
  942. if (commandData == 6) {
  943. sys.sendAll("Rule #6 - Please only speak English:");
  944. sys.sendAll("- Most people speak a different language, which is ok. But please speak english.");
  945. return;
  946. }
  947. if (commandData == 7) {
  948. sys.sendAll("Rule #7 - No Advertising:");
  949. sys.sendAll("- There will be absolutely no advertising on the server.");
  950. return;
  951. }
  952. if (commandData == 8) {
  953. sys.sendAll("Rule #8 - No Obscene or Pornographic Content Allowed:");
  954. sys.sendAll("- This includes links, texts, images, and any other kind of media. This will result in a instant ban.");
  955. return;
  956. }
  957. if (commandData == 9) {
  958. sys.sendAll("Rule #9 - Do not ask for Auth:");
  959. sys.sendAll(" - Authority is given upon merit. By asking you have pretty much eliminated your chances at becoming an Auth in the future.");
  960. return;
  961. }
  962. if (commandData == 10) {
  963. sys.sendAll("Rule #10 - Do not Insult Auth:");
  964. sys.sendAll("- Insulting Auth will result in immediate punishment.");}
  965. return;
  966. }
  967. ,
  968. reset : function () {
  969. this.serverStartUp();
  970. sys.sendAll("~~Server~~: The server script variables were reset.");
  971. return;
  972. }
  973. ,
  974. changeannouncement: function () {
  975. if (sys.auth(src) < 3) {
  976. return;
  977. }
  978. sys.setAnnouncement(commandData);}
  979. ,
  980. resetannouncement: function () {
  981. if (sys.auth(src) < 3) {
  982. return;
  983. }
  984. sys.setAnnouncement("Announcement reset by<font color=fuchsia> " + sys.name(src));}
  985. ,
  986. changemotd:function () {
  987. Topic = commandData;
  988. sys.sendAll("The MOTD has been changed.");}
  989. ,
  990. ban:function () {
  991. if(sys.dbIp(commandData) == undefined) {
  992. sendChanMessage(src, "+Bot: No player exists by this name!");
  993. return;
  994. }
  995.  
  996. if (sys.maxAuth(sys.ip(tar))>=sys.auth(src)) {
  997. sendChanMessage(src, "+Bot: Can't do that to higher auth!");
  998. return;
  999. }
  1000. var ip = sys.dbIp(commandData);
  1001. var alias=sys.aliases(ip)
  1002. var y=0;
  1003. var z;
  1004. for(var x in alias) {
  1005. z = sys.dbAuth(alias[x])
  1006. if (z > y) {
  1007. y=z
  1008. }
  1009. }
  1010. if(y>=sys.auth(src)) {
  1011. sendChanMessage(src, "+Bot: Can't do that to higher auth!");
  1012. return;
  1013. }
  1014. var banlist=sys.banList()
  1015. for(a in banlist) {
  1016. if(sys.dbIp(commandData) == sys.dbIp(banlist[a])) {
  1017. sendChanMessage(src, "+Bot: He/she's already banned!");
  1018. return;
  1019. }
  1020. }
  1021.  
  1022. sys.sendHtmlAll('<b><font color=red>' + commandData + ' was banned by ' + sys.name(src) + '!</font></b>');
  1023. if(tar != undefined) {
  1024. sys.kick(tar)
  1025. }
  1026. sys.ban(commandData)
  1027. sys.appendToFile('bans.txt', sys.name(src) + ' banned ' +commandData + "n")
  1028. return;
  1029. }
  1030. ,
  1031. unban: function () {
  1032. if(sys.dbIp(commandData) == undefined) {
  1033. sendChanMessage(src, "+Bot: No player exists by this name!");
  1034. return;
  1035. }
  1036. var banlist=sys.banList()
  1037. for(a in banlist) {
  1038. if(sys.dbIp(commandData) == sys.dbIp(banlist[a])) {
  1039. sys.unban(commandData)
  1040. sys.sendHtmlAll('<b><font color=red>' + commandData + ' was unbanned by ' + sys.name(src) + '!</font></b>');
  1041. sys.appendToFile('bans.txt', sys.name(src) + ' unbanned ' +commandData + "n")
  1042. return;
  1043. }
  1044. }
  1045. sendChanMessage(src, "+Bot: He/she's not banned!");
  1046. return;
  1047.  
  1048. }
  1049. ,
  1050.  
  1051. silentkick : function () {
  1052. if (sys.auth(src) < 3) {
  1053. return;
  1054. }
  1055. if (tar == undefined) {
  1056. return;
  1057. }
  1058. sys.kick(tar);
  1059. return;
  1060. }
  1061. ,
  1062. clearchat:function () {
  1063. var c;
  1064. for (c=0;c<2999;c++) {
  1065. sys.sendAll("");
  1066. }
  1067. sys.clearChat();
  1068. sys.sendAll(sys.name(src) + " Has Cleared the chat!");
  1069. return;
  1070. }
  1071. ,
  1072. setpa:function () {
  1073. sys.setPA(commandData);
  1074. sys.sendMessage(src, "Bot: -" + commandData + "- was set!");
  1075. return;
  1076. }
  1077. ,
  1078. clearjournal:function () {
  1079. var get = sys.getFileContent("gb");
  1080. sys.deleteFile("gb");
  1081. sys.sendAll("The guest book was cleared!");
  1082. sys.writeToFile("gb","This is the guest book. Comments are listed below:<br><br>");
  1083. return;
  1084. }
  1085. ,
  1086. masskick:function () {
  1087. for (var i = 1; i < 200 && sys.numPlayers() > 0; i++) {
  1088. if (sys.loggedIn(i)) {
  1089. sys.kick(i);
  1090. }
  1091. }
  1092. return;
  1093. }
  1094. });
  1095. var ownerCommands = ({
  1096.  
  1097. ownercommands : function () {
  1098. sys.sendHtmlMessage(src, "<hr>");
  1099. sys.sendHtmlMessage(src, "<font color=blue><timestamp/><b>*** <font color=black>Owner Commands <font color=blue>***</b></f>");
  1100. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/resetannouncement</f></b>: <font color=black>to reset the announcement(clear it)");
  1101. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/changeannouncement <font color=red>Message</f></b>: <font color=black>change announcement");
  1102. 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.");
  1103. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/silentkick</f><font color=red> Person</b></f>: <font color=black>to silently kick someone");
  1104. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
  1105. 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.");
  1106. 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.");
  1107. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/<font color=green>SilentBan/SilentUnban</f></b>: <font color=black>to silently ban someone");
  1108. 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.");
  1109. 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 //
  1110. 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.");
  1111. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/authnames</f></b>: <font color=black>view authnames for the /AuthName.");
  1112. sys.sendHtmlMessage(src, "<hr>");
  1113. return;
  1114. }
  1115. ,
  1116. clearpass: function () {
  1117. sys.clearPass(commandData);
  1118. sys.sendHtmlMessage(src, "<timestamp/><font color=orange><b>~~Bot~~:</b></font> You cleared " + commandData + "'s password.<f>");
  1119. sys.sendHtmlMessage(tar, "<timestamp/><font color=orange><b>~~Bot~~:</b></font> Your Password has been cleared by " + sys.name(src) + ".<f>");
  1120. return;
  1121. }
  1122. ,
  1123. alias: function () {
  1124. sys.sendHtmlMessage(src, "<font color=orange><timestamp/><b>~~Bot~~:</font></b> The aliases for the IP " + commandData + " are: " + sys.aliases(commandData) + ".");
  1125. return;
  1126. }
  1127. ,
  1128. authnames: function () {
  1129. sys.sendHtmlMessage(src, "<hr>");
  1130. sys.sendHtmlMessage(src, "<font color=purple><timestamp/> *** Auth Names ***</f>");
  1131. sys.sendHtmlMessage(src, "<font color=green><timestamp/> 0 Auth = <b> User</f>"); // */user* //
  1132. sys.sendHtmlMessage(src, "<font color=blue><timestamp/> 1 Auth = <b> Mod</f>"); // */mod* //
  1133. sys.sendHtmlMessage(src, "<font color=orange><timestamp/> 2 Auth = <b> Admin</f>"); // */admin*//
  1134. sys.sendHtmlMessage(src, "<font color=red><timestamp/> 3 Auth = <b> Owner</f>"); // */owner* //
  1135. sys.sendHtmlMessage(src, "<font color=cornflowerblue><timestamp/> 4 Auth = <b> Invisible</f>"); // */invisible* //
  1136. sys.sendHtmlMessage(src, "<hr>");
  1137. }
  1138. ,
  1139. tourauthnames: function () {
  1140. sys.sendHtmlMessage(src, "<hr>");
  1141. sys.sendHtmlMessage(src, "<font color=purple><timestamp/> *** Auth Names ***</f>");
  1142. sys.sendHtmlMessage(src, "<font color=green><timestamp/> 0 TourAuth = <b> TourUser</f>"); // */touruser* //
  1143. sys.sendHtmlMessage(src, "<font color=blue><timestamp/> 1 TourAuth = <b> TourMod</f>"); // */tourmod* //
  1144. sys.sendHtmlMessage(src, "<font color=orange><timestamp/> 2 TourAuth = <b> TourAdmin</f>"); // */touradmin*//
  1145. sys.sendHtmlMessage(src, "<font color=red><timestamp/> 3 TourAuth = <b> TourOwner</f>"); // */tourowner* //
  1146. sys.sendHtmlMessage(src, "<hr>");
  1147. }
  1148. ,
  1149. secretcommands : function () {
  1150. sys.sendHtmlMessage(src, "<hr>");
  1151. sys.sendHtmlMessage(src, "<font color=black><timestamp/><b>*** <font color=black>Secret Commands <font color=black>***</b></f>");
  1152. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/eval <font color=skyblue>String</f></b>: <font color=black>to use any js string");
  1153. 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.");
  1154. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/clearpass</f><font color=red> Person</b></f>: <font color=black>to clear someones password");
  1155. 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.");
  1156. sys.sendHtmlMessage(src, "<font color=green><timestamp/><b>/showteam</f><font color=red> Person</b></f>: <font color=black>to show someones team");
  1157. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>Person</f><font color=black> is any online player.");
  1158. 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");
  1159. sys.sendHtmlMessage(src, "<font color=blue>•<b>Note: <font color=red>IP</f><font color=black> is any registerd IP in the database.");
  1160. sys.sendHtmlMessage(src, "<hr>");
  1161. return;
  1162. }
  1163. ,
  1164. silentmute: function () {
  1165. if (tar == undefined) {
  1166. return;
  1167. }
  1168. muted[tar] = true;
  1169. return
  1170. }
  1171. ,
  1172. touruser: function () {
  1173. if (tar == undefined) {
  1174. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1175. return;
  1176. }
  1177. sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " has been given Tour-User by " + sys.name(src) + ".");
  1178. return;
  1179. }
  1180. ,
  1181. tourmod: function () {
  1182. if (tar == undefined) {
  1183. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1184. return;
  1185. }
  1186. sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " has been given Tour-Mod by " + sys.name(src) + ".");
  1187. return;
  1188. }
  1189. ,
  1190. touradmin: function () {
  1191. if (tar == undefined) {
  1192. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1193. return;
  1194. }
  1195. sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " has been given Tour-Admin by " + sys.name(src) + ".");
  1196. return;
  1197. }
  1198. ,
  1199. tourowner: function () {
  1200. if (tar == undefined) {
  1201. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1202. return;
  1203. }
  1204. sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " has been given Tour-Owner by " + sys.name(src) + ".");
  1205. return;
  1206. }
  1207. ,
  1208. silentunmute: function () {
  1209. if (tar == undefined) {
  1210. return;
  1211. }
  1212. muted[tar] = false;
  1213. return
  1214. }
  1215. ,
  1216. showteam: function () {
  1217. if (tar == undefined) {
  1218. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1219. return;
  1220. }
  1221. sys.sendMessage(src, "");
  1222. for (var i = 0; i < 6; i+=1) {sys.sendMessage(src, sys.pokemon(sys.teamPoke(tar, i)) + " @ " + sys.item(sys.teamPokeItem(tar, i)));
  1223. for (var j = 0; j < 4; j++) {sys.sendMessage(src, '- ' + sys.move(sys.teamPokeMove(tar, i, j)));}}
  1224. sys.sendMessage(src, "");
  1225. return;
  1226. }
  1227. ,
  1228. user: function () {
  1229. if (tar == undefined) {
  1230. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1231. return;
  1232. }
  1233. sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " has been usered by " + sys.name(src) + ".");
  1234. sys.changeAuth(tar, 0);
  1235. return;
  1236. }
  1237. ,
  1238. mod: function () {
  1239. if (tar == undefined) {
  1240. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1241. return;
  1242. }
  1243. sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " was been made a mod by " + sys.name(src) + ".");
  1244. sys.changeAuth(tar, 1);
  1245. return;
  1246. }
  1247. ,
  1248. admin: function () {
  1249. if (tar == undefined) {
  1250. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1251. return;
  1252. }
  1253. sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " was been made an admin by " + sys.name(src) + ".");
  1254. sys.changeAuth(tar, 2);
  1255. }
  1256. ,
  1257. owner: function () {
  1258. if (tar == undefined) {
  1259. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1260. return;
  1261. }
  1262. sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " was made an owner by " + sys.name(src) + ".");
  1263. sys.changeAuth(tar, 3);
  1264. }
  1265. ,
  1266. invisible: function () {
  1267. if (tar == undefined) {
  1268. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1269. return;
  1270. }
  1271. sys.sendHtmlAll("<font color=orange><b>~~Bot~~:</b> " + commandData + " was made an invisible auth by " + sys.name(src) + ".");
  1272. sys.changeAuth(tar, 4);
  1273. return;
  1274. }
  1275. ,
  1276. suser: function () {
  1277. if (tar == undefined) {
  1278. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1279. return;
  1280. }
  1281. sys.changeAuth(tar, 0);
  1282. }
  1283. ,
  1284. smod: function () {
  1285. if (tar == undefined) {
  1286. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1287. return;
  1288. }
  1289. sys.changeAuth(tar, 1);
  1290. }
  1291. ,
  1292. sadmin: function () {
  1293. if (tar == undefined) {
  1294. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1295. return;
  1296. }
  1297. sys.changeAuth(tar, 2);
  1298. }
  1299. ,
  1300. sowner: function () {
  1301. if (tar == undefined) {
  1302. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1303. return;
  1304. }
  1305. sys.changeAuth(tar, 3);
  1306. return;
  1307. }
  1308. ,
  1309. sinvisible: function () {
  1310. if (tar == undefined) {
  1311. sys.sendMessage(src, "+Bot: Either specify a name or that player is not on.");
  1312. return;
  1313. }
  1314. sys.changeAuth(tar, 4);
  1315. return;
  1316. }
  1317. ,
  1318. eval: function () {
  1319. sys.eval(commandData);
  1320. return;
  1321. }
  1322. ,
  1323. silentban:function () {
  1324. if(sys.dbIp(commandData) == undefined) {
  1325. sys.sendMessage(src, "+Bot: No player exists by this name!");
  1326. return;
  1327. }
  1328. if (sys.maxAuth(sys.ip(tar))>=sys.auth(src)) {
  1329. sys.sendMessage(src, "+Bot: Can't do that to higher auth!");
  1330. return;
  1331. }
  1332. var ip = sys.dbIp(commandData);
  1333. var alias=sys.aliases(ip)
  1334. var y=0;
  1335. var z;
  1336. for(var x in alias) {
  1337. z = sys.dbAuth(alias[x])
  1338. if (z > y) {
  1339. y=z
  1340. }
  1341. }
  1342. if(y>=sys.auth(src)) {
  1343. sys.sendMessage(src, "+Bot: Can't do that to higher auth!");
  1344. return;
  1345. }
  1346. var banlist=sys.banList()
  1347. for(a in banlist) {
  1348. if(sys.dbIp(commandData) == sys.dbIp(banlist[a])) {
  1349. sys.sendMessage(src, "+Bot: He/she's already banned!");
  1350. return;
  1351. }
  1352. }
  1353.  
  1354. if(tar != undefined) {
  1355. sys.kick(tar)
  1356. }
  1357. sys.ban(commandData)
  1358. sys.appendToFile('bans.txt', sys.name(src) + ' banned ' +commandData + "n")
  1359. return;
  1360. }
  1361. ,
  1362. silentunban: function () {
  1363. if(sys.dbIp(commandData) == undefined) {
  1364. sendChanMessage(src, "+Bot: No player exists by this name!");
  1365. return;
  1366. }
  1367. var banlist=sys.banList()
  1368. for(a in banlist) {
  1369. if(sys.dbIp(commandData) == sys.dbIp(banlist[a])) {
  1370. sys.unban(commandData)
  1371. sys.appendToFile('bans.txt', sys.name(src) + ' unbanned ' +commandData + "n")
  1372. return;
  1373. }
  1374. }
  1375. sendChanMessage(src, "+Bot: He/she's not banned!");
  1376. return;
  1377.  
  1378. }
  1379. ,
  1380. });
  1381. var getCommand = ({
  1382. '0': function (name) {
  1383. if (name in userCommands) {
  1384. return userCommands[name]; }
  1385. }
  1386. ,
  1387. '1': function (name) {
  1388. if (name in modCommands) {
  1389. return modCommands[name]; }
  1390. else if (name in userCommands) {
  1391. return userCommands[name]; }
  1392. }
  1393. ,
  1394. '2' : function (name) {
  1395. if (name in adminCommands) {
  1396. return adminCommands[name]; }
  1397. else if (name in modCommands) {
  1398. return modCommands[name]; }
  1399. else if (name in userCommands) {
  1400. return userCommands[name]; }
  1401. }
  1402. ,
  1403. '3' : function (name) {
  1404. if (name in ownerCommands) {
  1405. return ownerCommands[name]; }
  1406. else if (name in adminCommands) {
  1407. return adminCommands[name]; }
  1408. else if (name in modCommands) {
  1409. return modCommands[name]; }
  1410. else if (name in userCommands) {
  1411. return userCommands[name]; }
  1412. }
  1413. ,
  1414. '4' : function (name) {
  1415. if (name in ownerCommands) {
  1416. return ownerCommands[name]; }
  1417. else if (name in adminCommands) {
  1418. return adminCommands[name]; }
  1419. else if (name in modCommands) {
  1420. return modCommands[name]; }
  1421. else if (name in userCommands) {
  1422. return userCommands[name]; }
  1423. }
  1424. });
  1425. var cmd = getCommand[sys.auth(src)](command);
  1426. if (!cmd) {
  1427. sys.sendMessage(src, getCommand[3](command) ? "+Bot: You aren't allowed to use that command." : "+Bot: That command doesn't exist." );
  1428. return; }
  1429. cmd();
  1430. return;
  1431.  
  1432. }
  1433. if (typeof impersonation[src] != 'undefined') {
  1434. sys.stopEvent();
  1435. sys.sendAll(impersonation[src] + ": " + message);
  1436. return;
  1437. }
  1438. }
  1439.  
  1440. ,
  1441.  
  1442. beforeChallengeIssued : function (src, dest, clauses) {
  1443. /* Challenge Cup Clause */
  1444. if (clauses[7] == 1)
  1445. return;
  1446.  
  1447. if (clauseOn[dest] == true) {
  1448. for (var i = 0; i < 6; i++) {
  1449. if (hasBan(dest, sys.teamPoke(src,i))) {
  1450. sys.sendMessage(src, "ClauseBot: Your opponent is afraid of " + sys.pokemon(sys.teamPoke(src,i)));
  1451. sys.stopEvent();
  1452. return;
  1453. }
  1454. }
  1455. }
  1456. if (clauseOn[src] == true) {
  1457. for (var i = 0; i < 6; i++) {
  1458. if (hasBan(src, sys.teamPoke(dest,i))) {
  1459. sys.sendMessage(src, "ClauseBot: You are afraid of some pokemon of the opponent, so I won't let you challenge them.");
  1460. sys.stopEvent();
  1461. return;
  1462. }
  1463. }
  1464. }
  1465.  
  1466. /* Regular tier checks that can't be made using the built-in server tier system */
  1467. if (sys.tier(src) == "LittleCup" && sys.tier(dest) == "LittleCup") {
  1468. if (sys.hasTeamMove(src, sys.moveNum("SonicBoom")) ||sys.hasTeamMove(src, sys.moveNum("Dragon Rage"))) {
  1469. sys.sendMessage(src, "+Bot: SonicBoom and Dragon Rage are banned in Little Cup!");
  1470. sys.stopEvent();
  1471. }
  1472. if (sys.hasTeamMove(dest, sys.moveNum("SonicBoom")) ||sys.hasTeamMove(dest, sys.moveNum("Dragon Rage"))) {
  1473. sys.sendMessage(src, "+Bot: Your opponent has banned moves SonicBoom or Dragon Rage in Little Cup tier!");
  1474. sys.stopEvent();
  1475. }
  1476. if (sys.hasTeamItem(src, sys.itemNum("Berry Juice"))) {
  1477. sys.sendMessage(src, "+Bot: Berry Juice is banned in Little Cup!");
  1478. sys.stopEvent();
  1479. }
  1480. if (sys.hasTeamItem(dest, sys.itemNum("Berry Juice"))) {
  1481. sys.sendMessage(src, "+Bot: Berry Juice is banned in Little Cup and your opponent has it!");
  1482. sys.stopEvent();
  1483. }
  1484. }
  1485. }
  1486.  
  1487. ,
  1488.  
  1489. beforeBattleMatchup : function(src,dest,clauses)
  1490. {
  1491. if (clauseOn[dest] == true) {
  1492. for (var i = 0; i < 6; i++) {
  1493. if (hasBan(dest, sys.teamPoke(src,i))) {
  1494. sys.stopEvent();
  1495. return;
  1496. }
  1497. }
  1498. }
  1499. if (clauseOn[src] == true) {
  1500. for (var i = 0; i < 6; i++) {
  1501. if (hasBan(src, sys.teamPoke(dest,i))) {
  1502. sys.stopEvent();
  1503. return;
  1504. }
  1505. }
  1506. }
  1507.  
  1508. /* Regular tier checks that can't be made using the built-in server tier system */
  1509. if (sys.tier(src) == "LittleCup" && sys.tier(dest) == "LittleCup") {
  1510. if (sys.hasTeamMove(src, sys.moveNum("SonicBoom")) ||sys.hasTeamMove(src, sys.moveNum("Dragon Rage"))) {
  1511. sys.stopEvent();
  1512. }
  1513. if (sys.hasTeamMove(dest, sys.moveNum("SonicBoom")) ||sys.hasTeamMove(dest, sys.moveNum("Dragon Rage"))) {
  1514. sys.stopEvent();
  1515. }
  1516. if (sys.hasTeamItem(src, sys.itemNum("Berry Juice"))) {
  1517. sys.stopEvent();
  1518. }
  1519. if (sys.hasTeamItem(dest, sys.itemNum("Berry Juice"))) {
  1520. sys.stopEvent();
  1521. }
  1522. }
  1523. }
  1524.  
  1525. ,
  1526.  
  1527. beforeBattleStarted : function(src, dest) {
  1528. /* If this is little cup, the levels are changed to be level 5 */
  1529. if (sys.tier(src) == "LittleCup" && sys.tier(dest) == "LittleCup") {
  1530. 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)];
  1531. 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)];
  1532. for (var i = 0; i < 6; i+=1) {
  1533. if (sys.teamPokeLevel(src, i) > 5)
  1534. sys.changePokeLevel(src, i, 5);
  1535. if (sys.teamPokeLevel(dest, i) > 5)
  1536. sys.changePokeLevel(dest, i, 5);
  1537. }
  1538. }
  1539. }
  1540.  
  1541. ,
  1542.  
  1543. afterBattleEnded: function(src, dest) {
  1544. /* If this is little cup, the levels are to be changed back! */
  1545. if (sys.tier(src) == "LittleCup" && sys.tier(dest) == "LittleCup" && lilCupLevels[src]!= undefined && lilCupLevels[dest] != undefined) {
  1546. for (var i = 0; i < 6; i+=1) {
  1547. if (sys.teamPokeLevel(src, i) != lilCupLevels[src][i])
  1548. sys.changePokeLevel(src, i,lilCupLevels[src][i]);
  1549. if (sys.teamPokeLevel(dest, i) != lilCupLevels[dest][i])
  1550. sys.changePokeLevel(dest, i,lilCupLevels[dest][i]);
  1551. }
  1552. }
  1553. }
  1554.  
  1555. ,
  1556.  
  1557. beforeLogOut : function (src) {
  1558. if (muted[src] == true) {
  1559. sys.saveVal("muted*" + sys.ip(src), "true");
  1560. } else {
  1561. sys.removeVal("muted*" + sys.ip(src));
  1562. }
  1563. }
  1564.  
  1565. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement