// auto-transcompiled — see *.dnd.json for canonical truth
if(!global.mbout)
{
instance_destroy();
}



if(global.mbttopline == -1)
{

for(i = global.mb_total[1]-1; i >= 0; i -= 1)
{
if(global.mb_topic[i,2] == global.mb_cboard)
{
global.mb_ctindex[ti] = i;
ti += 1;
}
}
global.mb_ctopics = ti;
global.mbttopline = 0;

}

if(global.mb_level == 3 || global.mb_level == 4 || global.mb_level == 5 || global.mb_level == 6)
{
if(global.nselectid == 1)
{
global.lengthlimit = 700;
}
else
{
global.lengthlimit = 40;
}
}
else
{
global.lengthlimit = floor(global.mlheight/2)*global.maxlength;
}
