mIRC Home    About    Download    Register    News    Help

Print Thread
#245474 22/04/14 11:48 PM
Joined: Apr 2014
Posts: 5
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Apr 2014
Posts: 5
Hey there i am a complete noob when it comes to scripts and i was wondering if someone knows how to code what im looking for. I am looking to have a script that will automaticly post a question to the chat randomly from a few predetermined lines of text and would also be awesome to be able to enable and disable it as well.

Dreadmyst #245483 23/04/14 02:27 AM
Joined: Apr 2014
Posts: 191
B
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
This is not tested.

!autotext on to enable
!autotext off to disable

Code:
alias -l autotext {

  ; you can add more text here, just insert with var %text.4 <your text here.> 
  ; replace <number> on %text.<number> with line number, so on and so forth.

  var %text.1 How are you?
  var %text.2 Are you ok?
  var %text.3 How is going?

  ; edit $rand(1,3) with total lines you have. if you have 4 lines then it would be $rand(1,4)
  msg $1 %text. [ $+ [ $rand(1,3) ] ]  

}

on *:text:!autotext *:#:{
  if $nick !isop # { return }
  if $2 == off && $timer($+(autotext.,#)) { 
    $+(.timerautotext.,#) off
    msg # autotext was turn off.
  }
  if $2 == on && !$timer($+(autotext.,#)) {
    $+(.timerautotext.,#) 0 60 autotext #
    msg # autotext was turn on.
  }
}


Link Copied to Clipboard