mIRC Home    About    Download    Register    News    Help

Print Thread
#254691 25/08/15 05:40 PM
Joined: Aug 2015
Posts: 19
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2015
Posts: 19
how do i make a script that if a certain username types a message my bot will respond with (message here)

im not so good at this frown

thanks!

Joined: May 2015
Posts: 133
K
Vogon poet
Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Assuming you are using ircv3 and requesting the CAP TAGS

you can do:

Code:
on !*:text:*:#: {

  if (keyeslol isin $msgtags) {
    msg # hi keyeslol
  }
}


However, that will answer the nick every time they type anything in chat. Can you be a bit more specific what you are wanting to do?


twitter @keyeslol
Joined: Aug 2015
Posts: 19
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2015
Posts: 19
Lets say a user with the username addarash1 types (command here) and my bot replied with(any message here)
Example:
Addarash1: !command
Channelbot: (any message here)

Its like a bot made just for that one person

Bad english yes i know

Joined: May 2015
Posts: 133
K
Vogon poet
Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Do this:

Code:
on *:TEXT:!command:#: {
  if ($nick != addarash1) { return } 
  if ($1 === !command ) {
  msg $chan Test }
}


twitter @keyeslol
Joined: Aug 2015
Posts: 19
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2015
Posts: 19
thank you so much smile

edit: if addarash1 types a sentence with spaces it wont reply

Last edited by simenbmx8; 25/08/15 07:16 PM.
Joined: Aug 2015
Posts: 19
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2015
Posts: 19
it only works if addarash1 types a single word

Joined: Aug 2015
Posts: 19
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2015
Posts: 19
how do i get it to work if the user types a sentence?

Joined: May 2015
Posts: 133
K
Vogon poet
Offline
Vogon poet
K
Joined: May 2015
Posts: 133
USe the code i've posted above to accomplish that. However, i'm not sure why you would want the bot to respond whenever a user types anything.


twitter @keyeslol

Link Copied to Clipboard