Advertisement
MassacreLand

Element: NUKE(NotMine)

Jan 29th, 2012
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. math.randomseed(os.time())
  2.  
  3. function mousefunc(x, y, button, event)
  4. if event==1 then
  5. if button==1 then
  6. nukecounter=0
  7. end
  8. end
  9. end
  10. tpt.register_mouseclick(mousefunc)
  11.  
  12.  
  13.  
  14. tpt.el.bomb.description="BOOOOOOOOOOOOM!!!!!!!!!!"
  15. tpt.el.bomb.name="nuke"
  16.  
  17. function bomb_update(i, x, y, s, n)
  18. if tpt.get_property("tmp",i)==1 then
  19. randnum = math.random(0,nukecounter/100)
  20. if randnum==0 then
  21. tpt.set_property("type","nuke",i)
  22. tpt.set_property("tmp","0",i)
  23. nukecounter=nukecounter+1
  24. elseif randnum < nukecounter/750 then
  25. tpt.set_property("type","dest",i)
  26. else
  27. tpt.set_property("type","thdr",i)
  28. end
  29. end
  30.  
  31. end
  32. tpt.element_func(bomb_update, tpt.el.bomb.id) [/code]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement