If you're inexperienced, you should write it yourself since it will be a good exercise. I doubt anyone with experience will write it for you, since it's kinda trivial/boring :p

You can write it within a single on *:TEXT:*:#: { }
and just use a lot of IF statements

Use dynamic variables to check if a duel is going on, whose turn it is to attack, and so on. For example: %duel. [ $+ [ $nick ] ]

Other than that you'll need
$readini /writeini $rand