Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- turtleID = 10
- -- List of block names
- local blockList = {"minecraft:iron_ore", "minecraft:gold_ore", "minecraft:diamond_ore"}
- -- List of corresponding values for the blocks
- local valueList = {1, 5, 15}
- -- Serialize the lists into a single string
- local serializedData = textutils.serialize({blockList = blockList, valueList = valueList})
- -- Open a rednet connection
- rednet.open("top")
- -- Send the serialized data to the turtle
- rednet.send(turtleID, serializedData)
- -- Close the rednet connection
- rednet.close("top")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement