Harry potter duel script

By Ghost-writer on Aug 26, 2009

Wizard duels. Welcome to the dueling game! This is the only harry potter script on the internet! To use it type !duel and somone else type !duel and then you fight it out :). Or you can make potions by typing !potion store getting somthing from there and !mix potion and !drink potion. And you can buy a new wand and at the beginning of the game it gives you a wand :O! just type !wand :). Feel free to edit it just put my name some were. Have fun. And dont claim it as yours plawx ;].

Would like to thank byrak for potions. Mary for testing.

Updated fixed all bugs. and added more spells :) go to site if you need help. This is the most recent version of the script to this date so have fun :P.

You can now duel basalisks and ogers by typing !duel basalisk or !duel ogre lol.

Added highscore for the most duels. On a side note all highscores wont work until atleast 5 people play the game. I also fixed up a few monsters and added an inventory so you can keep past wands.
Updated again :) now fighting dragons is in style. New attack from your dragon friends! And you can sell items :P I know you wanna ;). Also i fixed a few bugs, thanks to the comments i have been getting :D. And that little phoenix feather might just help you in a duel with his big accio phoenix buddy :o. Hope chu like it :p

Repdated with second avis gone and spells fixed :] ohh and accio phoenix added to list :P.

Now you can kill that mother fucking death eater! and go ahead, kill a phoenix while you are at it :). You can also now hold more than one wand :D type !inventory to see em :P and i fixed some text bugs :P

Highscores added. !highscore Money. !highscore Magic

I think we have made a comback from harry stinker. Now we have !highscore duel for the best duelist. I did a few bug fixes for that annoying aquamentis bug :| and i lowered rebound rate, was annoying me everyone was beating a death eater, oh yeah. Theres a death eater. And now if you earned a wand threw a basalisk it will still be in your inventory. And well, more are to come.

Wizard Duels
on $*:TEXT:/^[!@.]duel phoenix/Si:#:{
  if ( %fight != active ) {
    set %backup1 $nick
    timerb1 1 300 unset %phoenix
    timerb2 1 300 unset %fight
    set %basalisk active
    set %player1 $nick
    set %special1 1
    set %fight active
    set %player1 $nick
    set %player2 phoenix
    set %ogrechan $chan
    set %turn 1
    timerogre 0 5 phoenix
    set %p1hp 100
    set %p2hp 1000
    set %special1 3
    msg # 15 $nick has started dueling a Phoenix! it is %player1 $+ 's turn.
    halt
  }
  else { .notice $nick somone else is already dueling. }
}
alias phoenix {
  set %player1 %backup1 
  if ( %turn == 2 ) { 
    if ( %player2 == phoenix ) {
      set %hit1 $rand(50,99)
      set %deathchance $rand(1,2)
      if ( %deathchance == 2 ) {
      msg %ogrechan 4,8The phoenix flies down and breathes sacred flame causing %hit1 damage! | dec %p1hp %hit1 | set %turn 1 }
      if ( %deathchance != 2 ) { msg %ogrechan The phoenix flies in the sky waiting for the right chance to strike! | set %turn 1 | halt }
    }
    if ( %p1hp <= 0 ) {
      unset %basalisk
      timerogre off
      unset %player2
      msg %ogrechan The phoenix has killed %player1 $+ !
      finish
      unset %turn
      unset %fight
    }
    msg %ogrechan %player1 has %p1hp hp left! | halt
  }
  if ( %p2hp == $null ) {
    if ( %phoenix [ $+ [ %player1 ] ] == $null ) {
      unset %basalisk
      msg %ogrechan %player1 has his killed first phoenix and earned the respect of phoenix's to now call upon!
      set %phoenix [ $+ [ %player1 ] ] 1
      timerogre off
    }
    unset %basalisk
    msg %ogrechan %player1 has recieved 5000 gold coins from the phoenix feather! | inc %money [ $+ [ %player1 ] ] 5000 | timerogre off | timerb1 off | timerb2 off
  }
}
on $*:TEXT:/^[!@.]duel death/Si:#:{
  if ( %basalisk != active ) {
    timerb1 1 300 unset %basalisk
    timerb2 1 300 unset %fight
    set %basalisk active
    set %player1 $nick
    set %special1 1
    set %fight active
    set %player1 $nick
    set %player2 Death eater
    set %ogrechan $chan
    set %turn 2
    timerogre 0 5 Deater
    set %p1hp 100
    set %p2hp 250
    set %special1 1
    msg # 15 $nick has started dueling a Death eater! it is The death eaters turn.
    deater
    halt
  }
  else { .notice $nick somone else is already dueling. }
}
alias deater {
  if ( %turn == 2 ) {
    if ( %player2 == Death eater ) {
      set %hit1 $rand(30,75)
      set %dragshit $rand(1,2)
      if ( %dragshit == 1 ) { set %attack 1,4 %player2 has done 1 of the unforgivable spell and hit 4,1 %hit1 $+ !  }
      if ( %dragshit == 2 ) { set %attack 1,6 %player2 has done 1 of the unforgivable spell and hit 6,1 %hit1 $+ !  }
      msg %ogrechan %attack
      set %turn 1
      dec %p1hp %hit1
      if ( %p1hp <= 0 ) {
        timerogre off
        dec %bad [ $+ [ %player1 ] ] $rand(1,20)
        msg %ogrechan The death eater has killed %player1 $+ ! And with his victory he steals 100 gold coins from %player1 $+ ! | dec %money [ $+ [ %player1 ] ] 100 | unset %turn
        unset %player2
        finish
        unset %turn
        unset %fight
        halt
      }
      .timer 1 1 msg %ogrechan %player1 has %p1hp hp left! | halt
    }
  }
  if ( %p2hp <= 0 ) { 
    msg %ogrechan %player1 has recieved 10000 gold coins from the death eater! | inc %money [ $+ [ %player1 ] ] 10000 | timerogre off 
    finish
    unset %turn
    unset %fight
    halt
  }
  if ( %p2hp == $null ) { 
    msg %ogrechan %player1 has recieved 10000 gold coins from the death eater! | inc %money [ $+ [ %player1 ] ] 10000 | timerogre off 
    finish
    unset %turn
    unset %fight
  }
}
on $*:TEXT:/^[!@.]duel dementor/Si:#:{
  if ( %basalisk != active ) {
    timerb1 1 300 unset %basalisk
    timerb2 1 300 unset %fight
    set %basalisk active
    set %dementor active
    set %player1 $nick
    set %special1 1
    set %fight active
    set %player1 $nick
    set %player2 Dementor
    set %ogrechan $chan
    set %turn 2
    timerogre 0 5 dmentor
    set %p1hp 100
    set %p2hp 750
    set %special1 1
    msg # 15 $nick has started dueling a Dementor! It is The Dementor's turn.
    deater
    halt
  }
  else { .notice $nick somone else is already dueling. }
}
alias dmentor {
  if ( %turn == 2 ) {
    if ( %player2 == Dementor ) {
      set %hit1 $rand(35,75)
      set %dragshit $rand(1,2)
      if ( %dragshit == 1 ) { set %attack 1,4 %player2 drains more of %player1 $+ 's life causing 4,1 %hit1 $+ !  }
      if ( %dragshit == 2 ) { set %attack 1,6 %player2 has drained some of %player1 $+ 's soul causing 6,1 %hit1 $+ !  }
      msg %ogrechan %attack
      set %turn 1
      dec %p1hp %hit1
      if ( %p1hp <= 0 ) {
        timerogre off
        dec %bad [ $+ [ %player1 ] ] $rand(1,20)
        msg %ogrechan 4,1 %player1 succumbs to the Dementor's kiss, stealing %player1 $+ 's soul. And with his victory he steals 1500 gold coins from %player1 $+ ! | dec %money [ $+ [ %player1 ] ] 1500 | unset %turn
        unset %player2
        finish
        unset %turn
        unset %fight
        halt
      }
      .timer 1 1 msg %ogrechan %player1 has %p1hp hp left! | halt
    }
  }
  if ( %p2hp <= 0 ) { 
    msg %ogrechan %player1 has recieved 5000 gold coins from the Dementor! | inc %money [ $+ [ %player1 ] ] 5000 | timerogre off 
    set %patronus [ $+ [ %player1 ] ] 1
    if ( %animal [ $+ [ $nick ] ] == $null ) { set %animal [ $+ [ $nick ] ] $read(animal.txt) }
    finish
    unset %turn
    unset %fight
    halt
  }
  if ( %p2hp == $null ) { 
    msg %ogrechan %player1 has recieved 5000 gold coins from the Dementor! | inc %money [ $+ [ %player1 ] ] 5000 | timerogre off 
    set %patronus [ $+ [ %player1 ] ] 1
    finish
    unset %turn
    unset %fight
  }
}

alias finish {
  unset %fight2
  unset %p1hp 100 
  unset %p2hp 100 
  unset %super1 5 
  unset %game $chan
  unset %super2 5
  unset %end
  unset %fight
  unset %ogre
  unset %dementor
  unset %basalisk
  halt
}
on $*:TEXT:/^[!@.]unset/Si:#:{
  if ( $nick isop $chan ) {
    timerogre off
    unset %fight2 active 
    unset %p1hp 100 
    //unset %basalisk
    unset %p2hp 100 
    unset %super1 5
    unset %dragonuse
    unset %game $chan
    unset %super2 5
    unset %end
    unset %fight
    unset %player1
    unset %ogre
    unset %player2
    msg # The battle has been unset
  }
  else { .notice $nick not high enough access! }
}
on $*:TEXT:/^[!@.]duel basalisk/Si:#:{
  if ( %fight != active ) {
    timerb1 1 300 unset %basalisk
    timerb2 1 300 unset %fight
    set %basalisk active
    set %player1 $nick
    set %special1 3
    set %fight active
    set %player1 $nick
    set %player2 Basalisk
    set %ogrechan $chan
    set %turn 1
    timerogre 0 5 Basalisk
    set %p1hp 100
    set %p2hp 300
    set %special1 3
    msg # 15 $nick has started dueling a basalisk! it is %player1 $+ 's turn.
  }
  else { .notice $nick somone else is already dueling. }
}
on $*:TEXT:/^[!@.]duel dragon/Si:#:{
  if ( %fight != active ) {
    timerb1 1 300 unset %basalisk
    timerb2 1 300 unset %fight
    set %basalisk active
    set %player1 $nick
    set %special1 1
    set %fight active
    set %player1 $nick
    set %player2 dragon
    set %ogrechan $chan
    set %turn 1
    timerogre 0 5 dragon
    set %p1hp 100
    set %p2hp 500
    set %special1 3
    msg # 15 $nick has started dueling a Dragon! it is %player1 $+ 's turn.
    halt
  }
  else { .notice $nick somone else is already dueling. }
}
alias dragon {
  if ( %turn == 2 ) {
    if ( %player2 == dragon ) {
      set %hit1 $rand(5,35)
      set %dragshit $rand(1,2)
      if ( %dragshit == 1 ) { set %attack 15,4The dragon1,4opens his mouth4,15and breathes fire1,4 on %player1 causing4,15 %hit1 damage }
      if ( %dragshit == 2 ) { set %attack 1,10The dragon flys past %player1 10,1 And slashes them with1,10 Their wings 10,1causing %hit1 Damage }
      msg %ogrechan %attack
      set %turn 1
      dec %p1hp %hit1
      if ( %p1hp <= 0 ) {
        timerogre off
        unset %player2
        inc %magic [ $+ [ %player1 ] ] 75
        msg %ogrechan The dragon has killed %player1 $+ !
        finish
        unset %turn
        unset %fight
      }
      .timer 1 1 msg %ogrechan %player1 has %p1hp hp left! | halt
    }
  }
  if ( %p2hp == $null ) {
    if ( %dragon [ $+ [ %player1 ] ] == $null ) {
      msg %ogrechan %player1 has his killed first dragon and earned the respect of dragons to now call upon!
      set %dragon [ $+ [ %player1 ] ] 1
      timerogre off
    }
    else { set %prize $rand(1,5)
      if ( %prize == 5 ) {
        msg %ogrechan %player1 has recieved 2000 gold coins from the dragons body! | inc %money [ $+ [ %player1 ] ] 2000 | timerogre off 
      }
    }
  }
}
alias basalisk {
  if ( %turn == 2 ) {
    if ( %player2 == Basalisk ) {
      set %hit1 $rand(0,40)
      msg %ogrechan The basalisk has bit %player1 causing %hit1 damage!
      set %turn 1
      dec %p1hp %hit1
      if ( %p1hp <= 0 ) {
        timerogre off
        msg %ogrechan The basalisk has killed %player1 $+ !
        finish
        unset %turn
        unset %fight
      }
      msg %ogrechan %player1 has %p1hp left!
    }
  }
  if ( %p2hp == $null ) {
    timerbasalisk off
    timerogre off
    unset %ogre
    unset %basalisk
    set %chancewand $rand(9,11)
    if ( %chancewand == 10 ) {
      timerogre off
      msg %ogrechan %player1 has gotten an elder wand from the basalisk!
      msg %ogrechan %player1 do you want to switch your wand to elder wand? yes or no? If you say no you get 5k.
      set %elderchance [ $+ [ %player1 ] ] 1 | timerogre off
    }  
  }
}
on $*:TEXT:/^[!@.]duel ogre/Si:#:{
  if ( %fight != active ) {
    timer 1 300 unset %basalisk
    set %basalisk active
    set %special1 1
    set %special2 1
    set %fight active
    set %fight2 active
    set %player1 $nick
    set %player2 ogre
    set %ogrechan $chan
    set %turn 1
    set %ogre active
    timerogre 0 5 ogre
    set %p1hp 100
    set %p2hp 120
    set %special1 1
    msg # 15 $nick has started dueling an ogre! it is %player1 $+ 's turn.
    halt
  }
  else { .notice $nick somone else is already dueling. }
}
alias ogre {
  if ( %turn == 2 ) {
    if ( %player2 == ogre ) {
      set %hit1 $rand(10,30)
      msg %ogrechan 14the ogre swings 5a club 15at %player1 $+ 's head 14doing %hit1 damage!
      set %turn 1
      dec %p1hp %hit1
      if ( %p1hp < 0 ) {
        msg %ogrechan The ogre has killed %player1 $+ !
        unset %basalisk
        finish
        unset %player1
        unset %turn
        unset %fight
        unset %fight2
        timerogre off
        halt
      }
      msg %ogrechan %player1 has %p1hp left!
    }
  }
  if ( %p2hp == $null ) {
    timerogre off
    unset %ogre
    unset %basalisk
    set %chancewand $rand(1,59)
    if ( %chancewand == 10 ) {
      timerogre off
      msg %ogrechan %player1 has gotten an elder wand from the ogre!
      msg %ogrechan %player1 do you want to switch your wand to elder wand? yes or no? If you say no you get 5k.
      set %elderchance [ $+ [ %player1 ] ] 1
    }  
  }
}
on $*:TEXT:/^[!@.]yes/Si:#:{
  if ( %elderchance [ $+ [ $nick ] ] == 1 ) {
    dec %elderchance [ $+ [ $nick ] ]
    set %wand [ $+ [ $nick ] ] 10
    msg # $nick now has an elder wand!
  }
}
on $*:TEXT:/^[!@.]no/Si:#:{
  if ( %elderchance [ $+ [ $nick ] ] == 1 ) {
    dec %elderchance [ $+ [ $nick ] ]
    msg # I see... Then I will take this wand! And you can have some pocket change! | inc %money [ $+ [ $nick ] ] 5000
  }
}
on *:nick: {
  haltdef
  if ( $nick == %player1 ) {
    set %player1 $newnick
  }
  elseif ( $nick == %player2 ) {
    set %player2 $newnick
  }
}
on $*:TEXT:/^[!@.]wand nick/Si:#:{
  if ( $len( $+ $3- $+ ) >= 20 ) { .notice $nick That name is to long for a wand | halt }
  else { set %wandnick [ $+ [ $nick ] ] $3- the 
  .notice $nick your wand nick is now %wandnick [ $+ [ $nick ] ] }
}
on $*:TEXT:/^[!@.]potion store/Si:#:{
  msg $nick Welcome to the Magical potion store! we have all kinds of herbs to help you make potions!
  timer 1 1 notice $nick If you want to learn potions visit this site. http://dark-harry-potter.webs.com/apps/forums/topics/show/1287392-potion-help-
}
on $*:TEXT:/^[!@.]wand store/Si:#:{
  msg $nick Welcome to the magical wand store! we have all your wizarding needs!
  timer 1 1 msg $nick in this magical store we have wands. to buy a wand type !buy <type> wand
  timer 1 2 msg $nick the types are as fallowed: Elder,Flame & Aqua,Vine,Ash,Birch From strongest to weakest. 
  timer 1 3 msg $nick the prices are 10,000,7,500,2000,500,100. In the same order.
}
on $*:TEXT:/^[!@.](help|site|commands|guide)/Si:#:{ msg $nick This may help you www.dark-harry-potter.webs.com }
on $*:TEXT:/^[!@.]inventory/Si:#:{
  if ( %vine [ $+ [ $nick ] ] == yes ) { var %1 3vine }
  if ( %ash [ $+ [ $nick ] ] == yes ) { var %2 0,1ash }
  if ( %birch [ $+ [ $nick ] ] == yes ) { var %3 5birch }
  if ( %aqua [ $+ [ $nick ] ] == yes ) { var %4 12Aqua }
  if ( %flame [ $+ [ $nick ] ] == yes ) { var %5 4Flame }
  if ( %elder [ $+ [ $nick ] ] == yes ) { var %6 8Elder }
  if ( %wand [ $+ [ $nick ] ] == $null ) { .notice $nick you do not have a wand. To get one type !wand | halt }
  notice $nick you have the fallowing wands. %6 %5 %4 %3 %2 %1 $+ .
}
on $*:TEXT:/^[!@.]switch/Si:#:{
  if ( $2 != $null ) {
    if ( % [ $+ [ $2 ] ] [ $+ [ $nick ] ] == yes ) {
      if ( $2 == sword ) { set %wand [ $+ [ $nick ] ] Sword }
      if ( $2 == elder ) { set %wand [ $+ [ $nick ] ] 10 }
      if ( $2 == flame ) { set %wand [ $+ [ $nick ] ] 9 }
      if ( $2 == Aqua ) { set %wand [ $+ [ $nick ] ] 8 }
      if ( $2 == Vine ) { set %wand [ $+ [ $nick ] ] 7 }
      if ( $2 == ash ) { set %wand [ $+ [ $nick ] ] 6 }
      if ( $2 == birch ) { set %wand [ $+ [ $nick ] ] 5 }
      msg # $nick has switched wands and now has a $2 wand
    }
    else { .notice $nick the syntax is !switch <Type> wand. You may not have this wand. }
  }
  else { .notice $nick please enter a wand type. syntax is !switch <type> wand. }
}
on $*:TEXT:/^[!@.]wand/Si:#:{
  if ( $2 == $null ) {
    if ( %wand [ $+ [ $nick ] ] == $null ) {
      set %wand [ $+ [ $nick ] ] $rand(1,4)
      if ( %wand [ $+ [ $nick ] ] == 1 ) { var %wandtype [ $+ [ $nick ] ] 5Woodwind }
      if ( %wand [ $+ [ $nick ] ] == 2 ) { var %wandtype [ $+ [ $nick ] ] 11Rowan }
      if ( %wand [ $+ [ $nick ] ] == 3 ) { var %wandtype [ $+ [ $nick ] ] 0,11holy }
      if ( %wand [ $+ [ $nick ] ] == 4 ) { var %wandtype [ $+ [ $nick ] ] 1Death }
      msg # $nick you have come to the seek a wand? well the wand has already found you... The wand that you have been bestowed is a %wandtype [ $+ [ $nick ] ] wand. Be careful with this wand. for it is the only one you get for free 
    }
    else {
      if ( %wand [ $+ [ $nick ] ] == 5 ) { var %wandtype [ $+ [ $nick ] ] 15birch }
      elseif ( %wand [ $+ [ $nick ] ] == 1 ) { var %wandtype [ $+ [ $nick ] ] 5Woodwind }
      elseif ( %wand [ $+ [ $nick ] ] == 2 ) { var %wandtype [ $+ [ $nick ] ] 11Rowan }
      elseif ( %wand [ $+ [ $nick ] ] == 3 ) { var %wandtype [ $+ [ $nick ] ] 0,11holy }
      elseif ( %wand [ $+ [ $nick ] ] == 4 ) { var %wandtype [ $+ [ $nick ] ] 1Death }
      elseif ( %wand [ $+ [ $nick ] ] == 7 ) { var %wandtype [ $+ [ $nick ] ] 3vine }
      elseif ( %wand [ $+ [ $nick ] ] == 6 ) { var %wandtype [ $+ [ $nick ] ] 0,1ash }
      elseif ( %wand [ $+ [ $nick ] ] == 8 ) { var %wandtype [ $+ [ $nick ] ] 12Aqua }
      elseif ( %wand [ $+ [ $nick ] ] == 10 ) { var %wandtype [ $+ [ $nick ] ] 8,1elder }
      elseif ( %wand [ $+ [ $nick ] ] == 9 ) { var %wandtype [ $+ [ $nick ] ] 4Flame }
      if ( %level [ $+ [ $nick ] ] >= 10 ) { 
        if ( %phoenix [ $+ [ $nick ] ] == $null ) { .msg # $nick has stumbled across a phoenix feather! After all $nick $+ 's hard work they has finally gotten the most powerful wizarding tool! | inc %phoenix [ $+ [ $nick ] ] | halt } 
        else { msg # $nick $+ 's wand is %wandnick [ $+ [ $nick ] ] 4,8Phoenix Feathered %wandtype [ $+ [ $nick ] ] wand. | halt
        }
        if ( %phoenix [ $+ [ $nick ] ] == 1 ) { msg # $nick $+ 's wand is %wandnick [ $+ [ $nick ] ] 4,8Phoenix Feathered %wandtype [ $+ [ $nick ] ] wand. | halt }
      }
      else {
        msg # $nick $+ 's wand is %wandnick [ $+ [ $nick ] ] %wandtype [ $+ [ $nick ] ] wand.
      }
    }
  }
  elseif ( $2 != $null  ) {
    if ( %wand [ $+ [ $2 ] ] == $null ) { .msg # $2 does not have a wand yet. To come get one type !wand | halt }
    if ( %wand [ $+ [ $2 ] ] == 1 ) { var %wandtype [ $+ [ $2 ] ] 5Woodwind }
    if ( %wand [ $+ [ $2 ] ] == 2 ) { var %wandtype [ $+ [ $2 ] ] 11Rowan }
    if ( %wand [ $+ [ $2 ] ] == 3 ) { var %wandtype [ $+ [ $2 ] ] 0,11holy }
    if ( %wand [ $+ [ $2 ] ] == 4 ) { var %wandtype [ $+ [ $2 ] ] 1Death }
    if ( %wand [ $+ [ $2 ] ] == 5 ) { var %wandtype [ $+ [ $2 ] ] 15birch }
    if ( %wand [ $+ [ $2 ] ] == 7 ) { var %wandtype [ $+ [ $2 ] ] 3vine }
    if ( %wand [ $+ [ $2 ] ] == 6 ) { var %wandtype [ $+ [ $2 ] ] 0,1ash }
    if ( %wand [ $+ [ $2 ] ] == 10 ) { var %wandtype [ $+ [ $2 ] ] 8,1elder }
    if ( %wand [ $+ [ $2 ] ] == 8 ) { var %wandtype [ $+ [ $2 ] ] 12Aqua }
    if ( %wand [ $+ [ $2 ] ] == 9 ) { var %wandtype [ $+ [ $2 ] ] 4Flame }
    if ( %level [ $+ [ $2 ] ] >= 10 ) {
      msg # $2 $+ 's wand is %wandnick [ $+ [ $2 ] ] 4,8Phoenix Feathered %wandtype [ $+ [ $2 ] ] wand.
    }

    else {
      msg # $2 $+ 's wand is %wandnick [ $+ [ $2 ] ] %wandtype [ $+ [ $2 ] ] wand.
    }
  }
}

on $*:TEXT:/^[!@.]store/Si:#:{
  .notice $nick we have a potion store and a wand store type !<store name> store . ex !wand store
}

on *:TEXT:!challenge*:#:notice $2 $nick 0,12has challanged you to a duel in $chan $+ ! do you wish to accept? To do so type !duel.
on $*:TEXT:/^[!@.]Duelcmds/Si:#:{
  msg $nick !.@ can be used with all of these
  msg $nick 12,0 ~ spells ~ 
  msg $nick !incendo !Serpensortia !Stupefy !Sectumsempra !Confundus !Aquamenti !Conjunctivitis !expecto patronum !Reducto !levicorpus
  msg $nick 4,1 ~ evil magic ~
  msg $nick !crucio !Avada Kadavra !imperio
  msg $nick 1,15 ~ charms ~
  msg $nick !protego !ferula !Densaugeo !flipendo !avis
  msg $nick 15,1 ~ Commands bought or earned ~
  msg $nick !accio dragon !deprimo !accio phoenix !obliviate
  msg $nick commands in detail can be found at http://dark-harry-potter.webs.com/apps/forums/topics/show/1274324-how-to-duel-
}
on $*:TEXT:/^[!@.](Duel|DM|Fight)/Si:#:{
  if ( %basalisk != $null ) { .notice $nick somones dueling | halt }
  elseif ( %magic [ $+ [ $nick ] ] == $null ) {
    set %magic [ $+ [ $nick ] ] 5
  }
  else { 
    echo -a $nick has %magic [ $+ [ $nick ] ] exp points
  }
  if (%fight2 == active) { 
    .notice $nick 4,0 a Match is already underway! Wait your turn! | halt
  } 
  if ( %basalisk != $null ) {
    .notice $nick %player1 is fighting a monster at the moment | halt
  }
  if (%fight == active) {
    set %player2 $nick 
    if (%player2 = %player1) { halt }
    msg $chan 12,1 the fight is set! 1,12 %player1 12,1 vs 12,1 %player2 $+ . 1,12 Take out your wands!
    notice %player1 Type "!Duelcmds" for the commands list.
    notice %player2 Type "!Duelcmds" for the commands list.
    set %fight2 active 
    set %p1hp 100
    set %p2hp 100
    set %magic1 2
    set %game $chan 
    set %magic2 2
    set %end
    set %special1 1 | set %special2 1
    /timer1000 1 1000 lalala
    timer99? off
    set %turnrandom $rand(1,2)
    if ( %turnrandom == 2) {
      set %turn 1
      msg # %player1 goes first
    }
    elseif ( %turnrandom == 1) {
      set %turn 2
      msg # %player2 goes first
    }
  } 
  else { 
    set %fight active 
    set %player1 $nick 
    msg $chan 12,1 $nick has declared a duel. Does anyone wish to accept his challange?
    unset %turn
    timer991 1 60 unset %player1
    timer992 1 60 unset %fight
  } 
} 
alias lalala {
  unset %end
  unset %magic2
  unset %magic1
  unset %fight2
  unset %fight
}
on $*:TEXT:/^[!@.]Conjunctivitis/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      set %hit1 $rand(15,38)
      if ( %player2 == death eater ) { set %hit1 $rand(30,60) }
      inc %hit1 %wand [ $+ [ $nick ] ]
      msg $chan 0,13 %player1 has shot a jet of 13,0 blinding light at %player2 0,13 causing %hit1 damage!
      dec %p2hp %hit1 
      set %turn 2 
    }
    if (%p2hp <= 0) { 
      msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
      unset %fight 
      unset %fight2 
      unset %p1hp 
      unset %p2hp 
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      unset %turn 
      unset %hit1 
      reset
      unset %hit2 
      unset %end
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 0,6 %player2 6,0 has 0,6 %p2hp 0,6 hp left 
  } 
  else { 
    if (%turn == 2) {
      if ($nick == %player2) { 
        set %hit1 $rand(15,38) 
        inc %hit1 %wand [ $+ [ $nick ] ]
        msg $chan 0,13 %player2 has shot a jet of 13,0 blinding light at %player1 0,13 causing %hit1 damage!
        dec %p1hp %hit1 
        set %turn 1 
        if (%p1hp <= 0) { 
          msg $chan 1,4 %player2 4,1has koed 1,4 %player1
          unset %fight 
          unset %fight2 
          unset %p1hp 
          unset %p2hp 
          unset %stamina1 
          unset %stamina2 
          set %moneygotten $rand(75,200)
          inc %money [ $+ [ %player2 ] ] %moneygotten
          msg # $nick has recieved %moneygotten gold coins
          unset %turn 
          unset %hit1 
          unset %hit2 
          unset %end
          reset
          inc %magic [ $+ [ %player2 ] ] $rand(10,25)
          halt
        }
        msg $chan 0,6 %player1 6,0 has 0,6 %p1hp 0,6 hp left 
      }
    } 
  } 
} 

on $*:TEXT:/^[!@.]Confundus/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      set %hit1 $rand(15,38)
      if ( %player2 == death eater ) { set %hit1 $rand(20,50) }
      inc %hit1 %wand [ $+ [ $nick ] ]
      msg $chan 0,3 %player1 shoots a beam of confusing green light at %player2 3,0 causing %hit1 damage!
      dec %p2hp %hit1 
      set %turn 2 
    }
    if (%p2hp <= 0) { 
      msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
      unset %fight 
      unset %fight2 
      unset %p1hp 
      unset %p2hp 
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      unset %turn 
      unset %hit1 
      reset
      unset %hit2 
      unset %end
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 0,3 %player2 0,3 has 3,0 %p2hp 3,0 hp left 
  } 
  else { 
    if (%turn == 2) {
      if ($nick == %player2) { 
        set %hit1 $rand(15,38) 
        inc %hit1 %wand [ $+ [ $nick ] ]
        msg $chan 0,3 %player2 shoots a beam of confusing green light at %player1 3,0 causing %hit1 damage!
        dec %p1hp %hit1 
        set %turn 1 
        if (%p1hp <= 0) { 
          msg $chan 1,4 %player2 4,1has koed 1,4 %player1
          unset %fight 
          unset %fight2 
          unset %p1hp 
          unset %p2hp 
          unset %stamina1 
          unset %stamina2 
          set %moneygotten $rand(75,200)
          inc %money [ $+ [ %player2 ] ] %moneygotten
          msg # $nick has recieved %moneygotten gold coins
          unset %turn 
          unset %hit1 
          unset %hit2 
          unset %end
          reset
          inc %magic [ $+ [ %player2 ] ] $rand(10,25)
          halt
        }
        msg $chan 0,3 %player1 0,3 has 3,0 %p1hp 3,0 hp left 
      }
    } 
  } 
} 

on $*:TEXT:/^[!@.]Accio dragon/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      if ( %dragon [ $+ [ %player1 ] ] != 1 ) { msg # You do not have the respect of dragons. | halt }
      elseif ( %dragonuse [ $+ [ $nick ] ] >= 2 ) { msg # Do not summon the dragons so often | halt }
      elseif ( $nick == %luck ) { set %hit1 $rand(30,50) }
      set %hit1 $rand(10,40)
      inc %dragonuse [ $+ [ $nick ] ]
      msg $chan 1,15 A dragon swoops down 4,15 and breathes fire on %player2 1,15 Causing %hit1 damage!
      set %turn 2 
      dec %p2hp %hit1
    }
    if (%p2hp <= 0) { 
      msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
      unset %fight 
      unset %fight2 
      unset %p1hp 
      unset %p2hp 
      reset
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      unset %turn 
      unset %hit1 
      unset %hit2 
      unset %end
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 12,0 %player2 0,12 has 12,0 %p2hp 0,12 hp left 
  } 
  else { 
    if (%turn != 2) { halt }
    elseif ($nick == %player2) { 
      if (%dragon [ $+ [ %player2 ] ] != 1 ) { msg # You do not have the respect of dragons | halt }
      elseif ( %dragonuse [ $+ [ $nick ] ] >= 2 ) { msg # Do not summon the dragons so often }
      elseif ( $nick == %luck ) { set %hit1 $rand(30,50) }
      set %hit1 $rand(10,40) 
      inc %dragonuse [ $+ [ $nick ] ]
      msg $chan 1,15 A dragon swoops down 4,15 and breathes fire on %player1 1,15 Causing %hit1 damage!
      dec %p1hp %hit1 
      set %turn 1 
      if (%p1hp <= 0) { 
        msg $chan 1,4 %player2 4,1has koed 1,4 %player1
        unset %fight 
        unset %fight2 
        unset %p1hp 
        unset %p2hp 
        unset %stamina1 
        unset %stamina2 
        set %moneygotten $rand(75,200)
        inc %money [ $+ [ %player2 ] ] %moneygotten
        msg # $nick has recieved %moneygotten gold coins
        unset %turn 
        unset %hit1 
        unset %hit2 
        reset
        unset %end
        inc %magic [ $+ [ %player2 ] ] $rand(10,25)
        halt
      }

      msg $chan 12,0 %player1 0,12 has 12,0 %p1hp 0,12 hp left 
    }
  } 
} 
on $*:TEXT:/^[!@.]expecto patronum/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      set %hit1 $rand(10,40)
      if ( %animal [ $+ [ $nick ] ] == $null ) { set %animal [ $+ [ $nick ] ] $read(animal.txt) }
      if ( %patronus [ $+ [ %player1 ] ] != 1 ) { .notice $nick You have not defeated a Dementor. | halt }
      if ( %dragonuse [ $+ [ $nick ] ] >= 2 ) { .notice $nick Your soul is too weary to perform that spell again. | halt }
      if ( %player2 == dementor ) { set %hit1 $rand(100,300) }
      inc %dragonuse [ $+ [ $nick ] ]
      msg $chan 11,15 A silvery whisp appears out of %player1 $+ 's wand 15,11 and out comes a ghostly 15,11 %animal [ $+ [ $nick ] ] Causing %hit1 damage!
      set %turn 2 
      dec %p2hp %hit1
    }
    if (%p2hp <= 0) { 
      msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
      unset %fight 
      unset %fight2 
      unset %p1hp 
      unset %p2hp 
      reset
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      unset %turn 
      unset %hit1 
      unset %hit2 
      unset %end
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 12,0 %player2 0,12 has 12,0 %p2hp 0,12 hp left 
  } 
  else { 
    if (%turn != 2) { halt }
    elseif ($nick == %player2) { 
      if ( %animal [ $+ [ $nick ] ] == $null ) { set %animal [ $+ [ $nick ] ] $read(animal.txt) }
      if (%patronus [ $+ [ %player2 ] ] != 1 ) { .notice $nick You have not defeated a Dementor. | halt }
      set %hit1 $rand(10,40)  
      if ( %dragonuse [ $+ [ $nick ] ] >= 2 ) { .notice $nick Your soul is too weary to perform that spell again. }
      if ( $nick == dementor ) { set %hit1 $rand(100,300) }
      inc %dragonuse [ $+ [ $nick ] ]
      msg $chan 11,15 A silvery whisp appears out of %player2 $+ 's wand 15,11 and out comes a ghostly 15,11 %animal [ $+ [ $nick ] ] Causing %hit1 damage!
      dec %p1hp %hit1 
      set %turn 1 
      if (%p1hp <= 0) { 
        msg $chan 1,4 %player2 4,1has koed 1,4 %player1
        unset %fight 
        unset %fight2 
        unset %p1hp 
        unset %p2hp 
        unset %stamina1 
        unset %stamina2 
        set %moneygotten $rand(75,200)
        inc %money [ $+ [ %player2 ] ] %moneygotten
        msg # $nick has recieved %moneygotten gold coins
        unset %turn 
        unset %hit1 
        unset %hit2 
        reset
        unset %end
        inc %magic [ $+ [ %player2 ] ] $rand(10,25)
        halt
      }

      msg $chan 12,0 %player1 0,12 has 12,0 %p1hp 0,12 hp left 
    }
  } 
} 
on $*:TEXT:/^[!@.]Aquamenti/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      set %hit1 $rand(15,38)
      if ( %wand [ $+ [ $nick ] ] == 8 ) { inc %hit1 $rand(5,15) }
      if ( %luck [ $+ [ $nick ] ] == 10 ) { set %hit1 $rand(30,50) }
      if ( %player2 == phoenix ) { set %hit1 $rand(30,60) }
      msg $chan 12,1 %player1 1,12 has shot a jet of water out of there wand and hit 12,1 %hit1 
      dec %p2hp %hit1 
      set %turn 2 
    }
    if (%p2hp <= 0) { 
      msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
      unset %fight 
      unset %fight2 
      unset %p1hp 
      unset %p2hp 
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      unset %turn 
      reset
      unset %hit1 
      unset %hit2 
      unset %end
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 12,0 %player2 0,12 has 12,0 %p2hp 0,12 hp left 
  } 
  else { 
    if (%turn != 2) { halt }
    elseif ($nick == %player2) { 
      set %hit1 $rand(15,38) 
      if ( %wand [ $+ [ $nick ] ] == 8 ) { inc %hit1 $rand(5,15) }
      if ( $nick == %luck ) { set %hit1 $rand(30,50) }
      msg $chan 12,1 %player2 1,12 has shot a jet of water out of there wand and hit 12,1 %hit1
      dec %p1hp %hit1 
      set %turn 1 
      if (%p1hp <= 0) { 
        msg $chan 1,4 %player2 4,1has koed 1,4 %player1
        unset %fight 
        unset %fight2 
        unset %p1hp 
        unset %p2hp 
        unset %stamina1 
        unset %stamina2 
        set %moneygotten $rand(75,200)
        inc %money [ $+ [ %player2 ] ] %moneygotten
        msg # $nick has recieved %moneygotten gold coins
        unset %turn 
        unset %hit1 
        reset
        unset %hit2 
        unset %end
        inc %magic [ $+ [ %player2 ] ] $rand(10,25)
        halt
      }

      msg $chan 12,0 %player1 0,12 has 12,0 %p1hp 0,12 hp left 
    }
  } 
} 
on $*:TEXT:/^[!@.]Incendo/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      set %hit1 $rand(0,38)
      if ( %wand [ $+ [ $nick ] ] == 9 ) { inc %hit1 $rand(5,15) }
      if ( %luck [ $+ [ $nick ] ] == 10 ) { set %hit1 $rand(30,50) }
      if ( %player2 == phoenix ) { dec %hit1 $Rand(1,10) }
      msg $chan 4,0 %player1 0,4 has shot flame out of there wand and hit 4,0 %hit1 
      dec %p2hp %hit1 
      set %turn 2 
    }
    if (%p2hp <= 0) { 
      msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
      unset %fight 
      unset %fight2 
      unset %p1hp 
      unset %p2hp 
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      unset %turn 
      unset %hit1 
      unset %hit2 
      unset %end
      reset
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 4,0 %player2 0,4 has 4,0 %p2hp 0,4 hp left 
  } 
  else { 
    if (%turn != 2) { halt }
    elseif ($nick == %player2) { 
      set %hit1 $rand(0,38) 
      if ( %wand [ $+ [ $nick ] ] == 10 ) { inc %hit1 $rand(5,15) }
      if ( $nick == %luck ) { set %hit1 $rand(30,50) }
      msg $chan 4,0 %player2 0,4 has shot flame out of there wand and hit 4,0 %hit1
      dec %p1hp %hit1 
      set %turn 1 
      if (%p1hp <= 0) { 
        msg $chan 1,4 %player2 4,1has koed 1,4 %player1
        unset %fight 
        unset %fight2 
        unset %p1hp 
        unset %p2hp 
        unset %stamina1 
        unset %stamina2 
        set %moneygotten $rand(75,200)
        inc %money [ $+ [ %player2 ] ] %moneygotten
        msg # $nick has recieved %moneygotten gold coins
        unset %turn 
        unset %hit1 
        unset %hit2 
        reset
        unset %end
        inc %magic [ $+ [ %player2 ] ] $rand(10,25)
        halt
      }
      msg $chan 4,0 %player1 0,4 has 4,0 %p1hp 0,4 hp left 
    }
  } 
} 
on $*:TEXT:/^[!@.]Reducto/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      set %hit1 $rand(10,38)
      msg $chan 8,1 %player1 1,8 has shot a 1,8yellow beam out of there wand8,1 setting of an explosion doing 1,8 %hit1 damage 
      dec %p2hp %hit1 
      set %turn 2 
    }
    if (%p2hp <= 0) { 
      msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
      unset %fight 
      unset %fight2 
      unset %p1hp 
      unset %p2hp 
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      unset %turn 
      unset %hit1 
      unset %hit2 
      reset
      unset %end
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 8,1 %player2 1,8 has 8,1 %p2hp 1,8 hp left 
  } 
  else { 
    if (%turn != 2) { halt }
    elseif ($nick == %player2) { 
      set %hit1 $rand(10,38) 
      msg $chan 8,1 %player2 1,8 has shot a 1,8yellow beam out of there wand8,1 setting of an explosion doing 1,8 %hit1 damage 
      dec %p1hp %hit1 
      set %turn 1 
      if (%p1hp <= 0) { 
        msg $chan 1,4 %player2 4,1has koed 1,4 %player1
        unset %fight 
        unset %fight2 
        unset %p1hp 
        unset %p2hp 
        unset %stamina1 
        unset %stamina2 
        set %moneygotten $rand(75,200)
        inc %money [ $+ [ %player2 ] ] %moneygotten
        msg # $nick has recieved %moneygotten gold coins
        unset %turn 
        unset %hit1 
        unset %hit2 
        unset %end
        reset
        inc %magic [ $+ [ %player2 ] ] $rand(10,25)
        halt
      }

      msg $chan 8,1 %player1 1,8 has 8,1 %p1hp 1,8 hp left 
    }
  } 
} 
on $*:TEXT:/^[!@.]Densaugeo/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      set %hit1 $rand(15,35) 
      inc %hit1 %wand [ $+ [ $nick ] ]
      msg $chan 1,14 %player1 $+ 's teeth grow and14,1 %player1 bites1,14 %player2 causing %hit1 damage
      dec %p2hp %hit1 
      set %turn 2 
    }
    if (%p2hp <= 0) { 
      msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
      unset %fight 
      unset %fight2 
      unset %p1hp 
      unset %p2hp 
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      unset %turn 
      unset %hit1 
      unset %hit2 
      unset %end
      reset
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 1,15 %player2 15,1 has 1,15 %p2hp 15,1 hp left 
  } 
  else { 
    if (%turn == 2) {
      if ($nick == %player2) { 
        set %hit1 $rand(15,35) 
        inc %hit1 %wand [ $+ [ $nick ] ]
        msg $chan 1,14 %player2 $+ 's teeth grow and14,1 %player2 bites1,14 %player1 causing %hit1 damage
        dec %p1hp %hit1 
        set %turn 1 
        if (%p1hp <= 0) { 
          msg $chan 1,4 %player2 4,1has koed 1,4 %player1
          unset %fight 
          unset %fight2 
          unset %p1hp 
          unset %p2hp 
          unset %stamina1 
          unset %stamina2 
          set %moneygotten $rand(75,200)
          inc %money [ $+ [ %player2 ] ] %moneygotten
          msg # $nick has recieved %moneygotten gold coins
          unset %turn 
          unset %hit1 
          unset %hit2 
          unset %end
          reset
          inc %magic [ $+ [ %player2 ] ] $rand(10,25)
          halt
        }
        msg $chan 1,15 %player1 15,1 has 1,15 %p1hp 15,1 hp left 
      }
    } 
  } 
} 
on $*:TEXT:/^[!@.]Serpensortia/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      set %hit1 $rand(0,38) 
      inc %hit1 %wand [ $+ [ $nick ] ]
      msg $chan 3,0 %player1 0,3 has released a snake from their wand and the serpent bite caused 3,0 %hit1 damage 
      dec %p2hp %hit1 
      set %turn 2 
    }
    if (%p2hp <= 0) { 
      msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
      unset %fight 
      unset %fight2
      reset 
      unset %p1hp 
      unset %p2hp 
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      unset %turn 
      unset %hit1 
      unset %hit2 
      unset %end
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 3,0 %player2 0,3 has 3,0 %p2hp 0,3 hp left 
  } 
  else { 
    if (%turn == 2) {
      if ($nick == %player2) { 
        set %hit1 $rand(0,38) 
        inc %hit1 %wand [ $+ [ $nick ] ]
        msg $chan 3,0 %player2 0,3 has released a snake from their wand and the serpent bite caused 3,0 %hit1 damage 
        dec %p1hp %hit1 
        set %turn 1 
        if (%p1hp <= 0) { 
          msg $chan 1,4 %player2 4,1has koed 1,4 %player1
          unset %fight 
          unset %fight2 
          reset
          unset %p1hp 
          unset %p2hp 
          unset %stamina1 
          unset %stamina2 
          set %moneygotten $rand(75,200)
          inc %money [ $+ [ %player2 ] ] %moneygotten
          msg # $nick has recieved %moneygotten gold coins
          unset %turn 
          unset %hit1 
          unset %hit2 
          unset %end
          inc %magic [ $+ [ %player2 ] ] $rand(10,25)
          halt
        }
        msg $chan 3,0 %player1 0,3 has 3,0 %p1hp 0,3 hp left 
      }
    } 
  } 
} 
on $*:TEXT:/^[!@.]Protego/Si:*:{
  if ( %turn == 1 ) { 
    if ( $nick == %player1 ) {
      set %heal $calc( %hit1 + $rand(1,20) )
      var %r $rand(1,5)
      if ( %luck [ $+ [ $nick ] ] == 10 ) { var %r luck }
      if ( %r != 3 ) { inc %p1hp %heal | msg # 6,1 $nick has successfully rebounded the attack and recovered %heal life | msg # 13 %player1 now has %p1hp hp }
      elseif ( %r == 3 ) { msg # 1,10the rebound has failed! } 
      set %turn 2
    }
  }
  else {
    if ( %turn == 2 ) {
      if ( $nick == %player2 ) {
        set %r $rand(1,5)
        if ( $nick == %luck ) { var %r luck }
        set %heal $calc( %hit1 + $rand(1,20) )
        if ( %r != 3 ) { inc %p2hp %heal | msg # 6,1 $nick has successfully rebounded the attack and recovered %heal life | msg # 13 %player2 now has %p2hp hp }
        elseif ( %r == 3 ) { msg # 1,10the rebound has failed! } 
        set %turn 1
      }
    }
  }
}
on $*:TEXT:/^[!@.]levicorpus/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      set %hit1 $rand(0,40) 
      inc %hit1 %wand [ $+ [ $nick ] ]
      msg $chan 0,15 %player1 0,15 shoots a white light and 15,0 %player2 is dangled upside down causing 0,15 %hit1 damage 
      dec %p2hp %hit1 
      set %turn 2 
    }
    if (%p2hp <= 0) { 
      msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
      unset %fight 
      unset %fight2 
      reset
      unset %p1hp 
      unset %p2hp 
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      unset %turn 
      unset %hit1 
      unset %hit2 
      unset %end
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 15,0 %player2 0,15 has 15,0 %p2hp 0,15 hp left 
  } 
  else { 
    if (%turn == 2) {
      if ($nick == %player2) { 
        set %hit1 $rand(0,40) 
        inc %hit1 %wand [ $+ [ $nick ] ]
        msg $chan 0,15 %player2 0,15 shoots a white light and 15,0 %player1 is dangled upside down causing 0,15 %hit1 damage 
        dec %p1hp %hit1 
        set %turn 1 
        if (%p1hp <= 0) { 
          msg $chan 4,1 %player2 1,4 has koed 4,1 %player1 
          unset %fight 
          unset %fight2 
          unset %p1hp 
          unset %p2hp 
          unset %stamina1 
          unset %stamina2 
          set %moneygotten $rand(75,200)
          inc %money [ $+ [ %player2 ] ] %moneygotten
          msg # $nick has recieved %moneygotten gold coins
          unset %turn 
          unset %hit1 
          unset %hit2 
          unset %end
          reset
          inc %magic [ $+ [ %player2 ] ] $rand(10,25)
          halt
        }
        msg $chan 15,0 %player1 0,15 has 15,0 %p1hp 0,15 hp left 
      }
    } 
  } 
} 

on $*:TEXT:/^[!@.]Ferula/Si:*:{
  if ( %turn == 1 ) { 
    if ( $nick == %player1 ) {
      set %heal 30
      var %r $rand(1,5)
      if ( $nick == %luck ) { var %r luck }
      if ( %r != 3 ) { inc %p1hp %heal | msg # 6,1 $nick has created some bandages and patched some wounds healing %heal life | msg # 13 %player1 now has %p1hp hp }
      elseif ( %r == 3 ) { msg # 1,10the bandages have withered away! } 
      set %turn 2
    }
  }
  else {
    if ( %turn == 2 ) {
      if ( $nick == %player2 ) {
        set %r $rand(1,5)
        if ( $nick == %luck ) { var %r luck }
        set %heal 30
        if ( %r != 3 ) { inc %p2hp %heal | msg # 6,1 $nick has created some bandages and patched some wounds healing %heal life | msg # 13 %player2 now has %p2hp hp }
        elseif ( %r == 3 ) { msg # 1,10the bandages have withered away! } 
        set %turn 1
      }
    }
  }
}

on $*:TEXT:/^[!@.]Avis/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      set %hit1 $rand(10,30) 
      inc %hit1 %wand [ $+ [ $nick ] ]
      msg $chan 11,1 %player1 1,11 has released birds from there wand and hit 11,0 %hit1 
      dec %p2hp %hit1 
      set %turn 2 
    }
    if (%p2hp <= 0) { 
      msg $chan 0,11 %player1 0,12 has koed 11,0 %player2 
      unset %fight 
      unset %fight2 
      unset %p1hp 
      reset
      unset %p2hp 
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      unset %turn 
      unset %hit1 
      unset %hit2 
      unset %end
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 12,0 %player2 0,12 has 12,0 %p2hp 0,12 hp left 
  } 
  else { 
    if (%turn == 2) {
      if ($nick == %player2) { 
        set %hit1 $rand(10,30) 
        inc %hit1 %wand [ $+ [ $nick ] ]
        msg $chan 11,1 %player2 1,11 has released birds from there wand and hit 11,0 %hit1 
        dec %p1hp %hit1 
        set %turn 1 
        if (%p1hp <= 0) { 
          msg $chan 0,11 %player2 0,12 has koed 11,0 %player1
          unset %fight 
          unset %fight2 
          reset
          unset %p1hp 
          unset %p2hp 
          unset %stamina1 
          unset %stamina2 
          set %moneygotten $rand(75,200)
          inc %money [ $+ [ %player2 ] ] %moneygotten
          msg # $nick has recieved %moneygotten gold coins
          unset %turn 
          unset %hit1 
          unset %hit2 
          unset %end
          inc %magic [ $+ [ %player2 ] ] $rand(10,25)
          halt
        }
        msg $chan 12,0 %player1 0,12 has 12,0 %p1hp 0,12 hp left 
      }
    } 
  } 
} 
on $*:TEXT:/^[!@.]Accio phoenix/Si:#:{
  if ( %turn == 1 ) {
    if ( $nick == %player1 ) {
      if ( %phoenix [ $+ [ $nick ] ] == 1 ) {
        set %turn 2
        set %hit1 $rand(15,45)
        inc %hit2 %wand [ $+ [ $nick ] ]
        set %move $rand(1,2)
        if ( %move == 2 ) { msg # 1,3 %player1 has called upon the phoenix! 1,9The phoenix has granted %player1 %hit1 hp! | inc %p1hp %hit1 | timerphoenix1 1 3 msg # 1,3 $+ %player1 3,1has1,3 %p1hp 3,1hp 1,3left }
        if ( %move == 1 ) { msg # 4,1 %player1 has called upon the phoenix! 1,4The phoenix blows fire at %player2 causing %hit1 damage! | dec %p2hp %hit1 | timerphoenix2 1 3 msg # 8,4 $+ %player2 4,8has8,4 %p2hp 4,8hp 8,4left }
      }
      if (%p2hp <= 0) { 
        timerphoenix off
        msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
        unset %fight 
        unset %fight2 
        unset %p1hp 
        unset %p2hp 
        set %moneygotten $rand(75,200)
        inc %money [ $+ [ %player1 ] ] %moneygotten
        msg # $nick has recieved %moneygotten gold coins
        unset %stamina1 
        unset %stamina2 
        unset %turn 
        unset %hit1 
        unset %hit2 
        unset %end
        reset
        inc %magic [ $+ [ %player1 ] ] $rand(10,25)
        halt
      }
      if ( %phoenix [ $+ [ $nick ] ] != 1 ) { .notice $nick you do not have a phoenix feather.
      }
    }
  }
  elseif ( $nick == %player2 ) {
    if ( %phoenix [ $+ [ $nick ] ] == 1 ) {
      set %turn 1
      set %hit1 $rand(15,45)
      inc %hit1 %wand [ $+ [ $nick ] ]
      set %move $rand(1,2)
      if ( %move == 2 ) { msg # 1,3 %player2 has called upon the phoenix! 1,9The phoenix has granted %player2 %hit1 hp! | inc %p2hp %hit1 | timerphoenix 1 1 msg # 9,1 %player2 9,1has1,9 %p2hp 9,1left! | halt }
      if ( %move == 1 ) { msg # 1,4 %player2 has called upon the phoenix! 4,1The phoenix blows fire at %player1 causing %hit1 damage! | dec %p1hp %hit1 | timerphoenix 1 1 msg # 8,4 $+ %player1 4,8has8,4 %p1hp 4,8hp 8,4left | halt }
    }
    if (%p1hp <= 0) { 
      timerphoenix off
      msg $chan 4,1 %player2 1,4 has koed 4,1 %player1  
      unset %fight 
      unset %fight2 
      unset %p1hp 
      unset %p2hp 
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      unset %turn 
      unset %hit1 
      unset %hit2 
      unset %end
      reset
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
  }
  if ( %phoenix [ $+ [ $nick ] ] != 1 ) {
  .notice $nick you do not have a phoenix feather. }
}

on $*:TEXT:/^[!@.]Deprimo/Si:#:{
  if (%turn == 1) {
    if ( %deprimo [ $+ [ $nick ] ] == 1 ) {
      if ($nick == %player1) { 
        set %hit1 $rand(10,45) 
        inc %hit1 %wand [ $+ [ $nick ] ]
        msg $chan 11,0 %player1 0,11 blasts wind out of there wand doing 11,0 %hit1 damage! 
        dec %p2hp %hit1 
        set %turn 2 
      }
      if (%p2hp <= 0) { 
        msg $chan 0,11 %player1 0,12 has koed 11,0 %player2 
        unset %fight 
        unset %fight2 
        unset %p1hp 
        unset %p2hp 
        set %moneygotten $rand(75,200)
        inc %money [ $+ [ %player1 ] ] %moneygotten
        msg # $nick has recieved %moneygotten gold coins
        unset %stamina1 
        unset %stamina2 
        unset %turn 
        unset %hit1 
        unset %hit2 
        unset %end
        reset
        inc %magic [ $+ [ %player1 ] ] $rand(10,25)
        halt
      }
      msg $chan 12,0 %player2 0,12 has 12,0 %p2hp 0,12 hp left 
    } 
    else { .notice $nick you do not have this spell! to buy it type !buy deprimo. }
  }
  else { 
    if (%turn == 2) {
      if ( %deprimo [ $+ [ $nick ] ] == 1 ) {
        if ($nick == %player2) { 
          set %hit1 $rand(10,45) 
          inc %hit1 %wand [ $+ [ $nick ] ]
          msg $chan 11,0 %player2 0,11 blasts wind out of there wand doing 11,0 %hit1 damage! 
          dec %p1hp %hit1 
          set %turn 1 
        }
        if (%p1hp <= 0) { 
          msg $chan 0,11 %player2 0,12 has koed 11,0 %player1
          unset %fight 
          unset %fight2 
          unset %p1hp 
          reset
          unset %p2hp 
          unset %stamina1 
          unset %stamina2 
          set %moneygotten $rand(75,200)
          inc %money [ $+ [ %player2 ] ] %moneygotten
          msg # $nick has recieved %moneygotten gold coins
          unset %turn 
          unset %hit1 
          unset %hit2 
          unset %end
          inc %magic [ $+ [ %player2 ] ] $rand(10,25)
          halt
        }
        msg $chan 12,0 %player1 0,12 has 12,0 %p1hp 0,12 hp left 
      }
      else { .notice $nick you do not have this spell, to buy it type !buy deprimo. }
    } 
  } 
} 

on $*:TEXT:/^[!@.]give money/Si:#:{
  if ($2 == $nick) { notice $nick you cant give yourself money | halt }
  elseif ($4 <= 0 ) { halt }
  elseif ($3 ison $chan) {
    if ( %money [ $+ [ $nick ] ] >= $4 ) {
      dec %money [ $+ [ $nick ] ] $4
      inc %money [ $+ [ $3 ] ] $4
      msg # $nick has given $3 $4 gold coins and now has %money [ $+ [ $nick ] ] gold coins and $3 know has %money [ $+ [ $3 ] ] gold coins
    }
    else {
      notice $nick you dont have enough
    }
    else {
      notice $nick That person isnt on 
    }
  }
}
on $*:TEXT:/^[!@.]dep/Si:#:{
  if ( $2 == all ) {
    notice $nick all your gold coins are in the bank
    inc %bank [ $+ [ $nick ] ] %money [ $+ [ $nick ] ]
    set %money [ $+ [ $nick ] ] 0
  }
  elseif ( $2 != $null ) {
    if ( %money [ $+ [ $nick ] ] >= $2 ) {
      if ( $2 >= 0 ) {
        dec %money [ $+ [ $nick ] ] $2
        inc %bank [ $+ [ $nick ] ] $2
        notice $nick you have deposoited $2 gold coins into your bank account.
      }
      else { notice $nick you cannot deposit negitives
      }
    }
    else {
      notice $nick you dont have that much money
    }
  }
  else { notice $nick specify amount.
  }
}
on $*:TEXT:/^[!@.]bank/Si:#:{
  if ( %bank [ $+ [ $nick ] ] == $null ) { 
    set %bank [ $+ [ $nick ] ] 100 
    msg $nick Welcome to the bank of gringotts were we will keep your money. You have 100 gold coins at the moment.
  }
  else {
    msg $nick you have %bank [ $+ [ $nick ] ] gold coins in your bank account.
  }
}
on $*:TEXT:/^[!@.]withdraw/Si:#:{
  if ( $2 != $null ) {
    if ( %bank [ $+ [ $nick ] ] >= $2 ) {
      dec %bank [ $+ [ $nick ] ] $2
      inc %money [ $+ [ $nick ] ] $2
      notice $nick you have withdrew $2 gold coins from your bank account.
    }
    else {
      notice $nick you dont have that much money
    }
  }
}
on $*:TEXT:/^[!@.]Flipendo/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      set %hit1 $rand(0,15) 
      set %hit2 $rand(0,25) 
      inc %hit1 %wand [ $+ [ $nick ] ]
      msg $chan 0,1 %player1 1,0has tossed objects at %player2 and hit 1,0 %hit1 and %hit2 
      dec %p2hp %hit1 
      dec %p2hp %hit2
      set %turn 2 
    }
    if (%p2hp <= 0) { 
      msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
      unset %fight 
      unset %fight2 
      unset %p1hp
      reset 
      unset %p2hp 
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      unset %turn 
      unset %hit1 
      unset %hit2 
      unset %end
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 1,0 %player2 0,1 has 1,0 %p2hp 0,1 hp left 
  } 
  else { 
    if (%turn == 2) {
      if ($nick == %player2) { 
        set %hit1 $rand(0,15) 
        set %hit2 $rand(0,25)
        inc %hit1 %wand [ $+ [ $nick ] ]
        msg $chan 0,1 %player2 1,1 0,1has tossed objects at %player1 and hit 1,0 %hit2 and %hit1 
        dec %p1hp %hit1 
        dec %p1hp %hit2
        set %turn 1 
        if (%p1hp <= 0) { 
          msg $chan 4,1 %player2 1,4 has koed 4,1 %player1 
          unset %fight 
          unset %fight2 
          unset %p1hp 
          unset %p2hp 
          reset
          unset %stamina1 
          unset %stamina2 
          set %moneygotten $rand(75,200)
          inc %money [ $+ [ %player2 ] ] %moneygotten
          msg # $nick has recieved %moneygotten gold coins
          unset %turn 
          unset %hit1 
          unset %hit2 
          unset %end
          inc %magic [ $+ [ %player2 ] ] $rand(10,25)
          halt
        }
        msg $chan 1,0 %player1 0,1 has 1,0 %p1hp 0,1 hp left 
      }
    } 
  } 
} 
on $*:TEXT:/^[!@.]Crucio/Si:#:{
  if (%turn == 1) {
    if ( %special1 >= 1 ) {
      if ($nick == %player1) { 
        set %hit1 $rand(30,45)
        inc %bad [ $+ [ $nick ] ]  
        inc %hit1 %wand [ $+ [ $nick ] ]
        inc %bad [ $+ [ $nick ] ] 
        set %special1 0
        msg $chan 6,1 %player1 1,6 has done 1 of the unforgivable spell and hit 6,1 %hit1 $+ ! 
        dec %p2hp %hit1 
        set %turn 2 
      }
      if (%p2hp <= 0) { 
        msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
        unset %fight 
        unset %fight2 
        unset %p1hp 
        unset %p2hp 
        reset
        set %moneygotten $rand(75,200)
        inc %money [ $+ [ %player1 ] ] %moneygotten
        msg # $nick has recieved %moneygotten gold coins
        unset %stamina1 
        unset %stamina2 
        unset %turn 
        unset %hit1 
        unset %hit2 
        unset %end
        inc %magic [ $+ [ %player1 ] ] $rand(10,25)
        halt
      }
      msg $chan 6,1 %player2 1,6 has 6,1 %p2hp 1,6 hp left 
    } 
    else { .notice $nick you cannot use a spell like this more than once per duel! }
  }
  else { 
    if (%turn == 2) {
      if ($nick == %player2) { 
        if ( %special2 >= 1 ) {
          set %hit1 $rand(30,45) 
          inc %bad [ $+ [ $nick ] ] 
          inc %hit1 %wand [ $+ [ $nick ] ]
          set %special2 0
          msg $chan 6,1 %player2 1,6 has done one of the unforgivable spell and hit 6,1 %hit1 $+ ! 
          dec %p1hp %hit1  
          set %turn 1 
          if (%p1hp <= 0) { 
            msg $chan 4,1 %player2 1,4 has koed 4,1 %player1 
            unset %fight 
            unset %fight2 
            unset %p1hp 
            unset %p2hp 
            unset %stamina1 
            reset
            unset %stamina2 
            set %moneygotten $rand(75,200)
            inc %money [ $+ [ %player2 ] ] %moneygotten
            msg # $nick has recieved %moneygotten gold coins
            unset %turn 
            unset %hit1 
            unset %hit2 
            unset %end
            inc %magic [ $+ [ %player2 ] ] $rand(10,25)
            halt
          }
          msg $chan 1,6 %player1 6,1 has 1,6 %p1hp 6,1 hp left
        }
        else { .notice $nick you cannot use a spell like this more than once per duel! }
      }
    } 
  } 
}
on $*:TEXT:/^[!@.]imperio/Si:#:{
  if (%turn == 1) {
    if ( %special1 >= 1 ) {
      if ($nick == %player1) { 
        set %hit1 $rand(1,20)
        inc %bad [ $+ [ $nick ] ]  
        inc %hit1 %wand [ $+ [ $nick ] ]
        inc %bad [ $+ [ $nick ] ] 
        set %special1 0
        msg $chan 2,1 %player1 1,2 has done 1 of the unforgivable spell and taken control of %player2 $+ 's mind causing 2,1 %hit1 damage! 
        dec %p2hp %hit1 
        set %turn 1 
      }
      if (%p2hp <= 0) { 
        msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
        unset %fight 
        unset %fight2 
        unset %p1hp 
        unset %p2hp 
        set %moneygotten $rand(75,200)
        inc %money [ $+ [ %player1 ] ] %moneygotten
        msg # $nick has recieved %moneygotten gold coins
        unset %stamina1 
        unset %stamina2 
        unset %turn 
        unset %hit1 
        unset %hit2 
        reset
        unset %end
        inc %magic [ $+ [ %player1 ] ] $rand(10,25)
        halt
      }
      msg $chan 2,1 %player2 1,2 has 2,1 %p2hp 1,2 hp left and it is still2,1 %player1 $+ 's turn.
    } 
    else { .notice $nick you cannot use a spell like this more than once per duel! }
  }
  else { 
    if (%turn == 2) {
      if ($nick == %player2) { 
        if ( %special2 >= 1 ) {
          set %hit1 $rand(1,20) 
          inc %bad [ $+ [ $nick ] ] 
          inc %hit1 %wand [ $+ [ $nick ] ]
          set %special2 0
          msg $chan 2,1 %player2 1,2 has done 1 of the unforgivable spell and taken control of %player1 $+ 's mind causing 2,1 %hit1 damage! 
          dec %p1hp %hit1  
          set %turn 2 
          if (%p1hp <= 0) { 
            msg $chan 4,1 %player2 1,4 has koed 4,1 %player1 
            unset %fight 
            unset %fight2 
            unset %p1hp 
            unset %p2hp 
            unset %stamina1 
            unset %stamina2 
            set %moneygotten $rand(75,200)
            inc %money [ $+ [ %player2 ] ] %moneygotten
            msg # $nick has recieved %moneygotten gold coins
            unset %turn 
            unset %hit1 
            reset
            unset %hit2 
            unset %end
            inc %magic [ $+ [ %player2 ] ] $rand(10,25)
            halt
          }
          msg $chan 2,1 %player1 1,2 has 2,1 %p1hp 1,2 hp left and it is still %player2 $+ 's turn.
        }
        else { .notice $nick you cannot use a spell like this more than once per duel! }
      }
    } 
  } 
}
on $*:TEXT:/^[!@.]avada kadavra/Si:#:{
  if (%turn == 1) {
    if ( %special1 >= 1 ) {
      if ($nick == %player1) { 
        if ( %wand [ $+ [ $nick ] ] >= 8 ) {
          set %hit1 $rand(30,55)
          inc %bad [ $+ [ $nick ] ]  
          inc %hit1 %wand [ $+ [ $nick ] ]
          inc %bad [ $+ [ $nick ] ] 
          set %special1 0
          msg $chan 4,1 %player1 1,4 has done 1 of the unforgivable spell and hit 4,1 %hit1 $+ ! 
          dec %p2hp %hit1 
          set %turn 2 
        }
        if (%p2hp <= 0) { 
          msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
          unset %fight 
          unset %fight2 
          unset %p1hp 
          unset %p2hp 
          set %moneygotten $rand(75,200)
          inc %money [ $+ [ %player1 ] ] %moneygotten
          msg # $nick has recieved %moneygotten gold coins
          unset %stamina1 
          unset %stamina2 
          unset %turn 
          unset %hit1 
          unset %hit2 
          reset
          unset %end
          inc %magic [ $+ [ %player1 ] ] $rand(10,25)
          halt
        }
        msg $chan 4,1 %player2 1,4 has 4,1 %p2hp 1,4 hp left 
      }
      else { .notice $nick you dont have a elder wand }
    } 
    else { .notice $nick you cannot use a spell like this more than once per duel! }
  }
  else { 
    if (%turn == 2) {
      if ($nick == %player2) { 
        if ( %special2 >= 1 ) {
          if ( %wand [ $+ [ $nick ] ] >= 8 ) {
            set %hit1 $rand(30,55) 
            inc %bad [ $+ [ $nick ] ] 
            inc %hit1 %wand [ $+ [ $nick ] ]
            set %special2 0
            msg $chan 4,1 %player2 1,4 has done one of the unforgivable spell and hit 4,1 %hit1 $+ ! 
            dec %p1hp %hit1 
            set %turn 1 
            if (%p1hp <= 0) { 
              msg $chan 4,1 %player2 1,4 has koed 4,1 %player1 
              unset %fight 
              unset %fight2 
              unset %p1hp 
              unset %p2hp 
              unset %stamina1 
              unset %stamina2 
              set %moneygotten $rand(75,200)
              inc %money [ $+ [ %player2 ] ] %moneygotten
              msg # $nick has recieved %moneygotten gold coins
              unset %turn 
              unset %hit1 
              unset %hit2 
              unset %end
              reset
              inc %magic [ $+ [ %player2 ] ] $rand(10,25)
              halt
            }
            msg $chan 1,4 %player1 4,1 has 1,4 %p1hp 4,1 hp left 
          }
          else { .notice $nick you dont have an elder wand }
        }
        else { .notice $nick you cannot use a spell like this more than once per duel! }
      }
    } 
  } 
}
on $*:TEXT:/^[!@.]Sectumsempra/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      set %hit1 $rand(1,40) 
      inc %hit1 %wand [ $+ [ $nick ] ]
      msg $chan 15,14 %player1 14,15 has conjured a sword from there wand and slashed %player2 causing 15,14 %hit1 damage
      dec %p2hp %hit1 
      set %turn 2 
    }
    if (%p2hp <= 0) { 
      msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
      unset %fight 
      unset %fight2 
      unset %p1hp 
      unset %p2hp 
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      unset %turn 
      unset %hit1 
      reset
      unset %hit2 
      unset %end
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 14,15 %player2 15,14 has 15,14 %p2hp 14,15 hp left 
  } 
  else { 
    if (%turn == 2) {
      if ($nick == %player2) { 
        set %hit1 $rand(1,40) 
        inc %hit1 %wand [ $+ [ $nick ] ]
        msg $chan 15,14 %player2 14,15 has conjured a sword from there wand and slashed %player1 causing 15,14 %hit1 damage
        dec %p1hp %hit1 
        set %turn 1 
        if (%p1hp <= 0) { 
          msg $chan 4,1 %player2 1,4 has koed 4,1 %player1 
          unset %fight 
          unset %fight2 
          unset %p1hp 
          reset
          unset %p2hp 
          unset %stamina1 
          unset %stamina2 
          set %moneygotten $rand(75,200)
          inc %money [ $+ [ %player2 ] ] %moneygotten
          msg # $nick has recieved %moneygotten gold coins
          unset %turn 
          unset %hit1 
          unset %hit2 
          unset %end
          inc %magic [ $+ [ %player2 ] ] $rand(10,25)
          halt
        }
        msg $chan 14,15 %player1 15,14 has 14,15 %p1hp 15,14 hp left 
      }
    } 
  } 
}
on $*:TEXT:/^[!@.]Furnunculus/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      set %hit1 $rand(1,40) 
      inc %hit1 %wand [ $+ [ $nick ] ]
      msg $chan 0,1 %player1 1,13 points a wand at %player2 making boils appear all over %player2 13,1 causing %hit1 damage
      dec %p2hp %hit1 
      set %turn 2 
    }
    if (%p2hp <= 0) { 
      msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
      unset %fight 
      unset %fight2 
      unset %p1hp 
      unset %p2hp 
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      reset
      unset %turn 
      unset %hit1 
      unset %hit2 
      unset %end
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 1,13 %player2 1,13 has 13,1 %p2hp 13,1 hp left 
  } 
  else { 
    if (%turn == 2) {
      if ($nick == %player2) { 
        set %hit1 $rand(1,40) 
        inc %hit1 %wand [ $+ [ $nick ] ]
        msg $chan 1,0 %player2 1,13 points a wand at %player1 making boils appear all over %player2 13,1 causing %hit1 damage
        dec %p1hp %hit1 
        set %turn 1 
        if (%p1hp <= 0) { 
          msg $chan 4,1 %player2 1,4 has koed 4,1 %player1 
          unset %fight 
          unset %fight2 
          unset %p1hp 
          unset %p2hp 
          unset %stamina1 
          reset
          unset %stamina2 
          set %moneygotten $rand(75,200)
          inc %money [ $+ [ %player2 ] ] %moneygotten
          msg # $nick has recieved %moneygotten gold coins
          unset %turn 
          unset %hit1 
          unset %hit2 
          unset %end
          inc %magic [ $+ [ %player2 ] ] $rand(10,25)
          halt
        }
        msg $chan 1,13 %player1 1,13 has 13,1 %p1hp 13,1 hp left 
      }
    } 
  } 
}
on $*:TEXT:/^[!@.]Stupefy/Si:#:{
  if (%turn == 1) {
    if ($nick == %player1) { 
      set %hit1 $rand(1,40) 
      inc %hit1 %wand [ $+ [ $nick ] ]
      msg $chan 0,1 %player1 1,0 has knocked back %player2 causing 0,1 %hit1 damage
      dec %p2hp %hit1 
      set %turn 2 
    }
    if (%p2hp <= 0) { 
      msg $chan 4,1 %player1 1,4 has koed 4,1 %player2 
      unset %fight 
      unset %fight2 
      unset %p1hp 
      unset %p2hp 
      set %moneygotten $rand(75,200)
      inc %money [ $+ [ %player1 ] ] %moneygotten
      msg # $nick has recieved %moneygotten gold coins
      unset %stamina1 
      unset %stamina2 
      reset
      unset %turn 
      unset %hit1 
      unset %hit2 
      unset %end
      inc %magic [ $+ [ %player1 ] ] $rand(10,25)
      halt
    }
    msg $chan 1,0 %player2 0,1 has 1,0 %p2hp 0,1 hp left 
  } 
  else { 
    if (%turn == 2) {
      if ($nick == %player2) { 
        set %hit1 $rand(1,40) 
        inc %hit1 %wand [ $+ [ $nick ] ]
        msg $chan 1,0 %player2 0,1 has knocked %player1 back causing 0,1 %hit1 damage
        dec %p1hp %hit1 
        set %turn 1 
        if (%p1hp <= 0) { 
          msg $chan 4,1 %player2 1,4 has koed 4,1 %player1 
          unset %fight 
          unset %fight2 
          unset %p1hp 
          unset %p2hp 
          unset %stamina1 
          reset
          unset %stamina2 
          set %moneygotten $rand(75,200)
          inc %money [ $+ [ %player2 ] ] %moneygotten
          msg # $nick has recieved %moneygotten gold coins
          unset %turn 
          unset %hit1 
          unset %hit2 
          unset %end
          inc %magic [ $+ [ %player2 ] ] $rand(10,25)
          halt
        }
        msg $chan 1,0 %player1 0,1 has 1,0 %p1hp 0,1 hp left 
      }
    } 
  } 
}

on $*:TEXT:/^[!@.]Buy/Si:*:{
  if ( $3 == wand ) {
    if ( $2 == birch ) {
      if ( %money [ $+ [ $nick ] ] >= 100 ) { 
        .msg $nick you have bought a birch wand! | dec %money [ $+ [ $nick ] ] 100 | set %wand [ $+ [ $nick ] ] 5 |  set %birch [ $+ [ $nick ] ] yes
      }
      else { .notice $nick you dont have enough gold coins! }
    }
    elseif ( $2 == ash ) { 
      if ( %money [ $+ [ $nick ] ] >= 500 ) {
        .msg $nick you have bought a ash wand! | dec %money [ $+ [ $nick ] ] 500 | set %wand [ $+ [ $nick ] ] 6 | set %ash [ $+ [ $nick ] ] yes
      }
      else { .notice $nick you dont have enough gold coins! }
    }
    elseif ( $2 == vine ) {
      if ( %money [ $+ [ $nick ] ] >= 2000 ) {
        .msg $nick you have bought a vine wand! | dec %money [ $+ [ $nick ] ] 2000 | set %wand [ $+ [ $nick ] ] 7 | set %vine [ $+ [ $nick ] ] yes
      }
      else { .notice $nick you dont have enough gold coins! }
    }
    if ( $2 == elder ) {
      if ( %money [ $+ [ $nick ] ] >= 10000 ) {
        .msg $nick you have bought the elder wand! | dec %money [ $+ [ $nick ] ] 10000 | set %wand [ $+ [ $nick ] ] 10 | set %Elder [ $+ [ $nick ] ] yes
      }
      else { .notice $nick you dont have enough gold coins! }
    }
    if ( $2 == flame ) {
      if ( %money [ $+ [ $nick ] ] >= 7500 ) {
        .msg $nick you have bought the legendery 4Flame wand | dec %money [ $+ [ $nick ] ] 7500 | set %wand [ $+ [ $nick ] ] 9 | set %flame [ $+ [ $nick ] ] yes
      }
      else { .notice $nick you dont have enough gold coins! }
    }
    if ( $2 == Aqua ) {
      if ( %money [ $+ [ $nick ] ] >= 7500 ) {
        .msg $nick you have bought the legendery 12Aqua wand | dec %money [ $+ [ $nick ] ] 7500 | set %wand [ $+ [ $nick ] ] 8 | set %aqua [ $+ [ $nick ] ] yes
      }
      else { .notice $nick you dont have enough gold coins }
    }
  }
  if ( $2 == roots ) {
    if ($3 = $null) { .notice $nick you need to set an amount to buy, type .buy [item] [amount] | halt }
    if ( %money [ $+ [ $nick ] ] >= 100 ) {
      if ( %money [ $+ [ $nick ] ] <= $calc($3 * 100)) { .notice $nick you dont have enough gold coins! | halt }
      dec %money [ $+ [ $nick ] ] $calc($3 * 100)
      inc %roots [ $+ [ $nick ] ] $3
      msg $nick you have purchased $3 roots!
    }
    else { .notice $nick you dont have enough gold coins! }
  }
  elseif ( $2 == dust ) {
    if ($3 = $null) { .notice $nick you need to set an amount to buy, type .buy [item] [amount] | halt }
    if ( %money [ $+ [ $nick ] ] >= $calc($3 * 200)) {
      dec %money [ $+ [ $nick ] ] $calc($3 * 200)
      inc %dust [ $+ [ $nick ] ] $3
      msg $nick you have purchased $3 bags of dragon dust!
    }
    else { .notice $nick you dont have enough gold coins! | halt }
  }
  elseif ( $2 == essence ) {
    if ($3 = $null) { .notice $nick you need to set an amount to buy, type .buy [item] [amount] | halt }
    if ( %money [ $+ [ $nick ] ] >= 500 ) {
      if ( %money [ $+ [ $nick ] ] <= $calc($3 * 500)) { .notice $nick you dont have enough gold coins! | halt }
      dec %money [ $+ [ $nick ] ] $calc($3 * 500)
      inc %essence [ $+ [ $nick ] ] $3
      msg $nick you have purchased $3 essence's of magic!
    }
    else { .notice $nick you dont have enough gold coins! | halt }
  }
  elseif ( $2 == Deprimo ) {
    if ( %deprimo [ $+ [ $nick ] ] == 1 ) { .notice $nick you already have this | halt }
    if ( %money [ $+ [ $nick ] ] >= 2000 ) {
      dec %money [ $+ [ $nick ] ] 2000
      set %deprimo [ $+ [ $nick ] ] 1
      msg $nick You have bought the deprimo spell!
    }
    else { .notice $nick you do not have enough money to buy this spell. }
  }
  elseif ( $2 == Obliviate ) {
    if ( %obliviate [ $+ [ $nick ] ] == 1 ) { .notice $nick you already have this | halt }
    if ( %money [ $+ [ $nick ] ] >= 2000 ) {
      dec %money [ $+ [ $nick ] ] 2000
      set %obliviate [ $+ [ $nick ] ] 1
      msg $nick You have bought the obliviate spell!
    }
    else { .notice $nick you do not have enough money to buy this spell. }
  }
  elseif ( $2 == sap ) {
    if ( $3 !isnum ) { .msg $nick numbers only | halt }
    if ( %money [ $+ [ $nick ] ] >= $calc( 500 * $3 ) ) {
      dec %money [ $+ [ $nick ] ] $calc(500 * $3)
      inc %sap [ $+ [ $nick ] ] $3
      msg $nick You have bought $3 bucket(s) of tree sap made from the elder tree. use it wisely.
      halt
    }
    else { msg $nick you need more money to buy this. | halt }
  }
}

on $*:TEXT:/^[!@.]stats/Si:*:{
  set %level [ $+ [ $nick ] ] $calc( %magic [ $+ [ $nick ] ] / 100 ) 
  if ( %level [ $+ [ $nick ] ] <= 1 ) { .msg # $nick is a level 1 Wizard! | set %magic [ $+ [ $nick ] ] 199 | halt }
  elseif ( %level [ $+ [ $nick ] ] <= 10 ) {
    msg # $nick is a level $left(%level [ $+ [ $nick ] ],1) Wizard
  }
  elseif ( %level [ $+ [ $nick ] ] <= 99 ) {
    msg # $nick is a level $left(%level [ $+ [ $nick ] ],2) Wizard
  }
  else {
    msg # $nick is a level $left(%level [ $+ [ $nick ] ],3) Wizard
  }
}

on $*:TEXT:/^[!@.]money/Si:*:{
  if ( %money [ $+ [ $nick ] ] == $null ) { .set %money [ $+ [ $nick ] ] 500 | msg $nick welcome to the wizarding world! i will start you of with 500 gold coins! type !store to see what you can buy }
  elseif ( %money [ $+ [ $nick ] ] <= 0 ) { .set %money [ $+ [ $nick ] ] 0 | .notice $nick you have 8 0 gold }
  elseif ( %money [ $+ [ $nick ] ] == 0 ) { .set %money [ $+ [ $nick ] ] 0 | .notice $nick you have 8 0 gold }
  else { .notice $nick you have8 %money [ $+ [ $nick ] ] Gold
  }
}
on $*:TEXT:/^[!@.](mix|brew)/Si:*:{
  if ( $3 == potion ) {
    if ( $2 == magic ) {
      if ($4 == $null) { notice $nick Error: Syntax - .mix magic potion [amount] | halt }
      if ( %roots [ $+ [ $nick ] ] < $4 ) || ( %dust [ $+ [ $nick ] ] < $4 ) { .notice $nick you dont have enough roots/dust to make that amount. [Need 1 Root,1 Dust] Roots: %roots [ $+ [ $nick ] ] Dusts: %dust [ $+ [ $nick ] ] | halt }
      dec %dust [ $+ [ $nick ] ] $4
      dec %roots [ $+ [ $nick ] ] $4
      inc %magicp [ $+ [ $nick ] ] $4
      inc %magic [ $+ [ $nick ] ] $calc($rand(5,10) * $4)
      msg $nick you have made $4 magical power increasing potion(s)!
    }
    elseif ( $2 == powerboost ) {
      if ($4 == $null) { notice $nick Error: Syntax - .mix powerboost potion [amount] | halt }
      if ( %essense [ $+ [ $nick ] ] < $4 ) || ( %dust [ $+ [ $nick ] ] < $calc($4 * 2) ) { notice $nick you dont have enough essence/dust to make that amount. [Need 1 Essence, 2 Dust] Essence: %essence [ $+ [ $nick ] ] Dust: %dust [ $+ [ $nick ] ] | halt }
      if ( %magic [ $+ [ $nick ] ] > 200 ) {
        dec %essence [ $+ [ $nick ] ] $4
        dec %dust [ $+ [ $nick ] ] $calc($4 * 2)
        inc %magic [ $+ [ $nick ] ] $calc($rand(20,40) * $4)
        inc %powerboost [ $+ [ $nick ] ] $4
        msg $nick you have mixed $4 powerboost potion(s)!
      }
      else { .notice $nick you need to be lv 2 to make this! }
    }
    elseif ( $2 == Felix ) {
      if ( $4 isnum ) {
        if ( %wand [ $+ [ $nick ] ] != 10 ) { notice $nick you need a elder wand to mix this! | halt }
        if ( %sap [ $+ [ $nick ] ] >= $calc(1 * $4) ) {
          if ( %magic [ $+ [ $nick ] ] >= 1000 ) {
            var %number $rand(1,2)
            dec %sap [ $+ [ $nick ] ] $4
            if ( %number == 2 ) { set %lucky $2 } 
            if ( %number != 2 ) { var %lucky $nick }
            if ( $nick != %lucky ) { .msg $nick you try to brew a few magical luck potion but when you puts in the sap the potion explodes in your face! | halt }
            if ( $nick == %lucky ) { .msg $nick you put a bit of sap into a big pot and with a lot of luck you make a few luck potions! | dec %sap [ $+ [ $nick ] ] | inc %luckpot [ $+ [ $nick ] ] $4 }
          }
          else { .notice $nick you need to be level 10 to make this. }
        }
        else { .notice $nick you do not have enough sap }
      }
    }
    else { .notice $nick proper syntax is !mix <potion> potion number. }
  }
}
on *:TEXT:!potions:#: {
  if ( %luckpot [ $+ [ $nick ] ] >= 0 ) { var %1 %luckpot [ $+ [ $nick ] ] felix felicis potions. }
  if ( %powerboost [ $+ [ $nick ] ] >= 0 ) { var %2 %powerboost [ $+ [ $nick ] ] power boost potions. }
  if ( %magicp [ $+ [ $nick ] ] >= 0 ) { var %3 %magicp [ $+ [ $nick ] ] magic potions }
  if ( %1 == $null && %2 == $null && %3 == $null ) { .notice $nick you do not have any potions. | halt }
  msg $nick you have %1 %2 %3 $+ .
}
on *:TEXT:!give*:#: {
  if ( $3 == felix ) {
    if ( $2 ison $chan ) {
      if ( %luckpot [ $+ [ $nick ] ] >= 1 ) {
        dec %luckpot [ $+ [ $nick ] ]
        inc %luckpot [ $+ [ $2 ] ]
        msg # $nick has given $2 a felex felicis potion. now $2 has %luckpot [ $+ [ $2 ] ] felex felicis potions. And $nick has %luckpot [ $+ [ $nick ] ] felex felicis potions.
      }
      else { .notice $nick you do not have a potion to give }
    }
    else { .notice $nick i do not see that person here }
  }
}

on $*:TEXT:/^[!@.]drink/Si:*:{
  if ( $3 == potion ) {
    if ( $2 == magic ) {
      if ( %magicp [ $+ [ $nick ] ] >= $4 ) {
        inc %magic [ $+ [ $nick ] ] $calc($rand(15,30) * $4 )
        dec %magicp [ $+ [ $nick ] ] $4
        msg $nick 12 $+ you have taken a $4 bottles of your magical potion(s) and are now filled with magic!
      }
      else { .notice $nick you dont have a magic potion to drink }
    }
    elseif ( $2 == powerboost ) {
      if ( %powerboost [ $+ [ $nick ] ] >= $4 ) {
        set %original [ $+ [ $nick ] ] %wand [ $+ [ $nick ] ]
        set %wand [ $+ [ $nick ] ] 8
        set %time $calc( $4 * 250 )
        dec %powerboost [ $+ [ $nick ] ] $4
        msg $nick 11you now have a strong aurora of magic! but its only temporary!
        timerwand [ $+ [ $nick ] ] 1 %time [ $+ [ $nick ] ] set %wand %original [ $+ [ $nick ] ]
      }
      else { .notice $nick you dont have this potion }
    }
    elseif ( $2 == felix ) {
      if ( %luckpot [ $+ [ $nick ] ] >= 1 ) {
        dec %luckpot [ $+ [ $nick ] ]
        msg # !@! $+ $nick has drank a lucky potion!@! You can feel the luck already!
        set %luck [ $+ [ $nick ] ] 10
        timer 1 300 set %luck [ $+ [ $nick ] ] fail
      }
      else { .notice $nick you do not have a luck potion to drink. }
    }
  }
}
on *:TEXT:*lucky*:*: {
  set %luck [ $+ [ $nick ] ] 10
}
on $*:TEXT:/^[!@.]sell/Si:*:{
  if ( $3 == wand ) {
    if ( $2 == elder ) {
      if ( %wand [ $+ [ $nick ] ] == 10 ) {
      msg $nick you have sold your elder wand for 5000 gold coins and now haVE a death wand! | set %wand [ $+ [ $nick ] ] 4 | inc %money [ $+ [ $nick ] ] 5000 | halt }
      else { .notice $nick you dont have a elder wand! }
    }
    if ( $2 == flame ) {
      if ( %wand [ $+ [ $nick ] ] == 9 ) {
        msg $nick you have sold your flame wand for 3000 gold coins and now have a death wand! | set %wand [ $+ [ $nick ] ] 4 | inc %money [ $+ [ $nick ] ] 3000 | halt
      }
      else { .notice $nick you dont have a flame wand! }
    }
    if ( $2 == aqua ) {
      if ( %wand [ $+ [ $nick ] ] == 8 ) {
        msg $nick you have sold your aqua wand for 3000 gold coins and now haVE a death wand! | set %wand [ $+ [ $nick ] ] 4 | inc %money [ $+ [ $nick ] ] 3000 | halt
      }
      else { .notice $nick you dont have a aqua wand! }
    }
  }
  elseif ( $2 == essence ) {
    if ($3 = $null) { .notice $nick you need to set an amount to buy, type .sell item amount | halt }
    if ( %essence [ $+ [ $nick ] ] >= $3 ) {
      inc %money [ $+ [ $nick ] ] $calc($3 * 700)
      dec %essence [ $+ [ $nick ] ] $3
      msg $nick you have sold $3 essence's of magic. | halt
    }
    else { .notice $nick you do not have that much essence. | halt }
  }
  elseif ( $2 == Deprimo ) {
    if ( %deprimo [ $+ [ $nick ] ] == 1 ) {
      inc %money [ $+ [ $nick ] ] 1500
      set %deprimo [ $+ [ $nick ] ] 0
      msg $nick You have sold the deprimo spell for 1.5k! | halt
    }
    else { .notice $nick you do not have enough money to buy this spell. }
  }
  if ( $3 == potion ) {
    if ( $2 == magic ) {
      if ( $4 == $null ) { .msg $nick the syntax is !sell magic potion # | halt }
      if ( %magic [ $+ [ $nick ] ] >= $4 ) { .msg $nick you do not have that many. | halt }
      else {
        msg $nick you have sold $4 magic potions for $calc($4 * 200) | halt
      }
    }
    if ( $2 == powerboost* ) {
      if ( $4 == $null ) { .msg $nick the syntax is !sell powerboost potion # | halt }
      if ( %magic [ $+ [ $nick ] ] >= $4 ) { .msg $nick you do not have that many. | halt }
      else {
        msg $nick you have sold $4 powerboost potions for $calc($4 * 200) | halt
      }
    }
  }
  else { .notice $nick we do not buy those. Sorry. }
}
alias reset {
  unset %dragonuse [ $+ [ %player1 ] ]
  unset %dragonuse [ $+ [ %player2 ] ]
}
on $*:TEXT:/^[!@.]highscore money/Si:#:{
  set -l %vars $var(%money*,0) | set -l %top1 a 0 | set -l %top2 a 0 | set -l %top3 a 0 | set -l %top4 a 0 | set -l %top5 a 0
  while (%vars > 0) {
    set -l %value $($var(%money*,%vars),2)
    if (%value > $gettok(%top1,2,32)) { set -l %top5 %top4 | set -l %top4 %top3 | set -l %top3 %top2 | set -l %top2 %top1 | set -l %top1 $right($var(%money*,%vars),-6) %value }
    elseif (%value > $gettok(%top2,2,32)) { set -l %top5 %top4 | set -l %top4 %top3 | set -l %top3 %top2 | set -l %top2 $right($var(%money*,%vars),-6) %value }
    elseif (%value > $gettok(%top3,2,32)) { set -l %top5 %top4 | set -l %top4 %top3 | set -l %top3 $right($var(%money*,%vars),-6) %value }
    elseif (%value > $gettok(%top4,2,32)) { set -l %top5 %top4 | set -l %top4 $right($var(%money*,%vars),-6) %value }
    elseif (%value > $gettok(%top5,2,32)) { set -l %top5 $right($var(%money*,%vars),-6) %value }
    dec %vars
  }
  set -l %num 1
  msg $chan Richest people
  while (%num <= 5) {
    msg $chan $chr(35) $+ %num $+ : $($+(%,top,%num),2)
    inc %num
  }
}
on $*:TEXT:/^[!@.]highscore magic/Si:#:{
  set -l %vars $var(%magic*,0) | set -l %top1 a 0 | set -l %top2 a 0 | set -l %top3 a 0 | set -l %top4 a 0 | set -l %top5 a 0
  while (%vars > 0) {
    set -l %value $($var(%magic*,%vars),2)
    if (%value > $gettok(%top1,2,32)) { set -l %top5 %top4 | set -l %top4 %top3 | set -l %top3 %top2 | set -l %top2 %top1 | set -l %top1 $right($var(%magic*,%vars),-6) %value }
    elseif (%value > $gettok(%top2,2,32)) { set -l %top5 %top4 | set -l %top4 %top3 | set -l %top3 %top2 | set -l %top2 $right($var(%magic*,%vars),-6) %value }
    elseif (%value > $gettok(%top3,2,32)) { set -l %top5 %top4 | set -l %top4 %top3 | set -l %top3 $right($var(%magic*,%vars),-6) %value }
    elseif (%value > $gettok(%top4,2,32)) { set -l %top5 %top4 | set -l %top4 $right($var(%magic*,%vars),-6) %value }
    elseif (%value > $gettok(%top5,2,32)) { set -l %top5 $right($var(%magic*,%vars),-6) %value }
    dec %vars
  }
  set -l %num 1
  msg $chan Best magicians.
  while (%num <= 5) {
    msg $chan Magic score $chr(35) $+ %num $+ : $($+(%,top,%num),2)
    inc %num
  }
}

on $*:TEXT:/^[!@.]Obliviate/Si:#:{
  if (%turn == 1) {
    if ( %obliviate [ $+ [ $nick ] ] == 1 ) {
      if ($nick == %player1) { 
        inc %oblivhit [ $+ [ $nick ] ] 10
        set %hit1 %oblivhit [ $+ [ $nick ] ]
        inc %hit1 %wand [ $+ [ $nick ] ]
        msg $chan 6,1 %player1 0,6 pours purple spiralling magic from the wand at %player2 6,0 %hit1 damage! 
        dec %p2hp %hit1 
        set %turn 2 
      }
      if (%p2hp <= 0) { 
        msg $chan 11,0 %player1 0,12 has koed 11,0 %player2 
        unset %fight 
        unset %fight2 
        unset %p1hp 
        unset %p2hp 
        set %moneygotten $rand(75,200)
        inc %money [ $+ [ %player1 ] ] %moneygotten
        msg # $nick has recieved %moneygotten gold coins
        unset %stamina1 
        unset %stamina2 
        unset %turn 
        unset %hit1 
        unset %hit2 
        unset %end
        reset
        inc %magic [ $+ [ %player1 ] ] $rand(10,25)
        halt
      }
      msg $chan 0,6 %player2 0,6 has 6,0 %p2hp 6,0 hp left 
    } 
    else { .notice $nick you do not have this spell! to buy it type !buy obliviate. }
  }
  else { 
    if (%turn == 2) {
      if ( %obliviate [ $+ [ $nick ] ] == 1 ) {
        if ($nick == %player2) { 
          inc %oblivhit [ $+ [ $nick ] ] 10
          set %hit1 %oblivhit [ $+ [ $nick ] ]
          msg $chan 1,6 %player2 0,6 pours purple spiralling magic from the wand at $player1 6,0 %hit1 damage! 
          dec %p1hp %hit1 
          set %turn 1 
        }
        if (%p1hp <= 0) { 
          msg $chan 0,11 %player2 0,12 has koed 11,0 %player1
          unset %fight 
          unset %fight2 
          unset %p1hp 
          reset
          unset %p2hp 
          unset %stamina1 
          unset %stamina2 
          set %moneygotten $rand(75,200)
          inc %money [ $+ [ %player2 ] ] %moneygotten
          msg # $nick has recieved %moneygotten gold coins
          unset %turn 
          unset %hit1 
          unset %hit2 
          unset %end
          inc %magic [ $+ [ %player2 ] ] $rand(10,25)
          halt
        }
        msg $chan 0,6 %player1 0,6 has 6,0 %p1hp 6,0 hp left 
      }
      else { .notice $nick you do not have this spell, to buy it type !buy obliviate. }
    } 
  } 
} 

Comments

Sign in to comment.
cptpan   -  Sep 28, 2013

Does anyone have the information and commands from the now-unavailable website?

 Respond  
cptpan   -  Sep 28, 2013

There are a few strange colour choices and typo's in this. But otherwise a fun script.

 Respond  
sixcolorswagg   -  Apr 10, 2011

where am i supposed to put this? remotes?

cptpan  -  Sep 28, 2013

Yes

Sign in to comment

romen   -  Mar 28, 2010
DarkCoder   -  Dec 14, 2009

This is lots of fun! So many variables tho.

 Respond  
-XperTeeZ-   -  Nov 20, 2009

yea, I've actually beaten the phoenix at lv 1 XD

 Respond  
Cheiron   -  Nov 20, 2009

gawd... -XperTeeZ- and myself have had a right blast at this earlier both dueling each other and against the bot and it rawks.. lmao.

 Respond  
-XperTeeZ-   -  Nov 20, 2009

Extravagant, mate! I wouldn't have nerves for something like that... Actually, who knows, lol XD

 Respond  
Ghost-writer   -  Nov 19, 2009

I havent updated the site in ages, but i think the url still works and all the tutorials are on the foroums, theres even a menu nicklist code on it.

 Respond  
3nigmat1c   -  Nov 19, 2009

This script is awesome, but I have been having great frustrations with the website recently

 Respond  
Ghost-writer   -  Sep 08, 2009

For everyone who actually wanted the script i put the final version i think im gonna make, with dementors :O And all the stuff i promised before. 1 thing tho. If you want to add dumbledore and voldemort or some secret club, contact me. I am thinking of adding those but since school started i might not. This could possibly be the end of. Harry stinker. ;[

 Respond  
GlobalAnomaly   -  Sep 07, 2009

I am going to drop this harry potter bot ;\ Gonna make somthing new. Anyone can feel free to continue it although this post was cut short. No idea why.

Limit on post size I believe.

 Respond  
PATX   -  Sep 07, 2009

Skullz rot in a sack newbie

 Respond  
Skullz   -  Sep 07, 2009

its not good unless it has meh money and spells on it :( Ghost Writer is a script killer:( rate it 0

 Respond  
Atr   -  Sep 07, 2009

Awwwwwwwwwwwwwwwwwwwwwwwwww

 Respond  
Ghost-writer   -  Sep 07, 2009

Thanks but it was getting boring for meh. I will have another big idea soon :D!

 Respond  
Atr   -  Sep 07, 2009

But this game rawks! D:

 Respond  
b0sse   -  Sep 07, 2009

Why drop it?
Its great :D

 Respond  
Ghost-writer   -  Sep 06, 2009

I am going to drop this harry potter bot ;\ Gonna make somthing new. Anyone can feel free to continue it although this post was cut short. No idea why.

 Respond  
Ghost-writer   -  Sep 02, 2009

Global irc.swiftirc.net -j #dark-world Talk to me there about it. Maybe i can take you up on your offer :).

 Respond  
GlobalAnomaly   -  Sep 02, 2009

Maybe you could change this into a full game :P I'd help out with that (I've been needing a project).

 Respond  
Ghost-writer   -  Sep 02, 2009

;D Thanks, and i did the second update requested by regecide :P

 Respond  
PATX   -  Sep 02, 2009

lol nice, big potter fan myself, so yea cool :)

 Respond  
Regecide   -  Sep 02, 2009

Dang the site broke or something when I tried to post another comment hah.

Great job keeping it updating, fixing bugs and all :D We play with this thing all the time and ignore what we are supposed to be on IRC for lol. Will ask bot owner to update code so we can try it out.

The damage for player 1 and player 2 is still off on !Densaugeo

Avis is still listed twice, they both have different damages from each other, but now it's not in there 3 times lol.

Accio Phoenix is not listed in the spells when you !duelcmds, but Accio Dragon is. I assumed that accio phoenix is not a spell, but rather an ability that has a %chance to happen, but not sure. Will see when we test it out.

And a DRAGON. Heck yeah. I'll spend all day on irc just to beat it

 Respond  
Ghost-writer   -  Sep 02, 2009

Wow! Thank you!!! That is the kind of input i need XD. I will be done those by 3 hours min :]

 Respond  
Regecide   -  Sep 02, 2009

Glad to see an update, I was getting tired of rebound being bugged out on me lol.

Avis is listed like 3x in the code. Which one is supposed to be the real one?

Phoenix Feather is granted both 1/1000th chance and/or level 10, so it is very easilly achieved after a few battles to level 10 (Probably intentional, but just wanted to add it in case) Also, I have noticed no real benefit of having the phoenix feather, and code states no clear benefit of having it other that it saying you have it. To me at least.

Aqua is not listed in wand store, maybe its a bonus for people who look at the code? Regardless, a friend bought it and keep casting aquamenti. I bought flame wand and keep casting incendo. We each did our spell about 100 times total. My max damage was 50, his max damage was 46. We bought have phoenix feathers. Basic Incendo should do 47 damage max I did 50, so I assume maybe phoenix feather added 3? Otherwise the 5-15 flame wand never added more than 12, and I never got a luck roll. His aqua did 46 max, 23 min. Basic max is 46 for aqua, and thats what he got max. so never got a luck roll, or not a good one, and did not get wand bonus or never combined max for more than 8 damage. Perhaps luck roll is broken?

When trying to !duel, you often get a message "somone is fighting an ogre at the moment" But nobody is fighting an ogre. I can !duel ogre or !duel basalisk, and it works, but I can't !duel !fight !dm. I have to !unset then !duel.

Conjunctivitis does not give the same damage depends on which player you are. Player 1 does 15-35, player 2 does 0-38, with the same spell.
The same exact thing happens with Densaugeo.

Deprimo is the same as above as well. For player 1 it is 10-45 but for player 2 it is 10-35.

When I !challenge someone (!Challange, since it's typo'd) it sends them my request, but does not tell them how to accept. Nor is it in the code. We tried all kinds of things but it wouldn't accept the challenge.

I just thought I'd post what I found so that if you make further updates you know what the current problems (Or possible problems, as we may have just gotten bad luck testing) are to work on.

 Respond  
Ghost-writer   -  Aug 31, 2009

This is updated version. Im gonna make it smaller soon :).

 Respond  
Ghost-writer   -  Aug 31, 2009

fuck ya :\

 Respond  
Slifter   -  Aug 31, 2009

THIS IS LIKE THE BEST SCRIPT IVE SEEN! IT RULES! gj

 Respond  
Apo123   -  Aug 29, 2009

You forgot an equal sign on the !drink command for potions. Should be

if ( %magicp [ $+ [ $nick ] ] >= $4 ) {

and the same for the check for powerboost potions. Otherwise the player can't drink any potions unless they have 2, and even then they can only drink all but 1 potion.

 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.