$$loop row as speechdata index as speechindex select count(*) from speechdata where playerindex='%%player.playerindex%%'$$
$$speechcount=speechdata.0$$
$$endloop$$
$$if (speechcount !EQUALS "0")$$
| Last $$MAXSPEECHLINES$$ Quotes |
$$loop row as speechdata index as speechindex select count(*),* from speechdata where playerindex='%%player.playerindex%%' group by speech order by count(*) desc limit %%MAXSPEECHLINES%%$$
$$coloured=colouredtext2html(speechdata.speech)$$
| $$coloured$$ |
$$endloop speech$$
$$endif$$