Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setbigPX=function(x,y,clr){
- OWOP.world.setPixel(x,y,clr)
- OWOP.world.setPixel(x+1,y,clr)
- OWOP.world.setPixel(x+1,y+1,clr)
- OWOP.world.setPixel(x,y+1,clr)
- OWOP.world.setPixel(x+2,y,clr)
- OWOP.world.setPixel(x+2,y+2,clr)
- OWOP.world.setPixel(x,y+2,clr)
- OWOP.world.setPixel(x+2,y+1,clr)
- OWOP.world.setPixel(x+1,y+2,clr)
- OWOP.world.setPixel(x+3,y,clr)
- OWOP.world.setPixel(x,y+3,clr)
- OWOP.world.setPixel(x+3,y+2,clr)
- OWOP.world.setPixel(x+3,y+1,clr)
- OWOP.world.setPixel(x+2,y+3,clr)
- OWOP.world.setPixel(x+1,y+3,clr)
- OWOP.world.setPixel(x+3,y+3,clr)
- }
- function randomMM(min,max) {
- return Math.floor(Math.random() * (max-min) + min);
- }
- RandErase=function(x,y,size){
- for(var i=0; i<size*size/4; i++){
- setTimeout(function(){
- setbigPX(randomMM(x,size+x),randomMM(y,size+y),[255,255,255]);
- setbigPX(randomMM(x,size+x),randomMM(y,size+y),[255,255,255]);
- },1*i);
- }
- }
- squareRand=function(x,y,size,clr,time){
- for(var iSQ=0; iSQ<time; iSQ++){
- setTimeout(function(){
- setbigPX(randomMM(x,size+x),randomMM(y,size+y),clr)
- },1*iSQ);
- }
- setTimeout(function(){
- for(var iSQ=0; iSQ<size*size/4; iSQ++){
- setTimeout(function(){
- setbigPX(randomMM(x,size+x),randomMM(y,size+y),[255,255,255])
- },1*iSQ);
- }
- },time+4000)
- }
- dotsRand=function(x2,y2,size2,clr,time){
- for(var dotsI=0; dotsI<time; dotsI++){
- setTimeout(function(){
- OWOP.world.setPixel(randomMM(x2,size2+x2),randomMM(y2,size2+y2),clr)
- OWOP.world.setPixel(randomMM(x2,size2+x2),randomMM(y2,size2+y2),clr)
- OWOP.world.setPixel(randomMM(x2,size2+x2),randomMM(y2,size2+y2),clr)
- OWOP.world.setPixel(randomMM(x2,size2+x2),randomMM(y2,size2+y2),clr)
- OWOP.world.setPixel(randomMM(x2,size2+x2),randomMM(y2,size2+y2),clr)
- },1*dotsI);
- }
- }
- explodeNuclear=function(x,y,size){
- explodeNuclear1(x-(size+4)/3.125,y-(size+4)/3.125,size)
- }
- explodeNuclear1=function(x,y,size){
- squareRand(x+(size+4)/3.125,y+(size+4)/3.125,(size+4)/6.25,[255,255,0],size*size/4)
- RandErase(x,y,size);
- 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)
- }
- OWOP.tool.addToolObject(new OWOP.tool.class("Mini Nuclear Bomb", OWOP.cursors.erase, OWOP.fx.player.NONE, OWOP.RANK.NONE, function(tool) {
- tool.setEvent('mousemove mousedown', function (mouse,event){
- if(mouse.buttons == 1 || mouse.buttons == 2) {
- explodeNuclear(OWOP.mouse.tileX,OWOP.mouse.tileY,Math.cbrt(125));
- }
- });
- }));
- OWOP.tool.addToolObject(new OWOP.tool.class("Little Boy", OWOP.cursors.erase, OWOP.fx.player.NONE, OWOP.RANK.NONE, function(tool) {
- tool.setEvent('mousemove mousedown', function (mouse,event){
- if(mouse.buttons == 1 || mouse.buttons == 2) {
- explodeNuclear(OWOP.mouse.tileX,OWOP.mouse.tileY,Math.cbrt(10000));
- }
- });
- }));
- OWOP.tool.addToolObject(new OWOP.tool.class("Fatman", OWOP.cursors.erase, OWOP.fx.player.NONE, OWOP.RANK.NONE, function(tool) {
- tool.setEvent('mousemove mousedown', function (mouse,event){
- if(mouse.buttons == 1 || mouse.buttons == 2) {
- explodeNuclear(OWOP.mouse.tileX,OWOP.mouse.tileY,Math.cbrt(20000));
- }
- });
- }));
- OWOP.tool.addToolObject(new OWOP.tool.class("W-59", OWOP.cursors.erase, OWOP.fx.player.NONE, OWOP.RANK.NONE, function(tool) {
- tool.setEvent('mousemove mousedown', function (mouse,event){
- if(mouse.buttons == 1 || mouse.buttons == 2) {
- explodeNuclear(OWOP.mouse.tileX,OWOP.mouse.tileY,Math.cbrt(1000000));
- }
- });
- }));
- OWOP.tool.addToolObject(new OWOP.tool.class("Castle Bravo", OWOP.cursors.erase, OWOP.fx.player.NONE, OWOP.RANK.NONE, function(tool) {
- tool.setEvent('mousemove mousedown', function (mouse,event){
- if(mouse.buttons == 1 || mouse.buttons == 2) {
- explodeNuclear(OWOP.mouse.tileX,OWOP.mouse.tileY,Math.cbrt(1000000*15));
- }
- });
- }));
- OWOP.tool.addToolObject(new OWOP.tool.class("Tsar Bomba", OWOP.cursors.erase, OWOP.fx.player.NONE, OWOP.RANK.NONE, function(tool) {
- tool.setEvent('mousemove mousedown', function (mouse,event){
- if(mouse.buttons == 1 || mouse.buttons == 2) {
- explodeNuclear(OWOP.mouse.tileX,OWOP.mouse.tileY,Math.cbrt(1000000*50));
- }
- });
- }));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement