milo logging
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
local peripheral = _G.peripheral
|
||||
local device = _G.device
|
||||
|
||||
local ni = peripheral.find('neuralInterface')
|
||||
if not ni then
|
||||
error('Missing neural interface')
|
||||
elseif not ni.disableAI then
|
||||
local kinetic = device['plethora:kinetic'] or
|
||||
error('Missing kinetic augment')
|
||||
else
|
||||
ni.disableAI()
|
||||
|
||||
if not kinetic.disableAI then
|
||||
error('Nope')
|
||||
end
|
||||
|
||||
kinetic.disableAI()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
local peripheral = _G.peripheral
|
||||
local device = _G.device
|
||||
|
||||
local ni = peripheral.find('neuralInterface')
|
||||
if not ni then
|
||||
error('Missing neural interface')
|
||||
elseif not ni.getEquipment then
|
||||
error('Missing introspection module')
|
||||
local intro = device['plethora:introspection'] or
|
||||
error('Missing Introspection module')
|
||||
|
||||
if intro.getBaubles then
|
||||
intro.getBaubles().drop(5)
|
||||
else
|
||||
ni.getEquipment().drop(6)
|
||||
intro.getEquipment().drop(6)
|
||||
end
|
||||
|
||||
@@ -20,13 +20,32 @@ local function findTargets()
|
||||
return l[1]
|
||||
end
|
||||
|
||||
local last
|
||||
local count = 0
|
||||
|
||||
while true do
|
||||
local target = findTargets()
|
||||
if target then
|
||||
print('looking at ' .. target.name)
|
||||
ni.lookAt(target)
|
||||
os.sleep(0)
|
||||
if target and (not last or Point.distance(last, target) > .2) then
|
||||
-- last = target
|
||||
if last then print(Point.distance(last, target)) end
|
||||
last = target
|
||||
--print(target.x, target.y, target.z, count)
|
||||
ni.lookAt(target)
|
||||
count = 0
|
||||
os.sleep(0)
|
||||
-- elseif count < 10 then
|
||||
-- count = count + 1
|
||||
-- os.sleep(.1)
|
||||
-- end
|
||||
else
|
||||
os.sleep(3)
|
||||
count = count + 1
|
||||
if count > 50 or not target then
|
||||
ni.lookAt({ x = math.random(-10, 10),
|
||||
y = math.random(-10, 10),
|
||||
z = math.random(-10, 10) })
|
||||
os.sleep(3)
|
||||
else
|
||||
os.sleep(.1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user