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

31
neural/shootMob.lua Normal file
View File

@@ -0,0 +1,31 @@
_G.requireInjector(_ENV)
local ni = require('neural.interface')
local uid = ni.getID and ni.getID() or error('Introspection module is required')
local os = _G.os
local args = { ... }
local function findEntity(name)
for _,v in pairs(ni.sense()) do
if v.id ~= uid and v.name == name then
return v
end
end
end
print('Targets:')
for _,v in pairs(ni.sense()) do
print(v.name)
end
local target = args[1] or error('specify target name')
repeat
local entity = findEntity(target)
if entity then
ni.shootAt(entity, 1)
end
os.sleep(.5)
until not entity