Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --RCA's HUD
- --Please use cracker64's script manager
- --VER 12 UPDATE {Not Available At Current Time}
- --Version 3
- print("RCA's HUD")
- print("Version XII")
- print("Have Fun!")
- function DrawHUD()
- function mouseclicky(mousex, mousey, button, event)
- if (event == 1) then
- var5 = 1
- end
- if (event == 2) then
- var5 = 2
- end
- end
- function keyclicky(key, nkey, modifier, event)
- if (key == "." and event == 1) then
- var6 = 1
- else
- var6 = 2
- end
- if (key == "," and event == 1) then
- var7 = 1
- else
- var7 = 2
- end
- if (key == "z" and event == 1) then
- var8 = 1
- else
- var8 = 2
- end
- if (key == "=" and event == 1) then
- var10 = 1
- end
- if (key == "-" and event == 1) then
- var10 = 2
- end
- end
- tpt.register_keypress(keyclicky)
- tpt.register_mouseclick(mouseclicky)
- if var7 == 1 then
- var9 = 1
- end
- if var6 == 1 then
- var9 = 2
- end
- if var9 == 1 then
- vis1 = 0
- var10 = 2
- var8 = 1
- else
- vis1 = 200
- end
- if var10 == 1 then
- vis2 = 200
- else
- vis2 = 0
- end
- if var8 ~= 1 then
- vis3 = 150
- else
- vis3 = 0
- end
- if tpt.mousex >= 611 then
- x2 = 611
- else
- x2 = tpt.mousex
- end
- if tpt.mousey >= 383 then
- y2 = 383
- else
- y2 = tpt.mousey
- end
- local x, y = sim.adjustCoords(x2, y2)
- if tpt.get_property("type", x, y) >= 1 then
- ptype = tpt.element(tpt.get_property("type", x, y))
- else
- ptype = "Empty,"
- end
- if tpt.get_property("type", x, y) == 6 and tpt.get_property("ctype", x, y) >= 1 then
- ptype = "Molten"
- end
- if tpt.get_property("type", x, y) >= 1 then
- var1 = tpt.get_property("temp", x, y)-273.15
- else
- var1 = 293.15
- end
- local var2 = var1*100
- local var3 = math.floor(var2)/100
- if tpt.get_property("type", x, y) >= 1 then
- temp = var3
- else
- temp = "()"
- end
- if tpt.get_property("type", x, y) >= 1 then
- temp2 = math.floor(tpt.get_property("temp", x, y)*10)/10
- else
- temp2 = "()"
- end
- if tpt.get_property("type", x, y) >= 1 then
- var12312389 = tpt.get_property("ctype", x, y)
- end
- if tpt.get_property("type", x, y) >= 1 and var12312389 >= 0 and var12312389 < sim.PT_NUM then
- ctype = tpt.element(tpt.get_property("ctype", x, y))
- end
- if tpt.get_property("type", x, y) == 0 or tpt.get_property("ctype", x, y) < 1 then
- ctype = "()"
- end
- if x >= 609 then
- x1 = 609/4
- else
- x1 = x/4
- end
- if y >= 381 then
- y1 = 381/4
- else
- y1 = y/4
- end
- local var4 = sim.pressure(x1, y1)*100
- local var14 = math.floor(var4)/100
- if var14 == "nan" then
- pressure = "Infinite"
- else
- pressure = var14
- end
- local parts = tpt.get_numOfParts()
- if tpt.get_property("type", x, y) >= 1 then
- tmp = tpt.get_property("tmp", x, y)
- else
- tmp = "0"
- end
- if tpt.get_property("type", x, y) >= 1 then
- life = tpt.get_property("life", x, y)
- else
- life = "0"
- end
- if tpt.get_property("type", x, y) >= 1 then
- tmp2 = tpt.get_property("tmp2", x, y)
- else
- tmp2 = "0"
- end
- if tpt.get_property("type", x, y) >= 1 then
- var11 = tpt.get_property("vy", x, y)*1000
- else
- var11 = 0
- end
- if var11 <= 9999 or var11 <= -9999 then
- vy = math.floor(var11)/1000
- else
- vy = "Err(2)"
- end
- if tpt.get_property("type", x, y) >= 1 then
- var12 = tpt.get_property("vx", x, y)*1000
- else
- var12 = 0
- end
- if var12 <= 9999 or var12 <= -9999 then
- vx = math.floor(var12)/1000
- else
- vx = "Err(1)"
- end
- local rclr = 0
- local draw = graphics.drawText
- local rect = graphics.fillRect
- rect(398, 13, 187, 12, 55, 55, 55, vis1)
- rect(398, 27, 200, 12, 55, 55, 55, vis1)
- rect(14, 13, 210, 12, 55, 55, 55, vis1)
- rect(398, 41, 180, 12, 55, 55, 55, vis2)
- --{MAY BE USEFUL LATER???}graphics.drawText(6, 6, os.date("%a %b %d, %l:%M:%S %p"), 0, 255, 165, 200)
- draw(16, 15, os.date(), rclr, 255, 165, vis1)
- draw(250, 6, "</> Turn HUD On/Off", rclr, 255, 165, vis3)
- draw(250, 16, "-/+ Extra On/Off", rclr, 255, 165, vis3)
- draw(550, 30, x, rclr, 255, 165, vis1)
- draw(578, 30, y, rclr, 255, 165, vis1)
- draw(541, 30, "X:", rclr, 255, 165, vis1)
- draw(570, 30, "Y:", rclr, 255, 165, vis1)
- draw(435, 15, ctype, rclr, 255, 165, vis1)
- draw(400, 15, ptype, rclr, 255, 165, vis1)
- draw(558, 15, pressure, rclr, 255, 165, vis1)
- draw(465, 15, "Temp:", rclr, 255, 165, vis1)
- draw(465, 30, "Tmp:", rclr, 255, 165, vis1)
- draw(400, 30, "Life:", rclr, 255, 165, vis1)
- draw(535, 15, "Pres:", rclr, 255, 165, vis1)
- draw(160, 15, "Parts:", rclr, 255, 165, vis1)
- draw(490, 15, temp, rclr, 255, 165, vis1)
- draw(485, 30, tmp, rclr, 255, 165, vis1)
- draw(422, 30, life, rclr, 255, 165, vis1)
- draw(187, 15, parts, rclr, 255, 165, vis1)
- draw(400, 44, "Tmp2:", rclr, 255, 165, vis2)
- draw(426, 44, tmp2, rclr, 255, 165, vis2)
- draw(465, 44, "VX:", rclr, 255, 165, vis2)
- draw(535, 44, "VY:", rclr, 255, 165, vis2)
- draw(480, 44, vx, rclr, 255, 165, vis2)
- draw(550, 44, vy, rclr, 255, 165, vis2)
- --Useful for programming, shows an element's number (Not name) at mouse X, Y. By default is commented out.
- --draw(550, 54, tpt.get_property("type", x, y), 0, 255, 165, 200)
- end
- tpt.hud(0)
- tpt.register_step(DrawHUD)
- function keyclicky(key, nkey, modifier, event)
- if (key == "m" and event == 1) then
- rtemp = 1
- end
- end
- tpt.register_keypress(keyclicky)
- local counter = 0
- function resettemp()
- counter = (counter + 1)%5
- if counter == 0 and rtemp == 1 then
- sim.resetTemp()
- tpt.set_property("temp", 293.15, "wtrv")
- warning = 1
- end
- if warning == 1 then
- graphics.fillRect(14, 27, 219,12, 55, 55, 55, 200)
- graphics.drawText(16, 29, "Realistic Mode Enabled (M) Restart To Reset", 0, 255, 165, 200)
- end
- end
- tpt.register_step(resettemp)
- function moo(i, x, y, surround_space, nt)
- if sim.pressure(x/4, y/4)<-7 and sim.partProperty(i, sim.FIELD_LIFE)~=0 and surround_space~=0 then
- sim.partCreate(-1, x+math.random(-3,3), y+math.random(-3,3), elem.DEFAULT_PT_ELEC) end
- end
- tpt.element_func(moo, tpt.el.tung.id, 0)
- tpt.el.tung.description="Tungsten. Brittle metal with a very high melting point. When sparked under a pressure of -7, emits electrons."
- --X-Laser
- --[[local TASR = elements.allocate("RCA", "XASR")
- elements.element(TASR, elements.element(elements.DEFAULT_PT_ARAY))
- elements.property(TASR, "Name", "XASR")
- elements.property(TASR, "Description", "X-Laser. Works like ARAY. Passes through everything.")
- elements.property(TASR, "Colour", 0xE37100)
- elements.property(TASR, "HeatConduct", 1)
- function TASR_update(i, x, y, surround_space, nt)
- if tpt.get_property("type", x-1, y) == 15 then
- sim.createLine(x+1, y, x+700, y, 0, 0, 127)
- end
- if tpt.get_property("type", x-1, y-1) == 15 then
- sim.createLine(x+1, y+1, x+700, y+700, 0, 0, 127)
- end
- if tpt.get_property("type", x, y-1) == 15 then
- sim.createLine(x, y+1, x, y+700, 0, 0, 127)
- end
- if tpt.get_property("type", x+1, y-1) == 15 then
- sim.createLine(x-1, y+1, x-700, y+700, 0, 0, 127)
- end
- if tpt.get_property("type", x+1, y) == 15 then
- sim.createLine(x-1, y, x-700, y, 0, 0, 127)
- end
- if tpt.get_property("type", x+1, y+1) == 15 then
- sim.createLine(x-1, y-1, x-700, y-700, 0, 0, 127)
- end
- if tpt.get_property("type", x, y+1) == 15 then
- sim.createLine(x, y-1, x, y-700, 0, 0, 127)
- end
- if tpt.get_property("type", x-1, y+1) == 15 then
- sim.createLine(x+1, y-1, x+700, y-700, 0, 0, 127)
- end
- end
- tpt.element_func(TASR_update, TASR)]]--
- --LASR
- --[[local LASR = elements.allocate("RCA", "LASR")
- elements.element(elements.RCA_PT_LASR, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(elements.RCA_PT_LASR, "Name", "LASR")
- elements.property(elements.RCA_PT_LASR, "Description", "Laser.")
- elements.property(elements.RCA_PT_LASR, "Colour", 0x940002)
- elements.property(elements.RCA_PT_LASR, "MenuSection", elem.SC_NUCLEAR)
- elements.property(elements.RCA_PT_LASR, "MenuVisible", 1)
- elements.property(elements.RCA_PT_LASR, "Temperature", 2000)
- --elements.property(elements.RCA_PT_LASR, "Life", 1)
- --elements.property(elements.RCA_PT_LASR, "HighTemperature", 7000)
- function LASR_update(i, x, y, surround_space, nt)
- function keyclicky(key, nkey, modifier, event)
- if (key == "275" and event == 1) then
- rght = 1
- else
- rght = 2
- end
- end
- tpt.register_keypress(keyclicky)
- if rght == 1 then
- tpt.parts[i].vx=5
- else
- tpt.parts[i].vx=0
- end
- xvel=tpt.parts[i].vx
- yvel=tpt.parts[i].vy
- xpos=x+xvel
- ypos=y+yvel
- if xpos >= 608 then
- tpt.delete(i)
- end
- if ypos >= 380 then
- tpt.delete(i)
- end
- end
- tpt.element_func(LASR_update, LASR)]]
- --METR Element
- local METR = elements.allocate("ELEMENT", "METR")
- elements.element(elements.ELEMENT_PT_METR, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(elements.ELEMENT_PT_METR, "Name", "METR")
- elements.property(elements.ELEMENT_PT_METR, "Description", "Meteors, Explode on impact. Use sparingly.")
- elements.property(elements.ELEMENT_PT_METR, "Colour", 0xFF7A0002)
- elements.property(elements.ELEMENT_PT_METR, "MenuSection", elem.SC_EXPLOSIVE)
- elements.property(elements.ELEMENT_PT_METR, "MenuVisible", 1)
- elements.property(elements.ELEMENT_PT_METR, "Weight", 100)
- elements.property(elements.ELEMENT_PT_METR, "Temperature", 9999)
- local function graphics1(i, colr, colg, colb)
- return 1,0x00010000,255,225,0,210,255,255,255,255
- end
- tpt.graphics_func(graphics1,METR)
- local function get_property(prop, x, y)
- if x >= 0 and x < sim.XRES and y >=0 and y < sim.YRES then
- return tpt.get_property(prop, x, y)
- end
- return 0
- end
- math.randomseed(os.time())
- function metr_update(i, x, y, s, n)
- if tpt.get_property("tmp",i)==0 then
- tpt.parts[i].tmp=1
- 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
- xpos=x-xvel
- ypos=y-yvel
- elemtype=get_property("type",xpos,ypos)
- if elemtype == 0 then
- tpt.create(xpos,ypos,"bray")
- tpt.set_property("temp",5000,xpos,ypos)
- end
- tpt.parts[i].temp=9999
- elemtype25=get_property("type",x+xvel*5,y+yvel*5)
- elemtype24=get_property("type",x+xvel*4,y+yvel*4)
- elemtype23=get_property("type",x+xvel*3,y+yvel*3)
- elemtype22=get_property("type",x+xvel*2,y+yvel*2)
- elemtype21=get_property("type",x+xvel,y+yvel)
- if elemtype25 ~= 0 and elemtype25 ~= elements.ELEMENT_PT_METR and elemtype25 ~= tpt.el.bray.id and elemtype25 ~= tpt.el.dmnd.id and elemtype25 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype24 ~= 0 and elemtype24 ~= elements.ELEMENT_PT_METR and elemtype24 ~= tpt.el.bray.id and elemtype24 ~= tpt.el.dmnd.id and elemtype24 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype23 ~= 0 and elemtype23 ~= elements.ELEMENT_PT_METR and elemtype23 ~= tpt.el.bray.id and elemtype23 ~= tpt.el.dmnd.id and elemtype23 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype22 ~= 0 and elemtype22 ~= elements.ELEMENT_PT_METR and elemtype22 ~= tpt.el.bray.id and elemtype22 ~= tpt.el.dmnd.id and elemtype22 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype21 ~= 0 and elemtype21 ~= elements.ELEMENT_PT_METR and elemtype21 ~= tpt.el.bray.id and elemtype21 ~= tpt.el.dmnd.id and elemtype21 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- end
- end
- tpt.element_func(metr_update, elements.ELEMENT_PT_METR,1)
- --BMBR Element {RCA}
- local BMBR = elements.allocate("ELEMENT", "BMBR")
- elements.element(elements.ELEMENT_PT_BMBR, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(elements.ELEMENT_PT_BMBR, "Name", "BMBR")
- elements.property(elements.ELEMENT_PT_BMBR, "Description", "Right Shooting Bomb.")
- elements.property(elements.ELEMENT_PT_BMBR, "Colour", 0xFF31CBD9)
- elements.property(elements.ELEMENT_PT_BMBR, "MenuSection", elem.SC_EXPLOSIVE)
- elements.property(elements.ELEMENT_PT_BMBR, "MenuVisible", 1)
- elements.property(elements.ELEMENT_PT_BMBR, "Weight", 100)
- elements.property(elements.ELEMENT_PT_BMBR, "Temperature", 9999)
- local function graphics1(i, colr, colg, colb)
- return 1,0x00010000,255,225,0,210,255,255,255,255
- end
- tpt.graphics_func(graphics1,BMBR)
- local function get_property(prop, x, y)
- if x >= 0 and x < sim.XRES and y >=0 and y < sim.YRES then
- return tpt.get_property(prop, x, y)
- end
- return 0
- end
- math.randomseed(os.time())
- function BMBR_update(i, x, y, s, n)
- if tpt.get_property("tmp",i)==0 then
- tpt.parts[i].tmp=1
- --randvel=math.random(-20,20)/10
- tpt.parts[i].vx=3
- tpt.parts[i].vy=0
- end
- xvel=3
- yvel=0
- if math.abs(xvel) < 1 then
- tpt.delete(i)
- end
- xpos=x-xvel
- ypos=y-yvel
- elemtype=get_property("type",xpos,ypos)
- if elemtype == 0 then
- tpt.create(xpos,ypos,"bray")
- tpt.set_property("temp",5000,xpos,ypos)
- end
- tpt.parts[i].temp=9999
- elemtype25=get_property("type",x+xvel*5,y+yvel*5)
- elemtype24=get_property("type",x+xvel*4,y+yvel*4)
- elemtype23=get_property("type",x+xvel*3,y+yvel*3)
- elemtype22=get_property("type",x+xvel*2,y+yvel*2)
- elemtype21=get_property("type",x+xvel,y+yvel)
- if elemtype25 ~= 0 and elemtype25 ~= elements.ELEMENT_PT_BMBR and elemtype25 ~= tpt.el.bray.id and elemtype25 ~= tpt.el.dmnd.id and elemtype25 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype24 ~= 0 and elemtype24 ~= elements.ELEMENT_PT_BMBR and elemtype24 ~= tpt.el.bray.id and elemtype24 ~= tpt.el.dmnd.id and elemtype24 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype23 ~= 0 and elemtype23 ~= elements.ELEMENT_PT_BMBR and elemtype23 ~= tpt.el.bray.id and elemtype23 ~= tpt.el.dmnd.id and elemtype23 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype22 ~= 0 and elemtype22 ~= elements.ELEMENT_PT_BMBR and elemtype22 ~= tpt.el.bray.id and elemtype22 ~= tpt.el.dmnd.id and elemtype22 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype21 ~= 0 and elemtype21 ~= elements.ELEMENT_PT_BMBR and elemtype21 ~= tpt.el.bray.id and elemtype21 ~= tpt.el.dmnd.id and elemtype21 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- end
- end
- tpt.element_func(BMBR_update, elements.ELEMENT_PT_BMBR,1)
- --BMBL Element {RCA}
- local BMBL = elements.allocate("ELEMENT", "BMBL")
- elements.element(elements.ELEMENT_PT_BMBL, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(elements.ELEMENT_PT_BMBL, "Name", "BMBL")
- elements.property(elements.ELEMENT_PT_BMBL, "Description", "Left Shooting Bomb.")
- elements.property(elements.ELEMENT_PT_BMBL, "Colour", 0xFF20878E)
- elements.property(elements.ELEMENT_PT_BMBL, "MenuSection", elem.SC_EXPLOSIVE)
- elements.property(elements.ELEMENT_PT_BMBL, "MenuVisible", 1)
- elements.property(elements.ELEMENT_PT_BMBL, "Weight", 100)
- elements.property(elements.ELEMENT_PT_BMBL, "Temperature", 9999)
- local function graphics1(i, colr, colg, colb)
- return 1,0x00010000,255,225,0,210,255,255,255,255
- end
- tpt.graphics_func(graphics1,BMBL)
- local function get_property(prop, x, y)
- if x >= 0 and x < sim.XRES and y >=0 and y < sim.YRES then
- return tpt.get_property(prop, x, y)
- end
- return 0
- end
- math.randomseed(os.time())
- function BMBL_update(i, x, y, s, n)
- if tpt.get_property("tmp",i)==0 then
- tpt.parts[i].tmp=1
- --randvel=math.random(-20,20)/10
- tpt.parts[i].vx=-3
- tpt.parts[i].vy=0
- end
- xvel=-3
- yvel=0
- if math.abs(xvel) < 1 then
- tpt.delete(i)
- end
- xpos=x-xvel
- ypos=y-yvel
- elemtype=get_property("type",xpos,ypos)
- if elemtype == 0 then
- tpt.create(xpos,ypos,"bray")
- tpt.set_property("temp",5000,xpos,ypos)
- end
- tpt.parts[i].temp=9999
- elemtype25=get_property("type",x+xvel*5,y+yvel*5)
- elemtype24=get_property("type",x+xvel*4,y+yvel*4)
- elemtype23=get_property("type",x+xvel*3,y+yvel*3)
- elemtype22=get_property("type",x+xvel*2,y+yvel*2)
- elemtype21=get_property("type",x+xvel,y+yvel)
- if elemtype25 ~= 0 and elemtype25 ~= elements.ELEMENT_PT_BMBL and elemtype25 ~= tpt.el.bray.id and elemtype25 ~= tpt.el.dmnd.id and elemtype25 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype24 ~= 0 and elemtype24 ~= elements.ELEMENT_PT_BMBL and elemtype24 ~= tpt.el.bray.id and elemtype24 ~= tpt.el.dmnd.id and elemtype24 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype23 ~= 0 and elemtype23 ~= elements.ELEMENT_PT_BMBL and elemtype23 ~= tpt.el.bray.id and elemtype23 ~= tpt.el.dmnd.id and elemtype23 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype22 ~= 0 and elemtype22 ~= elements.ELEMENT_PT_BMBL and elemtype22 ~= tpt.el.bray.id and elemtype22 ~= tpt.el.dmnd.id and elemtype22 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype21 ~= 0 and elemtype21 ~= elements.ELEMENT_PT_BMBL and elemtype21 ~= tpt.el.bray.id and elemtype21 ~= tpt.el.dmnd.id and elemtype21 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- end
- end
- tpt.element_func(BMBL_update, elements.ELEMENT_PT_BMBL,1)
- --MRTR {RCA}
- local MRTR = elements.allocate("ELEMENT", "MRTR")
- elements.element(elements.ELEMENT_PT_MRTR, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(elements.ELEMENT_PT_MRTR, "Name", "MRTR")
- elements.property(elements.ELEMENT_PT_MRTR, "Description", "Mortar Right.")
- elements.property(elements.ELEMENT_PT_MRTR, "Colour", 0xFF2E01E3)
- elements.property(elements.ELEMENT_PT_MRTR, "MenuSection", elem.SC_EXPLOSIVE)
- elements.property(elements.ELEMENT_PT_MRTR, "MenuVisible", 1)
- elements.property(elements.ELEMENT_PT_MRTR, "Weight", 100)
- elements.property(elements.ELEMENT_PT_MRTR, "Temperature", 9999)
- local function graphics1(i, colr, colg, colb)
- return 1,0x00010000,255,225,0,210,255,255,255,255
- end
- tpt.graphics_func(graphics1,MRTR)
- local function get_property(prop, x, y)
- if x >= 0 and x < sim.XRES and y >=0 and y < sim.YRES then
- return tpt.get_property(prop, x, y)
- end
- return 0
- end
- math.randomseed(os.time())
- function MRTR_update(i, x, y, s, n)
- if tpt.get_property("tmp",i)==0 then
- tpt.parts[i].tmp=1
- --randvel=math.random(-20,20)/10
- tpt.parts[i].vx=3
- tpt.parts[i].vy=3
- end
- xvel=3
- yvel=3
- if math.abs(xvel) < 1 then
- tpt.delete(i)
- end
- xpos=x-xvel
- ypos=y-yvel
- elemtype=get_property("type",xpos,ypos)
- if elemtype == 0 then
- tpt.create(xpos,ypos,"bray")
- tpt.set_property("temp",5000,xpos,ypos)
- end
- tpt.parts[i].temp=9999
- elemtype25=get_property("type",x+xvel*5,y+yvel*5)
- elemtype24=get_property("type",x+xvel*4,y+yvel*4)
- elemtype23=get_property("type",x+xvel*3,y+yvel*3)
- elemtype22=get_property("type",x+xvel*2,y+yvel*2)
- elemtype21=get_property("type",x+xvel,y+yvel)
- if elemtype25 ~= 0 and elemtype25 ~= elements.ELEMENT_PT_MRTR and elemtype25 ~= tpt.el.bray.id and elemtype25 ~= tpt.el.dmnd.id and elemtype25 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype24 ~= 0 and elemtype24 ~= elements.ELEMENT_PT_MRTR and elemtype24 ~= tpt.el.bray.id and elemtype24 ~= tpt.el.dmnd.id and elemtype24 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype23 ~= 0 and elemtype23 ~= elements.ELEMENT_PT_MRTR and elemtype23 ~= tpt.el.bray.id and elemtype23 ~= tpt.el.dmnd.id and elemtype23 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype22 ~= 0 and elemtype22 ~= elements.ELEMENT_PT_MRTR and elemtype22 ~= tpt.el.bray.id and elemtype22 ~= tpt.el.dmnd.id and elemtype22 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype21 ~= 0 and elemtype21 ~= elements.ELEMENT_PT_MRTR and elemtype21 ~= tpt.el.bray.id and elemtype21 ~= tpt.el.dmnd.id and elemtype21 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- end
- end
- tpt.element_func(MRTR_update, elements.ELEMENT_PT_MRTR,1)
- --MRTL {RCA}
- local MRTL = elements.allocate("ELEMENT", "MRTL")
- elements.element(elements.ELEMENT_PT_MRTL, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(elements.ELEMENT_PT_MRTL, "Name", "MRTL")
- elements.property(elements.ELEMENT_PT_MRTL, "Description", "Motar Left.")
- elements.property(elements.ELEMENT_PT_MRTL, "Colour", 0xFF5068E4)
- elements.property(elements.ELEMENT_PT_MRTL, "MenuSection", elem.SC_EXPLOSIVE)
- elements.property(elements.ELEMENT_PT_MRTL, "MenuVisible", 1)
- elements.property(elements.ELEMENT_PT_MRTL, "Weight", 100)
- elements.property(elements.ELEMENT_PT_MRTL, "Temperature", 9999)
- local function graphics1(i, colr, colg, colb)
- return 1,0x00010000,255,225,0,210,255,255,255,255
- end
- tpt.graphics_func(graphics1,MRTL)
- local function get_property(prop, x, y)
- if x >= 0 and x < sim.XRES and y >=0 and y < sim.YRES then
- return tpt.get_property(prop, x, y)
- end
- return 0
- end
- math.randomseed(os.time())
- function MRTL_update(i, x, y, s, n)
- if tpt.get_property("tmp",i)==0 then
- tpt.parts[i].tmp=1
- --randvel=math.random(-20,20)/10
- tpt.parts[i].vx=-3
- tpt.parts[i].vy=3
- end
- xvel=-3
- yvel=3
- if math.abs(xvel) < 1 then
- tpt.delete(i)
- end
- xpos=x-xvel
- ypos=y-yvel
- elemtype=get_property("type",xpos,ypos)
- if elemtype == 0 then
- tpt.create(xpos,ypos,"bray")
- tpt.set_property("temp",5000,xpos,ypos)
- end
- tpt.parts[i].temp=9999
- elemtype25=get_property("type",x+xvel*5,y+yvel*5)
- elemtype24=get_property("type",x+xvel*4,y+yvel*4)
- elemtype23=get_property("type",x+xvel*3,y+yvel*3)
- elemtype22=get_property("type",x+xvel*2,y+yvel*2)
- elemtype21=get_property("type",x+xvel,y+yvel)
- if elemtype25 ~= 0 and elemtype25 ~= elements.ELEMENT_PT_MRTL and elemtype25 ~= tpt.el.bray.id and elemtype25 ~= tpt.el.dmnd.id and elemtype25 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype24 ~= 0 and elemtype24 ~= elements.ELEMENT_PT_MRTL and elemtype24 ~= tpt.el.bray.id and elemtype24 ~= tpt.el.dmnd.id and elemtype24 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype23 ~= 0 and elemtype23 ~= elements.ELEMENT_PT_MRTL and elemtype23 ~= tpt.el.bray.id and elemtype23 ~= tpt.el.dmnd.id and elemtype23 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype22 ~= 0 and elemtype22 ~= elements.ELEMENT_PT_MRTL and elemtype22 ~= tpt.el.bray.id and elemtype22 ~= tpt.el.dmnd.id and elemtype22 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype21 ~= 0 and elemtype21 ~= elements.ELEMENT_PT_MRTL and elemtype21 ~= tpt.el.bray.id and elemtype21 ~= tpt.el.dmnd.id and elemtype21 ~= tpt.el.void.id then
- tpt.set_property("type","bomb",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- end
- end
- tpt.element_func(MRTL_update, elements.ELEMENT_PT_MRTL,1)
- --PLSM Copy For Explosives {RCA}
- local RCA1 = elements.allocate("RCA", "IGNT")
- elements.element(elements.RCA_PT_IGNT, elements.element(elements.DEFAULT_PT_GAS))
- elements.property(elements.RCA_PT_IGNT, "Name", "IGNT")
- elements.property(elements.RCA_PT_IGNT, "Description", "Igniter. Use to ignite explosives, hotter than fire.")
- elements.property(elements.RCA_PT_IGNT, "Colour", 0xFFE52961)
- elements.property(elements.RCA_PT_IGNT, "MenuSection", 5)
- elements.property(elements.RCA_PT_IGNT, "MenuVisible", 1)
- elements.property(elements.RCA_PT_IGNT, "Temperature", 5000)
- elements.property(elements.RCA_PT_IGNT, "Weight", 0)
- elements.property(elements.RCA_PT_IGNT, "Flammable", 1)
- elements.property(elements.RCA_PT_IGNT, "Explosive", 0)
- local TLRY = elements.allocate("RCA", "TLRY")
- elements.element(elements.RCA_PT_TLRY, elements.element(elements.DEFAULT_PT_BOMB))
- elements.property(elements.RCA_PT_TLRY, "Name", "TLRY")
- elements.property(elements.RCA_PT_TLRY, "MenuSection", elem.SC_EXPLOSIVE)
- elements.property(elements.RCA_PT_TLRY, "Description", "Artillery shell.")
- elements.property(elements.RCA_PT_TLRY, "Colour", 0x6E6E6E)
- elements.property(elements.RCA_PT_TLRY, "HeatConduct", 1)
- elements.property(elements.RCA_PT_TLRY, "Temperature", 9999)
- function TLRY_update(i, x, y, surround_space, nt)
- if tpt.get_property("type", x+1, y-1) > 0 and tpt.get_property("type", x+1, y-1) < 247 or
- tpt.get_property("type", x+1, y) > 0 and tpt.get_property("type", x+1, y) < 247 or
- tpt.get_property("type", x+1, y+1) > 0 and tpt.get_property("type", x+1, y+1) < 247 or
- tpt.get_property("type", x, y+1) > 0 and tpt.get_property("type", x, y+1) < 247 or
- tpt.get_property("type", x, y-1) > 0 and tpt.get_property("type", x, y-1) < 247 or
- tpt.get_property("type", x-1, y-1) > 0 and tpt.get_property("type", x-1, y-1) < 247 or
- tpt.get_property("type", x-1, y) > 0 and tpt.get_property("type", x-1, y) < 247 or
- tpt.get_property("type", x-1, y+1) > 0 and tpt.get_property("type", x-1, y+1) < 247 then
- sim.createParts(x, y, 3, 3, 247, 0, 0)
- sim.createParts(x, y, 5, 5, 4, 0, 1)
- sim.pressure(x/4,y/4,3)
- tpt.set_property("life", 3, "xpls")
- end
- end
- tpt.element_func(TLRY_update, TLRY)
- local XPLS = elements.allocate("RCA", "XPLS")
- elements.element(elements.RCA_PT_XPLS, elements.element(elements.DEFAULT_PT_NEUT))
- elements.property(elements.RCA_PT_XPLS, "Name", "XPLS")
- elements.property(elements.RCA_PT_XPLS, "MenuVisible", 0)
- elements.property(elements.RCA_PT_XPLS, "Description", "UHhh.")
- elements.property(elements.RCA_PT_XPLS, "Colour", 0xFF9900)
- elements.property(elements.RCA_PT_XPLS, "Temperature", 9999)
- elements.property(elements.RCA_PT_XPLS, "Diffusion", 2)
- elements.property(elements.RCA_PT_XPLS, "HeatConduct", 9999)
- function XPLS_update(i, x, y, s, surround_space, n, nt)
- end
- local function graphics1(i, colr, colg, colb)
- return 1,0x00010020,255,255,0,0,255,255,98,9
- end
- tpt.graphics_func(graphics1,XPLS)
- local TLYL = elements.allocate("ELEMENT", "TLYL")
- elements.element(elements.ELEMENT_PT_TLYL, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(elements.ELEMENT_PT_TLYL, "Name", "TLYL")
- elements.property(elements.ELEMENT_PT_TLYL, "Description", "Motar Left.")
- elements.property(elements.ELEMENT_PT_TLYL, "Colour", 0xFF5068E4)
- elements.property(elements.ELEMENT_PT_TLYL, "MenuSection", elem.SC_EXPLOSIVE)
- elements.property(elements.ELEMENT_PT_TLYL, "MenuVisible", 1)
- elements.property(elements.ELEMENT_PT_TLYL, "Weight", 100)
- elements.property(elements.ELEMENT_PT_TLYL, "Temperature", 9999)
- local function graphics1(i, colr, colg, colb)
- return 1,0x00010000,255,225,0,210,255,255,255,255
- end
- tpt.graphics_func(graphics1,TLYL)
- local function get_property(prop, x, y)
- if x >= 0 and x < sim.XRES and y >=0 and y < sim.YRES then
- return tpt.get_property(prop, x, y)
- end
- return 0
- end
- math.randomseed(os.time())
- function TLYL_update(i, x, y, s, n)
- if tpt.get_property("tmp",i)==0 then
- tpt.parts[i].tmp=1
- --randvel=math.random(-20,20)/10
- tpt.parts[i].vx=-3
- tpt.parts[i].vy=3
- end
- xvel=-3
- yvel=3
- if math.abs(xvel) < 1 then
- tpt.delete(i)
- end
- xpos=x-xvel
- ypos=y-yvel
- elemtype=get_property("type",xpos,ypos)
- if elemtype == 0 then
- tpt.create(xpos,ypos,"bray")
- tpt.set_property("temp",5000,xpos,ypos)
- end
- tpt.parts[i].temp=9999
- elemtype25=get_property("type",x+xvel*5,y+yvel*5)
- elemtype24=get_property("type",x+xvel*4,y+yvel*4)
- elemtype23=get_property("type",x+xvel*3,y+yvel*3)
- elemtype22=get_property("type",x+xvel*2,y+yvel*2)
- elemtype21=get_property("type",x+xvel,y+yvel)
- if elemtype25 ~= 0 and elemtype25 ~= elements.ELEMENT_PT_TLYL and elemtype25 ~= tpt.el.bray.id and elemtype25 ~= tpt.el.dmnd.id and elemtype25 ~= tpt.el.void.id then
- tpt.set_property("type","tlry",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype24 ~= 0 and elemtype24 ~= elements.ELEMENT_PT_TLYL and elemtype24 ~= tpt.el.bray.id and elemtype24 ~= tpt.el.dmnd.id and elemtype24 ~= tpt.el.void.id then
- tpt.set_property("type","tlry",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype23 ~= 0 and elemtype23 ~= elements.ELEMENT_PT_TLYL and elemtype23 ~= tpt.el.bray.id and elemtype23 ~= tpt.el.dmnd.id and elemtype23 ~= tpt.el.void.id then
- tpt.set_property("type","tlry",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype22 ~= 0 and elemtype22 ~= elements.ELEMENT_PT_TLYL and elemtype22 ~= tpt.el.bray.id and elemtype22 ~= tpt.el.dmnd.id and elemtype22 ~= tpt.el.void.id then
- tpt.set_property("type","tlry",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype21 ~= 0 and elemtype21 ~= elements.ELEMENT_PT_TLYL and elemtype21 ~= tpt.el.bray.id and elemtype21 ~= tpt.el.dmnd.id and elemtype21 ~= tpt.el.void.id then
- tpt.set_property("type","tlry",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- end
- end
- tpt.element_func(TLYL_update, elements.ELEMENT_PT_TLYL,1)
- local TLYR = elements.allocate("ELEMENT", "TLYR")
- elements.element(elements.ELEMENT_PT_TLYR, elements.element(elements.DEFAULT_PT_ELEC))
- elements.property(elements.ELEMENT_PT_TLYR, "Name", "TLYR")
- elements.property(elements.ELEMENT_PT_TLYR, "Description", "Motar Left.")
- elements.property(elements.ELEMENT_PT_TLYR, "Colour", 0xFF5068E4)
- elements.property(elements.ELEMENT_PT_TLYR, "MenuSection", elem.SC_EXPLOSIVE)
- elements.property(elements.ELEMENT_PT_TLYR, "MenuVisible", 1)
- elements.property(elements.ELEMENT_PT_TLYR, "Weight", 100)
- elements.property(elements.ELEMENT_PT_TLYR, "Temperature", 9999)
- local function graphics1(i, colr, colg, colb)
- return 1,0x00010000,255,225,0,210,255,255,255,255
- end
- tpt.graphics_func(graphics1,TLYR)
- local function get_property(prop, x, y)
- if x >= 0 and x < sim.XRES and y >=0 and y < sim.YRES then
- return tpt.get_property(prop, x, y)
- end
- return 0
- end
- math.randomseed(os.time())
- function TLYR_update(i, x, y, s, n)
- if tpt.get_property("tmp",i)==0 then
- tpt.parts[i].tmp=1
- --randvel=math.random(-20,20)/10
- tpt.parts[i].vx=3
- tpt.parts[i].vy=3
- end
- xvel=3
- yvel=3
- if math.abs(xvel) < 1 then
- tpt.delete(i)
- end
- xpos=x-xvel
- ypos=y-yvel
- elemtype=get_property("type",xpos,ypos)
- if elemtype == 0 then
- tpt.create(xpos,ypos,"bray")
- tpt.set_property("temp",5000,xpos,ypos)
- end
- tpt.parts[i].temp=9999
- elemtype25=get_property("type",x+xvel*5,y+yvel*5)
- elemtype24=get_property("type",x+xvel*4,y+yvel*4)
- elemtype23=get_property("type",x+xvel*3,y+yvel*3)
- elemtype22=get_property("type",x+xvel*2,y+yvel*2)
- elemtype21=get_property("type",x+xvel,y+yvel)
- if elemtype25 ~= 0 and elemtype25 ~= elements.ELEMENT_PT_TLYR and elemtype25 ~= tpt.el.bray.id and elemtype25 ~= tpt.el.dmnd.id and elemtype25 ~= tpt.el.void.id then
- tpt.set_property("type","tlry",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype24 ~= 0 and elemtype24 ~= elements.ELEMENT_PT_TLYR and elemtype24 ~= tpt.el.bray.id and elemtype24 ~= tpt.el.dmnd.id and elemtype24 ~= tpt.el.void.id then
- tpt.set_property("type","tlry",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype23 ~= 0 and elemtype23 ~= elements.ELEMENT_PT_TLYR and elemtype23 ~= tpt.el.bray.id and elemtype23 ~= tpt.el.dmnd.id and elemtype23 ~= tpt.el.void.id then
- tpt.set_property("type","tlry",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype22 ~= 0 and elemtype22 ~= elements.ELEMENT_PT_TLYR and elemtype22 ~= tpt.el.bray.id and elemtype22 ~= tpt.el.dmnd.id and elemtype22 ~= tpt.el.void.id then
- tpt.set_property("type","tlry",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- elseif elemtype21 ~= 0 and elemtype21 ~= elements.ELEMENT_PT_TLYR and elemtype21 ~= tpt.el.bray.id and elemtype21 ~= tpt.el.dmnd.id and elemtype21 ~= tpt.el.void.id then
- tpt.set_property("type","tlry",i)
- tpt.set_property("life",0,i)
- tpt.set_property("tmp",0,i)
- end
- end
- tpt.element_func(TLYR_update, elements.ELEMENT_PT_TLYR,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement