package management

This commit is contained in:
kepler155c
2018-11-03 18:14:11 -04:00
parent aa66b1c663
commit 1f7ef4a483
124 changed files with 1274 additions and 9 deletions

28
neural/neuralSword.lua Normal file
View File

@@ -0,0 +1,28 @@
_G.requireInjector(_ENV)
local ni = require('neural.interface')
local Util = require('util')
local os = _G.os
while true do
local target = Util.find(ni.sense(), 'name', 'joebodo')
if target then
if math.abs(target.x) < 2 and
math.abs(target.z) < 2 then
ni.lookAt(target)
ni.swing()
os.sleep(.5)
else
local angle = math.atan2(-(target.x - .5), target.z - .5)
ni.walkTo({
x = target.x + 1.5 * math.sin(angle),
y = 0,
z = target.z - 1.5 * math.cos(angle)
}, 1)
end
else
print('no target')
os.sleep(1)
end
end