User:LCFBot/Chat.js

switch (wgPageName) { case 'Special:B3': case 'Special:Chatbot': case 'Special:Tasks': case 'Special:Maintenance': case 'Special:CVN': importScriptPage('MediaWiki:B3.js', 'monchbox'); }; importScriptPage('MediaWiki:Bot.js/Hacks.js', 'lutest'); var logInterval = (900000); importScriptPage('User:Joeytje50/ChatLogger.js', 'runescape'); importScriptPage('MediaWiki:Chat.js/1.js', 'lutest') function botMessage(text){mainRoom.socket.send(new models.ChatEntry({roomId:this.roomId,name:wgUserName,text:text}).xport);} function botPatrol(chat){ if(chat.attributes.name=='Edward Nigma'){botTarget='The Riddler';}else{botTarget='noob';} if(chat.attributes.name=='LCFBot'){botTarget='NigmaBot';} if(chat.attributes.name=='Jdude420'){botTarget='Jdude';} if(chat.attributes.name=='Codyn329'){botTarget='Cody';} if(chat.attributes.name=='Riolu777'){botTarget='Rio';} if(chat.attributes.name=='Klintran'){botTarget='Klin';} if(chat.attributes.name=='Ireithien'){botTarget='Jed';} if(chat.attributes.text=='!speak'){botMessage(', '+botTarget+'.');} if(chat.attributes.text=='!die'){botMessage(botTarget+', we must not resort to-');if(chat.attributes.name=='Edward Nigma'){botMessage('*explodes*');setTimeout(function{window.open(window.location,'_self').close;},1000);}else{botMessage('EXPLOSION PREVENTED - COMMAND NOT AUTHORIZED');}} if(chat.attributes.text=='!dance'){botMessage('(dance) Look at me go, '+botTarget+'! (dance)');} if(chat.attributes.text=='!shoot'){botMessage('*Fires laser at '+botTarget+'*');} if(chat.attributes.text=='!kick'){botMessage('Unauthorized to carry out such an action.');} if(chat.attributes.text=='!ban'){botMessage('Unauthorized to carry out such an action.');} if(chat.attributes.text=='!deactivate'){botMessage('Disabling commands.');setTimeout(function{window.open(window.location,'_self').reload;},1000);} if(chat.attributes.text=='!warning'){botMessage('Anyone who needs a warning (stop) what you\'re doing.');} if(chat.attributes.text=='!nbhello'){botMessage('Hello, I\'m NigmaBot, I use commands. If someone starts spamming commands type !deactivate and my commands will disable.');} if(chat.attributes.text=='!refresh'){botMessage('You have forced me to refresh the window, '+botTarget+'.');setTimeout(function{window.open(window.location,'_self').close;},1000);} if(chat.attributes.text=='!party'){botMessage('(dance) Ain\'t no party like a bot party cause bot parties run off commands! (dance)');} if(chat.attributes.text=='!commands'){botMessage('Access denied.');} if(chat.attributes.text=='back'){botMessage('Welcome Back! :)');} if(chat.attributes.text=='Back'){botMessage('Welcome Back! :)');} if(chat.attributes.text=='Hey'){botMessage('Hello o/');} if(chat.attributes.text=='Hey o/'){botMessage('Hello o/');} if(chat.attributes.text=='Bye'){botMessage('Cya \o');} if(chat.attributes.text=='Bye \o'){botMessage('Cya \o');} } mainRoom.model.chats.bind('afteradd',botPatrol);