MassacreLand

Element: RAGE

Jan 29th, 2012
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. tpt.el.wind.name='RAGE'
  2. tpt.el.wind.description='Rage?'
  3. tpt.el.wind.color=0x800080
  4. tpt.el.wind.menusection=3
  5. tpt.el.wind.menu=1
  6. tpt.el.wind.enabled=1
  7. tpt.el.wind.weight=-1
  8. types={'fire','thrm'}
  9. math.randomseed(os.time())
  10. function rage(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',4,x+x2,y+y2)
  18. tpt.set_property('temp',10000+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.thrm.id and tpt.get_property('type',x+x2,y+y2)~=tpt.el.fire.id and tpt.get_property('type',x+x2,y+y2)~=tpt.el.wind.id then
  20. tpt.create(x+x2,y+y2,'rage')
  21. tpt.set_property('life',10,x+x2,y+y2)
  22. end
  23. end
  24. end
  25. end
  26. end
  27.  
  28. tpt.element_func(rage,tpt.el.wind.id)
Add Comment
Please, Sign In to add comment