THE SUPER NUKE

  • peeps
    11th Feb 2012 Member 0 Permalink
    just an realistic copy of an asteroid inpact:it BLOWS UP EVERYTHING on the screen WHEN IMPACT.
    just copy the script and save it in AN SINGLE FILE,then dofile it in the console.

    tpt.el.elec.properties=0
    tpt.el.elec.heat=9999
    tpt.el.elec.airdrag=-20
    tpt.el.elec.menusection=3
    tpt.el.elec.name="DOOM"
    tpt.el.elec.description="Doomsday Nuke,clears everything"
    switch=0
    time=0

    math.randomseed(os.time())
    function doom(i, x, y, s, n)
    if tpt.get_property("tmp",i)==0 then
    tpt.parts[i].tmp=3
    randvel=math.random(-20,20)/10
    tpt.parts[i].vx=randvel
    tpt.parts[i].vy=math.sqrt(8-(randvel^2))
    end

    xvel=tpt.get_property("vx",i)/2
    yvel=tpt.get_property("vy",i)/2
    if yvel <= 0 or math.abs(xvel) > 1 then
    tpt.delete(i)
    end
    tpt.parts[i].tmp=tpt.parts[i].tmp+1
    if tpt.get_property("tmp",id)>=200 then
    tpt.parts[i].tmp=3
    end
    tpt.create(x-xvel,y-yvel,"firw")
    tpt.set_property("tmp",tpt.parts[i].tmp,x-xvel,y-yvel)
    tpt.set_property("life",140,x-xvel,y-yvel)
    tpt.create(x-(xvel*2),y-(yvel*2),"firw")
    tpt.set_property("tmp",tpt.parts[i].tmp,x-(xvel*2),y-(yvel*2))
    tpt.set_property("life",70,x-(xvel*2),y-(yvel*2))
    tpt.create(x-(xvel*3),y-(yvel*3),"bomb")
    tpt.set_property("tmp",1,x-(xvel*3),y-(yvel*3))
    tpt.set_property("life",70,x-(xvel*3),y-(yvel*3))
    for ox=x-2,x+2,1 do
    for oy=y-2,y+2,1 do
    if tpt.get_property("type",ox,oy)~=0 then
    if tpt.get_property("type",ox,oy)~=69 then
    if tpt.get_property("type",ox,oy)~=tpt.el.elec.id then
    if tpt.get_property("type",ox,oy)~=tpt.el.bomb.id then
    for px=0,611,1 do
    for py=0,383,1 do
    tpt.delete(px,py)
    switch=1
    end
    end
    end
    end
    end
    end
    end
    end
    tpt.drawstar(x,y,100,255,255,85)
    end
    tpt.element_func(doom, tpt.el.elec.id,1)
    function blast()
    if switch==1 then
    switch=0
    time=40
    end
    if timr~=0 then
    tpt.fillrect(0,0,611,383,255,255,255,time*6)
    time=time-1
    end
    end
    tpt.register_step(blast)
    function tpt.drawstar(x,y,l,r,g,b)
    --x-y-,x-y0,x-y+,x0y-,x0y+,x+y-,x+y0,x+y+
    bit=255/l
    for a=0,l,1 do
    tpt.drawpixel(x-a,y-a,r,g,b,255-(bit*a))
    end
    for bx=x,x-l,-1 do
    tpt.drawpixel(bx,y,r,g,b,255-(bit*(x-bx)))
    end
    for c=0,l,1 do
    tpt.drawpixel(x-c,y+c,r,g,b,255-(bit*c))
    end
    for dy=y,y-l,-1 do
    tpt.drawpixel(x,dy,r,g,b,255-(bit*(y-dy)))
    end
    for ey=y,y+l,1 do
    tpt.drawpixel(x,ey,r,g,b,255-(bit*(ey-y)))
    end
    for f=0,l,1 do
    tpt.drawpixel(x+f,y-f,r,g,b,255-(bit*f))
    end
    for gx=x,x+l,1 do
    tpt.drawpixel(gx,y,r,g,b,255-(bit*(gx-x)))
    end
    for h=0,l,1 do
    tpt.drawpixel(h+x,h+y,r,g,b,255-(bit*h))
    end
    end

    it also contains my new eight-direction star effect!
  • Shruggedmammel
    11th Feb 2012 Member 0 Permalink
    cool man
  • mniip
    11th Feb 2012 Developer 0 Permalink
  • MassacreLand
    11th Feb 2012 Member 0 Permalink
  • BlueAmulet
    11th Feb 2012 Member 0 Permalink

    Deleted

    Edited once by BlueAmulet. Last: 13th April
  • mniip
    11th Feb 2012 Developer 0 Permalink

    if tpt.get_property("type",ox,oy)~=0 then
    if tpt.get_property("type",ox,oy)~=69 then
    if tpt.get_property("type",ox,oy)~=tpt.el.elec.id then
    if tpt.get_property("type",ox,oy)~=tpt.el.bomb.id then
    switch=1
    end
    end
    end
    end



    if tpt.get_property("type",ox,oy)~=0 and tpt.get_property("type",ox,oy)~=69 and tpt.get_property("type",ox,oy)~=tpt.el.elec.id and tpt.get_property("type",ox,oy)~=tpt.el.bomb.id then
    switch=1
    end