Yeah you're right. It wasn't the nicest form of scripting.
Anyway, I cant get your version to work tbh.
=23:31:10= * @me slaps
=23:31:10= * @me with a large trout.
* /describe: insufficient parameters (line 82, popups.ini)
And line 82, would be:
describe $chan $iif(!%split,slaps) %slapnicks $iif($calc(%cnt + 1) == %total,with a large trout.)