1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
addhook("build", "_build")
addhook("objectkill", "_objectkill")
timers = {}
obj_times = {1000, 0, 2000, 3000, 4000, 3000, 5000, 5000, 5000, 0, 0, 0, 3000, 3000}
function wait(delay, func)
	local k = tostring(func):gsub("[^a-zA-Z0-9_]*", "_")
	timers[k] = function()
func()
timers[k] = nil
end
	timer(delay + 100, "timers." .. k)
end
function _build(id, _type, x, y, mode, obj_id)
wait(obj_times[_type], function()
if object(obj_id, "type") == _type then
msg(player(id, "name").." successfully built a "..object(obj_id, "typename").." at tile ["..x..","..y.."]")
end
end)
end
function _objectkill(id, pl)
if object(id, "type") == 10 then
msg(player(id, "name").."'s construction site was destroyed by "..(pl ~= 0 and player(pl, "name") or "a ghost"))
end
end