All pastes #467763 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-05-02 18:19 UTC
rendered paste body
on *:text:!dh:#: {
  if ((%dmmatch. [ $+ [ $chan ] ] == off) || ($nick != %striker. [ $+ [ $chan ] ])) {
    notice $nick 6It has to be your turn in a 4Duel Match 6to use that command
    halt
  }  
  if ($nick == %striker. [ $+ [ $chan ] ]) {
    if (%striker. [ $+ [ $chan ] ] == %dueller1. [ $+ [ $chan ] ]) { 
      set %dh1. [ $+ [ $chan ] ] $rand(0,33)
      /dec %hpdueller2. [ $+ [ $chan ] ] %dh1. [ $+ [ $chan ] ]
      if (%hpdueller2. [ $+ [ $chan ] ] < 0) { set %hpdueller2. [ $+ [ $chan ] ] 0 }
      msg $chan 4 $+ %dueller1. [ $+ [ $chan ] ] 6just hit 4 $+ %dh1. [ $+ [ $chan ] ]
      msg $chan 4 $+ %dueller2. [ $+ [ $chan ] ] $+ 's 6Hit Points are now %hpdueller2. [ $+ [ $chan ] ] 
      set %striker. [ $+ [ $chan ] ] %dueller2. [ $+ [ $chan ] ]
      if (%hpdueller2. [ $+ [ $chan ] ] < 1) {
        msg $chan 4 $+ %dueller1. [ $+ [ $chan ] ]  6Has won the fight.
        inc %wins. [ $+ [ %dueller1. [ $+ [ $chan ] ] ] ]
        inc %losses. [ $+ [ %dueller2. [ $+ [ $chan ] ] ] ]
        unset %firsthit. [ $+ [ $chan ] ]
        unset %dueller1. [ $+ [ $chan ] ]
        unset %dueller2. [ $+ [ $chan ] ]
        unset %hpdueller1. [ $+ [ $chan ] ]
        unset %hpdueller2. [ $+ [ $chan ] ]
        unset %sadueller1. [ $+ [ $chan ] ]
        unset %sadueller2. [ $+ [ $chan ] ]
        set %dmmatch. [ $+ [ $chan ] ] off
        unset %striker. [ $+ [ $chan ] ] 
        halt 
      }
    }
    else {
      msg $chan 4 $+ %striker. [ $+ [ $chan ] ] $+ 's 6Turn to attack.
      halt
    }
  }
  if ($nick == %striker. [ $+ [ $chan ] ]) {
    if (%striker. [ $+ [ $chan ] ] == %dueller2. [ $+ [ $chan ] ]) { 
      set %dh1. [ $+ [ $chan ] ] $rand(0,33)
      /dec %hpdueller1. [ $+ [ $chan ] ] %dh1. [ $+ [ $chan ] ]
      if (%hpdueller1. [ $+ [ $chan ] ] < 0) { set %hpdueller1. [ $+ [ $chan ] ] 0 }
      msg $chan 4 $+ %dueller2. [ $+ [ $chan ] ] 6just hit 4 $+ %dh1. [ $+ [ $chan ] ]
      msg $chan 4 $+ %dueller1. [ $+ [ $chan ] ] $+ 's 6Hit Points are now %hpdueller1. [ $+ [ $chan ] ] 
      set %striker. [ $+ [ $chan ] ] %dueller2. [ $+ [ $chan ] ]
      if (%hpdueller1. [ $+ [ $chan ] ] < 1) {
        msg $chan 4 $+ %dueller2. [ $+ [ $chan ] ]  6Has won the fight.
        inc %wins. [ $+ [ %dueller2. [ $+ [ $chan ] ] ] ]
        inc %losses. [ $+ [ %dueller1. [ $+ [ $chan ] ] ] ]
        unset %firsthit. [ $+ [ $chan ] ]
        unset %dueller1. [ $+ [ $chan ] ]
        unset %dueller2. [ $+ [ $chan ] ]
        unset %hpdueller1. [ $+ [ $chan ] ]
        unset %hpdueller2. [ $+ [ $chan ] ]
        unset %sadueller1. [ $+ [ $chan ] ]
        unset %sadueller2. [ $+ [ $chan ] ]
        set %dmmatch. [ $+ [ $chan ] ] off
        unset %striker. [ $+ [ $chan ] ] 
        halt 
      }
    }
    else {
      msg $chan 4 $+ %striker. [ $+ [ $chan ] ] $+ 's 6Turn to attack.
      halt
    }
  }
}