I'll give you the pseudocode, but you'll have to figure the rest out yourself.
Note: This won't work, it's false code.
for i = 1, if i is BIGGER than 25, ADD 1 to i, and do
chat: i
end
Again, this is pseudocode, which means false code. Figure the syntax of Torque out yourself.