Advertisement
LGPvS

OWOP anarchy nuclear

Oct 24th, 2018
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.00 KB | None | 0 0
  1. setbigPX=function(x,y,clr){
  2. OWOP.world.setPixel(x,y,clr)
  3. OWOP.world.setPixel(x+1,y,clr)
  4. OWOP.world.setPixel(x+1,y+1,clr)
  5. OWOP.world.setPixel(x,y+1,clr)
  6. OWOP.world.setPixel(x+2,y,clr)
  7. OWOP.world.setPixel(x+2,y+2,clr)
  8. OWOP.world.setPixel(x,y+2,clr)
  9. OWOP.world.setPixel(x+2,y+1,clr)
  10. OWOP.world.setPixel(x+1,y+2,clr)
  11. OWOP.world.setPixel(x+3,y,clr)
  12. OWOP.world.setPixel(x,y+3,clr)
  13. OWOP.world.setPixel(x+3,y+2,clr)
  14. OWOP.world.setPixel(x+3,y+1,clr)
  15. OWOP.world.setPixel(x+2,y+3,clr)
  16. OWOP.world.setPixel(x+1,y+3,clr)
  17. OWOP.world.setPixel(x+3,y+3,clr)
  18. }
  19. function randomMM(min,max) {
  20.  
  21. return Math.floor(Math.random() * (max-min) + min);
  22.  
  23. }
  24. RandErase=function(x,y,size){
  25. for(var i=0; i<size*size/4; i++){
  26. setTimeout(function(){
  27.  
  28. setbigPX(randomMM(x,size+x),randomMM(y,size+y),[255,255,255]);
  29. setbigPX(randomMM(x,size+x),randomMM(y,size+y),[255,255,255]);
  30. },1*i);
  31.  
  32. }
  33. }
  34.  
  35. squareRand=function(x,y,size,clr,time){
  36. for(var iSQ=0; iSQ<time; iSQ++){
  37. setTimeout(function(){
  38.  
  39. setbigPX(randomMM(x,size+x),randomMM(y,size+y),clr)
  40.  
  41. },1*iSQ);
  42. }
  43. setTimeout(function(){
  44. for(var iSQ=0; iSQ<size*size/4; iSQ++){
  45. setTimeout(function(){
  46.  
  47. setbigPX(randomMM(x,size+x),randomMM(y,size+y),[255,255,255])
  48.  
  49. },1*iSQ);
  50. }
  51. },time+4000)
  52. }
  53. dotsRand=function(x2,y2,size2,clr,time){
  54. for(var dotsI=0; dotsI<time; dotsI++){
  55. setTimeout(function(){
  56.  
  57. OWOP.world.setPixel(randomMM(x2,size2+x2),randomMM(y2,size2+y2),clr)
  58. OWOP.world.setPixel(randomMM(x2,size2+x2),randomMM(y2,size2+y2),clr)
  59. OWOP.world.setPixel(randomMM(x2,size2+x2),randomMM(y2,size2+y2),clr)
  60. OWOP.world.setPixel(randomMM(x2,size2+x2),randomMM(y2,size2+y2),clr)
  61. OWOP.world.setPixel(randomMM(x2,size2+x2),randomMM(y2,size2+y2),clr)
  62. },1*dotsI);
  63.  
  64. }
  65. }
  66.  
  67. explodeNuclear=function(x,y,size){
  68. explodeNuclear1(x-(size+4)/3.125,y-(size+4)/3.125,size)
  69. }
  70. explodeNuclear1=function(x,y,size){
  71. squareRand(x+(size+4)/3.125,y+(size+4)/3.125,(size+4)/6.25,[255,255,0],size*size/4)
  72. RandErase(x,y,size);
  73. dotsRand(x-((size+4)*2.5-(size+4))/2.5,y-((size+4)*2.5-(size+4))/2.5,(size+4)*2.5,[0,255,0],size*size/4)
  74. }
  75.  
  76. OWOP.tool.addToolObject(new OWOP.tool.class("Mini Nuclear Bomb", OWOP.cursors.erase, OWOP.fx.player.NONE, OWOP.RANK.NONE, function(tool) {
  77.  
  78.  
  79. tool.setEvent('mousemove mousedown', function (mouse,event){
  80.  
  81.  
  82. if(mouse.buttons == 1 || mouse.buttons == 2) {
  83. explodeNuclear(OWOP.mouse.tileX,OWOP.mouse.tileY,Math.cbrt(125));
  84. }
  85. });
  86. }));
  87.  
  88. OWOP.tool.addToolObject(new OWOP.tool.class("Little Boy", OWOP.cursors.erase, OWOP.fx.player.NONE, OWOP.RANK.NONE, function(tool) {
  89.  
  90.  
  91. tool.setEvent('mousemove mousedown', function (mouse,event){
  92.  
  93.  
  94. if(mouse.buttons == 1 || mouse.buttons == 2) {
  95. explodeNuclear(OWOP.mouse.tileX,OWOP.mouse.tileY,Math.cbrt(10000));
  96. }
  97. });
  98. }));
  99.  
  100.  
  101.  
  102. OWOP.tool.addToolObject(new OWOP.tool.class("Fatman", OWOP.cursors.erase, OWOP.fx.player.NONE, OWOP.RANK.NONE, function(tool) {
  103.  
  104.  
  105. tool.setEvent('mousemove mousedown', function (mouse,event){
  106.  
  107.  
  108. if(mouse.buttons == 1 || mouse.buttons == 2) {
  109. explodeNuclear(OWOP.mouse.tileX,OWOP.mouse.tileY,Math.cbrt(20000));
  110. }
  111. });
  112. }));
  113.  
  114. OWOP.tool.addToolObject(new OWOP.tool.class("W-59", OWOP.cursors.erase, OWOP.fx.player.NONE, OWOP.RANK.NONE, function(tool) {
  115. tool.setEvent('mousemove mousedown', function (mouse,event){
  116. if(mouse.buttons == 1 || mouse.buttons == 2) {
  117. explodeNuclear(OWOP.mouse.tileX,OWOP.mouse.tileY,Math.cbrt(1000000));
  118. }
  119. });
  120. }));
  121.  
  122. OWOP.tool.addToolObject(new OWOP.tool.class("Castle Bravo", OWOP.cursors.erase, OWOP.fx.player.NONE, OWOP.RANK.NONE, function(tool) {
  123. tool.setEvent('mousemove mousedown', function (mouse,event){
  124. if(mouse.buttons == 1 || mouse.buttons == 2) {
  125. explodeNuclear(OWOP.mouse.tileX,OWOP.mouse.tileY,Math.cbrt(1000000*15));
  126. }
  127. });
  128. }));
  129.  
  130. OWOP.tool.addToolObject(new OWOP.tool.class("Tsar Bomba", OWOP.cursors.erase, OWOP.fx.player.NONE, OWOP.RANK.NONE, function(tool) {
  131.  
  132.  
  133. tool.setEvent('mousemove mousedown', function (mouse,event){
  134.  
  135.  
  136. if(mouse.buttons == 1 || mouse.buttons == 2) {
  137. explodeNuclear(OWOP.mouse.tileX,OWOP.mouse.tileY,Math.cbrt(1000000*50));
  138. }
  139. });
  140. }));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement