All pastes #993935 Raw Edit

m_autotalk

public text v1 · immutable
#993935 ·published 2008-04-22 23:41 UTC
rendered paste body
on *:load:{ add_command AUTOTALK }
on *:load:{ add_command MODINFO }

on *:TEXT:*:?:{
  if (($1 == MODINFO) && ($2 == ${NULL})) {
    send Module: AutoTalk (Responds to things in a channel) {MODINFO AutoTalk for more info}
  }
  elseif (($1 == MODINFO) && ($2 == AUTOTALK)) {
    send Responds to stuff in a channel.
    send Modver1.0 Author: Kefka Idea from: Aile
  }
  elseif (($1 == HELP) && ($2 == COMMANDS)) {
    send AUTOTALK: (Module function)
  }
  elseif (($1 == HELP) && ($2 == AUTOTALK)) {
    send Responds to some things in the main channel.
    send See Aile for more details. :>
  }

}

on *:TEXT:*:%mainchan:{

  if (($1 == So $+ $chr(44)) && ($2 == $me) && ($3 == ${NULL})) {
    .timer 1 1 msg %mainchan WHAT.
    .timer 1 3 describe %mainchan battle
    .timer 1 4 halt
  }
  else {
    set %m_autotalk.1 $rand(1,30)
    if (%m_autotalk.1 == 15) {
      msg %mainchan So, $nick
      halt
    }
    else {
      halt
    }
  }
}