This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Blooddragon's profile picture

Turtle check enderquarry

Started by Blooddragon, 27 January 2015 - 07:01 PM
Blooddragon #1
Posted 27 January 2015 - 08:01 PM
Hello

I want to write a program with which you can set up a enderquarry and then forming the enderQuarry everything degrades after termination .

the turtle can read the enderquarry when he's done ?? Who yes then how is the lua code ??

sorry for the bad english.
Lyqyd #2
Posted 27 January 2015 - 08:07 PM
Moved to Ask a Pro.
Blooddragon #3
Posted 27 January 2015 - 08:10 PM
thx to moved to Pro. :)/>
KingofGamesYami #4
Posted 27 January 2015 - 10:03 PM
You may or may not be able to tell when the enderquarry is done, depending on the mods you have available. To check if something can be used as a peripheral, enter the lua console by typing:

>lua

Your prompt should now show

lua>

Enter this code, replacing side with the side of the block, ei right.

lua> peripheral.isPresent( "side" )

If this returns true, you can use it as a peripheral.

If not, you cannot use it as a peripheral.

peripheral.getMethods( "side" ) will return a list of the methods you can use.
Blooddragon #5
Posted 28 January 2015 - 04:33 AM
Thx i test this.
Blooddragon #6
Posted 28 January 2015 - 06:58 PM
i have a list of peripheral

"getEnergyStored"
"getAdvancedMethodsData"
"getMaxEnergyStored"
"listMethods"
"listSources"

but when i use

peripheral.listSources("left")

than i becomme

attempt to call nil

what is wrong?
Edited on 28 January 2015 - 05:59 PM
Lyqyd #7
Posted 28 January 2015 - 07:33 PM
You'd need to use a wrapped peripheral, like so:


local myPeriph = peripheral.wrap("left")
myPeriph.listSources()
Blooddragon #8
Posted 28 January 2015 - 07:46 PM
lua> peripheral.call("left", "getAdvancedMethodsData")

the list is to long, i can not scrolling up the page
Edited on 28 January 2015 - 07:00 PM
KingofGamesYami #9
Posted 28 January 2015 - 10:04 PM
You'll want to save it to a file:

local file = fs.open( "file", "w" )
file.write( peripheral.call( "left", "getAdvancedMethodsData" )
file.close()
Edited on 28 January 2015 - 09:04 PM
Anavrins #10
Posted 29 January 2015 - 07:26 AM
The methods returned are the one by openperipheral, they're just methods to get the amount of energy stored in them.
Other than that, they don't emit a redstone signal when they're done, so I can't really think of anything that would work.
Blooddragon #11
Posted 29 January 2015 - 01:23 PM
thank you. and what is the query that is the ender quarry ready ???

Peripheral.call("finish", "Enderquarry")….???
KingofGamesYami #12
Posted 29 January 2015 - 01:46 PM
Basically, Anavrins is saying there is absolutely no way to check if the enderquarry is finished.
Blooddragon #13
Posted 29 January 2015 - 05:09 PM
KingofGamesYami, as for then ??
Blooddragon #14
Posted 31 January 2015 - 11:47 AM
what is the way to check if the enderquarry is finished with turle?? what is the code line.??

if you can help me then I can write my code and ready to post my first version here .
Bomb Bloke #15
Posted 31 January 2015 - 02:12 PM
no way