on *:TEXT:!*:#compgeek1210: { if ($1 == !duel) { if (%duelstatus == on) { /msg $chan There is a duel in progress, please wait untill it is over before starting another duel. } if (%duelstatus != on) { /set %duelstatus on /set %id1_stats unset /set %id2_stats unset /set %idduel1 $nick /set %idturn none /msg $chan  $+ $nick has started a duel! /msg $chan Both players, type in your attack, strength, defence, and hitpoints levels. /msg $chan they must add up and be less than or equal to 355. /msg $chan to do this type !setstats (attack) (strength) (defence) (hitpoints) } } if ($1 == !setstats) { if (($nick == %idduel1) && ( %id1_stats != set )) { /set %id1_total $calc( $2 + $3 + $4 + $5 ) if ( %id1_total < 356 ) { if (( $2 < 100 ) && ( $3 < 100 ) && ( $4 < 100 ) && ( $5 < 100 )) { /set %id1_attack $2 /set %id1_strength $3 /set %id1_defence $4 /set %id1_hitpoints $5 /set %id1_stats set /set %id1_ddsspecs 4 /set %id1_sharks 20 /set %turn $rand(1,2) /msg $chan  $+ %idduel1 $+ 's stats are: Attack: %id1_attack Strength: %id1_strength Defence: %id1_defence Hitpoints: %id1_hitpoints  if ((%id1_stats == set) && (%id2_stats == set)) { if (%turn == 1) { /set %idturn %idduel1 } if (%turn == 2) { /set %idturn %idduel2 } /msg $chan The duel has begun! %idturn $+ 's turn first. /msg $chan You each get 20 sharks, 4 DDS special attacks/D mace special attacks. /msg $chan The options are, !whip, !dds, !mace, and !eat. /msg $chan Type !endduel anytime to end the duel. } } } } if (($nick != %idduel1) && ( %id2_stats != set )) { /set %id2_total $calc( $2 + $3 + $4 + $5 ) if ( %id2_total < 356 ) { if (( $2 < 100 ) && ( $3 < 100 ) && ( $4 < 100 ) && ( $5 < 100 )) { /set %idduel2 $nick /set %id2_attack $2 /set %id2_strength $3 /set %id2_defence $4 /set %id2_hitpoints $5 /set %id2_stats set /set %id2_ddsspecs 4 /set %id2_sharks 20 /msg $chan  $+ %idduel2 $+ 's stats are: Attack: %id2_attack Strength: %id2_strength Defence: %id2_defence Hitpoints: %id2_hitpoints  if ((%id1_stats == set) && (%id2_stats == set)) { if (%turn == 1) { /set %idturn %idduel1 } if (%turn == 2) { /set %idturn %idduel2 } /msg $chan The duel has begun! %idturn $+ 's turn first. /msg $chan You each get 20 sharks, 4 DDS special attacks/D mace special attacks. /msg $chan The options are, !whip, !dds, !mace, and !eat. /msg $chan Type !endduel anytime to end the duel. } } } } } if ($1 == !whip) { if ($nick == %idturn) { if (%turn == 1) { /set %attkminusdef $calc( %id1_attack - %id2_defence + 100 ) } if (%turn == 2) { /set %attkminusdef $calc( %id2_attack - %id1_defence + 100 ) } /set %randhitnum $rand(0,200) if (%attkminusdef > %randhitnum) { /set %attkworks true } if (%attkminusdef <= %randhitnum) { /set %attkworks false } if (%attkworks == false) { if (%turn == 1) { /msg $chan  $+ %idduel1 whips %idduel2 and hits: 0 } if (%turn == 2) { /msg $chan  $+ %idduel2 whips %idduel1 and hits: 0 } } if (%attkworks == true) { if (%turn == 1) { /set %maxhit $floor($calc( %id1_strength * .42 )) /set %damagehit $rand(0,%maxhit) /set %id2_hitpoints $calc( %id2_hitpoints - %damagehit ) /msg $chan  $+ %idduel1 whips %idduel2 and hits: %damagehit  if ( %id2_hitpoints < 1 ) { /msg $chan  $+ %idduel1 wins with %id1_hitpoints hitpoints left. /set %win true } if ( %win != true ) { /msg $chan  $+ %idduel2 has %id2_hitpoints hitpoints left. } } if (%turn == 2) { /set %maxhit $floor($calc( %id2_strength * .42 )) /set %damagehit $rand(0,%maxhit) /set %id1_hitpoints $calc( %id1_hitpoints - %damagehit ) /msg $chan  $+ %idduel2 whips %idduel1 and hits: %damagehit  if ( %id1_hitpoints < 1 ) { /msg $chan  $+ %idduel2 wins with %id2_hitpoints hitpoints left. /set %win true } if ( %win != true ) { /msg $chan  $+ %idduel1 has %id1_hitpoints hitpoints left. } } } if ( %turn == 1 ) { /set %turn 2 /set %idturn %idduel2 } else { /set %turn 1 /set %idturn %idduel1 } } } if ($1 == !dds) { if ($nick == %idturn) { if (%turn == 1) { if ( %id1_ddsspecs < 1 ) { /set %id1_outofddsspecs true } /set %attkminusdef $calc( %id1_attack - %id2_defence + 100 ) } if (%turn == 2) { if ( %id2_ddsspecs < 1 ) { /set %id2_outofddsspecs true } /set %attkminusdef $calc( %id2_attack - %id1_defence + 100 ) } /set %randhitnum $rand(0,250) /set %randhitnum2 $rand(0,250) if ( %attkminusdef > %randhitnum ) { /set %attkworks1 true } if ( %attkminusdef > %randhitnum2 ) { /set %attkworks2 true } if ( %attkminusdef <= %randhitnum ) { /set %attkworks1 false } if ( %attkminusdef <= %randhitnum2 ) { /set %attkworks2 false } if (( %turn == 1 ) && ( %id1_outofddsspecs != true )) { /set %maxhit $floor($calc( %id1_strength * .365 )) /set %damagehit $rand(0,%maxhit) /set %damagehit2 $rand(0,%maxhit) if ( %attkworks1 == false ) { /set %damagehit 0 } if ( %attkworks2 == false ) { /set %damagehit2 0 } /set %id2_hitpoints $calc( %id2_hitpoints - %damagehit - %damagehit2 ) dec %id1_ddsspecs /msg $chan  $+ %idduel1 DDS specs %idduel2 and hits: %damagehit $+ - $+ %damagehit2  if ( %id2_hitpoints < 1 ) { /msg $chan  $+ %idduel1 wins with %id1_hitpoints hitpoints left. /set %win true } if ( %win != true ) { /msg $chan  $+ %idduel2 has %id2_hitpoints hitpoints left. } } if ((%turn == 2 ) && ( %id2_outofddsspecs != true )) { /set %maxhit $floor($calc( %id2_strength * .365 )) /set %damagehit $rand(0,%maxhit) /set %damagehit2 $rand(0,%maxhit) if ( %attkworks1 == false ) { /set %damagehit 0 } if ( %attkworks2 == false ) { /set %damagehit2 0 } /set %id1_hitpoints $calc( %id1_hitpoints - %damagehit - %damagehit2 ) dec %id2_ddsspecs /msg $chan  $+ %idduel2 DDS specs %idduel1 and hits: %damagehit $+ - $+ %damagehit2  if ( %id1_hitpoints < 1 ) { /msg $chan  $+ %idduel2 wins with %id2_hitpoints hitpoints left. /set %win true } if ( %win != true) { /msg $chan  $+ %idduel1 has %id1_hitpoints hitpoints left. } } if ( %turn == 1 ) { /set %turn 2 /set %idturn %idduel2 } else { /set %turn 1 /set %idturn %idduel1 } } } if ($1 == !mace) { if ($nick == %idturn) { if (%turn == 1) { if ( %id1_ddsspecs < 1 ) { /set %id1_outofddsspecs true } /set %attkminusdef $calc( %id1_attack - %id2_defence + 100 ) } if (%turn == 2) { if ( %id2_ddsspecs < 1 ) { /set %id2_outofddsspecs true } /set %attkminusdef $calc( %id2_attack - %id1_defence + 100 ) } /set %randhitnum $rand(0,250) if (%attkminusdef > %randhitnum) { /set %attkworks true } if (%attkminusdef <= %randhitnum) { /set %attkworks false } if (%attkworks == false) { if (%turn == 1) { /msg $chan  $+ %idduel1 mace specs %idduel2 and hits: 0 } if (%turn == 2) { /msg $chan  $+ %idduel2 mace specs %idduel1 and hits: 0 } } if (%attkworks == true) { if ((%turn == 1) && ( %id1_outofddsspecs != true )) { /set %maxhit $floor($calc( %id1_strength * .61 )) /set %damagehit $rand(0,%maxhit) /set %id2_hitpoints $calc( %id2_hitpoints - %damagehit ) dec %id1_ddsspecs /msg $chan  $+ %idduel1 mace specs %idduel2 and hits: %damagehit  if ( %id2_hitpoints < 1 ) { /msg $chan  $+ %idduel1 wins with %id1_hitpoints hitpoints left. /set %win true } if ( %win != true ) { /msg $chan  $+ %idduel2 has %id2_hitpoints hitpoints left. } } if ((%turn == 2) && ( %id2_outofddsspecs != true)) { /set %maxhit $floor($calc( %id2_strength * .61 )) /set %damagehit $rand(0,%maxhit) /set %id1_hitpoints $calc( %id1_hitpoints - %damagehit ) dec %id2_ddsspecs /msg $chan  $+ %idduel2 mace specs %idduel1 and hits: %damagehit  if ( %id1_hitpoints < 1 ) { /msg $chan  $+ %idduel2 wins with %id2_hitpoints hitpoints left. /set %win true } if ( %win != true ) { /msg $chan  $+ %idduel1 has %id1_hitpoints hitpoints left. } } } if ( %turn == 1 ) { /set %turn 2 /set %idturn %idduel2 } else { /set %turn 1 /set %idturn %idduel1 } } } if ($1 == !eat) { if ( $nick == %idturn ) { if ( %turn == 1 ) { /set %sharkseaten $rand(1,3) if ( %sharkseaten == 2) { /set %sharkseaten 1 } if ( %sharkseaten == 3) { /set %sharkseaten 2 } if ( %id1_sharks == 1) { /set %sharkseaten 1 } if (( %sharkseaten == 1) && ( %id1_sharks > 0 )) { /set %id1_hitpoints $calc( %id1_hitpoints + 20 ) /set %id1_sharks $calc( %id1_sharks - 1 ) /msg $chan  $+ %idduel1 eats a shark. } if ( %sharkseaten == 2) { /set %id1_hitpoints $calc( %id1_hitpoints + 40 ) /set %id1_sharks $calc( %id1_sharks - 2 ) /msg $chan  $+ %idduel1 eats two sharks. } } if ( %turn == 2 ) { /set %sharkseaten $rand(1,3) if ( %sharkseaten == 2) { /set %sharkseaten 1 } if ( %sharkseaten == 3) { /set %sharkseaten 2 } if ( %id1_sharks == 1) { /set %sharkseaten 1 } if (( %sharkseaten == 1) && ( %id2_sharks > 0 )) { /set %id2_hitpoints $calc( %id2_hitpoints + 20 ) /set %id2_sharks $calc( %id2_sharks - 1 ) /msg $chan  $+ %idduel2 eats a shark. } if ( %sharkseaten == 2) { /set %id2_hitpoints $calc( %id2_hitpoints + 40 ) /set %id2_sharks $calc( %id2_sharks - 2 ) /msg $chan  $+ %idduel2 eats two sharks. } } if ( %turn == 1 ) { /set %turn 2 /set %idturn %idduel2 } else { /set %turn 1 /set %idturn %idduel1 } } } if (($1 == !endduel) || ( %win == true )) { if (($nick == %idduel1) || ($nick == %idduel2) || ($nick == [Adam])) { /unset %duelstatus /unset %id1_stats /unset %id2_stats /unset %idduel1 /unset %idduel2 /unset %id1_attack /unset %id1_strength /unset %id1_defence /unset %id1_hitpoints /unset %id1_stats /unset %id1_ddsspecs /unset %id1_sharks /unset %turn /unset %id1_total /unset %id2_attack /unset %id2_strength /unset %id2_defence /unset %id2_hitpoints /unset %id2_stats /unset %id2_ddsspecs /unset %id2_sharks /unset %id2_total /unset %attkminusdef /unset %randhitnum /unset %attkworks /unset %maxhit /unset %damagehit /unset %damagehit2 /unset %win /unset %id1_outofddsspecs /unset %id2_outofddsspecs /unset %sharkseaten /unset %randhitnum2 /unset %attkworks1 /unset %attkworks2 /unset %idturn /msg $chan Duel Ended } } } ; Written by Compgeek1210