All pastes #476270 Raw Edit

dh

public text v1 · immutable
·published 2007-05-07 23:31 UTC
rendered paste body
on *:TEXT:!dh*:#:{
  if (%dmrun) {
    if ($nick != %dmp1) && ($nick != %dmp2) {
      .notice $nick 2You are not fighting in this Dm.
    }
    else {
      if ($nick != %turn) {
        .notice $nick 2It is not your turn.
      }
      else {
        if ($nick == %dmp1) {
          .timerdmlimit off
          .timerdmlimit 1 60 switchturn %dmp2 %dmp1
          if (%froze [ $+ [ %dmp1 ] ]) {
            dec %froze [ $+ [ %dmp1 ] ]
            $iif(%froze [ $+ [ %dmp1 ] ] <= 0, unset %froze [ $+ [ %dmp1 ] ])
            msg $chan 2It is now %dmp2 $+ 's turn.
            .notice $nick 2You have been frozen and may not attack with your Dharoks.
            set %turn %dmp2
            halt
          }
          else {
            set %whp2 $rand(0,60)
            if (%whp2 < %hp [ $+ [ %dmp2 ] ]) {
              dec %hp [ $+ [ %dmp2 ] ] %whp2
              msg $chan 2 %dmp1 has hit %dmp2 with their Dharok and has done4 %whp2 2damage. %dmp2 has3 %hp [ $+ [ %dmp2 ] ] 2hp left.
              if (%spec [ $+ [ %dmp1 ] ] < 100) {
                inc %spec [ $+ [ %dmp1 ] ] 5
              }
              msg $chan 2It is now %dmp2 $+ 's turn.
              set %turn %dmp2
              unset %whp2
              halt
            }
            if (%whp2 >= %hp [ $+ [ %dmp2 ] ]) {
              set %whp2 %hp [ $+ [ %dmp2 ] ]
              dec %hp [ $+ [ %dmp2 ] ] %whp2  
              msg $chan 2 %dmp1 has hit a4 %whp2 2with their Dharok's Axe leaving %dmp2 with3 %hp [ $+ [ %dmp2 ] ] 2hp. Congratulations %dmp1 $+ , you won the Dm!
              dmwinner %dmp2 %dmp1
              stopdm
              Halt
            } 
          }
        }        
        if ($nick == %dmp2) {
          .timerdmlimit off
          .timerdmlimit 1 60 switchturn %dmp1 %dmp2
          if (%froze [ $+ [ %dmp2 ] ]) {
            dec %froze [ $+ [ %dmp2 ] ]
            $iif(%froze [ $+ [ %dmp2 ] ] <= 0, unset %froze [ $+ [ %dmp2 ] ])
            msg $chan 2It is now %dmp1 $+ 's turn.
            set %turn %dmp1
          }
          else {
            set %whp1 $rand(0,60)
            if (%whp1 < %hp [ $+ [ %dmp1 ] ]) {
              dec %hp [ $+ [ %dmp1 ] ] %whp1
              msg $chan 2 %dmp2 has hit %dmp1 with their Dharok's Axe and has done 4 $+ %whp1 2damage. %dmp1 has 3 $+ %hp [ $+ [ %dmp1 ] ] 2hp left.
              if (%spec [ $+ [ %dmp2 ] ] < 100) {
                inc %spec [ $+ [ %dmp2 ] ] 5
              }
              msg $chan 2 It is now %dmp1 $+ 's turn.
              set %turn %dmp1
              unset %whp1
              halt
            }
            if (%whp1 >= %hp [ $+ [ %dmp1 ] ]) {
              set %whp1 %hp [ $+ [ %dmp1 ] ]
              dec %hp [ $+ [ %dmp1 ] ] %whp1
              msg $chan 2 %dmp2 has hit a4 %whp1 2with their Dharok's Axe leaving %dmp1 with3 %hp [ $+ [ %dmp1 ] ] 2hp. Congratulations %dmp2 $+ , you won the Dm!
              dmwinner %dmp1 %dmp2
              stopdm
              Halt
            }
          }
        }
      }
    }
  }
}