Guest User

[Lua] PIF Script [002]

a guest
Mar 9th, 2013
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.40 KB | None | 0 0
  1. -- PowderIsFalling WFLM, BFLM, and DELE mod. v1.0
  2. --
  3. --
  4. -- SCRIPT STARTS HERE :
  5. -- ELEMENTCODES
  6. --
  7. -- BFLM {
  8.  
  9.     local element1 = elements.allocate("PIFMOD", "BFLM")
  10.      elements.element(elements.PIFMOD_PT_BFLM, elements.element(elements.DEFAULT_PT_SMKE))
  11.     elements.property(elements.PIFMOD_PT_BFLM, "Name", "BFLM")
  12.     elements.property(elements.PIFMOD_PT_BFLM, "Description", "Black Flame. (Like Amaterasu)")
  13.     elements.property(elements.PIFMOD_PT_BFLM, "Colour", 0x191919)
  14.     elements.property(elements.PIFMOD_PT_BFLM, "MenuSection", 15)
  15.     elements.property(elements.PIFMOD_PT_BFLM, "Gravity", 0)
  16.     --elements.property(elements.PIFMOD_PT_BFLM, "Loss", nil)
  17.     --elements.property(elements.PIFMOD_PT_BFLM, "AirLoss", nil)
  18.     --elements.property(elements.PIFMOD_PT_BFLM, "AirDrag", nil)
  19.     --elements.property(elements.PIFMOD_PT_BFLM, "Advection", nil)
  20.     elements.property(elements.PIFMOD_PT_BFLM, "Weight", 0)
  21.     --elements.property(elements.PIFMOD_PT_BFLM, "Diffusion", nil)
  22.     elements.property(elements.PIFMOD_PT_BFLM, "Properties", PROP_LIFE_DEC)
  23.     --elements.property(elements.PIFMOD_PT_BFLM, "Properties", PROP_LIFE_KILL_DEC)
  24.  
  25. -- BFLM }
  26. --
  27. -- WFLM {
  28.  
  29.     local element1 = elements.allocate("PIFMOD", "WFLM")
  30.      elements.element(elements.PIFMOD_PT_WFLM, elements.element(elements.DEFAULT_PT_SMKE))
  31.     elements.property(elements.PIFMOD_PT_WFLM, "Name", "WFLM")
  32.     elements.property(elements.PIFMOD_PT_WFLM, "Description", "White Flame.")
  33.     elements.property(elements.PIFMOD_PT_WFLM, "Colour", 0xffffff)
  34.     elements.property(elements.PIFMOD_PT_WFLM, "MenuSection", 6)
  35.     elements.property(elements.PIFMOD_PT_WFLM, "Gravity", 0)
  36.     --elements.property(elements.PIFMOD_PT_WFLM, "Loss", nil)
  37.     --elements.property(elements.PIFMOD_PT_WFLM, "AirLoss", nil)
  38.     --elements.property(elements.PIFMOD_PT_WFLM, "AirDrag", nil)
  39.     --elements.property(elements.PIFMOD_PT_WFLM, "Advection", nil)
  40.     elements.property(elements.PIFMOD_PT_WFLM, "Weight", 0)
  41.     --elements.property(elements.PIFMOD_PT_WFLM, "Diffusion", nil)
  42.     elements.property(elements.PIFMOD_PT_WFLM, "Properties", nil)
  43.     elements.property(elements.PIFMOD_PT_WFLM, "Properties", nil)
  44.  
  45. -- WFLM }
  46. --
  47. -- DELE {
  48.  
  49.     local element1 = elements.allocate("PIFMOD", "DELE")
  50.     elements.element(elements.PIFMOD_PT_DELE, elements.element(elements.DEFAULT_PT_DMND))
  51.     elements.property(elements.PIFMOD_PT_DELE, "Name", "DELE")
  52.     elements.property(elements.PIFMOD_PT_DELE, "Description", "DELE.")
  53.     elements.property(elements.PIFMOD_PT_DELE, "Colour", 0xffffff)
  54.     elements.property(elements.PIFMOD_PT_DELE, "MenuSection", 8)
  55.     elements.property(elements.PIFMOD_PT_DELE, "Gravity", 1)
  56.     elements.property(elements.PIFMOD_PT_DELE, "Loss", 0.8)
  57.     elements.property(elements.PIFMOD_PT_DELE, "AirLoss", 0.01)
  58.     elements.property(elements.PIFMOD_PT_DELE, "AirDrag", 0)
  59.     elements.property(elements.PIFMOD_PT_DELE, "Advection", 0.5)
  60.     elements.property(elements.PIFMOD_PT_DELE, "Weight", 5)
  61.     elements.property(elements.PIFMOD_PT_DELE, "Diffusion", 0.5)
  62.     --elements.property(elements.PIFMOD_PT_DELE, "Properties", PROP_nil_nil)
  63.     --elements.property(elements.PIFMOD_PT_DELE, "Properties", PROP_nil_nil_nil)
  64.  
  65. -- DELE }
  66. --
  67. -- FUNCTIONS
  68. --
  69. -- BFLM {
  70.  
  71. function bflm_spred(i, x, y, s, n)
  72.     tick1 = math.random(1, 10)
  73.     if tick1 == 1 then
  74.         xxx = {1,-1,1,-1,1,0,-1,0}
  75.         yyy = {1,-1,-1,1,0,1,0,-1}
  76.         for l = 1, 8 do
  77.             tpt.set_property("type", "WFLM", x+xxx[l], y+yyy[l])
  78.         end
  79.     end
  80.     tick2 = math.random(1, 16)
  81.     if tick2 == 8 then
  82.         tpt.delete(x, y)
  83.     end
  84. end
  85.  
  86. -- BFLM }
  87. --
  88. -- WFLM {
  89.  
  90. function WFLM_spred(i, x, y, s, n)
  91.     tpt.set_property("life", "100", x, y)
  92.     tick1 = math.random(1, 10)
  93.     if tick1 == 1 then
  94.         xxx = {1,-1,1,-1,1,0,-1,0}
  95.         yyy = {1,-1,-1,1,0,1,0,-1}
  96.         for l = 1, 8 do
  97.             tpt.set_property("type", "BFLM", x+xxx[l], y+yyy[l])
  98.         end
  99.     end
  100.     tick2 = math.random(1, 16)
  101.     if tick2 == 8 then
  102.         tpt.delete(x, y)
  103.     end
  104. end
  105.  
  106. -- WFLM }
  107. --
  108. -- DELE {
  109.  
  110. function DELE(i, x, y, s, n)
  111.     tpt.set_property("life", "100", x, y)
  112.     tick1 = math.random(1, 10)
  113.     if tick1 == 1 then
  114.         xxx = {1,-1,1,-1,1,0,-1,0}
  115.         yyy = {1,-1,-1,1,0,1,0,-1}
  116.         for l = 1, 8 do
  117.             tpt.set_property("type", "WFLM", x+xxx[l], y+yyy[l])
  118.         end
  119.     end
  120. end
  121. -- DELE }
  122. --
  123. -- SETFUNCS
  124. --
  125. -- BFLM {
  126. tpt.element_func(bflm_spred, elements.PIFMOD_PT_BFLM)
  127. -- BFLM }
  128. --
  129. -- WFLM {
  130. tpt.element_func(WFLM_spred, elements.PIFMOD_PT_WFLM)
  131. -- WFLM }
  132. --
  133. -- DELE {
  134. tpt.element_func(DELE, elements.PIFMOD_PT_DELE)
  135. -- DELE }
  136. --
  137. -- END OF CODE
  138. --
  139. -- NO COPYRIGHT :)
Advertisement
Add Comment
Please, Sign In to add comment