Advertisement
-Amy-

TPT'sMod Version 1 Update 0.5

Mar 26th, 2014
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 48.77 KB | None | 0 0
  1. --TPT's Mod (The Largest Lua Mod)
  2. --The largest mod on TPT
  3. --VER 1.01 http://pastebin.com/raw.php?i=ub0UxqAJ
  4. --Bump version number every release, and update URL (if changed)
  5.  
  6. --Version 1.01
  7.  
  8. function DrawHUD()
  9.  graphics.drawText(6, 6, os.date("%a %b %d, %l:%M:%S %p     Click CR Tab For Info/Credits"), 61, 200, 225, 200)
  10. end
  11.  
  12. tpt.register_step(DrawHUD)
  13.  
  14.  
  15. --TUNG Mod :D
  16.  
  17.  function moo(i, x, y, surround_space, nt)
  18.  if sim.pressure(x/4, y/4)<-7 and sim.partProperty(i, sim.FIELD_LIFE)~=0 and surround_space~=0 then
  19.  sim.partCreate(-1, x+math.random(-3,3), y+math.random(-3,3), elem.DEFAULT_PT_ELEC) end
  20.  end
  21.  tpt.element_func(moo, tpt.el.tung.id, 0)
  22.  
  23. tpt.el.tung.description="Tungsten. Brittle metal with a very high melting point. When sparked under a pressure of -50, emits electrons."
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32. --METR Element
  33.  
  34. --[[tpt.el.elec.properties=0
  35. tpt.el.elec.heat=9999
  36. tpt.el.elec.airdrag=30
  37. tpt.el.elec.menusection=3
  38. tpt.el.elec.name="metr"
  39. tpt.el.elec.description="Meteor. Explodes on impact. Use sparingly."]]--
  40.  
  41. local METR = elements.allocate("ELEMENT", "METR")
  42. elements.element(elements.ELEMENT_PT_METR, elements.element(elements.DEFAULT_PT_ELEC))
  43. elements.property(elements.ELEMENT_PT_METR, "Name", "METR")
  44. elements.property(elements.ELEMENT_PT_METR, "Description", "Meteors, Explode on impact. Use sparingly.")
  45. elements.property(elements.ELEMENT_PT_METR, "Colour", 0xFF7A0002)
  46. elements.property(elements.ELEMENT_PT_METR, "MenuSection", elem.SC_EXPLOSIVE)
  47. elements.property(elements.ELEMENT_PT_METR, "MenuVisible", 1)
  48. --elements.property(elements.ELEMENT_PT_METR, "HotAir", -0.009)
  49. elements.property(elements.ELEMENT_PT_METR, "Weight", 100)
  50. elements.property(elements.ELEMENT_PT_METR, "Temperature", 9999)
  51. --elements.property(elements.ELEMENT_PT_METR, "HighPressure", 200)
  52. --elements.property(elements.ELEMENT_PT_METR, "HighPressureTransition", elements.DEFAULT_PT_LAVA)
  53. local function graphics1(i, colr, colg, colb)
  54.     return 1,0x00010000,255,225,0,210,255,255,255,255
  55. end
  56. tpt.graphics_func(graphics1,METR)
  57.  
  58. local function get_property(prop, x, y)
  59. if x >= 0 and x < sim.XRES and y >=0 and y < sim.YRES then
  60. return tpt.get_property(prop, x, y)
  61.  end
  62.     return 0
  63.     end
  64.  
  65.  
  66.  
  67.  
  68. math.randomseed(os.time())
  69. function metr_update(i, x, y, s, n)
  70.         if tpt.get_property("tmp",i)==0 then
  71.                 tpt.parts[i].tmp=1
  72.                 randvel=math.random(-20,20)/10
  73.                 tpt.parts[i].vx=randvel
  74.                 tpt.parts[i].vy=math.sqrt(8-(randvel^2))
  75.         end
  76.  
  77.         xvel=tpt.get_property("vx",i)/2
  78.         yvel=tpt.get_property("vy",i)/2
  79.         if yvel <= 0 or math.abs(xvel) > 1 then
  80.                 tpt.delete(i)
  81.  
  82.  
  83.         end
  84.  
  85.         xpos=x-xvel
  86.         ypos=y-yvel
  87.         elemtype=get_property("type",xpos,ypos)
  88.        
  89.         if elemtype == 0 then
  90.                 tpt.create(xpos,ypos,"bray")
  91.                 tpt.set_property("temp",5000,xpos,ypos)
  92.         end
  93.         tpt.parts[i].temp=9999
  94.  
  95.         elemtype25=get_property("type",x+xvel*5,y+yvel*5)
  96.         elemtype24=get_property("type",x+xvel*4,y+yvel*4)
  97.         elemtype23=get_property("type",x+xvel*3,y+yvel*3)
  98.         elemtype22=get_property("type",x+xvel*2,y+yvel*2)
  99.         elemtype21=get_property("type",x+xvel,y+yvel)
  100.         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
  101.                 tpt.set_property("type","bomb",i)
  102.                 tpt.set_property("life",0,i)
  103.                 tpt.set_property("tmp",0,i)
  104.  
  105.  
  106.         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
  107.                 tpt.set_property("type","bomb",i)
  108.                 tpt.set_property("life",0,i)
  109.                 tpt.set_property("tmp",0,i)
  110.         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
  111.                 tpt.set_property("type","bomb",i)
  112.                 tpt.set_property("life",0,i)
  113.                 tpt.set_property("tmp",0,i)
  114.         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
  115.                 tpt.set_property("type","bomb",i)
  116.                 tpt.set_property("life",0,i)
  117.                 tpt.set_property("tmp",0,i)
  118.         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
  119.                 tpt.set_property("type","bomb",i)
  120.                 tpt.set_property("life",0,i)
  121.                 tpt.set_property("tmp",0,i)
  122.         end
  123.                 end
  124.  
  125. --if x < 5 or x > 606 or y > 378 then
  126. --sim.partKill(i)
  127.    
  128.     --end
  129.  
  130. --sim.partKill(x < 5, y > 378)
  131.    
  132.  
  133.  
  134.  
  135.         --[[for scany = -4,4 do
  136.                 maxscanx=math.sqrt(1600-(scany^2))
  137.                 for scanx = -maxscanx,maxscanx do
  138.                         elemtype3 = tpt.get_property("type",x+scanx,y+scany)
  139.                         if elemtype3 ~= 0 and elemtype3 ~= elements.ELEMENT_PT_METR and elemtype3 ~= tpt.el.bray.id and elemtype3 ~= tpt.el.insl.id then
  140.                                 tpt.set_property("temp",tpt.get_property("temp",x+scanx,y+scany)+(19200/((scanx^2)+(scany^2))),x+scanx,y+scany)
  141.                         end
  142.                 end
  143.         end]]--
  144.  
  145.  
  146. tpt.element_func(metr_update, elements.ELEMENT_PT_METR,1)
  147.  
  148.  
  149.  
  150.  
  151. --BPDR Element
  152.  
  153. local element1 = elements.allocate("FEYNMAN", "BPDR")
  154. elements.element(elements.FEYNMAN_PT_BPDR, elements.element(elements.DEFAULT_PT_BCOL))
  155.  elements.property(elements.FEYNMAN_PT_BPDR, "Name", "BPDR")
  156.  elements.property(elements.FEYNMAN_PT_BPDR, "Description", "Black Powder, Very explosive.")
  157.  elements.property(elements.FEYNMAN_PT_BPDR, "Colour", 0x353535)
  158.  elements.property(elements.FEYNMAN_PT_BPDR, "MenuSection", 5)
  159.  elements.property(elements.FEYNMAN_PT_BPDR, "Gravity", .5)
  160.  elements.property(elements.FEYNMAN_PT_BPDR, "Flammable", 10000)
  161.  elements.property(elements.FEYNMAN_PT_BPDR, "Explosive", 1)
  162.  elements.property(elements.FEYNMAN_PT_BPDR, "Loss", 1)
  163.  elements.property(elements.FEYNMAN_PT_BPDR, "AirLoss", .5)
  164.  elements.property(elements.FEYNMAN_PT_BPDR, "AirDrag", .01)
  165.  elements.property(elements.FEYNMAN_PT_BPDR, "Advection", .01)
  166.  elements.property(elements.FEYNMAN_PT_BPDR, "Weight", 0)
  167.  elements.property(elements.FEYNMAN_PT_BPDR, "Diffusion", 0)
  168.  
  169. --Clouds Mod
  170.  
  171. local a = elements.allocate("MOD", "UCLD")
  172. elements.element(elements.MOD_PT_UCLD, elements.element(elements.DEFAULT_PT_HYGN))
  173. elements.property(elements.MOD_PT_UCLD, "Name", "UCLD")
  174. elements.property(elements.MOD_PT_UCLD, "Description", "Uranium Cloud. First type of radioactive cloud.")
  175. elements.property(elements.MOD_PT_UCLD, "Colour", 0xAAAAFF)
  176. elements.property(elements.MOD_PT_UCLD, "MenuSection", 10)
  177. elements.property(elements.MOD_PT_UCLD, "Gravity", 0)
  178. elements.property(elements.MOD_PT_UCLD, "Explosive", 0)
  179. elements.property(elements.MOD_PT_UCLD, "Weight", 0)
  180. elements.property(elements.MOD_PT_UCLD, "Diffusion", 1)
  181. elements.property(elements.MOD_PT_UCLD, "Hardness", 0)
  182. elements.property(elements.MOD_PT_UCLD, "Flammable", 0)
  183. elements.property(elements.MOD_PT_UCLD, "AirDrag", 0.01)
  184. function rain(i,x,y,s,n)
  185.         if math.random(1,500) < 5 then
  186.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'uran')
  187.     end
  188.         if math.random(1,500) == 20 then
  189.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'boyl')
  190.     end
  191. end
  192. tpt.element_func(rain,a)
  193.  
  194. local b = elements.allocate("MOD2", "RACD")
  195. elements.element(elements.MOD2_PT_RACD, elements.element(elements.DEFAULT_PT_HYGN))
  196. elements.property(elements.MOD2_PT_RACD, "Name", "RACD")
  197. elements.property(elements.MOD2_PT_RACD, "Description", "Rain Cloud.")
  198. elements.property(elements.MOD2_PT_RACD, "Colour", 0xA9ACB6)
  199. elements.property(elements.MOD2_PT_RACD, "MenuSection", 6)
  200. elements.property(elements.MOD2_PT_RACD, "Gravity", 0)
  201. elements.property(elements.MOD2_PT_RACD, "Explosive", 0)
  202. elements.property(elements.MOD2_PT_RACD, "Weight", 0)
  203. elements.property(elements.MOD2_PT_RACD, "Diffusion", 1)
  204. elements.property(elements.MOD2_PT_RACD, "Hardness", 0)
  205. elements.property(elements.MOD2_PT_RACD, "Flammable", 0)
  206. elements.property(elements.MOD2_PT_RACD, "AirDrag", 0.01)
  207. elements.property(elements.MOD2_PT_RACD, "LowTemperature", 273.15)
  208. elements.property(elements.MOD2_PT_RACD, "LowTemperatureTransition", "MOD_PT_SCLD")
  209. elements.property(elements.MOD2_PT_RACD, "Temperature", 295.15)
  210.  
  211.  
  212.  
  213.  
  214. function rain(i,x,y,s,n)
  215.     if math.random(1,500) == 20 then
  216.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'watr')
  217.    
  218.         end    
  219. end
  220. tpt.element_func(rain,b)
  221.  
  222. local c = elements.allocate("MOD3", "SCLD")
  223. elements.element(elements.MOD3_PT_SCLD, elements.element(elements.DEFAULT_PT_HYGN))
  224. elements.property(elements.MOD3_PT_SCLD, "Name", "SCLD")
  225. elements.property(elements.MOD3_PT_SCLD, "Description", "Snow Cloud.")
  226. elements.property(elements.MOD3_PT_SCLD, "Colour", 0x8F8FBC)
  227. elements.property(elements.MOD3_PT_SCLD, "MenuSection", 6)
  228. elements.property(elements.MOD3_PT_SCLD, "Gravity", 0)
  229. elements.property(elements.MOD3_PT_SCLD, "Explosive", 0)
  230. elements.property(elements.MOD3_PT_SCLD, "Weight", 0)
  231. elements.property(elements.MOD3_PT_SCLD, "Diffusion", 1)
  232. elements.property(elements.MOD3_PT_SCLD, "Hardness", 0)
  233. elements.property(elements.MOD3_PT_SCLD, "Flammable", 0)
  234. elements.property(elements.MOD3_PT_SCLD, "AirDrag", 0.01)
  235. elements.property(elements.MOD3_PT_SCLD, "HighTemperature", 273.15)
  236. elements.property(elements.MOD3_PT_SCLD, "HighTemperatureTransition", "MOD_PT_RACD")
  237. elements.property(elements.MOD3_PT_SCLD, "Temperature", 263.15 )
  238. elements.property(elements.MOD3_PT_SCLD, "LowTemperature", 245.15)
  239. elements.property(elements.MOD3_PT_SCLD, "LowTemperatureTransition", "MOD_PT_ICE")
  240.  
  241.  
  242. function rain(i,x,y,s,n)
  243.     if math.random(1,500) == 20 then
  244.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'snow')
  245.     end
  246. end    
  247. tpt.element_func(rain,c)
  248.  
  249. local d = elements.allocate("MOD4", "DRCD")
  250. elements.element(elements.MOD4_PT_DRCD, elements.element(elements.DEFAULT_PT_HYGN))
  251. elements.property(elements.MOD4_PT_DRCD, "Name", "DRCD")
  252. elements.property(elements.MOD4_PT_DRCD, "Description", "Distilled Rain Cloud.")
  253. elements.property(elements.MOD4_PT_DRCD, "Colour", 0x506987)
  254. elements.property(elements.MOD4_PT_DRCD, "MenuSection", 6)
  255. elements.property(elements.MOD4_PT_DRCD, "Gravity", 0)
  256. elements.property(elements.MOD4_PT_DRCD, "Explosive", 0)
  257. elements.property(elements.MOD4_PT_DRCD, "Weight", 0)
  258. elements.property(elements.MOD4_PT_DRCD, "Diffusion", 1)
  259. elements.property(elements.MOD4_PT_DRCD, "Hardness", 0)
  260. elements.property(elements.MOD4_PT_DRCD, "Flammable", 0)
  261. elements.property(elements.MOD4_PT_DRCD, "AirDrag", 0.01)
  262. elements.property(elements.MOD4_PT_DRCD, "LowTemperature", 273.15)
  263. elements.property(elements.MOD4_PT_DRCD, "LowTemperatureTransition", "MOD_PT_SCLD")
  264. elements.property(elements.MOD4_PT_DRCD, "Temperature", 295.15)
  265.  
  266.  
  267.  
  268.  
  269. function rain(i,x,y,s,n)
  270.     if math.random(1,500) == 20 then
  271.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'dstw')
  272.    
  273.         end    
  274. end
  275. tpt.element_func(rain,d)
  276.  
  277. local e = elements.allocate("MOD5", "SRCD")
  278. elements.element(elements.MOD5_PT_SRCD, elements.element(elements.DEFAULT_PT_HYGN))
  279. elements.property(elements.MOD5_PT_SRCD, "Name", "SRCD")
  280. elements.property(elements.MOD5_PT_SRCD, "Description", "Saltwater Rain Cloud.")
  281. elements.property(elements.MOD5_PT_SRCD, "Colour", 0x380474)
  282. elements.property(elements.MOD5_PT_SRCD, "MenuSection", 6)
  283. elements.property(elements.MOD5_PT_SRCD, "Gravity", 0)
  284. elements.property(elements.MOD5_PT_SRCD, "Explosive", 0)
  285. elements.property(elements.MOD5_PT_SRCD, "Weight", 0)
  286. elements.property(elements.MOD5_PT_SRCD, "Diffusion", 1)
  287. elements.property(elements.MOD5_PT_SRCD, "Hardness", 0)
  288. elements.property(elements.MOD5_PT_SRCD, "Flammable", 0)
  289. elements.property(elements.MOD5_PT_SRCD, "AirDrag", 0.01)
  290. elements.property(elements.MOD5_PT_SRCD, "LowTemperature", 273.15)
  291. elements.property(elements.MOD5_PT_SRCD, "LowTemperatureTransition", "MOD_PT_SCLD")
  292. elements.property(elements.MOD5_PT_SRCD, "Temperature", 295.15)
  293.  
  294.  
  295.  
  296.  
  297. function rain(i,x,y,s,n)
  298.     if math.random(1,500) == 20 then
  299.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'sltw')
  300.    
  301.         end    
  302. end
  303. tpt.element_func(rain,e)
  304.  
  305. local f = elements.allocate("MOD6", "TSCD")
  306. elements.element(elements.MOD6_PT_TSCD, elements.element(elements.DEFAULT_PT_HYGN))
  307. elements.property(elements.MOD6_PT_TSCD, "Name", "TSCD")
  308. elements.property(elements.MOD6_PT_TSCD, "Description", "Thunderstorm Cloud.")
  309. elements.property(elements.MOD6_PT_TSCD, "Colour", 0x302B54)
  310. elements.property(elements.MOD6_PT_TSCD, "MenuSection", 6)
  311. elements.property(elements.MOD6_PT_TSCD, "Gravity", 0)
  312. elements.property(elements.MOD6_PT_TSCD, "Explosive", 0)
  313. elements.property(elements.MOD6_PT_TSCD, "Weight", 0)
  314. elements.property(elements.MOD6_PT_TSCD, "Diffusion", 1)
  315. elements.property(elements.MOD6_PT_TSCD, "Hardness", 0)
  316. elements.property(elements.MOD6_PT_TSCD, "Flammable", 0)
  317. elements.property(elements.MOD6_PT_TSCD, "AirDrag", 0.01)
  318. elements.property(elements.MOD6_PT_TSCD, "LowTemperature", 273.15)
  319. elements.property(elements.MOD6_PT_TSCD, "LowTemperatureTransition", "MOD_PT_SCLD")
  320. elements.property(elements.MOD6_PT_TSCD, "Temperature", 303.15)
  321.  
  322.  
  323.  
  324.  
  325. function rain(i,x,y,s,n)
  326.     if math.random(1,500) == 20 then
  327.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'ligh')
  328.    
  329.         end    
  330. end
  331. tpt.element_func(rain,f)
  332.  
  333. --Explosives
  334.  
  335. --The Highly Explosive mod for Powder Toy
  336.  
  337. local function explosion(x, y, s)
  338.     for px = -1, 1 do
  339.         for py = -1, 1 do
  340.             tpt.create(x + px, y - py, "PLSM")
  341.             local pressure = sim.pressure((x + px) / 4.0, (y + py) / 4.0)
  342.             sim.pressure((x + px) / 4.0, (y + py) / 4.0, pressure + s * 10)
  343.             sim.velocityX((x + px) / 4.0, y / 4.0, px * s)
  344.             sim.velocityY((x + px) / 4.0, (y - py) / 4.0, -py * s)
  345.  
  346.         end
  347.     end
  348. end
  349.  
  350.  
  351.  
  352. local WBOMB = elements.allocate("MEXPL", "HELD")
  353. elements.element(elements.MEXPL_PT_HELD, elements.element(elements.DEFAULT_PT_GLOW))
  354. elements.property(elements.MEXPL_PT_HELD, "Color", "0xFFFEAF27")
  355. elements.property(elements.MEXPL_PT_HELD, "Name", "HELD")
  356. elements.property(elements.MEXPL_PT_HELD, "Description", "Highly Explosive Liquid.")
  357. elements.property(elements.MEXPL_PT_HELD, "MenuVisible", 1)
  358. elements.property(elements.MEXPL_PT_HELD, "MenuSection", 5)
  359. elements.property(elements.MEXPL_PT_HELD, "Advection", 0.1)
  360. elements.property(elements.MEXPL_PT_HELD, "AirDrag", 0.1)
  361. elements.property(elements.MEXPL_PT_HELD, "AirLoss", 0.9)
  362. elements.property(elements.MEXPL_PT_HELD, "Loss", 0.9)
  363. elements.property(elements.MEXPL_PT_HELD, "Falldown", 2)
  364. elements.property(elements.MEXPL_PT_HELD, "Hardness", 0.8)
  365. elements.property(elements.MEXPL_PT_HELD, "Weight", 12)
  366. elements.property(elements.MEXPL_PT_HELD, "Temperature", 340)
  367. elements.property(elements.MEXPL_PT_HELD, "HeatConduct", 100)
  368. elements.property(elements.MEXPL_PT_HELD, "State", 2)
  369. elements.property(elements.MEXPL_PT_HELD, "Properties", 2)
  370. elements.property(elements.MEXPL_PT_HELD, "HighTemperature", 365)
  371. elements.property(elements.MEXPL_PT_HELD, "HighTemperatureTransition", elements.MEXPL_PT_HEGS)
  372. elements.property(elements.MEXPL_PT_HELD, "LowTemperature", 327)
  373. elements.property(elements.MEXPL_PT_HELD, "LowTemperatureTransition", elements.MEXPL_PT_HESD)
  374.  
  375.  
  376. local function HELD_update(i, x, y, s, n)
  377.     local r = 1
  378.     if sim.pressure(x / 4.0, y / 4.0) >= 7.5 then
  379.  
  380.         explosion(x, y, 1)
  381.         tpt.delete(i)
  382.     elseif tpt.get_property("temp", i) >= 400 then
  383.         explosion(x, y, 1)
  384.         tpt.delete(i)
  385.     end
  386. end
  387.  
  388.  
  389.  
  390. tpt.element_func(HELD_update, elements.MEXPL_PT_HELD)
  391.  
  392. local SBOMB = elements.allocate("MEXPL", "HESD")
  393. elements.element(elements.MEXPL_PT_HESD, elements.element(elements.DEFAULT_PT_BANG))
  394. elements.property(elements.MEXPL_PT_HESD, "Color", "0xFFFF5000")
  395. elements.property(elements.MEXPL_PT_HESD, "Name", "HESD")
  396. elements.property(elements.MEXPL_PT_HESD, "Description", "Highly Explosive Solid.")
  397. elements.property(elements.MEXPL_PT_HESD, "MenuVisible", 1)
  398. elements.property(elements.MEXPL_PT_HESD, "MenuSection", 5)
  399. elements.property(elements.MEXPL_PT_HESD, "Hardness", 0.8)
  400. elements.property(elements.MEXPL_PT_HESD, "Temperature", 293)
  401. elements.property(elements.MEXPL_PT_HESD, "HeatConduct", 100)
  402. elements.property(elements.MEXPL_PT_HESD, "Falldown", 0)
  403. elements.property(elements.MEXPL_PT_HESD, "State", 1)
  404. elements.property(elements.MEXPL_PT_HESD, "Properties", 4)
  405. elements.property(elements.MEXPL_PT_HESD, "HighTemperature", 326)
  406. elements.property(elements.MEXPL_PT_HESD, "HighTemperatureTransition", elements.MEXPL_PT_HELD)
  407. elements.property(elements.MEXPL_PT_HESD, "HighPressure", 2)
  408. elements.property(elements.MEXPL_PT_HESD, "HighPressureTransition", elements.MEXPL_PT_HEPR)
  409.  
  410. local function HESD_update(i, x, y, s, n)
  411.     local r = 1
  412.     if sim.pressure(x / 4.0, y / 4.0) >= 7.5 then
  413.  
  414.         explosion(x, y, 1)
  415.         tpt.delete(i)
  416.     elseif tpt.get_property("temp", i) >= 400 then
  417.         explosion(x, y, 1)
  418.         tpt.delete(i)
  419.     end
  420. end
  421.  
  422.  
  423.  
  424. tpt.element_func(HESD_update, elements.MEXPL_PT_HESD)
  425.  
  426. local GBOMB = elements.allocate("MEXPL", "HEGS")
  427. elements.element(elements.MEXPL_PT_HEGS, elements.element(elements.DEFAULT_PT_GAS))
  428. elements.property(elements.MEXPL_PT_HEGS, "Color", "0xFFEBFE5D")
  429. elements.property(elements.MEXPL_PT_HEGS, "Name", "HEGS")
  430. elements.property(elements.MEXPL_PT_HEGS, "Description", "Highly Explosive Gas.")
  431. elements.property(elements.MEXPL_PT_HEGS, "MenuVisible", 1)
  432. elements.property(elements.MEXPL_PT_HEGS, "MenuSection", 5)
  433. elements.property(elements.MEXPL_PT_HEGS, "Hardness", 0.8)
  434. elements.property(elements.MEXPL_PT_HEGS, "Temperature", 390)
  435. elements.property(elements.MEXPL_PT_HEGS, "HeatConduct", 100)
  436. elements.property(elements.MEXPL_PT_HEGS, "Falldown", 0)
  437. elements.property(elements.MEXPL_PT_HEGS, "Diffusion", 0.5)
  438. elements.property(elements.MEXPL_PT_HEGS, "State", 3)
  439. elements.property(elements.MEXPL_PT_HEGS, "Properties", 3)
  440. elements.property(elements.MEXPL_PT_HEGS, "LowTemperature", 366)
  441. elements.property(elements.MEXPL_PT_HEGS, "LowTemperatureTransition", elements.MEXPL_PT_HESD)
  442.  
  443.  
  444. local function HEGS_update(i, x, y, s, n)
  445.     local r = 1
  446.     if sim.pressure(x / 4.0, y / 4.0) >= 7.5 then
  447.  
  448.         explosion(x, y, 1)
  449.         tpt.delete(i)
  450.     elseif tpt.get_property("temp", i) >= 400 then
  451.         explosion(x, y, 1)
  452.         tpt.delete(i)
  453.     end
  454. end
  455.  
  456.  
  457.  
  458. tpt.element_func(HEGS_update, elements.MEXPL_PT_HEGS)
  459.  
  460. local PBOMB = elements.allocate("MEXPL", "HEPR")
  461. elements.element(elements.MEXPL_PT_HEPR, elements.element(elements.DEFAULT_PT_DUST))
  462. elements.property(elements.MEXPL_PT_HEPR, "Color", "0xFFFFFF00")
  463. elements.property(elements.MEXPL_PT_HEPR, "Name", "HEPR")
  464. elements.property(elements.MEXPL_PT_HEPR, "Description", "Highly Explosive Powder.")
  465. elements.property(elements.MEXPL_PT_HEPR, "MenuVisible", 1)
  466. elements.property(elements.MEXPL_PT_HEPR, "MenuSection", 5)
  467. elements.property(elements.MEXPL_PT_HEPR, "Hardness", 0.8)
  468. elements.property(elements.MEXPL_PT_HEPR, "Temperature", 293)
  469. elements.property(elements.MEXPL_PT_HEPR, "HeatConduct", 100)
  470. elements.property(elements.MEXPL_PT_HEPR, "Falldown", 1)
  471. elements.property(elements.MEXPL_PT_HELD, "Advection", 0.1)
  472. elements.property(elements.MEXPL_PT_HELD, "AirDrag", 0.1)
  473. elements.property(elements.MEXPL_PT_HELD, "AirLoss", 0.9)
  474. elements.property(elements.MEXPL_PT_HELD, "Loss", 0.9)
  475. elements.property(elements.MEXPL_PT_HELD, "Hardness", 0.8)
  476. elements.property(elements.MEXPL_PT_HELD, "Weight", 12)
  477. elements.property(elements.MEXPL_PT_HEPR, "State", 1)
  478. elements.property(elements.MEXPL_PT_HEPR, "Properties", 4)
  479. elements.property(elements.MEXPL_PT_HEPR, "HighTemperature", 326)
  480. elements.property(elements.MEXPL_PT_HEPR, "HighTemperatureTransition", elements.MEXPL_PT_HELD)
  481.  
  482.  
  483. local function HEPR_update(i, x, y, s, n)
  484.     local r = 1
  485.     if sim.pressure(x / 4.0, y / 4.0) >= 7.5 then
  486.  
  487.         explosion(x, y, 1)
  488.         tpt.delete(i)
  489.     elseif tpt.get_property("temp", i) >= 400 then
  490.         explosion(x, y, 1)
  491.         tpt.delete(i)
  492.     end
  493. end
  494.  
  495.  
  496.  
  497. tpt.element_func(HEPR_update, elements.MEXPL_PT_HEPR)
  498.  
  499. --"New Elements"
  500.  
  501. local function heat()
  502.         tpt.set_property("temp", 295.15, "NHTR")
  503.         tpt.set_property("temp", 9999, "HETR")
  504.         tpt.set_property("temp", 0, "COLR")
  505. end
  506. tpt.register_step(heat)
  507.  
  508.  
  509.  
  510.  
  511.  
  512. elements.allocate('YOSHI', 'HETR')
  513. elements.element(elements.YOSHI_PT_HETR, elements.element(elements.DEFAULT_PT_DMND))
  514. elements.property(elements.YOSHI_PT_HETR, 'Name', 'HETR')
  515. elements.property(elements.YOSHI_PT_HETR, 'Description', 'Heats Elements.')
  516. elements.property(elements.YOSHI_PT_HETR, 'Color', '0xFF1111')
  517. elements.property(elements.YOSHI_PT_HETR, 'MenuSection', '2')
  518. elements.property(elements.YOSHI_PT_HETR, 'HeatConduct', '65535')
  519. local g = function(i, x, y, s, n)
  520. --Update Function
  521. end
  522. tpt.element_func(g, tpt.element('HETR'))
  523. local g = function(i, r, g, b)
  524. local function gfunc(i, r, g, b)
  525.         return 1, 0x0003007F, 255, 255, 17, 17, 255, 255, 17, 17
  526. end
  527. tpt.graphics_func(gfunc, tpt.element('HETR'))
  528. end
  529. tpt.graphics_func(g, tpt.element('HETR'))
  530. local function heat()
  531. end
  532. tpt.register_step(heat)
  533.  
  534.  
  535.  
  536. elements.allocate('YOSHI', 'COLR')
  537. elements.element(elements.YOSHI_PT_COLR, elements.element(elements.DEFAULT_PT_DMND))
  538. elements.property(elements.YOSHI_PT_COLR, 'Name', 'COLR')
  539. elements.property(elements.YOSHI_PT_COLR, 'Description', 'Cools Elements.')
  540. elements.property(elements.YOSHI_PT_COLR, 'Color', '0x1111FF')
  541. elements.property(elements.YOSHI_PT_COLR, 'MenuSection', '2')
  542. elements.property(elements.YOSHI_PT_COLR, 'HeatConduct', '65535')
  543. local g = function(i, x, y, s, n)
  544. --Update Function
  545. end
  546. tpt.element_func(g, tpt.element('COLR'))
  547. local g = function(i, r, g, b)
  548. local function gfunc(i, r, g, b)
  549.         return 1, 0x0003007F, 255, 17, 17, 255, 255, 17, 17, 255
  550. end
  551. tpt.graphics_func(gfunc, tpt.element('COLR'))
  552. end
  553. tpt.graphics_func(g, tpt.element('COLR'))
  554.  
  555.  
  556.  
  557. elements.allocate('YOSHI', 'HCTD')
  558. elements.element(elements.YOSHI_PT_HCTD, elements.element(elements.DEFAULT_PT_DMND))
  559. elements.property(elements.YOSHI_PT_HCTD, 'Name', 'HCTD')
  560. elements.property(elements.YOSHI_PT_HCTD, 'Description', 'Heat conductor.')
  561. elements.property(elements.YOSHI_PT_HCTD, 'Color', '0x11FF11')
  562. elements.property(elements.YOSHI_PT_HCTD, 'MenuSection', '2')
  563. elements.property(elements.YOSHI_PT_HCTD, 'HeatConduct', '65535')
  564. local g = function(i, x, y, s, n)
  565. --Update Function
  566. end
  567. tpt.element_func(g, tpt.element('HCTD'))
  568. local g = function(i, r, g, b)
  569. local function gfunc(i, r, g, b)
  570.         return 1, 0x0003007F, 255, 17, 255, 17, 255, 17, 255, 17
  571. end
  572. tpt.graphics_func(gfunc, tpt.element('HCTD'))
  573. end
  574. tpt.graphics_func(g, tpt.element('HCTD'))
  575.  
  576.  
  577.  
  578. elements.allocate('YOSHI', 'NHTR')
  579. elements.element(elements.YOSHI_PT_NHTR, elements.element(elements.DEFAULT_PT_DMND))
  580. elements.property(elements.YOSHI_PT_NHTR, 'Name', 'NHTR')
  581. elements.property(elements.YOSHI_PT_NHTR, 'Description', 'Normal  heater.')
  582. elements.property(elements.YOSHI_PT_NHTR, 'Color', '0x11117F')
  583. elements.property(elements.YOSHI_PT_NHTR, 'MenuSection', '2')
  584. elements.property(elements.YOSHI_PT_NHTR, 'HeatConduct', '65535')
  585. local g = function(i, x, y, s, n)
  586. --Update Function
  587. end
  588. tpt.element_func(g, tpt.element('NHTR'))
  589. local g = function(i, r, g, b)
  590. local function gfunc(i, r, g, b)
  591.         return 1, 0x0003007F, 255, 17, 17, 127, 255, 17, 17, 127
  592. end
  593. tpt.graphics_func(gfunc, tpt.element('NHTR'))
  594. end
  595. tpt.graphics_func(g, tpt.element('NHTR'))
  596.  
  597.  
  598.  
  599. local a = elements.allocate("YOSHI", "RCLD")
  600. elements.element(elements.YOSHI_PT_RCLD, elements.element(elements.DEFAULT_PT_HYGN))
  601. elements.property(elements.YOSHI_PT_RCLD, "Name", "RCLD")
  602. elements.property(elements.YOSHI_PT_RCLD, "Description", "Radioactive cloud, Second type.")
  603. elements.property(elements.YOSHI_PT_RCLD, "Colour", 0x11FF22)
  604. elements.property(elements.YOSHI_PT_RCLD, "MenuSection", 10)
  605. elements.property(elements.YOSHI_PT_RCLD, "Gravity", 0)
  606. elements.property(elements.YOSHI_PT_RCLD, "Explosive", 0)
  607. elements.property(elements.YOSHI_PT_RCLD, "Weight", 0)
  608. elements.property(elements.YOSHI_PT_RCLD, "Diffusion", 1)
  609. elements.property(elements.YOSHI_PT_RCLD, "Hardness", 0)
  610. elements.property(elements.YOSHI_PT_RCLD, "Flammable", 100000)
  611. elements.property(elements.YOSHI_PT_RCLD, "AirDrag", 0.01)
  612. function rain(i,x,y,s,n)
  613.         if math.random(1,500) < 5 then
  614.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'plut')
  615.     end
  616.         if math.random(1,500) == 20 then
  617.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'uran')
  618.     end
  619.         if math.random(1,500) == 30 then
  620.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'isoz')
  621.     end
  622.         if math.random(1,500) == 40 then
  623.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'deut')
  624.     end
  625.         if math.random(1,500) == 50 then
  626.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'bvbr')
  627.     end
  628. end
  629. tpt.element_func(rain,a)
  630.  
  631.  
  632.  
  633. local a = elements.allocate("YOSHI", "SULF")
  634. elements.element(elements.YOSHI_PT_SULF, elements.element(elements.DEFAULT_PT_COAL))
  635. elements.property(elements.YOSHI_PT_SULF, "Name", "SULF")
  636. elements.property(elements.YOSHI_PT_SULF, "Description", "Basic Sulphur.")
  637. elements.property(elements.YOSHI_PT_SULF, "Colour", 0xFFFF11)
  638. elements.property(elements.YOSHI_PT_SULF, "MenuSection", 9)
  639. elements.property(elements.YOSHI_PT_SULF, "Gravity", 0)
  640. elements.property(elements.YOSHI_PT_SULF, "Explosive", 0)
  641. elements.property(elements.YOSHI_PT_SULF, "Weight", 10)
  642. elements.property(elements.YOSHI_PT_SULF, "Diffusion", 0)
  643. elements.property(elements.YOSHI_PT_SULF, "Hardness", 0)
  644. elements.property(elements.YOSHI_PT_SULF, "Flammable", 10)
  645.  
  646.  
  647.  
  648. local a = elements.allocate("YOSHI", "SACD")
  649. elements.element(elements.YOSHI_PT_SACD, elements.element(elements.DEFAULT_PT_ACID))
  650. elements.property(elements.YOSHI_PT_SACD, "Name", "SACD")
  651. elements.property(elements.YOSHI_PT_SACD, "Description", "Sulphuric acid, does nothing yet.")
  652. elements.property(elements.YOSHI_PT_SACD, "Colour", 0xEEEE11)
  653. elements.property(elements.YOSHI_PT_SACD, "MenuSection", 7)
  654. elements.property(elements.YOSHI_PT_SACD, "Gravity", 1)
  655. elements.property(elements.YOSHI_PT_SACD, "Explosive", 0)
  656. elements.property(elements.YOSHI_PT_SACD, "Weight", 10)
  657. elements.property(elements.YOSHI_PT_SACD, "Diffusion", 0.1)
  658. elements.property(elements.YOSHI_PT_SACD, "Hardness", 0)
  659. elements.property(elements.YOSHI_PT_SACD, "Flammable", 0)
  660.  
  661.  
  662.  
  663. local a = elements.allocate("YOSHI", "RMTL")
  664. elements.element(elements.YOSHI_PT_RMTL, elements.element(elements.DEFAULT_PT_TTAN))
  665. elements.property(elements.YOSHI_PT_RMTL, "Name", "RMTL")
  666. elements.property(elements.YOSHI_PT_RMTL, "Description", "Realistic metal.")
  667. elements.property(elements.YOSHI_PT_RMTL, "Colour", 0x666666)
  668. elements.property(elements.YOSHI_PT_RMTL, "MenuSection", 9)
  669. elements.property(elements.YOSHI_PT_RMTL, "Gravity", 0)
  670. elements.property(elements.YOSHI_PT_RMTL, "Explosive", 0)
  671. elements.property(elements.YOSHI_PT_RMTL, "Weight", 100)
  672. elements.property(elements.YOSHI_PT_RMTL, "Diffusion", 0)
  673. elements.property(elements.YOSHI_PT_RMTL, "Hardness", 0)
  674. elements.property(elements.YOSHI_PT_RMTL, "Flammable", 0)
  675. elements.property(elements.YOSHI_PT_RMTL, "AirLoss", 0)
  676. elements.property(elements.YOSHI_PT_RMTL, "Temperature", 273.15 + 22)
  677. elements.property(elements.YOSHI_PT_RMTL, "HighTemperature", 1798)
  678. elements.property(elements.YOSHI_PT_RMTL, "HighTemperatureTransition", elements.YOSHI_PT_MRMT)
  679.  
  680.  
  681.  
  682. local a = elements.allocate("YOSHI", "MRMT")
  683. elements.element(elements.YOSHI_PT_MRMT, elements.element(elements.DEFAULT_PT_MERC))
  684. elements.property(elements.YOSHI_PT_MRMT, "Name", "MRMT")
  685. elements.property(elements.YOSHI_PT_MRMT, "Description", "Molten realistic metal.")
  686. elements.property(elements.YOSHI_PT_MRMT, "Colour", 0xFEDCBA)
  687. elements.property(elements.YOSHI_PT_MRMT, "MenuSection", 4)
  688. elements.property(elements.YOSHI_PT_MRMT, "MenuVisible", 0)
  689. elements.property(elements.YOSHI_PT_MRMT, "Gravity", 1)
  690. elements.property(elements.YOSHI_PT_MRMT, "Explosive", 0)
  691. elements.property(elements.YOSHI_PT_MRMT, "Weight", 100)
  692. elements.property(elements.YOSHI_PT_MRMT, "Diffusion", 0)
  693. elements.property(elements.YOSHI_PT_MRMT, "Hardness", 0)
  694. elements.property(elements.YOSHI_PT_MRMT, "Flammable", 0)
  695. elements.property(elements.YOSHI_PT_MRMT, "Temperature", 1799)
  696. elements.property(elements.YOSHI_PT_MRMT, "LowTemperature", 1798)
  697. elements.property(elements.YOSHI_PT_MRMT, "LowTemperatureTransition", elements.YOSHI_PT_RMTL)
  698.  
  699.  
  700.  
  701. local a = elements.allocate("YOSHI", "THNL")
  702. elements.element(elements.YOSHI_PT_THNL, elements.element(elements.DEFAULT_PT_NITR))
  703. elements.property(elements.YOSHI_PT_THNL, "Name", "THNL")
  704. elements.property(elements.YOSHI_PT_THNL, "Description", "Thermonucleum, Extremely explosive.")
  705. elements.property(elements.YOSHI_PT_THNL, "Colour", 0x3F94EC)
  706. elements.property(elements.YOSHI_PT_THNL, "MenuSection", 10)
  707. elements.property(elements.YOSHI_PT_THNL, "Gravity", 1)
  708. elements.property(elements.YOSHI_PT_THNL, "Explosive", 2)
  709. elements.property(elements.YOSHI_PT_THNL, "Weight", 10)
  710. elements.property(elements.YOSHI_PT_THNL, "Diffusion", 0)
  711. elements.property(elements.YOSHI_PT_THNL, "Hardness", 0)
  712. elements.property(elements.YOSHI_PT_THNL, "Flammable", 100000)
  713. elements.property(elements.YOSHI_PT_THNL, "Temperature", 295.15)
  714. elements.property(elements.YOSHI_PT_THNL, "AirDrag", 0.5)
  715.  
  716.  
  717.  
  718. elements.allocate('AU3FGEN', 'GNTM')
  719. elements.element(elements.AU3FGEN_PT_GNTM, elements.element(elements.DEFAULT_PT_DMND))
  720. elements.property(elements.AU3FGEN_PT_GNTM, 'Name', 'GNTM')
  721. elements.property(elements.AU3FGEN_PT_GNTM, 'Description', 'Gentium, Strange and laggy.')
  722. elements.property(elements.AU3FGEN_PT_GNTM, 'Color', '0x1F7F3F')
  723. elements.property(elements.AU3FGEN_PT_GNTM, 'MenuSection', '10')
  724. elements.property(elements.AU3FGEN_PT_GNTM, 'Gravity', '0')
  725. elements.property(elements.AU3FGEN_PT_GNTM, 'Flammable', '65535')
  726. elements.property(elements.AU3FGEN_PT_GNTM, 'Explosive', '1')
  727. elements.property(elements.AU3FGEN_PT_GNTM, 'Loss', '0')
  728. elements.property(elements.AU3FGEN_PT_GNTM, 'AirLoss', '1')
  729. elements.property(elements.AU3FGEN_PT_GNTM, 'AirDrag', '0')
  730. elements.property(elements.AU3FGEN_PT_GNTM, 'Advection', '1')
  731. elements.property(elements.AU3FGEN_PT_GNTM, 'Weight', '1024')
  732. elements.property(elements.AU3FGEN_PT_GNTM, 'Diffusion', '0')
  733. elements.property(elements.AU3FGEN_PT_GNTM, 'Falldown', '0')
  734. local g = function(i, x, y, s, n)
  735. --Update Function
  736. end
  737. tpt.element_func(g, tpt.element('GNTM'))
  738. local g = function(i, r, g, b)
  739. local function gfunc(i, r, g, b)
  740.         return 1, 0x0003007F, math.random(0,255), math.random(0,255), math.random(0,255), math.random(0,255), math.random(0,255), math.random(0,255), math.random(0,255), math.random(0,255)
  741. end
  742. tpt.graphics_func(gfunc, tpt.element('GNTM'))
  743. end
  744. tpt.graphics_func(g, tpt.element('GNTM'))
  745.  
  746. --Radioactive Mod
  747.  
  748. --Changes
  749. -- You can change this from on/off.
  750.  
  751. on=40
  752. off=0
  753.  
  754.  
  755. elements.property(elements.DEFAULT_PT_ACID, "Flammable", off)
  756. -- Added Elements.
  757. -- Feel free to take them, just give credit.
  758. -- Feel free to edit them, just give credit.
  759.  
  760. print("TPT's Mod")
  761.  print("Version 1")
  762. print("Update 0")
  763.  print("Created by Amy. All elements were reprogrammed and compiled into a single file.")
  764. print("Contact via email or http://powder.uk.co")
  765. local a = elements.allocate("X", "C")
  766. elements.element(elements.X_PT_C, elements.element(elements.DEFAULT_PT_WOOD))
  767. elements.property(elements.X_PT_C, "Name", "SAWD")
  768. elements.property(elements.X_PT_C, "Description", "Saw Dust, Flammable.")
  769. elements.property(elements.X_PT_C, "Colour", 0xFFFF66)
  770. elements.property(elements.X_PT_C, "MenuSection", 8)
  771. elements.property(elements.X_PT_C, "Gravity", 1)
  772. elements.property(elements.X_PT_C, "Flammable", 30)
  773. elements.property(elements.X_PT_C, "Explosive", 0)
  774. elements.property(elements.X_PT_C, "Weight", 20)
  775. elements.property(elements.X_PT_C, "Diffusion", 0.5)
  776. elements.property(elements.X_PT_C, "Falldown", 1)
  777.  
  778. local a = elements.allocate("C", "Q")
  779. elements.element(elements.C_PT_Q, elements.element(elements.DEFAULT_PT_HYGN))
  780. elements.property(elements.C_PT_Q, "Name", "????")
  781. elements.property(elements.C_PT_Q, "Description", "????")
  782. elements.property(elements.C_PT_Q, "Colour", 0xFFFF0080)
  783. elements.property(elements.C_PT_Q, "MenuSection", 10)
  784. elements.property(elements.C_PT_Q, "Gravity", 0.3)
  785. elements.property(elements.C_PT_Q, "Explosive", 1)
  786. elements.property(elements.C_PT_Q, "Weight", 66)
  787. elements.property(elements.C_PT_Q, "Diffusion", 0)
  788. elements.property(elements.C_PT_Q, "HotAir", -0.1)
  789. elements.property(elements.C_PT_Q, "Hardness", 0)
  790.  
  791. local q={0x99FFFF,0x9999FF,0xCCFF00,0x00FFCC,0x00CC00,0x330099}
  792. local z=q[math.random(1,6)]
  793.  
  794. elements.property(elements.C_PT_Q, "Colour", z)
  795.  
  796. function light(i,x,y,s,n)
  797.         if math.random(1,300000) == 10 then
  798.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'ligh')
  799.         end
  800. end
  801. tpt.element_func(light,a)
  802.  
  803. local a = elements.allocate("B", "Q")
  804. elements.element(elements.B_PT_Q, elements.element(elements.DEFAULT_PT_HYGN))
  805. elements.property(elements.B_PT_Q, "Name", "LCLD")
  806. elements.property(elements.B_PT_Q, "Description", "Lava Clouds.")
  807. elements.property(elements.B_PT_Q, "Colour", 0xCC0000)
  808. elements.property(elements.B_PT_Q, "MenuSection", 6)
  809. elements.property(elements.B_PT_Q, "Gravity", 0.1)
  810. elements.property(elements.B_PT_Q, "Explosive", 0)
  811. elements.property(elements.B_PT_Q, "Weight", 66)
  812. elements.property(elements.B_PT_Q, "Temperature", math.huge)
  813. elements.property(elements.B_PT_Q, "Diffusion", 0.1)
  814. elements.property(elements.B_PT_Q, "Hardness", 0)
  815.  
  816. function fire(i,x,y,s,n)
  817.         if math.random(1,750) == 10 then
  818.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'lava')
  819.         end
  820. end
  821. tpt.element_func(fire,a)
  822.  
  823. --[[
  824.  
  825. local a = elements.allocate("V", "X")
  826. elements.element(elements.V_PT_X, elements.element(elements.DEFAULT_PT_HYGN))
  827. elements.property(elements.V_PT_X, "Name", "CLDS")
  828. elements.property(elements.V_PT_X, "Description", "Clouds. Produce Water.")
  829. elements.property(elements.V_PT_X, "Colour", 0x3366CC)
  830. elements.property(elements.V_PT_X, "MenuSection", 6)
  831. elements.property(elements.V_PT_X, "Gravity", 0.3)
  832. elements.property(elements.V_PT_X, "Explosive", 0)
  833. elements.property(elements.V_PT_X, "Weight", 88)
  834. elements.property(elements.V_PT_X, "Diffusion", 0.2)
  835. elements.property(elements.V_PT_X, "Hardness", 0)
  836.  
  837. function rain(i,x,y,s,n)
  838.         if math.random(1,750) == 10 then
  839.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'watr')
  840.         end
  841. end
  842. tpt.element_func(rain,a)]]--
  843.  
  844. local a = elements.allocate("V", "W")
  845. elements.element(elements.V_PT_W, elements.element(elements.DEFAULT_PT_HYGN))
  846. elements.property(elements.V_PT_W, "Name", "ACLD")
  847. elements.property(elements.V_PT_W, "Description", "Acid Cloud.")
  848. elements.property(elements.V_PT_W, "Colour", 0xFF0066)
  849. elements.property(elements.V_PT_W, "MenuSection", 6)
  850. elements.property(elements.V_PT_W, "Gravity", 0.1)
  851. elements.property(elements.V_PT_W, "Explosive", 0)
  852. elements.property(elements.V_PT_W, "Weight", -400)
  853. elements.property(elements.V_PT_W, "Diffusion", 0.1)
  854. elements.property(elements.V_PT_W, "Hardness", 0)
  855.  
  856. function acid(i,x,y,s,n)
  857.          if math.random(1,750) == 10 then
  858.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'acid')
  859.         end
  860. end
  861. tpt.element_func(acid,a)
  862.  
  863. local a = elements.allocate("T", "M")
  864. elements.element(elements.T_PT_M, elements.element(elements.DEFAULT_PT_LAVA))
  865. elements.property(elements.T_PT_M, "Name", "MAGA")
  866. elements.property(elements.T_PT_M, "Description", "Unknown Liquid. Releases NBLE. Very Hot.")
  867. elements.property(elements.T_PT_M, "Colour", 0xFF3300)
  868. elements.property(elements.T_PT_M, "Temperature", math.huge)
  869. elements.property(elements.T_PT_M, "Gravity", 3)
  870. elements.property(elements.T_PT_M, "Diffusion", 0.2)
  871.  
  872. function RLS(i,x,y,s,n)
  873.          if math.random(1,550) == 10 then
  874.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'nble')
  875.                          if math.random(1,1300) == 10 then
  876.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'plsm')
  877.                 end
  878.         end
  879. end
  880. tpt.element_func(RLS,a)
  881. l="IFOUNDIT"
  882. local a = elements.allocate("R","D")
  883. elements.element(elements.R_PT_D, elements.element(elements.DEFAULT_PT_PHOT))
  884. elements.property(elements.R_PT_D, "Name", "SPRB")
  885. elements.property(elements.R_PT_D, "Color", 0xFF0099)
  886. elements.property(elements.R_PT_D, "MenuSection", 8)
  887. elements.property(elements.R_PT_D, "Advection", 0.2)
  888. elements.property(elements.R_PT_D, "Collision", 1.0)
  889. elements.property(elements.R_PT_D, "Gravity", 3.0)
  890. elements.property(elements.R_PT_D, "Diffusion", 0.3)
  891. elements.property(elements.R_PT_D, "Weight", 40.45)
  892. elements.property(elements.R_PT_D, "Temperature", 100000.0)
  893. elements.property(elements.R_PT_D, "HeatConduct", 100000.0)
  894. elements.property(elements.R_PT_D, "Description", "Super Ball. Very Hot. Bounces.")
  895. elements.property(elements.R_PT_D, "Properties", PROP_DEADLY)
  896.  
  897.  
  898. local a = elements.allocate("V1", "X1")
  899. elements.element(elements.V1_PT_X1, elements.element(elements.DEFAULT_PT_HYGN))
  900. elements.property(elements.V1_PT_X1, "Name", "STRM")
  901. elements.property(elements.V1_PT_X1, "Description", "Storm Clouds. Produces More Water Than CLDS, and Lightning.")
  902. elements.property(elements.V1_PT_X1, "Colour", 0x999999)
  903. elements.property(elements.V1_PT_X1, "MenuSection", 6)
  904. elements.property(elements.V1_PT_X1, "Gravity", 0.1)
  905. elements.property(elements.V1_PT_X1, "Explosive", 0)
  906. elements.property(elements.V1_PT_X1, "Weight", 99)
  907. elements.property(elements.V1_PT_X1, "Diffusion", 0.1)
  908. elements.property(elements.V1_PT_X1, "Hardness", 0)
  909.  
  910. function rain2(i,x,y,s,n)
  911.         if math.random(1,350) == 10 then
  912.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'watr')
  913.                         if math.random(1,750) == 10 then
  914.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'ligh')
  915.         end
  916.         end
  917. end
  918. tpt.element_func(rain2,a)
  919.  
  920. local a = elements.allocate("N", "H")
  921. elements.element(elements.N_PT_H, elements.element(elements.DEFAULT_PT_WOOD))
  922. elements.property(elements.N_PT_H, "Name", "TR0N")
  923. elements.property(elements.N_PT_H, "Description", "Produces TRON. A Solid. A Home.")
  924. elements.property(elements.N_PT_H, "Colour", 0x66FFFF)
  925. elements.property(elements.N_PT_H, "Flammable", 0)
  926. elements.property(elements.N_PT_H, "MenuSection", 9)
  927.  
  928. function tron(i,x,y,s,n)
  929.         if math.random(1,100) == 10 then
  930.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'tron')
  931.         end
  932. end
  933. tpt.element_func(tron,a)
  934.  
  935. local a = elements.allocate("E", "O")
  936. elements.element(elements.E_PT_O, elements.element(elements.DEFAULT_PT_GUN))
  937. elements.property(elements.E_PT_O, "Name", "PC-4")
  938. elements.property(elements.E_PT_O, "Description", "Powder C4.  Explosive.")
  939. elements.property(elements.E_PT_O, "Colour", 0xFF33FF)
  940. elements.property(elements.E_PT_O, "Gravity", 2.0)
  941. elements.property(elements.E_PT_O, "Diffusion", 0.2)
  942. elements.property(elements.E_PT_O, "Weight", 30.20)
  943. elements.property(elements.E_PT_O, "Flammable", 3000.34)
  944.  
  945. local a = elements.allocate("J", "O")
  946. elements.element(elements.J_PT_O, elements.element(elements.DEFAULT_PT_DUST))
  947. elements.property(elements.J_PT_O, "Name", "FLY")
  948. elements.property(elements.J_PT_O, "Description", "Fly. Annoying Pestering Bug.")
  949. elements.property(elements.J_PT_O, "Colour", 0x333333)
  950. elements.property(elements.J_PT_O, "MenuSection", 11)
  951. elements.property(elements.J_PT_O, "Gravity", 0.1)
  952. elements.property(elements.J_PT_O, "Flammable", 1)
  953. elements.property(elements.J_PT_O, "Explosive", 0)
  954. elements.property(elements.J_PT_O, "Weight", -3000)
  955. elements.property(elements.J_PT_O, "Diffusion", 0.9)
  956. elements.property(elements.J_PT_O, "Falldown", 0.8)
  957.  
  958. local a = elements.allocate("C", "T")
  959. elements.element(elements.C_PT_T, elements.element(elements.DEFAULT_PT_GLOW))
  960. elements.property(elements.C_PT_T, "Name", "NPLM")
  961. elements.property(elements.C_PT_T, "Description", "Napalm. Very explosive.")
  962. elements.property(elements.C_PT_T, "Colour", 0x380520)
  963. elements.property(elements.C_PT_T, "MenuSection", 5)
  964. elements.property(elements.C_PT_T, "Gravity", 0.5)
  965. elements.property(elements.C_PT_T, "Flammable", 1000)
  966. elements.property(elements.C_PT_T, "Explosive", 1)
  967. elements.property(elements.C_PT_T, "Loss", 0)
  968. elements.property(elements.C_PT_T, "Weight", 20)
  969.  
  970. local a = elements.allocate("G", "H")
  971. elements.element(elements.G_PT_H, elements.element(elements.DEFAULT_PT_WOOD))
  972. elements.property(elements.G_PT_H, "Name", "BHIV")
  973. elements.property(elements.G_PT_H, "Description", "BEE Hive. Produces BEEs. Obviously.")
  974. elements.property(elements.G_PT_H, "Colour", 0x999966)
  975. elements.property(elements.G_PT_H, "Flammable", 10)
  976. elements.property(elements.G_PT_H, "MenuSection", 9)
  977.  
  978. function bee(i,x,y,s,n)
  979.         if math.random(1,330) == 10 then
  980.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'bee')
  981.         end
  982. end
  983. tpt.element_func(bee,a)
  984.  
  985. local a = elements.allocate("B", "O")
  986. elements.element(elements.B_PT_O, elements.element(elements.DEFAULT_PT_DUST))
  987. elements.property(elements.B_PT_O, "Name", "BEE")
  988. elements.property(elements.B_PT_O, "Description", "BEE. Pestering Demons. Move Faster Then FLY.")
  989. elements.property(elements.B_PT_O, "Colour", 0xFFFF00)
  990. elements.property(elements.B_PT_O, "MenuSection", 11)
  991. elements.property(elements.B_PT_O, "Gravity", 0.1)
  992. elements.property(elements.B_PT_O, "Flammable", 10)
  993. elements.property(elements.B_PT_O, "Explosive", 0)
  994. elements.property(elements.B_PT_O, "Weight", -6000)
  995. elements.property(elements.B_PT_O, "Diffusion", 2)
  996. elements.property(elements.B_PT_O, "Falldown", 0.2)
  997. function beeh(i,x,y,s,n)
  998.         if math.random(1,9000) == 10 then
  999.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'bhiv')
  1000.         end
  1001. end
  1002. tpt.element_func(beeh,a)
  1003.  
  1004. local a = elements.allocate("T", "X")
  1005. elements.element(elements.T_PT_X, elements.element(elements.DEFAULT_PT_HYGN))
  1006. elements.property(elements.T_PT_X, "Name", "TORN")
  1007. elements.property(elements.T_PT_X, "Description", "Tornado. Work in progress.")
  1008. elements.property(elements.T_PT_X, "Colour", 0x333333)
  1009. elements.property(elements.T_PT_X, "MenuSection", 11)
  1010. elements.property(elements.T_PT_X, "Gravity", 0.5)
  1011. elements.property(elements.T_PT_X, "Explosive", 0)
  1012. elements.property(elements.T_PT_X, "HotAir", -0.5)
  1013. elements.property(elements.T_PT_X, "Weight", 99)
  1014. elements.property(elements.T_PT_X, "Diffusion", 0.2)
  1015. elements.property(elements.T_PT_X, "Hardness", 0)
  1016.  
  1017. function rt(i,x,y,s,n)
  1018.         if math.random(1,550) == 10 then
  1019.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'watr')
  1020.         end
  1021. end
  1022. tpt.element_func(rt,a)
  1023.  
  1024. local a = elements.allocate("A","G")
  1025. elements.element(elements.A_PT_G, elements.element(elements.DEFAULT_PT_HYGN))
  1026. elements.property(elements.A_PT_G, "Name", "LAG")
  1027. elements.property(elements.A_PT_G, "Description", "Worlds Worst Creation.")
  1028. elements.property(elements.A_PT_G, "Colour", 0x578985)
  1029. elements.property(elements.A_PT_G, "MenuSection", 10)
  1030. elements.property(elements.A_PT_G, "HotAir", 0.1)
  1031. function acid(i,x,y,s,n)
  1032.          if math.random(1,100) == 50 then
  1033.                 tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'lag')
  1034.         end
  1035.         if math.random(1,100) == 50 then
  1036.         tpt.create(x + math.random(-1,1), y + math.random(-3,3), 'hygn')
  1037.         end
  1038.         if math.random(1,100) == 50 then
  1039.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'neut')
  1040.         end
  1041.         if math.random(1,100) == 50 then
  1042.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'prot')
  1043.         end
  1044.         if math.random(1,100) == 50 then
  1045.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'elec')
  1046.         if math.random(1,100) == 50 then
  1047.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'phot')
  1048.         end
  1049.         if math.random(1,100) == 50 then
  1050.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'neut')
  1051.         end
  1052.         if math.random(1,100) == 50 then
  1053.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'tron')
  1054.        
  1055.         if math.random(1,100) == 50 then
  1056.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'nble')
  1057.         if math.random(1,100) == 50 then
  1058.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'boyl')
  1059.         if math.random(1,100) == 50 then
  1060.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'watr')
  1061.         if math.random(1,100) == 50 then
  1062.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'dstw')
  1063.         if math.random(1,100) == 50 then
  1064.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'sltw')
  1065.         if math.random(1,100) == 50 then
  1066.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'glow')
  1067.         if math.random(1,100) == 50 then
  1068.         tpt.create(x + math.random(-4,4), y + math.random(-6, 6), 'soap')
  1069.         end
  1070.         end
  1071.         end
  1072.         end
  1073.         end
  1074.         end
  1075.         end
  1076.         end
  1077.         end
  1078. end
  1079. tpt.element_func(acid,a)
  1080.  
  1081. --WTF
  1082.  
  1083. local WTF = elements.allocate('CJB', 'WTF')
  1084.     elements.element(elements.CJB_PT_WTF, elements.element(elements.DEFAULT_PT_BCOL))
  1085.     elements.property(elements.CJB_PT_WTF, 'Name', 'WTF')
  1086.     elements.property(elements.CJB_PT_WTF, 'Description', 'Derpy, volatile gas/solid/I have no bloody idea.')
  1087.     elements.property(elements.CJB_PT_WTF, 'Color', '0xB87503')
  1088.     elements.property(elements.CJB_PT_WTF, 'MenuSection', '11')
  1089.     elements.property(elements.CJB_PT_WTF, 'Gravity', '0.4')
  1090.     elements.property(elements.CJB_PT_WTF, 'Flammable', '16384')
  1091.     elements.property(elements.CJB_PT_WTF, 'Explosive', '1')
  1092.     elements.property(elements.CJB_PT_WTF, 'Loss', '1')
  1093.     elements.property(elements.CJB_PT_WTF, 'AirLoss', '20')
  1094.     elements.property(elements.CJB_PT_WTF, 'AirDrag', '0.02')
  1095.     elements.property(elements.CJB_PT_WTF, 'Advection', '1')
  1096.     elements.property(elements.CJB_PT_WTF, 'Weight', '20')
  1097.     elements.property(elements.CJB_PT_WTF, 'Diffusion', '16384')
  1098.     elements.property(elements.CJB_PT_WTF, 'Temperature', '16384')
  1099.     elements.property(elements.CJB_PT_WTF, 'HotAir', '900')
  1100. local function Lflare(i, colr, colg, colb)
  1101.     return 1, 0x00000004, 255, 184, 117, 3, 255, 184, 117, 3
  1102. end
  1103. tpt.graphics_func(Lflare, WTF)
  1104.  
  1105.  
  1106. --Credits, I hope?
  1107.  
  1108. --[[
  1109. FeynmanLogomaker, timpfeifer, CeeJayBee, Videogamer555, 00yoshi, RadioActiveLua. If you were left out, email me at amywilsonmaster@gmail.com
  1110. ]]--
  1111.  
  1112.  
  1113. local a = "1"
  1114. local b = Window:new(-1,-1,200,200)
  1115. local c = Label:new(10,5,140,16, "TPT's Mod")
  1116. local d = Label:new(10,25,121,16, "Compiled by Amy")
  1117. local e =       Label:new(10,85,170,16, "Credit to: jacob1, FeynmanLogomaker,")
  1118. local f =       Label:new(135,5,88,16, ("AMY"))
  1119. local g = Label:new(10,95,180,16, "timpfeifer, CeeJayBee, Videogamer555,")
  1120. local h = Label:new(10,105,170,16,"00yoshi, and RadioActiveLua.")
  1121. local i = Label:new(10,125,180,16,"Report Bugs/Suggest for Next Version:")
  1122. local j = Label:new(10,135,170,16,"amywilsonmaster@gmail.com")
  1123.  
  1124. local Close = Button:new(10, 174, 60, 16, "Close")
  1125.  
  1126. Close:action(function() interface.closeWindow(b) end)
  1127. b:onTryExit(function() interface.closeWindow(b) end)
  1128.  
  1129. b:addComponent(Close);
  1130.  
  1131.  
  1132. local Button1 = Button:new(613, 97, 15, 15, "CR", "Open Info and Credits.")
  1133.  
  1134. Button1:action(function() interface.showWindow(b) end)
  1135.  
  1136. bb = Label:new(10,45,138,16, "Special Thanks To jacob1")
  1137. cc = Label:new(10,55,60,16, "Version 1")
  1138. dd = Label:new(10,65,57,16, "Update 0")
  1139.  
  1140. b:addComponent(bb)
  1141. b:addComponent(dd)
  1142. b:addComponent(cc)
  1143. b:addComponent(c)
  1144. b:addComponent(d)
  1145. b:addComponent(e)
  1146. b:addComponent(f)
  1147. b:addComponent(g)
  1148. b:addComponent(h)
  1149. b:addComponent(i)
  1150. b:addComponent(j)
  1151.  
  1152. interface.addComponent(Button1)
  1153.  
  1154. local a1 = "2"
  1155. local b1 = Window:new(-1,-1,200,200)
  1156. local c1 = Label:new(10,5,80,16, "SECRET MODE")
  1157. local d1 = Label:new(10,15,121,16, "Created By RadioActiveLua")
  1158. local f1 =      Label:new(135,5,88,16, ("RAM V."..a))
  1159.  
  1160. local Close1 = Button:new(10, 174, 60, 16, "Close")
  1161.  
  1162. local Start1 = Button:new(10, 194, 60, 16, "Enter")
  1163.  
  1164. Close1:action(function() interface.closeWindow(b1) end)
  1165. b1:onTryExit(function() interface.closeWindow(b1) end)
  1166.  
  1167. b1:addComponent(Close1);
  1168. b1:addComponent(Start1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement