%mp3repeat doesn't require on or off switch in the script its just if (%mp3repeat) meaning that the result can be anything however to unset it you must "Unset %mp3repeat"
try this..
make sure the alias that calls next.end is like $next.end(off) or /next.end off
alias next.end {
if ($1 == on) { %mp3repeat on }
if ($1 == off) { unset %mp3repeat }
%g = 0
:loop
inc %g
%temp.nextname = $readini $mircdirsystem\mp3.ini MP3 %g
if (%totalmp3lists <= %g) { if (%mp3repeat) { set %g 0 | if ($dialog(mp3) != $null) { .did -c mp3 14 1 } | goto end } | else { set %g 0 | if ($dialog(mp3) != $null) { .did -c mp3 14 1 } | set %mp3file $readini $mircdirsystem\mp3.ini MP3 1 | halt } }
if (%mp3file == %temp.nextname) { if ($dialog(mp3) != $null) { .did -c mp3 14 $calc(%g + 2) } | goto end }
goto loop
:end
%mp3file = $readini $mircdirsystem\mp3.ini MP3 $calc(%g + 1)
if ($exists(%mp3file)) { .splay -p %mp3file } | else { next.end2 }
}
alias next.end2 { .timer1342 1 1 next.end }
on *:MP3END:{ next.end }