IRC Bot Help?! reddit / irc ---------------------------------------------------------------------- Meowtty · 2016-06-07 22:10 Been working on coding an IRC bot for a server me and a friend have just started. Using an older bot from a friend's server as a template, but struggling with getting everything decent. (Disclaimer: I failed IT in HS and I'm starting learning this from scratch, please be gentle.) All the files are .mrc and the language is the same as mIRC scripting language. I'm wanting the bot to mostly respond to triggers in chat, as well be able to respond to basic private messages. I currently have it able to perform greets, !rules and similar triggers, and notice users on nick changes not to be assholes and spam. Working on triggering on words in chat, how do I script it to react to more than one word (e.g. instead of being triggered on 'food' , it would be triggered on 'pizza','sammich' ect. (stupid example but meh)). Example of previously written code for the bot is below as an example. Also wondering what other sort of functions would be good to add in, most are legit but wanting some stuff in for shits and giggles. All help is much appreciated. on *:TEXT:dong:#: { /var %which = $rand(0,3) { if %which = 0 /.timergive1 1 1 /msg $chan ヽ༼ຈل͜ຈ༽ノ ʀᴀɪsᴇ ᴜʀ ᴅᴏɴɢᴇʀs ヽ༼ຈل͜ຈ༽ノ if %which = 1 /.timergive1 1 1 /msg $chan ᕙ༼ຈل͜ຈ༽ᕗ. ʜᴀʀᴅᴇʀ, ʙᴇᴛᴛᴇʀ, ғᴀsᴛᴇʀ, ᴅᴏɴɢᴇʀ .ᕙ༼ຈل͜ຈ༽ᕗ if %which = 2 /.timergive1 1 1 /msg $chan ヽ༼ຈل͜ຈ༽ノ WHAT DOESNT KILL ME ONLY MAKES ME DONGER ᕙ༼ຈل͜ຈ༽ᕗ if %which = 3 /.timergive1 1 1 /msg $chan ヽ༼ຈل͜ຈ༽ノ Darude your Sandstorms ヽ༼ຈل͜ຈ༽ノ } } ---------------------------------------------------------------------- [deleted] · 2016-06-07 22:15 [deleted] ---------------------------------------------------------------------- [deleted] · 2016-06-07 22:16 [deleted] ---------------------------------------------------------------------- damiankw · 2016-06-07 22:16 You said its essentially mIRC script .. does that mean youre running this outside of mIRC somehow?!?!???! Also, the way I do it, is to trigger on * and then process thereafter. That way you can do things like If ((food isin $1-) || (bread isin $1-)) { do meh } Or if you are feeling really keen, use tokens. ---------------------------------------------------------------------- jumpking · 2016-06-07 22:18 Here's just one of the many ways to accomplish this. Note that since the matchtext is just a wildcard (*) that this script will have to be put into a file without any other ON TEXT events in it. (File > New) on *:text:*:#: { var %words = pizza sammich dong bacon cheeseburger taco if (%words isin $1-) { ; Do stuff here } } Edit: I should clarify. All of what I've mentioned including my example script should be done under the 'Remotes' tab of the scripts editor. ---------------------------------------------------------------------- Meowtty · 2016-06-07 22:19 Paying for a shell and loading the script in. As I said I'm not sure if/how it'll work, but I saw it hosted on another server and seemed functional. If not, recoding would be an ass but sooner rather than later. Thanks btw! ---------------------------------------------------------------------- Meowtty · 2016-06-07 22:20 So if a file contains more on text files in it like that it won't work? If so any way to fix it? :< Ty btw! ---------------------------------------------------------------------- jumpking · 2016-06-07 22:23 Correct, and no there isn't a way to fix it. The fix is to just put it in a different script file (File > New) in the scripts editor. You can then switch between files in the script editor using the 'View' menu option at the top. Edit: I should clarify. All of what I've mentioned including my example script should be done under the 'Remotes' tab of the scripts editor. ---------------------------------------------------------------------- KindOne · 2016-06-07 22:36 mIRC scripting wiki: http://en.wikichip.org/wiki/mirc mIRC scripting IDE: http://www.msldev.com/ - Has not been updated in a while, I use the latest_build.zip from http://www.msldev.com/download/win/ instead of the installer. Same person runs both of those sites. Edit: Some mIRC channels: irc.efnet.org (might be .net ?) #mirc chat.freenode.net ##mirc irc.swiftirc.net #msl (mIRC Scripting Language) / #mircscripting Response times can be anywhere from a few minutes to a few hours or so depending on the network, channel, and the time of day. ---------------------------------------------------------------------- damiankw · 2016-06-08 08:06 I'm intrigued. Very intrigued. mIRC script used to be my go to language, until i started using linux a lot more.