Advertisement
Guest User

Untitled

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