Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --http://www.youtube.com/watch?v=Eq27GOX71TU
- bot = 1 --assign OpenMech id
- mech = peripheral.wrap("right") --attach Robot Controller
- mobs = mech.getMobIds(bot) -- find mobs
- for k, mobId in pairs(mobs) do --read information stored in mobs
- mob = mech.getMobData(bot, mobId)
- mobType = mob.type
- print("mob: "..mobType) --print mob type
- print("at X: "..mob.position.x) --print mob coordinates
- print("at Y: "..mob.position.y)
- print("at Z: "..mob.position.z)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement