rendered paste bodyon *:TEXT:!enddm:#:{
if ($address($nick,2) == $address($me,2)) || ($nick isop $chan) || ($nick == %dm1 [ $+ [ $chan ] ]) || ($nick == %dm2 [ $+ [ $chan ] ]) {
if (%dmstatus [ $+ [ $chan ] ] != $null) {
msg $chan $color1 $+ The current $+ $color2 DM $color1 $+ is canceled by $color2 $+ $nick $+ $color1 $+ .
}
else {
notice $nick There is no DM running on this channel!
}
unset %dm1 [ $+ [ $chan ] ]
unset %dm2 [ $+ [ $chan ] ]
unset %dmstatus [ $+ [ $chan ] ]
unset %dmturn [ $+ [ $chan ] ]
unset %dmhp1 [ $+ [ $chan ] ]
unset %dmhp2 [ $+ [ $chan ] ]
unset %dmdd1 [ $+ [ $chan ] ]
unset %dmdd2 [ $+ [ $chan ] ]
}
}
on *:TEXT:!endall*:#:{
if ($address($nick,2) == $address($me,2)) || ($nick == kura) {
amsg [AMSG] $nick is ending all games. Reason: $2-
unset %dm1*
unset %dm2*
unset %dmstatus*
unset %dmturn*
unset %dmhp1*
unset %dmhp2*
unset %dmdd1*
unset %dmdd2*
}
}
on *:TEXT:!dm*:#:{
if (%deathmatch [ $+ [ $chan ] ] == enabled) {
if ($chan == #tdc) {
notice $nick Oh no, NO DM's in $chan $+ , you $nick $+ -being-noob! Invite [DM]Mighty into another channel!
else {
if (%dmstatus [ $+ [ $chan ] ] == $null) {
set %dmstatus $+ $chan open
set %dm1 $+ $chan $nick
msg $chan $color2 $+ $nick $color1 $+ is challenging anybody in $+ $color2 $chan $color1 $+ to DM him! Show us how brave you are and accept the challenge by typing $color2 $+ !dm $color1 $+ .
}
elseif (%dmstatus [ $+ [ $chan ] ] == open) {
if ($nick == %dm1 [ $+ [ $chan ] ]) {
notice $nick You cannot fight yourself!
}
else {
set %dmstatus $+ $chan on
set %dm2 $+ $chan $nick
set %dmhp1 $+ $chan 99
set %dmhp2 $+ $chan 99
set %dmspec1 $+ $chan 100
set %dmspec2 $+ $chan 100
msg $chan $+ $color2 $+ $nick $color1 $+ has accepted the challenge and will fight against $+ $color2 $+ %dm1 [ $+ [ $chan ] ] $+ $color1 $+ !
var %dmstart = $rand(1,2)
describe $chan gambles the dices..
if (%dmstart == 1) {
msg $chan $+ $color2 $+ %dm1 [ $+ [ $chan ] ] $color1 $+ may start this battle by typing the first command.
set %dmturn $+ $chan 1
}
elseif (%dmstart == 2) {
msg $chan $+ $color2 $+ %dm2 [ $+ [ $chan ] ] $color1 $+ may start this battle by typing the first command.
set %dmturn $+ $chan 2
}
msg $chan $color1 $+ To view all available items, type $+ $color2 $+ !items $color1 $+ .
}
elseif (%dmstatus [ $+ [ $chan ] ] == on) {
notice $nick There is already a DM running. Please try again later!
}
}
}
}
}
}