Guest User

coreEnd.lua

a guest
Mar 27th, 2026
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. core = peripheral.find("weakAutomata")
  2. itemName = "advancedperipherals:weak_automata_core"
  3. x=0
  4. successful, message = core.feedSoul("Sheep")
  5. local function findItemSlot(name)
  6.  for i = 1, 16 do
  7.   local detail = turtle.getItemDetail(i)
  8.   if detail and detail.name == name then
  9.    return i
  10.   end
  11.  end
  12. end
  13. if not findItemSlot(itemName) then
  14.  print("no weak automata core found")
  15.  return
  16. end
  17. while findItemSlot(itemName) do
  18.  while not successful do
  19.   if core.getOperationCooldown("feedSoul") then
  20.    while core.getOperationCooldown("feedSoul") > 0 do
  21.     print("wait")
  22.    end
  23.   end
  24.   successful, message = core.feedSoul()
  25.  
  26.   if successful then
  27.    print(successful)
  28.    print(message)
  29.   else
  30.    if x < 1 then
  31.     print(message)
  32.     x=x+1
  33.    end
  34.    if core.lookAtEntity then
  35.     info=core.lookAtEntity()
  36.     file=fs.open("entity","w")
  37.     file.writeLine(textutils.serialise(info))
  38.     file.close()
  39.     -- print("Looking at "..textutils.serialise(info))
  40.    end
  41.   end
  42.  end
  43. end
  44.  
Advertisement
Add Comment
Please, Sign In to add comment