on *:text:*:?: { if ($nick == %dualnick2) { if ($1 == !accept) { set %maxhit1 $get($calc(%dualnick2,maxhp) / 3) set %maxhit2 $get($calc(%dualnick1,maxhp) / 3) while ($get(%dualnick2,maxhp) > 0) || ($get(%dualnick2,maxhp) > 0) { set %hit1 $rand(0, $+ %maxhit1) set %hit2 $rand(0, $+ %maxhit2) /notice %dualnick1 you hit a %hit1 and %dualnick2 hits a %hit2 /notice %dualnick2 you hit a %hit2 and %dualnick1 hits a %hit1 } IF ($get(%dualnick1,hp)) && ($get(%dualnick2,hp)) < 0 ) { /write -shp %dualnick1 $+ .txt hp $get(Dualnick1,maxhp) /write -shp %dualnick2 $+ .txt hp $get(Dualnick2,maxhp) /notice %dualnick1 Uh Oh it was a draw because you both died! /notice %dualnick2 Uh Oh it was a draw because you both died! Halt } if ($get(%dualnick1,hp) < 0 ) { /write -shp %dualnick1 $+ .txt hp $get(Dualnick1,maxhp) /write -shp %dualnick2 $+ .txt hp $get(Dualnick2,maxhp) /write -sgp %dualnick2 $+ .txt gp $calc( + %stakeamount) /notice %dualnick1 You have died and lost %stakeamount to %dualnick2 /notice %dualnick2 You have Won %stakeamount and killed %dualnick1 } if ($get(%dualnick1,hp) ) { /write -shp %dualnick1 $+ .txt hp $get(Dualnick1,maxhp) /write -shp %dualnick2 $+ .txt hp $get(Dualnick2,maxhp) /write -sgp %dualnick1 $+ .txt gp $calc( + %stakeamount) /write -sgp %dualnick2 $+ .txt gp $calc( - %stakeamount) /notice %dualnick2 You have died and lost %stakeamount to %dualnick1 /notice %dualnick1 You have Won %stakeamount and killed %dualnick2 }