All pastes #489732 Raw Edit

Fixed (w00t?)

public text v1 · immutable
·published 2007-05-15 18:02 UTC
rendered paste body
on *:TEXT:!vd*:#:{ 
  if (%vd == 1) && (%vdplay !== 1) {
    if (!$4) { notice $nick Specify the troops please. | halt }
    if ($calc($2 + ($3*2) + ($4*4)) >= 20000) { notice $nick You have spent too many points. Please see !vdrules to see how much you can spend. | halt }
    if (%play == 1) { notice $nick A game is already being played. | halt }
    if (%vd == 0) { notice $nick Violent Diplomacy is not currently on. Please contact Jcfc so he can turn it on. | halt }
    if ($calc($2 + ($3*2) + ($4*4)) <= 20000) {
      msg $chan $nick wants to play Violent Diplomacy! Type !vd [INFANTRY] [DRAGOONS] [CAVALRY] to play with him.
      set %vdplay 1
      set %p1inf $2
      set %p1drag $3
      set %p1cav $4
      set %player1 $nick
      halt
    }
  }
  if (%vdplay == 1) && (%vd == 1) {
    if (!$4) { notice $nick Specify the troops please. | halt }
    if ($calc($2 + ($3 * 2) + ($4 * 4)) >= 20000) { notice $nick You have spent too many points. Please see !vdrules to see how much you can spend. | halt }
    if (%play == 1) { notice $nick A game is already being played. | halt }
    if (%vd == 0) { notice $nick Violent Diplomacy is not currently on. Please contact Jcfc so he can turn it on. | halt }
    if ($calc($2 + ($3 * 2) + ($4 * 4)) <= 20000) {
      set %vdplay 1
      set %p2inf $2
      set %p2drag $3
      set %p2cav $4
      set %player2 $nick
      msg $chan The game is on! %player1 vs. %player2 $+ .
      halt
    }
  }
  if (%vd == 0) { notice $nick Violent Diplomacy is not currently on. Please contact Jcfc so he can turn it on. | halt }
}

on 1:join:#Jcfc:{ 
  say Welcome $nick to # ! 
  say For commands, say !commands.
}