All pastes #920353 Raw Edit

DM Script Colored

public text v1 · immutable
#920353 ·published 2008-02-27 11:28 UTC
rendered paste body
on *:TEXT:!dmcmds:#: {
  msg $nick 3[12DMCOMMANDS3]12: A list of DM commands:
  msg $nick 4!dm 12- Starts the dm.
  msg $nick 4!enddm 12- Stops the dm.
  msg $nick 4!whip 12- Whips the other person. (Max 40 damage)
  msg $nick 4!dds 12- Hits the other person with a DDS special. (Max 60 damage) (Drains 25% of special bar)
  msg $nick 4!eat 12- Eats a shark and heals 20 hp. Can use when frozen. (10 sharks)
  msg $nick 4!cbow 12- Hits the person with a crystal bow. Can use when frozen. (Max 30 damage) (4 damage penalty when frozen)
  msg $nick 4!barrage 12- Hits the opponent with ice barrage. Has 70% chance of freezing the opponent for 1 turn. (Max 30 damage) (4 uses)
  msg $nick 4!dh 12- Hits the oppenent with dharoks set. (Max 70 damage) (Need 7 or less hp for hit of 70)
  msg $nick 4!fwave 12- Hits the opponent with fire wave. Can use when frozen. (Max 20 damage)
  msg $nick 4!msb 12- Hits the opponent with a magic shortbow. Can use when frozen. (Max 50 damage) (Drains 50% of special bar)
  msg $nick 4!guth 12- Hits the opponent with Guthans Set. (Max 30) (35% chance of healing yourself)
  msg $nick 4!score 12- Tells you your score.
  msg $nick 4!turn 12- Says whos turn it is.
  msg $nick 4!status 12- Tells you your hp, special bar, sharks etc.
}
alias dmoff {
  unset %hp [ $+ [ %nick1 ] ]
  unset %hp [ $+ [ %nick2 ] ]
  unset %specbar [ $+ [ %nick1 ] ]
  unset %specbar [ $+ [ %nick2 ] ]
  unset %sharks [ $+ [ %turn1 ] ]
  unset %sharks [ $+ [ %turn2 ] ]
  unset %barrages [ $+ [ %turn1 ] ]
  unset %barrages [ $+ [ %turn2 ] ]
  unset %frozen [ $+ [ %turn1 ] ]
  unset %frozen [ $+ [ %turn2 ] ]
  unset %nick1
  unset %nick2
  unset %turn1
  unset %turn2
  unset %turn11
  unset %turn22
  unset %whip
  unset %eat
  unset %dds1
  unset %dds2
  unset %msb1
  unset %msb2
  unset %cbow
  unset %barrage
  unset %R
  unset %dh
  unset %fwave
  unset %hai
  unset %N
  unset %J
  unset %heal
  unset %guth
  disable #dm
}

alias scores {
  inc %wins [ $+ [ %turn1 ] ]
  inc %losses [ $+ [ %turn2 ] ]
}
on *:TEXT:!dm:#: { 
  if (!%nick1) {
    enable #dm
    set %nick1 $nick
    set %N $r(1,2)
    set %hai %nick1
    msg $chan 3[12DM3]12: DM has been started by4 %nick1 $+ 12! Type !dm to challenge4 %nick1 $+ 12.
  }
  elseif ($address($nick,2) == $address(%nick1,2)) {  msg $chan 3[12DM3]12:4 $+ %nick1 12is such a freaking moron that he wants to dm himself. | halt  }
  elseif (%nick1) && (!%nick2) && ($group(#dm).status == on) && ($nick ison $chan) && (%nick1 ison $chan) {
    set %nick2 $nick
    set %turn1 $iif(%N == 1, %nick1 , %nick2)
    set %hp [ $+ [ %nick1 ] ] 99
    set %hp [ $+ [ %nick2 ] ] 99
    set %turn2 $iif(%N == 1, %nick2, %nick1)
    set %turn11 %turn2
    set %turn22 %turn1
    set %specbar [ $+ [ %turn1 ] ] 100
    set %specbar [ $+ [ %turn2 ] ] 100
    set %sharks [ $+ [ %turn1 ] ] 10
    set %sharks [ $+ [ %turn2 ] ] 10
    set %barrages [ $+ [ %turn1 ] ] 4
    set %barrages [ $+ [ %turn2 ] ] 4
    set %frozen [ $+ [ %turn1 ] ] off
    set %frozen [ $+ [ %turn2 ] ] off
    msg $chan 3[12DM3]12:4 $+ %nick2 12has accepted4 %nick1 $+ 12's challenge!
    timer 1 1 msg $chan 3[12DM3]12: For a list of dm commands, type 4!dmcmds
    timer 1 2 msg $chan 3[12DM3]12: It's4 %turn1 $+ 12's turn.
  }
  else {
    notice $nick 3[12DM3]12: There is a dm already in progress, please wait.
    halt
  }
}

on *:TEXT:!enddm:#: {
  if ($nick == %nick1 || $nick == %nick2) || ($address($nick,2) == $address($me,2)) {
    dmoff
    msg $chan 3[12DM3]12: DM halted by4 $nick $+ 12.
  }
}

#dm off

on *:TEXT:!turn:#: {
  if ($group(#dm).status == on) {
    msg $chan 3[12TURN3]12: It's currently4 $iif( !%nick2 , %hai , %turn1 ) $+ 12's turn.
  }
  else {
    halt
  }
}

on *:TEXT:!status:#: {
  if ($nick == %turn1 || $nick == %turn2) {
    notice $nick 3[12STATUS3]12: Your current hp is:4 %hp [ $+ [ $nick ] ] $+ 12. You have4 %sharks [ $+ [ $nick ] ] 12sharks left. You can use4 %barrages [ $+ [ $nick ] ] 12more barrages. Your special bar is4 %specbar [ $+ [ $nick ] ] $+ % $+ 12. You4 $iif(%frozen [ $+ [ $nick == on ] ] , are , are not) 12frozen.
  }
  else {
    halt
  }
}

on *:TEXT:!whip:#: {
  if ($nick == %turn1) && ($nick != %turn2) && (%frozen [ $+ [ %turn1 ] ] == off) {
    set %whip $rand(0,40)
    dec %hp [ $+ [ %turn2 ] ] %whip
  }
  if ( %hp [ $+ [ %turn2 ] ] < 1 ) {
    set %hp [ $+ [ %turn2 ] ] 0
    msg $chan 3[12WHIP3]12:4 %turn1 12just hit a %whip with a whip.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] 12.
    timer 1 1 msg $chan 3[12DIED3]12:4 %turn2 12is now dead! 4GF YOU TRIED!
    scores
    dmoff
  }
  elseif ($nick == %turn1) && ($nick != %turn2) && (%frozen [ $+ [ %turn1 ] ] == off) {
    msg $chan 3[12WHIP3]12:4 %turn1 12just hit a4 %whip 12with a whip.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] 12.
    inc %specbar [ $+ [ %turn1 ] ] $iif(%specbar [ $+ [ %turn1 ] ] >= 96, $calc( 100 - %specbar [ $+ [ %turn1 ] ] ) , 5 )
    set %turn1 %turn11
    set %turn2 %turn22
    set %turn11 %turn2
    set %turn22 %turn1
    unset %R
    timer 1 1 msg $chan 3[12TURN3]12: It's4 %turn1 $+ 12's turn.
  }
  elseif (%frozen [ $+ [ %turn1 ] ] == on) {
    notice $nick 3[12FROZEN3]12: You are frozen, you can't use the whip.
  }
  elseif ($nick == %turn2) {
    notice $nick 3[12TURN3]12: It's not your turn
  }
}


on *:TEXT:!eat*:#: {
  if ($nick == %turn1) && (%sharks [ $+ [ %turn1 ] ] > 0) {
    set %eat $iif( %hp [ $+ [ %turn1 ] ] >= 79, $calc( 99 - %hp [ $+ [ %turn1 ] ] ) , 20)
    inc %hp [ $+ [ %turn1 ] ] %eat
    dec %sharks [ $+ [ %turn1 ] ]
    msg $chan 3[12EAT3]12:4 %turn1 12just healed4 20 12hp by eating a shark.4 $+ %turn1 $+ 12's hp is4 %hp [ $+ [ %turn1 ] ] 12.
    notice $nick 3[12EAT3]12: You have4 %sharks [ $+ [ %turn1 ] ] 12sharks left.
    inc %specbar [ $+ [ %turn1 ] ] $iif(%specbar [ $+ [ %turn1 ] ] >= 96, $calc( 100 - %specbar [ $+ [ %turn1 ] ] ) , 5 )
    set %turn1 %turn11
    set %turn2 %turn22
    set %turn11 %turn2
    set %turn22 %turn1
    set %frozen [ $+ [ %turn2 ] ] off
    unset %R
    timer 1 1 msg $chan 3[12TURN3]12: It's4 %turn1 $+ 12's turn.
  }
  elseif (%sharks [ $+ [ %turn1 ] ] < 1) {
    notice $nick 3[12EAT3]12: You have already used up all 10 of your sharks, please use something else.
  }
  elseif ($nick == %turn2) {
    notice $nick 3[12TURN3]12: It's not your turn
  }
}


on *:TEXT:!dds*:#: {
  if ($nick == %turn1) && (%specbar [ $+ [ %turn1 ] ] >= 25) && (%frozen [ $+ [ %turn1 ] ] == off) {
    set %dds1 $rand(0,30)
    set %dds2 $rand(0,30)
    dec %hp [ $+ [ %turn2 ] ] $calc( %dds1 + %dds2 )
  }
  elseif (%specbar [ $+ [ %turn1 ] ] <= 24) {
    notice %turn1 3[12DDS3]12: Your special bar is less than 25% so you cant use the dds.
    halt
  } 
  if ( %hp [ $+ [ %turn2 ] ] < 1 ) {
    set %hp [ $+ [ %turn2 ] ] 0
    msg $chan 3[12DDS3]12:4 %turn1 12just hit a4 %dds1 12and4 %dds2 12with a dds.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] $+ 12.
    timer 1 1 msg $chan 3[12DIED3]12:4 %turn2 12is now dead!4 GF YOU TRIED!
    scores
    dmoff
  }
  elseif ($nick == %turn1) && ($nick != %turn2) && (%specbar [ $+ [ %turn1 ] ] >= 25) && (%frozen [ $+ [ %turn1 ] ] == off)  {
    dec %specbar [ $+ [ %turn1 ] ] 25
    msg $chan 3[12DDS3]12:4 %turn1 12just hit a4 %dds1 12and4 %dds2 12with a dds.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] $+ 12.
    notice %turn1 3[12SPEC BAR3]12: You're special bar is4 %specbar [ $+ [ %turn1 ] ] $+ % $+ 12.
    set %turn1 %turn11
    set %turn2 %turn22
    set %turn11 %turn2
    set %turn22 %turn1
    unset %R
    timer 1 1 msg $chan 3[12TURN3]12: It's4 %turn1 $+ 12's turn.
  }
  elseif (%frozen [ $+ [ %turn1 ] ] == on) {
    notice $nick 3[12FROZEN3]12: You are frozen, you can't use the dds.
  }
  elseif ($nick == %turn2) {
    notice $nick 3[12TURN3]12: It's not your turn
  }
}

on *:TEXT:!cbow:#: {
  if ($nick == %turn1) && ($nick != %turn2) {
    set %cbow $rand(0,30)
    dec %hp [ $+ [ %turn2 ] ] %cbow
  }
  if ( %frozen [ $+ [ %turn1 ] ] == on ) {
    dec %hp [ $+ [ %turn1 ] ] 4
  }
  if ( %hp [ $+ [ %turn1 ] ] < 1 ) && (%hp [ $+ [ %turn2 ] ] < 1 ) && (%frozen [ $+ [ %turn1 ] ] == on) {
    msg $chan 3[12CBOW3]12:4 %turn1 12just hit a4 %cbow 12with a crystal bow. However,4 %turn1 12was frozen so there was a4 4 12damage penalty so both4 %turn1 12and4 %turn2 12are dead!
    inc %wins [ $+ [ %turn1 ] ]
    inc %wins [ $+ [ %turn2 ] ]
    inc %losses [ $+ [ %turn1 ] ]
    inc %losses [ $+ [ %turn2 ] ]
    dmoff
  }
  elseif ( %hp [ $+ [ %turn1 ] ] < 1 ) && {%hp [ $+ [ %turn2 ] ] > 0 ) && (%frozen [ $+ [ %turn1 ] ] == on) {
    set %hp [ $+ [ %turn1 ] ] 0
    msg $chan 3[12CBOW3]12:4 %turn1 12just hit a4 %cbow 12with a crystal bow.4 $+ %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] 12.
    timer 1 1 msg $chan 3[12CBOW3]12: However,4 %turn1 12was frozen so there is a4 4 12damage penalty.4 %turn1 $+ 12's hp is now4 %hp [ $+ [ %turn1 ] ] $+ 12.
    timer 1 2 msg $chan 3[12DIED3]12:4 %turn1 12is now dead! 4GF YOU TRIED!
    inc %wins [ [ %turn2 ] ]
    inc %losses [ $+ [ %turn1 ] ]
    dmoff
  }
  elseif (%hp [ $+ [ %turn1 ] ] > 0) && (%hp [ $+ [ %turn2 ] ] > 0) && (%frozen [ $+ [ %turn1 ] ] == on) {
    msg $chan %turn1 just hit a %cbow with a crystal bow. $+ %turn2 $+ 's hp is %hp [ $+ [ %turn2 ] ] .
    timer 1 1 msg $chan However, %turn1 was frozen so there is a 4 damage penalty. %turn1 $+ 's hp is now %hp [ $+ [ %turn1 ] ] $+ .
    inc %specbar [ $+ [ %turn1 ] ] $iif(%specbar [ $+ [ %turn1 ] ] >= 96, $calc( 100 - %specbar [ $+ [ %turn1 ] ] ) , 5 )
    set %turn1 %turn11
    set %turn2 %turn22
    set %turn11 %turn2
    set %turn22 %turn1
    set %frozen [ $+ [ %turn2 ] ] off
    unset %R
    timer 1 2 msg $chan It's %turn1 $+ 's turn.
  }
  elseif ( %hp [ $+ [ %turn2 ] ] < 1 ) && (%hp [ $+ [ %turn1 ] ] > 0) && (%frozen [ $+ [ %turn1 ] ] == off) {
    set %hp [ $+ [ %turn2 ] ] 0
    msg $chan %turn1 just hit a %cbow with a crystal bow. $+ %turn2 $+ 's hp is %hp [ $+ [ %turn2 ] ] .
    timer 1 1 msg $chan 3[12DIED3]12:4 %turn2 12is now dead! 4GF YOU TRIED!
    inc %wins [ $+ [ %turn1 ] ]
    inc %losses [ $+ [ %turn2 ] ]
    scores
    dmoff
  }
  elseif ($nick == %turn1) && ($nick != %turn2) && (%frozen [ $+ [ %turn1 ] ] == off) {
    msg $chan 3[12DIED3]12:4 %turn1 12just hit a4 %cbow 12with a crystal bow.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] 12.
    inc %specbar [ $+ [ %turn1 ] ] $iif(%specbar [ $+ [ %turn1 ] ] >= 96, $calc( 100 - %specbar [ $+ [ %turn1 ] ] ) , 5 )
    set %turn1 %turn11
    set %turn2 %turn22
    set %turn11 %turn2
    set %turn22 %turn1
    set %frozen [ $+ [ %turn2 ] ] off
    unset %R
    timer 1 1 msg $chan 3[12TURN3]12: It's4 %turn1 $+ 12's turn.
  }
  elseif ($nick == %turn2) {
    notice $nick 3[12TURN3]12: It's not your turn
  }
}

on *:TEXT:!barrage:#: {
  if ($nick == %turn1) && (%barrages [ $+ [ %turn1 ] ] >= 0) {
    set %barrage $rand(0,30)
    set %R $r(1,10)
    dec %barrages [ $+ [ %turn1 ] ]
    dec %hp [ $+ [ %turn2 ] ] %barrage
  }
  if ( %hp [ $+ [ %turn2 ] ] < 1 ) {
    set %hp [ $+ [ %turn2 ] ] 0
    msg $chan 3[12BARRAGE3]12:4 %turn1 12just hit a4 %barrage 12with ice barrage.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] $+ 12.
    timer 1 1 msg $chan 3[12DIED3]12:4 %turn2 12is now dead! 4GF YOU TRIED!
    scores
    dmoff
  }
  elseif (%barrages [ $+ [ %turn1 ] ] <= -1) {
    notice %turn1 3[12BARRAGE3]12: You have used the ice barrage4 4 12times already, please choose something else.
    halt
  }
  elseif ($nick == %turn1) && ($nick != %turn2) && (%barrages [ $+ [ %turn1 ] ] >= 0) && (%R isnum 1-7) {
    set %frozen [ $+ [ %turn2 ] ] on
    msg $chan 3[12BARRAGE3]12:4 %turn1 12just hit a4 %barrage 12with ice barrage.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] $+ 12.
    notice %turn1 3[12BARRAGE3]12: You have4 %barrages [ $+ [ %turn1 ] ] 12more barrages left.
    timer 1 1 msg $chan 3[12FROZEN3]12:4 %turn2 12is frozen.
    inc %specbar [ $+ [ %turn1 ] ] $iif(%specbar [ $+ [ %turn1 ] ] >= 96, $calc( 100 - %specbar [ $+ [ %turn1 ] ] ) , 5 )
    set %turn1 %turn11
    set %turn2 %turn22
    set %turn11 %turn2
    set %turn22 %turn1
    set  %frozen [ $+ [ %turn2 ] ] off
    unset %R
    timer 1 2 msg $chan 3[12TURN3]12: It's4 %turn1 $+ 12's turn.
  }
  elseif ($nick == %turn1) && ($nick != %turn2) && (%barrages [ $+ [ %turn1 ] ] >= 0) && (%R isnum 8-10) {
    msg $chan 3[12BARRAGE3]12:4 %turn1 12just hit a4 %barrage 12with ice barrage.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] $+ 12.
    notice %turn1 3[12BARRAGE3]12: You have4 %barrages [ $+ [ %turn1 ] ] 12more barrages left.
    inc %specbar [ $+ [ %turn1 ] ] $iif(%specbar [ $+ [ %turn1 ] ] >= 96, $calc( 100 - %specbar [ $+ [ %turn1 ] ] ) , 5 )
    set %turn1 %turn11
    set %turn2 %turn22
    set %turn11 %turn2
    set %turn22 %turn1
    set %frozen [ $+ [ %turn1 ] ] off
    unset %R
    timer 1 1 msg $chan 3[12TURN3]12: It's4 %turn1 $+ 12's turn.
  }
  elseif ($nick == %turn2) {
    notice $nick 3[12TURN3]12: It's not your turn
  }
}

on *:TEXT:!dh:#: {
  if ($nick == %turn1) && ($nick != %turn2) && (%frozen [ $+ [ %turn1 ] ] == off) {
    if (%hp [ $+ [ %turn1 ] ] isnum 70-99) && (%hp [ $+ [ %turn1 ] ] !isnum 0-69) {
      set %dh $rand(0,30)
    }
    elseif (%hp [ $+ [ %turn1 ] ] isnum 50-69) && (%hp [ $+ [ %turn1 ] ] !isnum 0-49) && (%hp [ $+ [ %turn1 ] ] !isnum 70-99) {
      set %dh $rand(0,35)
    }
    elseif (%hp [ $+ [ %turn1 ] ] isnum 35-49) && (%hp [ $+ [ %turn1 ] ] !isnum 0-34) && (%hp [ $+ [ %turn1 ] ] !isnum 50-99) {
      set %dh $rand(0,40)
    }
    elseif (%hp [ $+ [ %turn1 ] ] isnum 20-34) && (%hp [ $+ [ %turn1 ] ] !isnum 0-19) && (%hp [ $+ [ %turn1 ] ] !isnum 35-99) {
      set %dh $rand(0,50)
    }
    elseif (%hp [ $+ [ %turn1 ] ] isnum 8-19) && (%hp [ $+ [ %turn1 ] ] !isnum 0-7) && (%hp [ $+ [ %turn1 ] ] !isnum 20-99) {
      set %dh $rand(0,60)
    }
    elseif (%hp [ $+ [ %turn1 ] ] isnum 1-7) && (%hp [ $+ [ %turn1 ] ] !isnum 0) && (%hp [ $+ [ %turn1 ] ] !isnum 8-99) {
      set %dh $rand(0,70)
    }
    dec %hp [ $+ [ %turn2 ] ] %dh
    if ( %hp [ $+ [ %turn2 ] ] < 1 ) {
      set %hp [ $+ [ %turn2 ] ] 0
      msg $chan 3[12DH3]12:4 %turn1 12just hit a4 %dh 12with a dharoks.4 $+ %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] 12.
      timer 1 1 msg $chan 3[12DIED3]12:4 %turn2 12is now dead! 4GF YOU TRIED!
      scores
      dmoff
    }
    elseif ($nick == %turn1) && ($nick != %turn2) && (%frozen [ $+ [ %turn1 ] ] == off) {
      msg $chan 3[12DH3]12:4 %turn1 12just hit a4 %dh 12with a dharoks.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] 12.
      inc %specbar [ $+ [ %turn1 ] ] $iif(%specbar [ $+ [ %turn1 ] ] >= 96, $calc( 100 - %specbar [ $+ [ %turn1 ] ] ) , 5 )
      set %turn1 %turn11
      set %turn2 %turn22
      set %turn11 %turn2
      set %turn22 %turn1
      unset %R
      timer 1 1 msg $chan 3[12TURN3]12: It's4 %turn1 $+ 12's turn.
    }
    elseif (%frozen [ $+ [ %turn1 ] ] == on) {
      notice $nick 3[12FROZEN3]12: You are frozen, you can't use dharoks.
    }
    elseif ($nick == %turn2) {
      notice $nick 3[12TURN3]12: It's not your turn
    }
  }
}

on *:TEXT:!fwave:#: {
  if ($nick == %turn1) && ($nick != %turn2) {
    set %fwave $rand(0,20)
    dec %hp [ $+ [ %turn2 ] ] %fwave
  }
  if ( %hp [ $+ [ %turn2 ] ] < 1 ) {
    set %hp [ $+ [ %turn2 ] ] 0
    msg $chan 3[12FWAVE3]12:4 %turn1 12just hit a4 %fwave 12with fire wave.4 $+ %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] 12.
    timer 1 1 msg $chan 3[12DIED3]12:4 $+ %turn2 12is now dead! 4GF YOU TRIED!
    scores
    dmoff
  }
  elseif ($nick == %turn1) && ($nick != %turn2) {
    msg $chan 3[12FWAVE3]12:4 %turn1 12just hit a4 %fwave 12with fire wave.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] 12.
    inc %specbar [ $+ [ %turn1 ] ] $iif(%specbar [ $+ [ %turn1 ] ] >= 96, $calc( 100 - %specbar [ $+ [ %turn1 ] ] ) , 5 )
    set %turn1 %turn11
    set %turn2 %turn22
    set %turn11 %turn2
    set %turn22 %turn1
    set %frozen [ $+ [ %turn2 ] ] off
    unset %R
    timer 1 1 msg $chan 3[12TURN3]12: It's4 %turn1 $+ 12's turn.
  }
  elseif ($nick == %turn2) {
    notice $nick 3[12TURN3]12: It's not your turn
  }
}

on *:TEXT:!msb*:#: {
  if ($nick == %turn1) && (%specbar [ $+ [ %turn1 ] ] >= 50) {
    set %msb1 $rand(0,25)
    set %msb2 $rand(0,25)
    dec %hp [ $+ [ %turn2 ] ] $calc( %msb1 + %msb2 )
  }
  elseif (%specbar [ $+ [ %turn1 ] ] <= 49) {
    notice %turn1 3[12MSB3]12: Your special bar is less than 50% so you cant use the magic shortbow.
    halt
  } 
  if ( %hp [ $+ [ %turn2 ] ] < 1 ) {
    set %hp [ $+ [ %turn2 ] ] 0
    msg $chan 3[12MSB3]12:4 %turn1 12just hit a4 %msb1 12and4 %msb2 12with a magic shortbow.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] $+ 12.
    timer 1 1 msg $chan 3[12DIED3]12:4 %turn2 12is now dead! 4GF YOU TRIED!
    scores
    dmoff
  }
  elseif ($nick == %turn1) && ($nick != %turn2) && (%specbar [ $+ [ %turn1 ] ] >= 50) {
    dec %specbar [ $+ [ %turn1 ] ] 50
    msg $chan 3[12MSB3]12:4 %turn1 12just hit a4 %msb1 12and4 %msb2 12with a magic shortbow.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] $+ 12.
    notice %turn1 3[12SPEC BAR3]12: You're special bar is4 %specbar [ $+ [ %turn1 ] ] $+ % $+ 12.
    set %turn1 %turn11
    set %turn2 %turn22
    set %turn11 %turn2
    set %turn22 %turn1
    set %frozen [ $+ [ %turn2 ] ] off
    unset %R
    timer 1 1 msg $chan 3[12TURN3]12: It's4 %turn1 $+ 12's turn.
  }
  elseif ($nick == %turn2) {
    notice $nick 3[12TURN3]12: It's not your turn
  }
}

on *:TEXT:!guth:#: {
  if ($nick == %turn1) && ($nick != %turn2) && (%frozen [ $+ [ %turn1 ] ] == off) {
    set %J $r(1,100)
    set %guth $rand(0,30)
    dec %hp [ $+ [ %turn2 ] ] %guth
  }
  if ( %hp [ $+ [ %turn2 ] ] < 1 ) {
    set %hp [ $+ [ %turn2 ] ] 0
    msg $chan 3[12GUTHAN3]12:4 %turn1 12just hit a4 %guth 12with a guthans set.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] 12.
    timer 1 1 msg $chan 3[12DIED3]12:4 %turn2 12is now dead! 4GF YOU TRIED!
    scores
    dmoff
  }
  elseif ($nick == %turn1) && ($nick != %turn2) && (%frozen [ $+ [ %turn1 ] ] == off) && (%J isnum 1-35) {
    msg $chan 3[12GUTHAN3]12:4 %turn1 12just hit a4 %guth 12with a guthans set.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] 12.
    set %heal %guth
    set %hp [ $+ [ %turn1 ] ] $iif($calc(%heal + %hp [ $+ [ %turn1 ] ] >= 100, 99, $calc(%heal + %hp [ $+ [ %turn1 ] ])
    timer 1 1 msg $chan 3[12HEAL3]12:4 %turn1 12also healed4 %guth 12so4 %turn1 $+ 12's hp is now4 %hp [ $+ [ %turn1 ] ] $+ 12.
    inc %specbar [ $+ [ %turn1 ] ] $iif(%specbar [ $+ [ %turn1 ] ] >= 96, $calc( 100 - %specbar [ $+ [ %turn1 ] ] ) , 5 )
    set %turn1 %turn11
    set %turn2 %turn22
    set %turn11 %turn2
    set %turn22 %turn1
    unset %R
    timer 1 2 msg $chan 3[12TURN3]12: It's4 %turn1 $+ 12's turn.
  }
  elseif ($nick == %turn1) && ($nick != %turn2) && (%frozen [ $+ [ %turn1 ] ] == off) && (%J isnum 36-100) {
    msg $chan 3[12GUTHAN3]12:4 %turn1 12just hit a4 %guth 12with a guthans set.4 %turn2 $+ 12's hp is4 %hp [ $+ [ %turn2 ] ] 12.
    inc %specbar [ $+ [ %turn1 ] ] $iif(%specbar [ $+ [ %turn1 ] ] >= 96, $calc( 100 - %specbar [ $+ [ %turn1 ] ] ) , 5 )
    set %turn1 %turn11
    set %turn2 %turn22
    set %turn11 %turn2
    set %turn22 %turn1
    unset %R
    timer 1 1 msg $chan 3[12TURN3]12: It's4 %turn1 $+ 12's turn.
  }
  elseif (%frozen [ $+ [ %turn1 ] ] == on) {
    notice $nick 3[12FROZEN3]12: You are frozen, you can't use guthans.
  }
  elseif ($nick == %turn2) {
    notice $nick 3[12TURN3]12: It's not your turn
  }
}

#dm end

on *:TEXT:!score*:#: {
  var %nick = $iif(!$2,$nick,$2)
  var %allwins = $iif(!%wins [ $+ [ %nick ] ],0,%wins [ $+ [ %nick ] ])
  var %allloss = $iif(!%losses [ $+ [ %nick ] ],0,%losses [ $+ [ %nick ] ])
  var %totalwins $round($bytes($calc(100/( %allwins + %allloss ) * %allwins ),b3),3)
  msg $chan 3[12SCORE3]12:4 $+ %nick $+ 12's Win-Loss record:4 %allwins 12-4 %allloss $+ 12. The win vs loss percentage is4 %totalwins $+ % - $calc( 100 - %totalwins) $+ % $+ 12.
}