1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function drawFill(posx, posy, sizex, sizey, tile)
	local tile = tile or 0
	local posx, posy = posx or 0, posy or 0
	local sizex, sizey = sizex or 3, sizey or 3
	
	for x = 0, sizex-1 do
		for y = 0, sizey-1 do
			parse("settile ".. x+posx .." ".. y+posy .." ".. tile)
		end
	end
end
addhook("say","timeout_test")
function timeout_test(id, txt)
	if txt:sub(1, 9) == "!settiles" then
		local num = txt:match("%d+") or 1
		
		msg("Setting N tiles: " .. num)
		
		drawFill(0, 0, num, num, math.random(1, map("tilecount")-1))
	end
end
!settiles 28 - and less must work