Advertisement
Guest User

Script Nuclear Bomb

a guest
Aug 11th, 2020
1,718
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.88 KB | None | 0 0
  1. local ooo , err = pcall(function()
  2. local NUCL = elements.allocate("NUCULAR","NUCL")
  3. elements.element(elements.NUCULAR_PT_NUCL, elements.element(elements.DEFAULT_PT_BOMB))
  4. elements.property(elements.NUCULAR_PT_NUCL, "Name", "NUCL")
  5. elements.property(elements.NUCULAR_PT_NUCL, "Description", "Nuclear Bomb")
  6.  
  7. function nucl_update(i,x,y,s,n)
  8. local succes , error = pcall(function()
  9. local ele = "plsm"
  10. if tpt.get_property("type" , x , y+1) ~= 0 then
  11. --tpt.set_gravity(x/4,(y/4)-3,1,1, -9999)
  12. tpt.set_pressure((x/4)-25,(y/4)-35, 50, 50, -9999)
  13. tpt.set_pressure((x/4)-2,(y/4)-2, 5, 5, -9999)
  14. tpt.set_property("type","none",x,y)
  15. for u = 1 , 30 do
  16. for i = 1 , 30 do
  17. tpt.create(x - (u-15),y-(i+2),"nbdb" , 50 ,50)
  18. end
  19. end
  20.  
  21. tpt.set_property("type","nbdb",x-50,y-50 , 100 , 100)
  22. tpt.set_property("type","nbdp",x-10,y-32 , 20 , 20)
  23. for u = 1 , 20 do
  24. for i = 1 , 20 do
  25. tpt.create(x - (u-10),y-(i+30),"snow" )
  26. tpt.set_property("ctype" , "sing" , x , y)----------------------------Here
  27. tpt.set_property("tmp" , 75 , x , y)----------------------------------Here
  28. end
  29. end
  30. end
  31.  
  32. end)
  33. if succes then
  34.  
  35. else
  36. print(error)
  37. end
  38. end
  39. --tpt.element_func(nucl_update, elements.NUCULAR_PT_NUCL)
  40. elements.property(elements.NUCULAR_PT_NUCL,"Update",nucl_update)
  41. end)
  42.  
  43. ----------------------------------------------
  44. local ooo , err = pcall(function()
  45. local NUCL = elements.allocate("NUCULAR","FCOL")
  46. elements.element(elements.NUCULAR_PT_FCOL, elements.element(elements.DEFAULT_PT_PLUT))
  47. elements.property(elements.NUCULAR_PT_FCOL, "Name", "NBDB")
  48. elements.property(elements.NUCULAR_PT_FCOL, "Description", "Nuclear Bomb Debris")
  49.  
  50. function FCOL_update(i,x,y,s,n)
  51. local succes , error = pcall(function()
  52.  
  53. if math.random (1, 10) == 1 then
  54. tpt.create(x,y-2,"fire")
  55. tpt.create(x+1,y-2,"fire")
  56. tpt.create(x-1,y-2,"fire")
  57. tpt.create(x,y-4,"caus")
  58. tpt.create(x+1,y-4,"caus")
  59. tpt.create(x-1,y-4,"caus")
  60. tpt.set_pressure((x/4)-0,(y/4)-3, 1, 1, 10)
  61. end
  62. end)
  63. if succes then
  64.  
  65. else
  66.  
  67. end
  68. end
  69.  --
  70.  elements.property(elements.NUCULAR_PT_FCOL,"Update",FCOL_update)
  71.  
  72. end)
  73. if ooo then
  74. else
  75. print(err)
  76. end
  77. -------
  78. local ooo , err = pcall(function()
  79. local OOFF = elements.allocate("NUCULAR","FCCL")
  80. elements.element(elements.NUCULAR_PT_FCCL, elements.element(elements.DEFAULT_PT_PLUT))
  81. elements.property(elements.NUCULAR_PT_FCCL, "Name", "NBDP")
  82. elements.property(elements.NUCULAR_PT_FCCL, "Description", "Nuclear Bomb Debris Particle")
  83.  
  84. function FCCL_update(i,x,y,s,n)
  85. local succes , error = pcall(function()
  86.  
  87. if math.random (1, 120) == 1 then
  88. tpt.create(x,y-2,"neut")
  89. tpt.create(x+1,y-2,"neut")
  90. tpt.create(x-1,y-2,"neut")
  91. tpt.create(x,y-4,"prot")
  92. tpt.create(x+1,y-4,"prot")
  93. tpt.create(x-1,y-4,"prot")
  94. tpt.set_pressure((x/4)-0,(y/4)-3, 1, 1, 10)
  95. end
  96. end)
  97. if succes then
  98.  
  99. else
  100.  
  101. end
  102. end
  103.  --
  104.  elements.property(elements.NUCULAR_PT_FCCL,"Update",FCCL_update)
  105.  
  106. end)
  107. if ooo then
  108. else
  109. print(err)
  110. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement