Basic DM based on the game RuneScape

By Blknbluyoshi on Aug 13, 2007

I created this DM because many other people don't have a good DM that works. This DM is pretty basic and i will be coming out with a special bar and other cool features soon.

Type .commands to get the DM commands

;!dm script
;created by
;Blknbluyoshi

on $*:text:.commands:*:{ 
  msg $nick .::. Attacks .::. 
  msg $nick .whip 
  msg $nick .dds 
  msg $nick .dh 
  msg $nick .eat 
  msg $nick .msb
  msg $nick .anchor
  msg $nick .guthan
  msg $nick .cbow
  msg $nick .other
  msg $nick .dbow
  msg $nick .::. Others .::.
  msg $nick .tele
  msg $nick .dm 
  msg $nick .stopdm
  msg $nick 4Script Edited By Blknbluyoshi
}

on *:text:.dm*:#: { 
  if (%duel2 == active) { 
    msg $chan a DM is already active please wait for it to end. 
  } 
  if (%duel == active) { 
    set %player2 $nick
    msg $chan the match is set! %player1 vs %player2 
    notice %player1 Type ".commands" for the commands list.
    notice %player2 Type ".commands" for the commands list.
    set %duel2 active 
    set %p1hp 99 
    set %p2hp 99 
    set %spec1 0 
    set %spec2 0 
    set %turn 1 

  } 
  else { 
    set %duel active 
    set %player1 $nick 
    msg $chan $nick has initiated a DM type .DM to fight them 
  } 
} 

on *:text:.eat*:#: { 
  if (%turn == 1) { 
    if (%p1hp == 99) {
      notice $nick You already have 99 hitpoints, please choose another command.
      halt
    }
    else ($nick == %player1) { 
      set %turn 2 
      inc %p1hp 20 
      msg $chan %player1 eats a shark and gains 20 hp 
      msg $chan %player1 has %p1hp hp left 
    } 
  } 
  else if (%turn == 2) { 
    if (%p2hp == 99) {
      notice $nick You already have 99 hitpoints, please choose another command.
      halt
    }
    if ($nick == %player2) { 
      set %turn 1 
      inc %p2hp 20 
      msg $chan %player2 eats a shark and gains 20 hp 
      msg $chan %player2 has %p2hp hp
    } 
  } 
} 

on *:text:.dds*:#: { 
  if (%turn == 1) { 
    if ($nick == %player1) { 
      if (%spec2 < 4) { 
        set %hit1 $rand(0,23) 
        set %hit2 $rand(0,23) 
        inc %spec1 
        msg $chan %player1 has hit %hit1 and %hit2 
        dec %p2hp %hit1 
        dec %p2hp %hit2 
        msg $chan %player2 has %p2hp hp left 
        set %turn 2 
      } 
      if (%p2hp < 0) { 
        msg $chan %player1 has defeated %player2 
        unset %duel 
        unset %player1 
        unset %player2 
        unset %duel2 
        unset %p1hp 
        unset %p2hp 
        unset %spec1 
        unset %spec2 
        unset %turn 
        unset %hit1 
        unset %hit2 
      } 
      else { 
      } 
    } 
    else if (%spec1 == 4) { 
      notice %player1 you are out of specials 
    } 
  } 
  else { 
    if (%turn == 2) { 
      if ($nick == %player2) { 
        if (%spec2 < 4) { 
          set %hit1 $rand(0,23) 
          set %hit2 $rand(0,23) 
          inc %spec2 
          msg $chan %player2 has hit %hit1 and %hit2 
          dec %p1hp %hit1 
          dec %p1hp %hit2 
          msg $chan %player1 has %p1hp hp left 
          set %turn 1 
          if (%p2hp < 0) { 
            msg $chan %player1 has defeated %player2
            unset %duel 
            unset %player1 
            unset %player2 
            unset %duel2 
            unset %p1hp 
            unset %p2hp 
            unset %spec1 
            unset %spec2 
            unset %turn 
            unset %hit1 
            unset %hit2 
          } 
          else { 
          } 
        } 
        else if (%spec2 == 4) { 
          notice %player2 you are out of specials. 
        } 
      } 
    } 
  } 
} 

on *:text:.dbow*:#: { 
  if (%turn == 1) { 
    if ($nick == %player1) { 
      if (%spec2 < 4) { 
        set %hit1 $rand(5,45) 
        set %hit2 $rand(2,42) 
        inc %spec1 
        msg $chan %player1 has hit %hit1 and %hit2 
        dec %p2hp %hit1 
        dec %p2hp %hit2 
        msg $chan %player2 has %p2hp hp left 
        set %turn 2 
      } 
      if (%p2hp < 0) { 
        msg $chan %player1 has defeated %player2 
        unset %duel 
        unset %player1 
        unset %player2 
        unset %duel2 
        unset %p1hp 
        unset %p2hp 
        unset %spec1 
        unset %spec2 
        unset %turn 
        unset %hit1 
        unset %hit2 
      } 
      else { 
      } 
    } 
    else if (%spec1 == 4) { 
      notice %player1 you are out of specials 
    } 
  } 
  else { 
    if (%turn == 2) { 
      if ($nick == %player2) { 
        if (%spec2 < 4) { 
          set %hit1 $rand(5,45) 
          set %hit2 $rand(2,42) 
          inc %spec2 
          msg $chan %player2 has hit %hit1 and %hit2 
          dec %p1hp %hit1 
          dec %p1hp %hit2 
          msg $chan %player1 has %p1hp hp left 
          set %turn 1 
          if (%p2hp < 0) { 
            msg $chan %player1 has defeated %player2
            unset %duel 
            unset %player1 
            unset %player2 
            unset %duel2 
            unset %p1hp 
            unset %p2hp 
            unset %spec1 
            unset %spec2 
            unset %turn 
            unset %hit1 
            unset %hit2 
          } 
          else { 
          } 
        } 
        else if (%spec2 == 4) { 
          notice %player2 you are out of specials. 
        } 
      } 
    } 
  } 
} 

on *:text:.msb*:#: { 
  if (%turn == 1) { 
    if ($nick == %player1) { 
      if (%spec2 < 4) { 
        set %hit1 $rand(5,23) 
        set %hit2 $rand(2,18) 
        inc %spec1 
        msg $chan %player1 has hit %hit1 and %hit2 
        dec %p2hp %hit1 
        dec %p2hp %hit2 
        msg $chan %player2 has %p2hp hp left 
        set %turn 2 
      } 
      if (%p2hp < 0) { 
        msg $chan %player1 has defeated %player2 
        unset %duel 
        unset %player1 
        unset %player2 
        unset %duel2 
        unset %p1hp 
        unset %p2hp 
        unset %spec1 
        unset %spec2 
        unset %turn 
        unset %hit1 
        unset %hit2 
      } 
      else { 
      } 
    } 
    else if (%spec1 == 4) { 
      notice %player1 you are out of specials 
    } 
  } 
  else { 
    if (%turn == 2) { 
      if ($nick == %player2) { 
        if (%spec2 < 4) { 
          set %hit1 $rand(5,23) 
          set %hit2 $rand(2,18) 
          inc %spec2 
          msg $chan %player2 has hit %hit1 and %hit2 
          dec %p1hp %hit1 
          dec %p1hp %hit2 
          msg $chan %player1 has %p1hp hp left 
          set %turn 1 
          if (%p2hp < 0) { 
            msg $chan %player1 has defeated %player2
            unset %duel 
            unset %player1 
            unset %player2 
            unset %duel2 
            unset %p1hp 
            unset %p2hp 
            unset %spec1 
            unset %spec2 
            unset %turn 
            unset %hit1 
            unset %hit2 
          } 
          else { 
          } 
        } 
        else if (%spec2 == 4) { 
          notice %player2 you are out of specials. 
        } 
      } 
    } 
  } 
} 

on *:text:.anchor*:#: { 
  if (%turn == 1) { 
    if ($nick == %player1) { 
      set %turn 2 
      set %hit $rand(5,35) 
      msg $chan %player1 has hit a %hit 
      dec %p2hp %hit 
      msg $chan %player2 has %p2hp hp left 
      if (%p2hp < 0) { 
        msg $chan %player1 has defeated %player2 
        unset %duel 
        unset %player1 
        unset %player2 
        unset %duel2 
        unset %p1hp 
        unset %p2hp 
        unset %spec1 
        unset %spec2 
        unset %turn 
        unset %hit1 
        unset %hit2 
      } 
      else { 
      } 
    } 
  } 
  else if (%turn == 2) { 
    if ($nick == %player2) { 
      set %turn 1 
      set %hit $rand(5,35) 
      msg $chan %player2 has hit a %hit 
      dec %p1hp %hit 
      msg $chan %player1 has %p1hp hp left 
      if (%p1hp < 0) { 
        msg $chan %player2 has defeated %player1 
        unset %duel 
        unset %player1 
        unset %player2 
        unset %duel2 
        unset %p1hp 
        unset %p2hp 
        unset %spec1 
        unset %spec2 
        unset %turn 
        unset %hit1 
        unset %hit2 
      } 
      else { 
      } 
    } 
  } 
} 

on *:text:.cbow*:#: { 
  if (%turn == 1) { 
    if ($nick == %player1) { 
      set %turn 2 
      set %hit $rand(10,25) 
      msg $chan %player1 has hit a %hit 
      dec %p2hp %hit 
      msg $chan %player2 has %p2hp hp left 
      if (%p2hp < 0) { 
        msg $chan %player1 has defeated %player2 
        unset %duel 
        unset %player1 
        unset %player2 
        unset %duel2 
        unset %p1hp 
        unset %p2hp 
        unset %spec1 
        unset %spec2 
        unset %turn 
        unset %hit1 
        unset %hit2 
      } 
      else { 
      } 
    } 
  } 
  else if (%turn == 2) { 
    if ($nick == %player2) { 
      set %turn 1 
      set %hit $rand(10,25) 
      msg $chan %player2 has hit a %hit 
      dec %p1hp %hit 
      msg $chan %player1 has %p1hp hp left 
      if (%p1hp < 0) { 
        msg $chan %player2 has defeated %player1 
        unset %duel 
        unset %player1 
        unset %player2 
        unset %duel2 
        unset %p1hp 
        unset %p2hp 
        unset %spec1 
        unset %spec2 
        unset %turn 
        unset %hit1 
        unset %hit2 
      } 
      else { 
      } 
    } 
  } 
} 

on *:text:.whip*:#: { 
  if (%turn == 1) { 
    if ($nick == %player1) { 
      set %turn 2 
      set %hit $rand(0,30) 
      msg $chan %player1 has hit a %hit 
      dec %p2hp %hit 
      msg $chan %player2 has %p2hp hp left 
      if (%p2hp < 0) { 
        msg $chan %player1 has defeated %player2 
        unset %duel 
        unset %player1 
        unset %player2 
        unset %duel2 
        unset %p1hp 
        unset %p2hp 
        unset %spec1 
        unset %spec2 
        unset %turn 
        unset %hit1 
        unset %hit2 
      } 
      else { 
      } 
    } 
  } 
  else if (%turn == 2) { 
    if ($nick == %player2) { 
      set %turn 1 
      set %hit $rand(0,30) 
      msg $chan %player2 has hit a %hit 
      dec %p1hp %hit 
      msg $chan %player1 has %p1hp hp left 
      if (%p1hp < 0) { 
        msg $chan %player2 has defeated %player1 
        unset %duel 
        unset %player1 
        unset %player2 
        unset %duel2 
        unset %p1hp 
        unset %p2hp 
        unset %spec1 
        unset %spec2 
        unset %turn 
        unset %hit1 
        unset %hit2 
      } 
      else { 
      } 
    } 
  } 
} 

on *:text:.dh*:#: { 
  if (%turn == 1) { 
    if ($nick == %player1) { 
      set %turn 2 
      set %dh $rand(10,70) 
      msg $chan %player1 has hit a %dh 
      dec %p2hp %dh 
      msg $chan %player2 has %p2hp hp left 
      if (%p2hp < 0) { 
        msg $chan %player1 has defeated %player2 
        unset %duel 
        unset %player1 
        unset %player2 
        unset %duel2 
        unset %p1hp 
        unset %p2hp 
        unset %spec1 
        unset %spec2 
        unset %turn 
        unset %hit1 
        unset %hit2 
      } 
      else { 
      } 
    } 
  } 
  if (%turn == 2) { 
    if ($nick == %player2) { 
      set %turn 1 
      set %dh $rand(10,70) 
      msg $chan %player2 has hit a %dh 
      dec %p1hp %dh 
      msg $chan %player1 has %p1hp hp left 
      if (%p1hp < 0) { 
        msg $chan %player2 has defeated %player1
        unset %duel 
        unset %player1 
        unset %player2 
        unset %duel2 
        unset %p1hp 
        unset %p2hp 
        unset %spec1 
        unset %spec2 
        unset %turn 
        unset %hit1 
        unset %hit2 
      } 
      else { 
      } 
    } 
  } 
}
on *:text:.guthan*:#: { 
  if (%turn == 1) { 
    if ($nick == %player1) { 
      set %turn 2 
      set %dh $rand(0,30) 
      msg $chan %player1 has hit a %dh 
      dec %p2hp %dh 
      msg $chan %player2 has %p2hp hp left 
      if (%p2hp < 0) { 
        msg $chan %player1 has defeated %player2 
        unset %duel 
        unset %player1 
        unset %player2 
        unset %duel2 
        unset %p1hp 
        unset %p2hp 
        unset %spec1 
        unset %spec2 
        unset %turn 
        unset %hit1 
        unset %hit2 
      } 
      else { 
      } 
    } 
  } 
  if (%turn == 2) { 
    if ($nick == %player2) { 
      set %turn 1 
      set %dh $rand(0,30) 
      msg $chan %player2 has hit a %dh 
      dec %p1hp %dh 
      msg $chan %player1 has %p1hp hp left 
      if (%p1hp < 0) { 
        msg $chan %player2 has defeated %player1
        unset %duel 
        unset %player1 
        unset %player2 
        unset %duel2 
        unset %p1hp 
        unset %p2hp 
        unset %spec1 
        unset %spec2 
        unset %turn 
        unset %hit1 
        unset %hit2 
      } 
      else { 
      } 
    } 
  } 
}

on *:text:.tele*:#: { 
  if (%turn == 1) { 
    if ($nick == %player1) { 
      msg $chan msg $chan %player2 has defeated %player1
      unset %duel 
      unset %player1 
      unset %player2 
      unset %duel2 
      unset %p1hp 
      unset %p2hp 
      unset %spec1 
      unset %spec2 
      unset %turn 
      unset %hit1 
      unset %hit2 
    }
    else{
  }
  if (%turn == 2) { 
    if ($nick == %player2) { 
      msg $chan msg $chan %player1 has defeated %player2
      unset %duel 
      unset %player1 
      unset %player2 
      unset %duel2 
      unset %p1hp 
      unset %p2hp 
      unset %spec1 
      unset %spec2 
      unset %turn 
      unset %hit1 
      unset %hit2 
    }
  }
}
on *:text:.stopdm*:#: { 
  msg $chan 4DM STOPPED
  msg $chan 4Script Edited By Blknbluyoshi
  unset %duel 
  unset %player1 
  unset %player2 
  unset %duel2 
  unset %p1hp 
  unset %p2hp 
  unset %spec1 
  unset %spec2 
  unset %turn 
  unset %hit1 
  unset %hit2 
}

Comments

Sign in to comment.
Timmah   -  Jul 27, 2008

You can use regex so the user Can do either ! or . or @. other than that it looks like a pretty nice script!

 Respond  
criminal   -  Apr 08, 2008

You also forgot that if a player has 0 hp he is dead too..

if (%p2hp < 0) {
should be like this
if (%p2hp <= 0) {

You should add ags or bgs too :) I think many people would like to use that

 Respond  
criminal   -  Apr 08, 2008

Ugh... its messed up, it always makes it to where you have the same Hp as the other player.. Fix it plz

Maybe you should search yourself and not just leach \" RuneScape \" scripts from others.

 Respond  
criminal   -  Apr 08, 2008

If a player dies, it will still count he\'s hp.
which will end up something like -26 or so.

        msg $chan %player1 has hit %hit1 and %hit2 
        dec %p2hp %hit1 
        dec %p2hp %hit2
        set %turn 2 
        if (%p2hp > 0) { msg $chan %player2 has %p2hp hp left }
 Respond  
criminal   -  Apr 08, 2008
        unset %duel 
        unset %player1 
        unset %player2 
        unset %duel2 
        unset %p1hp 
        unset %p2hp 
        unset %spec1 
        unset %spec2 
        unset %turn 
        unset %hit1 
        unset %hit2 

can be done like this:

        unsetall

on :text:.dds:#: {
if (%turn == 1) {
if ($nick == %player1) {
if (%spec2 < 4) {

%spec2 must be %spec1

on :text:.dds:#: {
if (%turn == 1) {
if ($nick == %player1) {
if (%spec1 < 4) {

 Respond  
criminal   -  Apr 08, 2008
on *:text:.eat*:#: { 
  if (%turn == 1) { 
    if (%p1hp == 99) {
      notice $nick You already have 99 hitpoints, please choose another command.
      halt
    }
    else ($nick == %player1) { 
      set %turn 2 
      inc %p1hp 20 
      msg $chan %player1 eats a shark and gains 20 hp 
      msg $chan %player1 has %p1hp hp left 
    } 
  } 

I think you forgot to say \' elseif \' instead of else ($nick == %player1) {

on *:text:.eat*:#: { 
  if (%turn == 1) { 
    if (%p1hp == 99) {
      notice $nick You already have 99 hitpoints, please choose another command.
      halt
    }
    elseif ($nick == %player1) { 
      set %turn 2 
      inc %p1hp 20 
      msg $chan %player1 eats a shark and gains 20 hp 
      msg $chan %player1 has %p1hp hp left 
    } 
  } 
 Respond  
guest598594   -  Mar 21, 2008
on $*:text:.commands:*:{ 

Umm...are you trying to do [anysymbol]commands ? If you\'re just doing .commands, you don\'t need the $

I would just do

on $*:text:/[!@.]commands/Si:*:{
 Respond  
Eugenio   -  Mar 21, 2008

It dont work for me.

 Respond  
rsb   -  Mar 15, 2008

neat

 Respond  
richrunescaper   -  Oct 27, 2007

Ugh... its messed up, it always makes it to where you have the same Hp as the other player.. Fix it plz

 Respond  
Metallboy100   -  Aug 19, 2007

guys, when i first paste it on my remotes it worked, now it doesnt. what should i do to make it work for me?

 Respond  
Blknbluyoshi   -  Aug 14, 2007

yeah, i love my nick XD I\'ll take it off if you don\'t like it. It\'s not really that hard to take off :P

 Respond  
stargazer989   -  Aug 14, 2007

wow just about anything that happens your nick appears... but its still good, 2/10 for originality 8/10 for quality.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.