mIRC Homepage
Posted By: pykolas bot text read and output - 11/08/16 10:32 PM
So I want to make !hug command where people would write !hug *text* and bot goes: "$nick hugs *text*". All I need is to know how bot could reat second word and output it. Also, it should read only second word (if there is !hug this that, it should only output $nick hugs this). I believe I knew this, but forgot. Thanks in advance. (there is other topic in other section, I hope it will be deleted, because it was in wrong one.)
Posted By: Thedelirious1 Re: bot text read and output - 12/08/16 05:59 AM
Code:
on *:text:!hug *:#:{
  msg $chan $nick hugs $2- $+ .
}
Posted By: pykolas Re: bot text read and output - 13/08/16 12:25 AM
Originally Posted By: Thedelirious1
Code:
on *:text:!hug *:#:{
  msg $chan $nick hugs $2- $+ .
}


$2- gives second word? And $+ adds dot at the end?
© mIRC Discussion Forums