Forum




Does anyone have "Random Wall Spawn" script ?
2 replies



1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
local list = {1,2,3,4,5,6,7,8,9,11,12,15} for x = 0, map('xsize') do 	 for y = 0, map('ysize') do 		if tile(x, y, 'walkable') and tile(x, y, 'frame') ~= 0 then 			if math.random(1, 100) > 75 then 				parse('spawnobject '.. list[math.random(1, #list)] ..' '.. x ..' '.. y ..' 0 0 '.. math.random(0, 2) ..' 0') 			end 		end 	end end
Didn't tested it, but should work.
Edit: Crashing fixed, don't use this script on big maps.
edited 2×, last 17.02.13 11:09:50 am



