Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mon = peripheral.wrap("bottom")
- local turrets = {
- peripheral.wrap("OMTBase_0");
- peripheral.wrap("OMTBase_1");
- peripheral.wrap("OMTBase_2");
- peripheral.wrap("OMTBase_3");
- }
- function clearMonitor()
- mon.setTextColor(colors.white)
- mon.clear()
- mon.setCursorPos(1,1)
- end
- function nextLine()
- x,y = mon.getCursorPos()
- mon.setCursorPos(1,y+1)
- end
- function turretAttackPlayers(attack)
- for i=1, #turrets do
- turrets[i].setTargetPlayers(attack)
- end
- end
- function turretAttackMobs(attack)
- for i=1, #turrets do
- turrets[i].setTargetMobs(attack)
- end
- end
- local counter = 0
- while true do
- turretAttackPlayers(true)
- clearMonitor()
- mon.write(counter)
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement