mIRC Home    About    Download    Register    News    Help

Print Thread
#132571 12/10/05 10:41 AM
Joined: Aug 2005
Posts: 7
A
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Aug 2005
Posts: 7
I want set up script for my bot
that when someone types !rules it will display all rules in a pc window or in notice.

But im not sure how to set it up
I also want set my bot to do autogreet in different rooms but i want it to do 2 different greets 1 for each room

#132572 12/10/05 01:23 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Code:
on *:text:!rules:*:{
  msg $nick The rules are.....
  msg $nick Line 2 of rules
  msg $nick Line 3 of rules
  .notice $nick Or do this to send rules by notice instead of msg.
}


If you have a lot of rules or you want to include help information as well, you might consider writing up a txt file with everything and then doing:

Code:
on *:text:!rules:*: {
  .notice $nick Sending the rules...
  dcc send $nick [color:red]rules.txt[/color]
}

Replace the red filename with your choice of filename. If it's not placed in the same folder as mIRC, include the path (if the path and/or filename contains spaces, put quotes around the path/filename).



One final way, if you have a lot of rules and don't want to send a file is to do:

Code:
on *:text:!rules:*:{
  play $nick [color:red]rules.txt[/color] 1500
}


Replace the red filename the same as above. This will message the file to the user at 1.5 second interval per line so that you don't get flooded off the server. It's a safe way to message a lot of lines to a person.


Code:
on *:join:*: {
  if ($chan == [color:red]#chan1[/color]) {
    .notice $nick This is your greeting.
  }
  elseif ($chan == [color:red]#chan2[/color]) {
    .notice $nick This is your other greeting.
  }
}


Replace the red parts and set the greetings to whatever you like.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard