All pastes #745039 Raw Edit

Untitled

public text v1 · immutable
·published 2007-10-21 23:58 UTC
rendered paste body
on *:TEXT:!soccer:#fifa:{ 
  msg $nick Would you like to be the shooter or the goalie?
  set %p1 = $address($nick,2) 
}
on *:TEXT:*Goalie*:?:{
  if %p1 = $address($nick,2) { msg $nick So be it, You are the goalie. Say Start when you are ready.
    set %p1 = %goalie
  }
}
on *:TEXT:*Shooter*:?:{
  if %p1 = $address($nick,2) { msg $nick As you wish, you are the shooter. Say Start when you are ready.
    set %p1 = %shooter
  }
}
on *:TEXT:!soccer:#fifa:{ 
  if %p1 = %goalie
  set %p2 %shooter
  msg $nick You are the shooter.
  elseif (%p1 = %shooter)
  set %p2 = %goalie
  msg $nick You are the goalie.
  msg #fifa The goalie for this game is: %p1 $+ , The shooter for this game is %p2 
  elseif (%p1 && %p2 == *) { halt }
}
on *:TEXT:*start*:?:{
  if $address($nick,2) = $address(%p1 && (%p1 = %goalie) { msg $nick You are the goalie. Please wait for further instructions.
    elseif $address($nick,2) = $address(%p2 && (%p2 = %shooter) { msg $nick You are the shooter. Please pick a place to shoot by typing !shoot _ (Fill in __ with a number 1-4. Thanks!
    }
  }
}
on *:TEXT:!shoot*:?:{ 
  if $address($nick,2) = $address(%p2 && (%p2 = %shooter)) { msg $nick You have aimed your shot. Waiting on the Goalie. 
    set %shot $2
    msg %p1 The shooter has aimed, attempt your save by typing !save _ (Replace _ with a number 1-4)
  }
}
on *:TEXT:!save*:?:{ 
  if $address($nick,2) = $address(%p1 && (%p1 = %goalie) { set %save $2 
    msg #fifa The shooter has aimed and the goalie has determined where he will attempt to save. Let's find out the result.
    if (%shot != %save) { msg #fifa %shooter shoots and $read(score.txt) $+ !!!
      inc %goals [ $+ [ $nick ] ]
      elseif (%shot == %save) { msg #fifa %goalie has $read(saves.txt) $+ !!!
        inc %saves [ $+ [ $nick ] ]
      }
    }
  }
}
on *:TEXT:!goals*:#:{ msg $chan $2 has scored %goals [ $+ [ $2 ] ] - Nice. }
on *:TEXT:!saves*:#:{ msg $chan $2 has saved %saves [ $+ [ $2 ] ] - Nice. }