alias unsetdm { msg %dmchan Nobody has decided to DM %dmp1 within 30 seconds, the DM invitation is now closed. unset %dmp1 $nick unset %dmstart 1 unset %dmchan $chan } alias stopdm { unset %dmstart unset %dmrun unset %hp* unset %food* unset %spec* unset %dmp* unset %dhp* unset %whp* unset %ghp* unset %turn unset %dmchan } alias switchturn { msg %dmchan $1 has not made an action in 30 seconds, it is now $2 $+ 's turn. set %turn $2 } on *:TEXT:!dm:#:{ if (%dmstart) && (!%dmrun) { if ($nick == %dmp1) { .notice $nick You may not fight yourself. /halt } /unset %dmstart .msg $chan $nick Has joined The dm against %dmp1 /set %dmp2 $nick .msg $chan The fighters in this DM are %dmp1 and %dmp2 .msg $chan Both fighters will recieve 20 sharks which heal 20 and start with the maximum of 99 HP /unset %dmstart /set %dmp2 $nick /set %dmrun 1 /set %hp [ $+ [ %dmp1 ] ] 99 /set %hp [ $+ [ %dmp2 ] ] 99 /set %food [ $+ [ %dmp1 ] ] 20 /set %food [ $+ [ %dmp2 ] ] 20 /set %spec [ $+ [ %dmp1 ] ] 100 /set %spec [ $+ [ %dmp2 ] ] 100 /set %firstp $rand(1,2) if (%firstp == 1) { /set %turn %dmp1 .msg $chan %dmp1 gets the first attack! /unset %firstp } if (%firstp == 2) { /set %turn %dmp2 .msg $chan %dmp2 gets the first attack! /unset %firstp } } elseif (!%dmrun) { .msg $chan $nick Has initiated a DM! Type !dm to fight them. /set %dmp1 $nick /set %dmstart 1 /set %dmchan $chan /.timerDm 1 30 unsetdm } else { .notice $nick Sorry, there is already a Dm running, please wait for that one to end. } if (%dmrun) { /.timerdm off } } on *:TEXT:!stopdm:#:{ if ($nick == %dmp1) || ($nick == %dmp2) || ($nick isop %dmchan) || ($nick == Locke) { if (%dmstart) { msg $chan The Dm invitation has been closed by $nick $+ . } elseif (%dmrun) { msg $chan The Dm between %dmp1 and %dmp2 has been ended by $nick $+ . } else { .notice $nick There is no Dm to stop. } timerdm off stopdm } } on *:TEXT:!dmcommands:#:{ .notice $nick !Whip Will attack your opponent with your whip. It will also decrease your Special Energy by 25%. The max hit is 35. .notice $nick !Dds Will attack your opponent twice with a dds. It will also decrease your Special Energy by 25%. The max hit on each of the attacks is 25. .notice $nick !Gmaul Will attack your opponent three times with a granite maul. The max hit on each of the attacks is 20. .notice $nick !Eat Will eat a shark and increase your health by 100%. .notice $nick !Spec Will check your special energy bar. .notice $nick !Food Will check the amount of food you have left. .notice $nick !Stopdm will stop the Dm if you are a deathmatch player or an op in the channel. } on *:TEXT:!spec*:#:{ if ($nick == %dmp1) { .notice $nick You have %spec [ $+ [ %dmp1 ] ] $+ % special energy left. } elseif ($nick == %dmp2) { .notice $nick You have %spec [ $+ [ %dmp2 ] ] $+ % special energy left. } else { .notice $nick You are not fighting in this Dm. } } on *:TEXT:!food*:#:{ if ($nick == %dmp1) { .notice $nick You have %food [ $+ [ %dmp1 ] ] sharks left. } elseif ($nick == %dmp2) { .notice $nick You have %food [ $+ [ %dmp2 ] ] sharks left. } else { .notice $nick You are not fighting in this Dm. } } on *:TEXT:!eat*:#:{ if (%dmrun) { if ($nick != %dmp1) && ($nick != %dmp2) { .notice $nick You are not fighting in this Dm. } else { if ($nick != %turn) { .notice $nick It is not your turn. } else { if ($nick == %dmp1) { .timerdmlimit off .timerdmlimit 1 30 switchturn %dmp2 %dmp1 if (%food [ $+ [ %dmp1 ] ] > 0) { set %hp [ $+ [ %dmp1 ] ] $calc(%hp [ $+ [ %dmp1 ] ] + 20) if (%hp [ $+ [ %dmp1 ] ] > 99) { set %hp [ $+ [ %dmp1 ] ] 99 } dec %food [ $+ [ %dmp1 ] ] 1 if (%spec [ $+ [ %dmp1 ] ] < 100) { inc %spec [ $+ [ %dmp1 ] ] 5 } msg $chan $nick has eaten a shark. You now have $+ %hp [ $+ [ %dmp1 ] ] hp. .notice $nick You have %food [ $+ [ %dmp1 ] ] sharks left. msg $chan It is now %dmp2 $+ 's turn. set %turn %dmp2 } else { .notice $nick Sorry, you have no food left to eat. set %turn %dmp2 msg $chan It is now %dmp2 $+ 's turn. } } if ($nick == %dmp2) { .timerdmlimit off .timerdmlimit 1 30 switchturn %dmp1 %dmp2 if (%food [ $+ [ %dmp2 ] ] > 0) { inc %hp [ $+ [ %dmp2 ] ] 20 if (%hp [ $+ [ %dmp2 ] ] > 99) { set %hp [ $+ [ %dmp2 ] ] 99 } dec %food [ $+ [ %dmp2 ] ] 1 if (%spec [ $+ [ %dmp2 ] ] < 100) { inc %spec [ $+ [ %dmp2 ] ] 5 } msg $chan $nick has eaten a shark. You now have $+ %hp [ $+ [ %dmp2 ] ] hp. .notice $nick You have %food [ $+ [ %dmp2 ] ] sharks left. msg $chan It is now %dmp1 $+ 's turn. set %turn %dmp1 } else { .notice $nick Sorry, you have no food left to eat. set %turn %dmp1 msg $chan It is now %dmp1 $+ 's turn. } } } } } } on *:TEXT:!whip*:#:{ if (%dmrun) { if ($nick != %dmp1) && ($nick != %dmp2) { .notice $nick You are not fighting in this Dm. } else { if ($nick != %turn) { .notice $nick It is not your turn. } else { if ($nick == %dmp1) { .timerdmlimit off .timerdmlimit 1 30 switchturn %dmp2 %dmp1 set %whp2 $rand(0,35) if (%whp2 < %hp [ $+ [ %dmp2 ] ]) { dec %hp [ $+ [ %dmp2 ] ] %whp2 msg $chan %dmp1 has hit %dmp2 with their whip and has done %whp2 damage. %dmp2 has %hp [ $+ [ %dmp2 ] ] hp left. if (%spec [ $+ [ %dmp1 ] ] < 100) { inc %spec [ $+ [ %dmp1 ] ] 5 } msg $chan It is now %dmp2 $+ 's turn. set %turn %dmp2 unset %whp2 halt } if (%whp2 > %hp [ $+ [ %dmp2 ] ]) { set %whp2 %hp [ $+ [ %dmp2 ] ] dec %hp [ $+ [ %dmp2 ] ] %whp2 msg $chan %dmp1 has hit a %whp2 with their whip leaving %dmp2 with %hp [ $+ [ %dmp2 ] ] hp. Congratulations %dmp1 $+ , you won the Dm! stopdm Halt } } if ($nick == %dmp2) { .timerdmlimit off .timerdmlimit 1 30 switchturn %dmp1 %dmp2 set %whp1 $rand(0,35) if (%whp1 < %hp [ $+ [ %dmp1 ] ]) { dec %hp [ $+ [ %dmp1 ] ] %whp1 msg $chan %dmp2 has hit %dmp1 with their whip and has done $+ %whp1 damage. %dmp1 has $+ %hp [ $+ [ %dmp1 ] ] hp left. if (%spec [ $+ [ %dmp2 ] ] < 100) { inc %spec [ $+ [ %dmp2 ] ] 5 } msg $chan It is now %dmp1 $+ 's turn. set %turn %dmp1 unset %whp1 halt } if (%whp1 > %hp [ $+ [ %dmp1 ] ]) { set %whp1 %hp [ $+ [ %dmp1 ] ] dec %hp [ $+ [ %dmp1 ] ] %whp1 msg $chan %dmp2 has hit a %whp1 with their whip leaving %dmp1 with %hp [ $+ [ %dmp1 ] ] hp. Congratulations %dmp2 $+ , you won the Dm! stopdm Halt } } } } } else { .notice $nick A DM is not running and thus you may not attack your opponent. } } on *:TEXT:!dds*:#:{ if (%dmrun) { if ($nick != %dmp1) && ($nick != %dmp2) { .notice $nick You are not fighting in this Dm. } else { if ($nick != %turn) { .notice $nick It is not your turn. } else { if ($nick == %dmp1) { .timerdmlimit off .timerdmlimit 1 30 switchturn %dmp2 %dmp1 if (%spec [ $+ [ %dmp1 ] ] >= 25) { set %dhp1p2 $rand(0,25) set %dhp2p2 $rand(0,25) if ($calc(%dhp1p2 + %dhp2p2) < %hp [ $+ [ %dmp2 ] ]) { dec %hp [ $+ [ %dmp2 ] ] %dhp1p2 dec %hp [ $+ [ %dmp2 ] ] %dhp2p2 dec %spec [ $+ [ %dmp1 ] ] 25 .notice $nick You now have %spec [ $+ [ %dmp1 ] ] $+ % of your spec bar left. msg $chan %dmp1 has hit %dmp2 with their dds and has done %dhp1p2 and %dhp2p2 damage. %dmp2 has %hp [ $+ [ %dmp2 ] ] hp left. if (%spec [ $+ [ %dmp1 ] ] < 100) { inc %spec [ $+ [ %dmp1 ] ] 5 } msg $chan It is now %dmp2 $+ 's turn. set %turn %dmp2 unset %dhp1p2 unset %dhp2p2 halt } if ($calc(%dhp1p2 + %dhp2p2) >= %hp [ $+ [ %dmp2 ] ]) { set %dhp1p2 $floor($calc($($+(%,hp,$(%dmp2,2)),2)/2)) set %dhp2p2 $ceil($calc($($+(%,hp,$(%dmp2,2)),2)/2)) dec %hp [ $+ [ %dmp2 ] ] %dhp1p2 dec %hp [ $+ [ %dmp2 ] ] %dhp2p2 msg $chan %dmp1 has hit a %dhp1p2 and %dhp2p2 on %dmp2 leaving %dmp2 with %hp [ $+ [ %dmp2 ] ] hp. Congratulations %dmp1 $+ , you won the Dm! stopdm Halt } } else { .notice $nick You do not have enough spec energy to do that. You have %spec [ $+ [ %dmp1 ] ] $+ % of your spec energy left. msg $chan It is now %dmp2 $+ 's turn. set %turn %dmp2 } } if ($nick == %dmp2) { .timerdmlimit off .timerdmlimit 1 30 switchturn %dmp1 %dmp2 if (%spec [ $+ [ %dmp2 ] ] >= 25) { set %dhp1p1 $rand(0,25) set %dhp2p1 $rand(0,25) if ($calc(%dhp1p1 + %dhp2p1) < %hp [ $+ [ %dmp1 ] ]) { dec %hp [ $+ [ %dmp1 ] ] %dhp2p1 dec %hp [ $+ [ %dmp1 ] ] %dhp1p1 dec %spec [ $+ [ %dmp2 ] ] 25 .notice $nick You now have %spec [ $+ [ %dmp2 ] ] $+ % of your spec bar left. msg $chan %dmp2 has hit %dmp1 with their dds and has done $+ %dhp1p1 and %dhp2p1 damage. %dmp1 has $+ %hp [ $+ [ %dmp1 ] ] hp left. if (%spec [ $+ [ %dmp2 ] ] < 100) { inc %spec [ $+ [ %dmp2 ] ] 5 } msg $chan It is now %dmp1 $+ 's turn. set %turn %dmp1 unset %dhp1p1 unset %dhp2p1 halt } if ($calc(%dhp1p1 + %dhp2p1) >= %hp [ $+ [ %dmp1 ] ]) { set %dhp1p1 $floor($calc($($+(%,hp,$(%dmp1,2)),2)/2)) set %dhp2p1 $ceil($calc($($+(%,hp,$(%dmp1,2)),2)/2)) dec %hp [ $+ [ %dmp1 ] ] %dhp1p1 dec %hp [ $+ [ %dmp1 ] ] %dhp2p1 msg $chan %dmp2 has hit a %dhp1p1 and %dhp2p1 on %dmp1 leaving %dmp1 with %hp [ $+ [ %dmp1 ] ] hp. Congratulations %dmp2 $+ , you won the Dm! stopdm Halt } } else { .notice $nick You do not have enough spec energy to do that. You have %spec [ $+ [ %dmp2 ] ] $+ % of your spec energy left. msg $chan It is now %dmp1 $+ 's turn. set %turn %dmp1 } } } } } else { .notice $nick A DM is not running and thus you may not attack your opponent. } } on *:TEXT:!gmaul*:#:{ if (%dmrun) { if ($nick != %dmp1) && ($nick != %dmp2) { .notice $nick You are not fighting in this Dm. } else { if ($nick != %turn) { .notice $nick It is not your turn. } else { if ($nick == %dmp1) { .timerdmlimit off .timerdmlimit 1 30 switchturn %dmp2 %dmp1 if (%spec [ $+ [ %dmp1 ] ] >= 100) { set %ghp1p2 $rand(0,20) set %ghp2p2 $rand(0,20) set %ghp3p2 $rand(0,20) if ($calc(%ghp1p2 + %ghp2p2 + %ghp3p2) < %hp [ $+ [ %dmp2 ] ]) { dec %hp [ $+ [ %dmp2 ] ] %ghp1p2 dec %hp [ $+ [ %dmp2 ] ] %ghp2p2 dec %hp [ $+ [ %dmp2 ] ] %ghp3p2 dec %spec [ $+ [ %dmp1 ] ] 100 .notice $nick You now have %spec [ $+ [ %dmp1 ] ] $+ % of your spec bar left. msg $chan %dmp1 has hit %dmp2 with their granite maul and has done %ghp1p2 $+ , %ghp2p2 and %ghp3p2 damage leaving %dmp2 with %hp [ $+ [ %dmp2 ] ] hp. if (%spec [ $+ [ %dmp1 ] ] < 100) { inc %spec [ $+ [ %dmp1 ] ] 5 } msg $chan It is now %dmp2 $+ 's turn. set %turn %dmp2 unset %ghp1p2 unset %ghp2p2 unset %ghp3p2 halt } if ($calc(%ghp1p2 + %ghp2p2 + %ghp3p2) >= %hp [ $+ [ %dmp2 ] ]) { set %ghpcv1 $rand(1,3) if (%ghpcv1 = 1) { set %ghp1p2 $floor($calc($($+(%,hp,$(%dmp2,2)),2)/2)) set %ghp2p2 $ceil($calc($($+(%,hp,$(%dmp2,2)),2)/2)) set %ghp3p2 0 } if (%ghpcv1 = 2) { set %ghp1p2 $floor($calc($($+(%,hp,$(%dmp2,2)),2)/2)) set %ghp3p2 $ceil($calc($($+(%,hp,$(%dmp2,2)),2)/2)) set %ghp2p2 0 } if (%ghpcv1 = 3) { set %ghp3p2 $floor($calc($($+(%,hp,$(%dmp2,2)),2)/2)) set %ghp2p2 $ceil($calc($($+(%,hp,$(%dmp2,2)),2)/2)) set %ghp1p2 0 } dec %hp [ $+ [ %dmp2 ] ] %ghp3p2 dec %hp [ $+ [ %dmp2 ] ] %ghp2p2 dec %hp [ $+ [ %dmp2 ] ] %ghp1p2 msg $chan %dmp1 has hit %dmp2 with their granite maul and has done %ghp1p2 $+ , %ghp2p2 and %ghp3p2 damage. %dmp2 has %hp [ $+ [ %dmp2 ] ] hp left. Congratulations %dmp1 $+ , you won the Dm! stopdm Halt } } else { .notice $nick You do not have enough spec energy to do that. You have %spec [ $+ [ %dmp1 ] ] $+ % of your spec energy left. msg $chan It is now %dmp2 $+ 's turn. set %turn %dmp2 } } if ($nick == %dmp2) { .timerdmlimit off .timerdmlimit 1 30 switchturn %dmp1 %dmp2 if (%spec [ $+ [ %dmp2 ] ] = 100) { set %ghp1p1 $rand(0,20) set %ghp2p1 $rand(0,20) set %ghp3p1 $rand(0,20) if ($calc(%ghp1p1 + %ghp2p1 + %ghp3p1) < %hp [ $+ [ %dmp1 ] ]) { dec %hp [ $+ [ %dmp1 ] ] %ghp1p1 dec %hp [ $+ [ %dmp1 ] ] %ghp2p1 dec %hp [ $+ [ %dmp1 ] ] %ghp3p1 dec %spec [ $+ [ %dmp2 ] ] 100 .notice $nick You now have %spec [ $+ [ %dmp2 ] ] $+ % of your spec bar left. msg $chan %dmp2 has hit %dmp1 with their granite maul and has done %ghp1p1 $+ , %ghp2p1 and %ghp3p1 damage. %dmp1 has %hp [ $+ [ %dmp1 ] ] hp left. if (%spec [ $+ [ %dmp2 ] ] < 100) { inc %spec [ $+ [ %dmp2 ] ] 5 } msg $chan It is now %dmp1 $+ 's turn. set %turn %dmp1 unset %ghp1p1 unset %ghp2p1 unset %ghp3p1 halt } if ($calc(%ghp1p1 + %ghp2p1 + %ghp3p1) >= %hp [ $+ [ %dmp1 ] ]) { set %ghpcv2 $rand(1,3) if (%ghpcv2 = 1) { set %ghp1p1 $floor($calc($($+(%,hp,$(%dmp1,2)),2)/2)) set %ghp2p1 $ceil($calc($($+(%,hp,$(%dmp1,2)),2)/2)) set %ghp3p1 0 } if (%ghpcv2 = 2) { set %ghp1p1 $floor($calc($($+(%,hp,$(%dmp1,2)),2)/2)) set %ghp3p1 $ceil($calc($($+(%,hp,$(%dmp1,2)),2)/2)) set %ghp2p1 0 } if (%ghpcv2 = 3) { set %ghp3p1 $floor($calc($($+(%,hp,$(%dmp1,2)),2)/2)) set %ghp2p1 $ceil($calc($($+(%,hp,$(%dmp1,2)),2)/2)) set %ghp1p1 0 } dec %hp [ $+ [ %dmp1 ] ] %ghp3p1 dec %hp [ $+ [ %dmp1 ] ] %ghp2p1 dec %hp [ $+ [ %dmp1 ] ] %ghp1p1 msg $chan %dmp2 has hit %dmp1 with their granite maul and has done %ghp1p1 $+ , %ghp2p1 and %ghp3p1 damage. %dmp1 has %hp [ $+ [ %dmp1 ] ] hp left. Congratulations %dmp2 $+ , you won the Dm! stopdm Halt } } else { .notice $nick You do not have enough spec energy to do that. You have %spec [ $+ [ %dmp2 ] ] $+ % of your spec energy left. msg $chan It is now %dmp1 $+ 's turn. set %turn %dmp1 } } } } } else { .notice $nick A DM is not running and thus you may not attack your opponent. } }