diff --git a/milo/plugins/statsView.lua b/milo/plugins/statsView.lua index 4dd2318..6192ff3 100644 --- a/milo/plugins/statsView.lua +++ b/milo/plugins/statsView.lua @@ -326,7 +326,6 @@ Nodes : %d local oterm = term.redirect(activityTab.term.win) activityTab.term.win.scrollBottom() Util.print(...) -_G._p = activityTab.term term.redirect(oterm) if activityTab.enabled then activityTab:sync() diff --git a/neural/dropNeural.lua b/neural/dropNeural.lua index 1b3467f..baca259 100644 --- a/neural/dropNeural.lua +++ b/neural/dropNeural.lua @@ -2,7 +2,7 @@ local device = _G.device if not device.neuralInterface then error('Missing neural interface') -elseif device.neuralInterface.getEquipment then +elseif not device.neuralInterface.getEquipment then error('Missing kinetic augment') else device.neuralInterface.getEquipment().drop(6) diff --git a/neural/elytraFly.lua b/neural/elytraFly.lua index 99e036f..81d96b9 100644 --- a/neural/elytraFly.lua +++ b/neural/elytraFly.lua @@ -1,33 +1,31 @@ +-- credit: osmarks https://pastebin.com/ZP9Q1HCT + +local Sound = require('sound') + local modules = _G.peripheral.wrap('back') local os = _G.os -print('Based on code from osmarks') -print('https://pastebin.com/ZP9Q1HCT') - -local function get_meta() - return modules.getMetaOwner() -end - while true do - local meta = get_meta() - if not meta.isSneaking then - local power = 4 - if meta.isElytraFlying or meta.isFlying then power = 1 end + local meta = modules.getMetaOwner() + if not meta.isSneaking and meta.isElytraFlying then - while not meta.isSneaking and meta.isFlying or meta.isElytraFlying do - meta = get_meta() - if meta.pitch < 0 then - modules.launch(meta.yaw, meta.pitch, power) - end - os.sleep(0.1) - end + if meta.pitch < 0 then -- looking up + modules.launch(meta.yaw, meta.pitch, -meta.pitch / 22.5) + --Sound.play('entity.bobber.throw') - if not meta.isSneaking then - if meta.motionY < -0.8 then - modules.launch(0, 270, power / 2) - end + elseif meta.motionY < -0.5 then -- falling fast + modules.launch(0, 270, 2) + Sound.play('entity.bat.takeoff') end + os.sleep(0.1) + + elseif not meta.isSneaking and meta.motionY < -0.8 then + print('fallling...') + modules.launch(0, 270, 2) + Sound.play('entity.bat.takeoff') + os.sleep(0.1) + + else + os.sleep(0.4) end - - os.sleep(0.4) end diff --git a/swshop/swshop.lua b/swshop/swshop.lua index fde11e3..935e4f2 100644 --- a/swshop/swshop.lua +++ b/swshop/swshop.lua @@ -105,7 +105,7 @@ local function handleTransaction(transaction) local uid = math.random() print(string.format('requesting %d of %s', count, t.itemId)) os.queueEvent('shop_provide', t.itemId, count, uid) - local timerId = os.startTimer(5) + local timerId = os.startTimer(60) while true do local e, p1, p2 = os.pullEvent() if e == 'timer' and p1 == timerId then