Advertisement
Guest User

Realistic_Elements

a guest
Aug 1st, 2014
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 20.30 KB | None | 0 0
  1. -- Caesium
  2. caes = elements.allocate("RAD", "CAES") --properties
  3. elements.element(caes, elements.element(elements.DEFAULT_PT_COAL))
  4. elements.property(caes, "Name", "CAES")
  5. elements.property(caes, "Description", "Caesium. Highly reactive and will violently explode in water.")
  6. elements.property(caes, "Colour", 0xD8D8D8)
  7. elements.property(caes, "MenuSection", 10)
  8. elements.property(caes, "Gravity", 0)
  9. elements.property(caes, "Properties", elements.ST_SOLID + elements.TYPE_SOLID + elements.PROP_DEADLY)
  10. elements.property(caes, "Flammable", 0)
  11. elements.property(caes, "Explosive", 0)
  12. function propc(i,x,y,s,n)
  13. local ctemp = tpt.get_property("temp", i) -- melt into Liquid Caesium
  14.     if ctemp > 301.59 then
  15.     tpt.set_property("type", "lcas", i)
  16.     end
  17.     if math.random(1, 7500) == 1 then -- decay
  18.     local ran = math.random(-20,20)
  19.     local ran2 = math.random(-20,0)
  20.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
  21.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  22.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
  23.     tpt.set_property("vx", math.random(-25,25), i)
  24.     tpt.set_property("vy", math.random(-25,25), i)
  25.     tpt.set_property("life", 10000, i)
  26.         if math.abs(ran) + math.abs(ran2) > 10 then
  27.         local ran3 = math.random(1,4)
  28.             if ran3 == 1 then
  29.             tpt.set_property("type", "elec", i)
  30.             end
  31.             if ran3 == 2 then
  32.             tpt.set_property("type", "phot", i)
  33.             end
  34.             if ran3 == 3 then
  35.             tpt.set_property("type", "prot", i)
  36.             end
  37.             if ran3 == 4 then
  38.             tpt.set_property("type", "neut", i)
  39.             end
  40.         end
  41.     end
  42.    
  43. local colx = math.random(-1,1)
  44. local coly = math.random(-1,1)
  45. local coltype = tpt.get_property("type", x+colx, y+coly)
  46. local temp = tpt.get_property("temp", i)
  47.     if coltype == elements.DEFAULT_PT_WATR then
  48.     tpt.set_pressure(x,y,10,10,100)
  49.     tpt.set_property("life", 10000, i)
  50.     tpt.set_property("vx", math.random(-25,25), i)
  51.     tpt.set_property("vy", math.random(-25,25), i)
  52.     tpt.set_property("temp", temp + 1000 ,i)
  53.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
  54.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  55.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
  56.     tpt.set_property("type", "hygn", coltype)
  57.     local rand = math.random(1,4)
  58.         if rand == 1 then
  59.         tpt.set_property("type", "elec", i)
  60.         end
  61.         if rand == 2 then
  62.         tpt.set_property("type", "phot", i)
  63.         end
  64.         if rand == 3 then
  65.         tpt.set_property("type", "prot", i)
  66.         end
  67.         if rand == 4 then
  68.         tpt.set_property("type", "neut", i)
  69.         end
  70.     end
  71.     if coltype == elements.DEFAULT_PT_DSTW then
  72.     tpt.set_pressure(x,y,10,10,100)
  73.     tpt.set_property("life", 10000, i)
  74.     tpt.set_property("vx", math.random(-25,25), i)
  75.     tpt.set_property("vy", math.random(-25,25), i)
  76.     local rand = math.random(1,4)
  77.         if rand == 1 then
  78.                 tpt.set_property("type", "elec", i)
  79.         end
  80.         if rand == 2 then
  81.         tpt.set_property("type", "phot", i)
  82.         end
  83.         if rand == 3 then
  84.         tpt.set_property("type", "prot", i)
  85.         end
  86.                 if rand == 4 then
  87.         tpt.set_property("type", "neut", i)
  88.         end
  89.     tpt.set_property("temp", temp + 1000 ,i)
  90.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
  91.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  92.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
  93.     tpt.set_property("type", "hygn", coltype)
  94.     end
  95.     if coltype == elements.DEFAULT_PT_SLTW then
  96.     tpt.set_pressure(x,y,10,10,100)
  97.     tpt.set_property("life", 10000, i)
  98.     tpt.set_property("vx", math.random(-25,25), i)
  99.     tpt.set_property("vy", math.random(-25,25), i)
  100.     local rand = math.random(1,4)
  101.         if rand == 1 then
  102.         tpt.set_property("type", "elec", i)
  103.         end
  104.         if rand == 2 then
  105.         tpt.set_property("type", "phot", i)
  106.         end
  107.         if rand == 3 then
  108.         tpt.set_property("type", "prot", i)
  109.         end
  110.         if rand == 4 then
  111.         tpt.set_property("type", "neut", i)
  112.         end
  113.     tpt.set_property("temp", temp + 1000 ,i)
  114.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
  115.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  116.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
  117.     tpt.set_property("type", "hygn", coltype)
  118.     end
  119. end
  120. tpt.element_func(propc, tpt.element("caes"))
  121. elements.property(caes, "HighTemperature", 1938)
  122. -- Liquid Caesium
  123. Lcas = elements.allocate("RAD", "LCAS") -- properties
  124. elements.element(Lcas, elements.element(elements.DEFAULT_PT_EXOT))
  125. elements.property(Lcas, "Name", "LCAS")
  126. elements.property(Lcas, "Description", "Liquid Caesium. Highly reactive and will violently explode in water.")
  127. elements.property(Lcas, "Colour", 0xD9D9D9)
  128. elements.property(Lcas, "MenuSection", 10)
  129. elements.property(Lcas, "Gravity", 1)
  130. elements.property(Lcas, "Weight", 10)
  131. elements.property(Lcas, "Flammable", 0)
  132. elements.property(Lcas, "Explosive", 0)
  133. elements.property(caes, "Properties", elements.ST_LIQUID + elements.TYPE_LIQUID + elements.PROP_DEADLY)
  134. function proplcas(i,x,y,s,n)
  135. local ctemp = tpt.get_property("temp", i) -- decay
  136.     if math.random(1, 7500) == 1 then
  137.     local ran = math.random(-20,20)
  138.     local ran2 = math.random(-20,0)
  139.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
  140.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  141.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
  142.     tpt.set_property("life", 10000, i)
  143.     tpt.set_property("vx", math.random(-25,25), i)
  144.     tpt.set_property("vy", math.random(-25,25), i)
  145.         if math.abs(ran) + math.abs(ran2) > 10 then
  146.         local ran3 = math.random(1,4)
  147.             if ran3 == 1 then
  148.             tpt.set_property("type", "elec", i)
  149.             end
  150.             if ran3 == 2 then
  151.             tpt.set_property("type", "phot", i)
  152.             end
  153.             if ran3 == 3 then
  154.             tpt.set_property("type", "prot", i)
  155.             end
  156.             if ran3 == 4 then
  157.             tpt.set_property("type", "neut", i)
  158.             end
  159.         end
  160.     end
  161. local colx = math.random(-1,1) -- react w/ water
  162. local coly = math.random(-1,1)
  163. local coltype = tpt.get_property("type", x+colx, y+coly)
  164. local temp = tpt.get_property("temp", i)
  165.     if coltype == elements.DEFAULT_PT_WATR then
  166.     tpt.set_pressure(x,y,10,10,100)
  167.     tpt.set_property("life", 10000, i)
  168.     tpt.set_property("vx", math.random(-25,25), i)
  169.     tpt.set_property("vy", math.random(-25,25), i)
  170.     local rand = math.random(1,4)
  171.         if rand == 1 then
  172.         tpt.set_property("type", "elec", i)
  173.         end
  174.         if rand == 2 then
  175.         tpt.set_property("type", "phot", i)
  176.         end
  177.         if rand == 3 then
  178.         tpt.set_property("type", "prot", i)
  179.         end
  180.         if rand == 4 then
  181.         tpt.set_property("type", "neut", i)
  182.         end
  183.     tpt.set_property("temp", temp + 1000 ,i)
  184.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
  185.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  186.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
  187.     tpt.set_property("type", "hygn", coltype)
  188.     end
  189.     if coltype == elements.DEFAULT_PT_DSTW then
  190.     tpt.set_pressure(x,y,10,10,100)
  191.     tpt.set_property("life", 10000, i)
  192.     tpt.set_property("vx", math.random(-25,25), i)
  193.     tpt.set_property("vy", math.random(-25,25), i)
  194.     local rand = math.random(1,4)
  195.         if rand == 1 then
  196.         tpt.set_property("type", "elec", i)
  197.         end
  198.         if rand == 2 then
  199.         tpt.set_property("type", "phot", i)
  200.         end
  201.         if rand == 3 then
  202.         tpt.set_property("type", "prot", i)
  203.         end
  204.         if rand == 4 then
  205.         tpt.set_property("type", "neut", i)
  206.         end
  207.     tpt.set_property("temp", temp + 1000 ,i)
  208.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
  209.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  210.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
  211.     tpt.set_property("type", "hygn", coltype)
  212.     end
  213.     if coltype == elements.DEFAULT_PT_SLTW then
  214.     tpt.set_pressure(x,y,10,10,100)
  215.     tpt.set_property("life", 10000, i)
  216.     tpt.set_property("vx", math.random(-25,25), i)
  217.     tpt.set_property("vy", math.random(-25,25), i)
  218.     local rand = math.random(1,4)
  219.         if rand == 1 then
  220.         tpt.set_property("type", "elec", i)
  221.         end
  222.         if rand == 2 then
  223.         tpt.set_property("type", "phot", i)
  224.         end
  225.         if rand == 3 then
  226.         tpt.set_property("type", "prot", i)
  227.         end
  228.         if rand == 4 then
  229.         tpt.set_property("type", "neut", i)
  230.         end
  231.     tpt.set_property("temp", temp + 1000 ,i)
  232.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
  233.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  234.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
  235.     tpt.set_property("type", "hygn", coltype)
  236.     end
  237. end
  238. elements.property(Lcas, "LowTemperature", 200) -- turn into Solid Caesium
  239. tpt.element_func(proplcas, tpt.element("lcas"))
  240. elements.property(Lcas, "LowTemperatureTransition", caes)
  241. -- Palladium
  242. -- notes: Asorbs hydrogen, acid resistant, melts at 1833.15, solidifies at about 1700
  243. Pald = elements.allocate("STB", "PALD") --properties
  244. elements.element(Pald, elements.element(elements.DEFAULT_PT_GLAS))
  245. elements.property(Pald, "Name", "PALD")
  246. elements.property(Pald, "Description", "Palladium. Adsorbs Hydrogen and doesn't corrode.")
  247. elements.property(Pald, "Colour", 0xFFABBBBF)
  248. elements.property(Pald, "MenuSection", 9)
  249. elements.property(Pald, "Gravity", 0)
  250. elements.property(Pald, "Properties", elements.ST_SOLID + elements.TYPE_SOLID + elements.PROP_CONDUCTS)
  251. elements.property(Pald, "Flammable", 0)
  252. elements.property(Pald, "Explosive", 0)
  253. elements.property(Pald, "HighTemperature", 1833.15)
  254. function propp(i,x,y,s,nt)
  255. local life = tpt.get_property("life", i)
  256.     if life >= 1 then
  257.     tpt.set_property("life", 0 , i)
  258.     end
  259. -- adsorbs hydrogen
  260. local collx = math.random(-1,1)
  261. local colly = math.random(-1,1)
  262. hygn = tpt.get_property("type", x+collx, y+colly)
  263.     if hygn == elements.DEFAULT_PT_HYGN then
  264.     tpt.delete(x+collx, y+colly)
  265.     end
  266. end
  267. tpt.element_func(propp, tpt.element("pald"))
  268. -- Radium
  269. -- notes: Emits light and decays, soft and a white to black colour. Radium corrodes in water. Dangerous to humans. Melts at 973.15 boils at 1413.15.
  270. Radi = elements.allocate("RAD", "RADI") --properties
  271. elements.element(Radi, elements.element(elements.DEFAULT_PT_TTAN))
  272. elements.property(Radi, "Name", "RADI")
  273. elements.property(Radi, "Description", "Radium. Emits light and slowly corrodes in water.")
  274. elements.property(Radi, "Colour", 0xFFFFFFFF)
  275. elements.property(Radi, "MenuSection", 10)
  276. elements.property(Radi, "Gravity", 0)
  277. elements.property(Radi, "Properties", elements.ST_SOLID + elements.TYPE_SOLID + elements.PROP_DEADLY)
  278. elements.property(Radi, "Flammable", 0)
  279. elements.property(Radi, "Explosive", 0)
  280. elements.property(Radi, "HighTemperature", 1413.15)
  281. function propr(i,x,y,s,n)
  282. local ratemp = tpt.get_property("temp",i)
  283.     if ratemp > 973.15 then
  284.     tpt.set_property("type","lrad",i)
  285.     end
  286.     if math.random(0,100) == 1 then -- create photons and decay
  287.     local mathx = math.random(-1,1)
  288.     local mathy = math.random(-1,1)
  289.     tpt.create(x+mathx, y+mathy, "PHOT")
  290.     tpt.set_property("life",680,mathx,mathy)
  291.         if(math.random(0,7500) == 1) then
  292.         tpt.set_property("life", 10000, i)
  293.         tpt.set_property("vx", math.random(-25,25), i)
  294.         tpt.set_property("vy", math.random(-25,25), i)
  295.         tpt.set_property("type", "neut", i)
  296.         end
  297.     end
  298. local nx = math.random(-1,1) -- react w/ water
  299. local nx2 = math.random(-1,1)
  300. watr = tpt.get_property("type", x+nx, y+nx2)
  301.     if watr == elements.DEFAULT_PT_WATR then
  302.         if math.random(0,7500) == 1 then
  303.         tpt.set_property("type","exot",i)
  304.         end
  305.     end
  306.     if watr == elements.DEFAULT_PT_DSTW then
  307.         if math.random(0,7500) == 1 then
  308.         tpt.set_property("type","exot",i)
  309.         end
  310.     end
  311.     if watr == elements.DEFAULT_PT_SLTW then
  312.         if math.random(0,7500) == 1 then
  313.         tpt.set_property("type","exot",i)
  314.         end
  315.     end
  316. end
  317. tpt.element_func(propr, tpt.element("radi"))
  318. -- Liquid Radium
  319. -- notes:
  320. Lrad = elements.allocate("RAD", "Lrad") --properties
  321. elements.element(Lrad, elements.element(elements.DEFAULT_PT_MERC))
  322. elements.property(Lrad, "Name", "LRAD")
  323. elements.property(Lrad, "Description", "Liquid Radium. Emits light and slowly corrodes in water.")
  324. elements.property(Lrad, "Colour", 0xFFFFFFFF)
  325. elements.property(Lrad, "MenuSection", 10)
  326. elements.property(Lrad, "Gravity", 1)
  327. elements.property(Lrad, "Properties", elements.ST_LIQUID + elements.TYPE_LIQUID + elements.PROP_DEADLY)
  328. elements.property(Lrad, "Flammable", 0)
  329. elements.property(Lrad, "Explosive", 0)
  330. elements.property(Lrad, "HighTemperature", 1413.15)
  331. elements.property(Lrad, "LowTemperature", 1300)
  332. elements.property(Lrad, "LowTemperatureTransition", Radi)
  333. function proplr(i,x,y,s,n)
  334. local lrtemp = tpt.get_property("temp",i)
  335. tpt.set_property("temp", lrtemp + 973.15, i)
  336.     if math.random(0,100) == 1 then -- decay and create photons
  337.     local mathx = math.random(-1,1)
  338.     local mathy = math.random(-1,1)
  339.     tpt.create(x+mathx, y+mathy, "PHOT")
  340.     tpt.set_property("life",680,x+mathx, y+mathy)
  341.         if(math.random(0,7500) == 1) then
  342.         tpt.set_property("life", 10000, i)
  343.         tpt.set_property("vx", math.random(-25,25), i)
  344.         tpt.set_property("vy", math.random(-25,25), i)
  345.         tpt.set_property("type", "neut", i)
  346.         end
  347.     end
  348. local nx = math.random(-1,1) -- react w/ water
  349. local nx2 = math.random(-1,1)
  350. watr = tpt.get_property("type", x+nx, y+nx2)
  351.     if watr == elements.DEFAULT_PT_WATR then
  352.         if math.random(0,7500) == 1 then
  353.         tpt.set_property("type","exot",i)
  354.         end
  355.     end
  356.     if watr == elements.DEFAULT_PT_DSTW then
  357.         if math.random(0,7500) == 1 then
  358.         tpt.set_property("type","exot",i)
  359.         end
  360.     end
  361.     if watr == elements.DEFAULT_PT_SLTW then
  362.         if math.random(0,7500) == 1 then
  363.         tpt.set_property("type","exot",i)
  364.         end
  365.     end    
  366. end
  367. tpt.element_func(proplr, tpt.element("lrad"))
  368. -- Magnesium
  369. -- notes: Burns with fire or plasma, flame is very hot. Melts (or burns) at 923.15. Boils at 1380.15. Burns with white flame. Creates hydrogen with acid.
  370. Magn = elements.allocate("STB", "MAGN") --properties
  371. elements.element(Magn, elements.element(elements.DEFAULT_PT_GLAS))
  372. elements.property(Magn, "Name", "MAGN")
  373. elements.property(Magn, "Description", "Magnesium. Burns with an intense flame.")
  374. elements.property(Magn, "Colour", 0x586165)
  375. elements.property(Magn, "MenuSection", 9)
  376. elements.property(Magn, "Gravity", 0)
  377. elements.property(Magn, "Properties", elements.ST_SOLID + elements.TYPE_SOLID)
  378. elements.property(Magn, "Flammable", 0)
  379. elements.property(Magn, "Explosive", 0)
  380. elements.property(Magn, "HighTemperature", 100000)
  381. function propmag(i,x,y,s,n)
  382. local tempm = tpt.get_property("temp", i) -- burn with temperature.
  383.     if tempm > 1380.15 then
  384.     tpt.set_property("life", 500, i)
  385.     tpt.set_property("temp", 6500, i)
  386.     local magran = math.random(1,3)
  387.         if magran == 1 then
  388.         tpt.set_property("type", "PLSM", i)
  389.         end
  390.         if magran == 2 then
  391.         tpt.set_property("type", "FIRE", i)
  392.         end
  393.         if magran == 3 then
  394.         tpt.set_property("type", "PHOT", i)
  395.         end
  396.     end
  397. local magx = math.random(-1,1)
  398. local magy = math.random(-1,1)
  399. local acid = tpt.get_property("type", x+magx, y+magy) -- react with acid
  400.     if acid == elements.DEFAULT_PT_ACID then
  401.     tpt.set_property("type", "HYGN", i)
  402.     tpt.set_property("type", "HYGN", acid)
  403.     end
  404. end
  405. tpt.element_func(propmag, tpt.element("magn"))
  406. -- Francium
  407. -- notes: Violently explodes in water.
  408. Fran = elements.allocate("RAD", "Fran") --properties
  409. elements.element(Fran, elements.element(elements.DEFAULT_PT_BCOL))
  410. elements.property(Fran, "Name", "FRAN")
  411. elements.property(Fran, "Description", "Francium. Highly unstable and will decay within seconds. Do not place in water.")
  412. elements.property(Fran, "Colour", 0xC0C0C0)
  413. elements.property(Fran, "MenuSection", 10)
  414. elements.property(Fran, "Weight", 100)
  415. elements.property(Fran, "Gravity", 1)
  416. elements.property(Fran, "Properties", elements.ST_SOLID + elements.TYPE_SOLID + elements.PROP_DEADLY)
  417. elements.property(Fran, "Flammable", 0)
  418. elements.property(Fran, "Explosive", 0)
  419. elements.property(Fran, "HighTemperature", 100000)
  420. function propfr(i,x,y,s,n)
  421.     if math.random(0,25) == 1 then
  422.         local frdecay = math.random(1,7) -- decay
  423.         local frtemp = tpt.get_property("temp", i)
  424.         tpt.set_property("life", math.random(500,1000),i)
  425.         tpt.set_property("vx", math.random(-25,25), i)
  426.         tpt.set_property("vy", math.random(-25,25), i)
  427.         tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
  428.         tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  429.         tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
  430.             if frdecay == 1 then
  431.             tpt.set_property("temp", frtemp + 50000 , i)
  432.             tpt.set_property("type", "PHOT", i)
  433.             end
  434.             if frdecay == 2 then
  435.             tpt.set_property("type", "PHOT", i)
  436.             end
  437.             if frdecay == 3 then
  438.             tpt.set_property("type", "PROT", i)
  439.             end
  440.             if frdecay == 4 then
  441.             tpt.set_property("type", "NEUT", i)
  442.             end
  443.             if frdecay == 5 then
  444.             tpt.set_property("type", "NEUT", i)
  445.             end
  446.             if frdecay == 5 then
  447.             tpt.set_property("type", "NBLE", i)
  448.             end
  449.             if frdecay == 5 then
  450.             tpt.set_property("type", "PROT", i)
  451.             end
  452.     end
  453. local col = math.random(-1,1) -- react with water
  454. local col2 = math.random(-1,1)
  455. colltype = tpt.get_property("type", x+col, y+col2)
  456.     if colltype == elements.DEFAULT_PT_WATR then
  457.     local frdecay = math.random(1,7)
  458.     local frtemp = tpt.get_property("temp", i)
  459.     tpt.set_property("type", "PHOT", colltype)
  460.     tpt.set_property("life", math.random(500,1000),i)
  461.     tpt.set_property("vx", math.random(-25,25), i)
  462.     tpt.set_property("vy", math.random(-25,25), i)
  463.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
  464.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  465.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
  466.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "thdr")
  467.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "caes")
  468.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "magn")
  469.     tpt.set_pressure(x,y,1,1,200)
  470.         if frdecay == 1 then
  471.         tpt.set_property("temp", frtemp + 50000 , i)
  472.         tpt.set_property("type", "PHOT", i)
  473.         end
  474.         if frdecay == 2 then
  475.         tpt.set_property("type", "PHOT", i)
  476.         end
  477.         if frdecay == 3 then
  478.         tpt.set_property("type", "PROT", i)
  479.         end
  480.         if frdecay == 4 then
  481.         tpt.set_property("type", "NEUT", i)
  482.         end
  483.         if frdecay == 5 then
  484.         tpt.set_property("type", "NEUT", i)
  485.         end
  486.         if frdecay == 5 then
  487.         tpt.set_property("type", "NBLE", i)
  488.         end
  489.         if frdecay == 5 then
  490.         tpt.set_property("type", "PROT", i)
  491.         end
  492.     end
  493.     if colltype == elements.DEFAULT_PT_DSTW then
  494.     local frdecay = math.random(1,7)
  495.     local frtemp = tpt.get_property("temp", i)
  496.     tpt.set_property("life", math.random(500,1000),i)
  497.     tpt.set_property("vx", math.random(-25,25), i)
  498.     tpt.set_property("vy", math.random(-25,25), i)
  499.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
  500.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  501.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
  502.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "thdr")
  503.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "caes")
  504.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "magn")
  505.     tpt.set_pressure(x,y,10,10,200)
  506.         if frdecay == 1 then
  507.         tpt.set_property("temp", frtemp + 50000 , i)
  508.         tpt.set_property("type", "PHOT", i)
  509.         end
  510.         if frdecay == 2 then
  511.         tpt.set_property("type", "PHOT", i)
  512.         end
  513.         if frdecay == 3 then
  514.         tpt.set_property("type", "PROT", i)
  515.         end
  516.         if frdecay == 4 then
  517.         tpt.set_property("type", "NEUT", i)
  518.         end
  519.         if frdecay == 5 then
  520.         tpt.set_property("type", "NEUT", i)
  521.         end
  522.         if frdecay == 5 then
  523.         tpt.set_property("type", "NBLE", i)
  524.         end
  525.         if frdecay == 5 then
  526.         tpt.set_property("type", "PROT", i)
  527.         end
  528.     end
  529.     if colltype == elements.DEFAULT_PT_SLTW then
  530.     local frdecay = math.random(1,7)
  531.     local frtemp = tpt.get_property("temp", i)
  532.     tpt.set_property("life", math.random(500,1000),i)
  533.     tpt.set_property("vx", math.random(-25,25), i)
  534.     tpt.set_property("vy", math.random(-25,25), i)
  535.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "nble")
  536.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "hygn")
  537.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "plsm")
  538.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "thdr")
  539.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "caes")
  540.     tpt.create(x+math.random(-1,1), y+math.random(-1,1), "magn")
  541.     tpt.set_pressure(x,y,10,10,200)
  542.         if frdecay == 1 then
  543.         tpt.set_property("temp", frtemp + 50000 , i)
  544.         tpt.set_property("type", "PHOT", i)
  545.         end
  546.         if frdecay == 2 then
  547.         tpt.set_property("type", "PHOT", i)
  548.         end
  549.         if frdecay == 3 then
  550.         tpt.set_property("type", "PROT", i)
  551.         end
  552.         if frdecay == 4 then
  553.         tpt.set_property("type", "NEUT", i)
  554.         end
  555.         if frdecay == 5 then
  556.         tpt.set_property("type", "NEUT", i)
  557.         end
  558.         if frdecay == 5 then
  559.         tpt.set_property("type", "NBLE", i)
  560.         end
  561.         if frdecay == 5 then
  562.         tpt.set_property("type", "PROT", i)
  563.         end
  564.     end
  565. end
  566. tpt.element_func(propfr, tpt.element("Fran"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement