开发者

Need help with a mIRC macro

I'm trying to make a script that will automatically says "see you later" as soon as one s开发者_运维百科pecific handle in a channel says the words "going home". I tried to do it on my own but got lost. Could anyone help me out?


on *:TEXT:going home:#:{ msg $chan see you later }

Note that this would only pick up "going home", not "I'm going home". You would need to add more to it, like making it *going home* or something of the sort.


The script below should get you started with mIRC scripting. It works with private message as well as an channel message (going home).

on *:text:*going home*:#,?: {
  if ($chan) { !var %target = $chan }
  else { !var %target = $nick }  
  if ($nick == sprig) || ($nick == Bob) { !msg %target see you later }
}

You could also use !var %target = $iif(($chan),$chan,$nick) instead of having the first two lines. The #,? means the on text event is happening in a channel (#) or a private message (?). To send a private message use the /msg command. The command prefix ! makes the script run the client version of the command opposed to a scripted overwrite of the command alias msg echo -a You've overwritten /msg command for example will prevent you from being able to use the /msg command which you do not want. Incase it has been overwritten I prefix most command calls with ! to ensure some of my data is not intercepted by an overwrite. The || between the if calls means or as if nick is sprig or if nick is bob (|| = or).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜