I like it :)
tpt.el.bomb.name="BNMT"
tpt.el.bomb.description="Burning Metal"
math.randomseed(os.time())
function splash(i, x, y, s, n)
if tpt.parts[i].life==0 then
tpt.parts[i].life=math.random(0,400)
end
if tpt.parts[i].tmp==0 then
tpt.parts[i].tmp=1
end
for xpos=x-1,x+1,1 do
for ypos=y-1,y+1,1 do
if tpt.get_property("type",xpos,ypos)~=0 and tpt.get_property("type",xpos,ypos)~=tpt.el.bomb.id then
if tpt.parts[i].life>=50 then
if tpt.parts[i].ctype<2 then --change this to 3 and it will cause CRAZY fireworks <br/> tpt.delete(i)
cindex=math.random(0,255)
for ox=x-1,x+1,1 do
for oy=y-1,y+1,1 do
if tpt.get_property("type",ox,oy)==0 then
tpt.create(ox,oy,tpt.el.bomb.id)
tpt.set_property("life",tpt.parts[i].life/2,ox,oy)
tpt.set_property("tmp",1,ox,oy)
tpt.set_property("ctype",tpt.parts[i].ctype+1,ox,oy)
tpt.set_property("vx",math.random(-8,8),ox,oy)
tpt.set_property("vy",math.random(-8,8),ox,oy)
tpt.set_property("temp",3300,ox,oy)
tpt.set_property("dcolour",math.floor(math.sin(cindex*3.14159/127.5)*128+128)+math.floor(math.sin(cindex*3.14159/127.5+2.0944)*128+128)*0x100+math.floor(math.sin(cindex*3.14159/127.5+4.1888)*128+128)*0x10000+0xff000000,ox,oy)
end
end
end
end
end
end
end
end
end
end
tpt.element_func(splash, tpt.el.bomb.id,1)