Advertisement
MassacreLand

Element: EWAT

Jan 29th, 2012
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.93 KB | None | 0 0
  1.  
  2. tpt.el.star.name='EWAT'
  3. tpt.el.star.description='Angry water.'
  4. tpt.el.star.color=0x84BFD5
  5. tpt.el.star.menusection=4
  6. tpt.el.star.menu=1
  7. tpt.el.star.enabled=1
  8. tpt.el.star.weight=-1
  9. types={'hygn','oxyg'}
  10. math.randomseed(os.time())
  11. function ewat(i,x,y,s,n)
  12. for n=1,2 do
  13. tpt.parts[i].x=tpt.get_property('x',i)+math.random(-6,6)
  14. tpt.parts[i].y=tpt.get_property('y',i)+math.random(-6,6)
  15. for x2=-7,7 do
  16. for y2=-math.sqrt((49)-(x2^2)),math.sqrt((49)-(x2^2)) do
  17. tpt.create(x+x2,y+y2,types[math.random(1,2)])
  18. tpt.set_property('life',4,x+x2,y+y2)
  19. tpt.set_property('temp',-10000+273.15,x+x2,y+y2)
  20. if tpt.get_property('type',x+x2,y+y2)~=0 and tpt.get_property('type',x+x2,y+y2)~=tpt.el.oxyg.id and tpt.get_property('type',x+x2,y+y2)~=tpt.el.hygn.id and tpt.get_property('type',x+x2,y+y2)~=tpt.el.star.id then
  21. tpt.create(x+x2,y+y2,'watr')
  22. tpt.set_property('life',10,x+x2,y+y2)
  23. end
  24. end
  25. end
  26. end
  27. end
  28.  
  29. tpt.element_func(ewat,tpt.el.star.id)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement