Last night my son comes to me asking if I could script a TNT Cannon for him to run on the pycraft server. I told him I had no idea how to construct one. Do he quickly demonstrates how it is built in creative mode and I script one up with him. I didn't realize that Minecraft had options like that. Didn't ever know what the red stone was ever used for. If you have any good plans for something that uses redstone please let me know. I can script it and post it after.

Here is the TNT Cannon script. I am positive I can do it cleaner but like I said this was a late night project with my 8 year old.

you can get the install instructions from here:

***********************************************************************************

#TNT CANNON

from mc import *

import random

mc = Minecraft()

x,y,z = mc.player.getTilePos()

#mc.setBlock(x+5,y,z,31,1)

#mc.setBlock(x+5,y,z+1,31,1)

mc.setBlocks(x-1,y,z-1,x+7,y,z-1,1,6)#stone left

mc.setBlocks(x-1,y,z+1,x+7,y,z+1,1,6)#stone right

mc.setBlocks(x+8,y,z-1,x+8,y,z+4,1,6)#stone front

mc.setBlocks(x+6,y,z+2,x+8,y,z+4,1,6)#stone block

mc.setBlock(x-1,y,z,1,6)

mc.setBlock(x,y,z,8)#water

mc.setBlocks(x+1,y,z,x+7,y,z,46)#tnt

mc.setBlocks(x-1,y+1,z-1,x+8,y+1,z-1,55)#wire

mc.setBlocks(x-1,y+1,z+1,x+7,y+1,z+1,55)#wire

mc.setBlocks(x+6,y+1,z+2,x+8,y+1,z+4,55)

mc.setBlock(x+6,y+1,z+2,93,2)

mc.setBlock(x+6,y+1,z+3,93,2)

mc.setBlock(x+7,y+1,z+4,93,1)

mc.setBlock(x+7,y+1,z+2,0)

mc.setBlock(x+7,y+1,z+1,0)

mc.setBlock(x+7,y+1,z+3,0)

mc.setBlock(x+8,y+1,z+1,93)

mc.setBlock(x+8,y+1,z+2,93)

mc.setBlock(x+8,y+1,z+3,93)

mc.setBlock(x+8,y+1,z,46)

mc.setBlock(x-1,y+1,z,143,5)

mc.postToChat('scripted by spohnz')

import random

mc = Minecraft()

x,y,z = mc.player.getTilePos()

#mc.setBlock(x+5,y,z,31,1)

#mc.setBlock(x+5,y,z+1,31,1)

mc.setBlocks(x-1,y,z-1,x+7,y,z-1,1,6)#stone left

mc.setBlocks(x-1,y,z+1,x+7,y,z+1,1,6)#stone right

mc.setBlocks(x+8,y,z-1,x+8,y,z+4,1,6)#stone front

mc.setBlocks(x+6,y,z+2,x+8,y,z+4,1,6)#stone block

mc.setBlock(x-1,y,z,1,6)

mc.setBlock(x,y,z,8)#water

mc.setBlocks(x+1,y,z,x+7,y,z,46)#tnt

mc.setBlocks(x-1,y+1,z-1,x+8,y+1,z-1,55)#wire

mc.setBlocks(x-1,y+1,z+1,x+7,y+1,z+1,55)#wire

mc.setBlocks(x+6,y+1,z+2,x+8,y+1,z+4,55)

mc.setBlock(x+6,y+1,z+2,93,2)

mc.setBlock(x+6,y+1,z+3,93,2)

mc.setBlock(x+7,y+1,z+4,93,1)

mc.setBlock(x+7,y+1,z+2,0)

mc.setBlock(x+7,y+1,z+1,0)

mc.setBlock(x+7,y+1,z+3,0)

mc.setBlock(x+8,y+1,z+1,93)

mc.setBlock(x+8,y+1,z+2,93)

mc.setBlock(x+8,y+1,z+3,93)

mc.setBlock(x+8,y+1,z,46)

mc.setBlock(x-1,y+1,z,143,5)

mc.postToChat('scripted by spohnz')

## No comments:

## Post a Comment