Advertisement
Guest User

Untitled

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