Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bundleAlignX = 32
- bundleAlignZ = 16
- bundleDupe1 = 12
- bundleDupe8 = 8
- bundleAlignTrig = 64
- bundlePush = 1
- BundleSafety = 2
- bundleFire = 128
- BundleAccelReady = 256
- bundleAccelX = 512
- bundleAccelZ = 1024
- bundleSendOff = 2048
- local DCHook = require("DiscordHook")
- local connected, dc = DCHook.createWebhook("https://discord.com/api/webhooks/1212096041914994729/eIYujNw0wgywygp_EoQ8JB7SL5_bOWNxCKMoNoj_Ab39U-GYmJfSUE0r8efoWLiULo-e")
- -- ye ye i know this is public but i don't care tbh
- function duper(val)
- redstone.setBundledOutput("back",val)
- sleep(1/20)
- redstone.setBundledOutput("back",0)
- end
- function payload(amount,fuse,alignX,alignZ)
- if fuse > 79 then
- fuse = 79
- end
- --if fuse < 1 then
- -- fuse = 1
- --end
- while amount > 0 do
- print("duping")
- if amount >= 8 then
- duper(bundleDupe8)
- amount = amount -8
- else
- duper(bundleDupe1)
- amount = amount -1
- end
- sleep(0.5)
- end
- print("done duping")
- sleep(1)
- print("aligning")
- duperCMD = bundleAlignTrig
- if alignX then
- duperCMD = duperCMD+bundleAlignX
- end
- if alignZ then
- duperCMD = duperCMD+bundleAlignZ
- end
- duper(duperCMD)
- print("done, now waiting for fuse")
- sleep((98-fuse) * 0.05)
- duper(bundlePush)
- print("done")
- sleep(3)
- end
- function accelerate(accx,accz)
- print("accelerating")
- max = accx
- if accz > accx then
- max = accz
- end
- looped = 0
- dc.send(string.format("accelerating with %d tnt",max))
- while accx > 0 or accz > 0 do
- looped = looped + 1
- duperCMD = 0
- if math.floor((looped-1)/100) ~= math.floor((looped-2)/100) then
- dc.send(string.format("%d/%d",looped-1,max))
- end
- if accx > 0 then
- print("x")
- duperCMD = duperCMD+bundleAccelX
- accx = accx - 1
- end
- if accz > 0 then
- print("z")
- duperCMD = duperCMD+bundleAccelZ
- accz = accz - 1
- end
- duper(duperCMD)
- sleep(5 * 0.05)
- end
- sleep(6)
- print("done")
- end
- dc.send("----------------------------------------\n\nfire sequence started ,waiting to be unloaded")
- while bit.band(redstone.getBundledInput("back"),BundleSafety) > 0 do
- sleep(2)
- print(".")
- end
- sleep(2)
- --dc.send("creating payload 1")
- --payload(512,79,false,false)
- --dc.send("creating payload 2")
- --payload(8,1,true,true)
- --dc.send("done")
- dc.send("creating payload")
- payload(8,0,true,true)
- payload(512,79,false,false)
- dc.send("done")
- duper(bundleFire)
- while bit.band(redstone.getBundledInput("back"),BundleAccelReady) == 0 do
- sleep(0.1)
- end
- dc.send("accelerating")
- accelerate(206,221)
- --accelerate(40,40)
- dc.send("done")
- sleep(5)
- duper(bundleSendOff)
- dc.send("sent off")
- sleep(45)
- dc.send("done, ready to fire now")
- --wait for send off
- while redstone.getInput("right") == false do
- sleep(1)
- end
- redstone.setOutput("bottom",true)
- sleep(1/20)
- redstone.setOutput("bottom",false)
- dc.send("fired....\nor selfdestructed")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement