Advertisement
CelticCoder

depositSend

Feb 9th, 2024 (edited)
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. turtleID = 10
  2.  
  3. -- List of block names
  4. local blockList = {"minecraft:iron_ore", "minecraft:gold_ore", "minecraft:diamond_ore"}
  5.  
  6. -- List of corresponding values for the blocks
  7. local valueList = {1, 5, 15}
  8.  
  9. -- Serialize the lists into a single string
  10. local serializedData = textutils.serialize({blockList = blockList, valueList = valueList})
  11.  
  12. -- Open a rednet connection
  13. rednet.open("top")
  14.  
  15. -- Send the serialized data to the turtle
  16. rednet.send(turtleID, serializedData)
  17.  
  18. -- Close the rednet connection
  19. rednet.close("top")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement