Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

ayangd

Members
  • Content Count

    9
  • Joined

  • Last visited

About ayangd

  • Rank
    Junior Member

Contact Methods

  • Minecraft
    ayangd
  • GitHub
    ayangd

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Well, thanks for translating them for me, tho.... I appreciate that. I will update my code after integrating it to my other code/module. Imagine starting the program again and again, they will always break blocks when starting I'll just pass the robot facing from the command line, or from another program calling this program. So, for now, let it be as simple as it is. Btw, when you scan for like 8 blocks away from the robot, wouldn't it catch some stone as ore? (Sometimes stone can go up to 2.2 hardness by +-0.5 noise.)
  2. Yeah, I read your code, and I wish I can read russian cyrillic alphabets ._. So, you use the geolyzer to determine the robot facing, by testing scan and break, then scan again, isn't it? And you scan 16x16 blocks by scanning 4 times, isn't it? (Because, I see it's impossible to scan it all at one time as it will scan for 256 blocks, which it exceeds the limit of 64 blocks per scan) I was thinking about just scanning the ore near the robot as if you scan farther away, it will barely distinguish the ore and the stone's hardness, but I see it is +-0.5! Nice. Anyway, thanks for the input there!
  3. Demo in video: https://youtu.be/p_ytIJhMRqc Minimum robot specs: Computer Case (Tier 2) CPU (Tier 1) Memory (Tier 1.5) EEPROM (LUA embedded) Graphics Card (Tier 1) Hard Disk Drive (Tier 1) or Disk Drive and (after assembly) Floppy Disk which the HDD or FD has LUA and mine.lua program in it Keyboard Screen (Tier 1) Inventory Upgrade Geolyzer Mining tool: Iron pickaxe Program usage: mine <facing> <depth> When the robot can't dig down anymore, the robot will ignore the depth and go up. Tips: When the robot is running, don't peek down. When the robot go up, you will block it. And charge it full before usage. Download: wget https://raw.githubusercontent.com/ayangd/oc-automate_everything/master/subprojects/mine.lua mine.lua
  4. Easily move your robot using very short commands! rim('10(5flfl)') The code above demonstrates how your robot can do: By only one line of command! Easily import the source code: rim = require('<this file>').interpret rim('ud') -- Go up and down E.g robot excavation: rim('32(15(16(xf)lfl)15(xf)xd2l)', robot.swingDown) Documentation is inside the source code (head). https://pastebin.com/L2JtJA61
  5. If you're talking about a robot that presses the `tilde` key, then no. Robot's can't use oreExcavator mod.
  6. If you're talking about the total slots available, `robot.inventorySize()` is the answer. But, if you're talking about the empty slots available, scanning slots one by one is an option. Here is a simple code for that: local robot = require('robot') local function getEmptySlots() local emptySlots = 0 for i = 1, robot.inventorySize() do if robot.count(i) == 0 then emptySlots = emptySlots + 1 end end return emptySlots end Hope this helps. Have a nice day!
  7. Well, if you're in the newest version of OpenComputes, there's no way to do it. Reference to the problem: https://github.com/MightyPirates/OpenComputers/issues/649 Hope this helps. Have a nice day!
  8. As Molinko said, this code goes to an EEPROM. To do this, follow these steps: Get a fresh EEPROM (not Lua BIOS included one). Get a computer with OpenOS loaded. Put the fresh EEPROM to the computer. run `edit /dev/eeprom` and paste the code there. But, I assume you already have it, you will just need to modify it. As the instruction said, modify the user list on top with your name and/or people you want to grant access to. If it's `Bob`, then write `{ "Bob" }`. Note: CaSe SeNsItIvE. Done. After setting up the EEPROM, set up another computer for the EEPROM, by following these steps: Set up a fresh computer (Tier 1 is okay), with door on top, or a redstone connection to other contraption. Put a CPU (Tier 1 is okay), a Memory (Tier 1 is okay too), and a redstone card. Put a number (1 or more) of GPU and screen. Turn on the computer Done! To use this code, sneak-rightclick the screen with barehand to trigger it, or open the screen gui, then click the screen. After trying the code you've shared, I found some oddities and, my suggestion, is to change to my modified code here: local user = { "user1", "user2", "user3" } local red = component.proxy(component.list("redstone")()) local scr = {} local gpu = {} for a in component.list("screen") do table.insert(scr, a) end for a in component.list("gpu") do table.insert(gpu, component.proxy(a)) end for i = 1, #gpu do if scr[i] ~= nil then gpu[i].bind(scr[i]) end end function showState(s) for i, g in ipairs(gpu) do g.setResolution(40, 20) if s then g.setForeground(0x00FF00) g.set(16, 10, "Access granted.") else g.setForeground(0xFF0000) g.set(16, 10, "Access denied.") end end end function sleep(x) local tgt = computer.uptime() + x while computer.uptime() < tgt do computer.pullSignal(tgt - computer.uptime()) end end while true do showState(false) local sigType, _, x, y, btn, nick = computer.pullSignal(5) if sigType == "touch" then for i, v in ipairs(user) do if v == nick then showState(true) red.setOutput(1, 255) sleep(2) red.setOutput(1, 0) end end end end Hope this solves your problem. Well, have a nice day then!
  9. You can either make your own library, or look mine. https://github.com/ayangd/oc-automate_everything/blob/master/oldfloppy/util/navigate.lua Basically, what it does, is to wrap the robot's movement API, and updates the position value when the function is called. If you really lazy, or want my code, tell me. I'll tell you how to use mine. I hope it helps. Have a nice day!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.