for i in 0...pokemon.maxRibbon
if pokemon.getRibbon(i)
imagepos.push(["Graphics/Pictures/ribbons",236+64*(coord%4),86+80*(coord/4).floor,
64*(i%8),64*(i/8).floor,64,64])
coord+=1
break if coord>=12
end
end
break if coord>=13#or more