All pastes #500541 Raw Edit

dm script (begin)(F)

public text v1 · immutable
·published 2007-05-21 16:51 UTC
rendered paste body
on *:text:!dm:#: {
  if {$nick == %p1 || $nick == %p2) { notice $nick You are already in a dm! | HALT }
  if (%duel == ON) { notice $nick There is already running a dm!
  HALT }
  elseif (%duel2 == OFF) {
    msg $chan $nick has initiated a dm!
    set %p1 $nick
    set %duel on
  }
  elseif (%duel2 == ON) {
    set %hp1 99
    set %hp2 99
    set %dds1 100
    set %dds2 100
    set %p2 $nick
    set %duel2 OFF
    set %duel ON
    msg $chan $nick has joined the dm against %p1 $+ !
    set %starter $rand(1,2)
    if (%starter == 1) { msg $chan %p1 may deal the first hit! }
    if (%starter == 2) { msg $chan %p2 may deal the first hit! }
  }
}
on *:text:!stopdm:#: {
  if ($nick isop $chan) {
    if (%duel == off) {
      msg $chan There is no duel on!
    }
    else {
      unset %p1
      unset %p2
      set %duel OFF
      msg $chan Dm has been stopped by $nick $+ !
    }
  }
}