Advertisement
MassacreLand

Element: SHDW

Feb 2nd, 2012
851
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.98 KB | None | 0 0
  1. tpt.el.phot.name='SHDW'
  2. tpt.el.phot.description='A unpredictable burste of energy.'
  3. tpt.el.phot.color=0x434343
  4. tpt.el.phot.menusection=8
  5. tpt.el.phot.menu=1
  6. tpt.el.phot.enabled=1
  7. tpt.el.phot.weight=-1
  8. types={'neut','plsm'}
  9. math.randomseed(os.time())
  10. function shadow(i,x,y,s,n)
  11. for n=1,2 do
  12. tpt.parts[i].x=tpt.get_property('x',i)+math.random(-6,6)
  13. tpt.parts[i].y=tpt.get_property('y',i)+math.random(-6,6)
  14. for x2=-7,7 do
  15. for y2=-math.sqrt((49)-(x2^2)),math.sqrt((49)-(x2^2)) do
  16. tpt.create(x+x2,y+y2,types[math.random(1,2)])
  17. tpt.set_property('life',10,x+x2,y+y2)
  18. tpt.set_property('temp',50000+273.15,x+x2,y+y2)
  19. if tpt.get_property('type',x+x2,y+y2)~=0 and tpt.get_property('type',x+x2,y+y2)~=tpt.el.plsm.id and tpt.get_property('type',x+x2,y+y2)~=tpt.el.neut.id and tpt.get_property('type',x+x2,y+y2)~=tpt.el.phot.id then
  20. tpt.create(x+x2,y+y2,'ice')
  21. tpt.set_property('life',30,x+x2,y+y2)
  22. end
  23. end
  24. end
  25. end
  26. end
  27.      
  28. tpt.element_func(shadow,tpt.el.phot.id)
  29.  
  30. tpt.el.neut.color=0x434343
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement