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

OpenPeripherals Trading Station

Started by val, 22 June 2014 - 02:33 AM
val #1
Posted 22 June 2014 - 04:33 AM
Hi,

I was messing around with a Turtle and an ExtraUtilities Trading Station to see if I could build an automated trader (sell paper, buy enchants, stuff like that)

Spent a quarter of an hour learning the syntax of all of the api calls and their returns, started to work up to the final masterpiece of code, ran it and.. the final function performTrade failed. There was no reason for this failure as far as I can tell, the turtle has plenty of emeralds in inventory, and I set him up with only 1 villager nearby wanting to sell for 1 emerald. No matter what I do, it always returns False.

Has anyone else run into this and is there a workaround?

http://pastebin.com/LVSwvCKd is a stripped down version of the code that reproduces the problem.

Setup is:
  • Turtle with Trading Station on right hand side,
  • villager in front

That code prints out a load of things unnecessarily but it was more to prove to myself at that point that I wasn't gong crazy.
Bomb Bloke #2
Posted 22 June 2014 - 05:15 AM
What does the OpenPeripheral docs script have to say about the function in concern? I'm having trouble finding a build that'll accept the Trading Post as a peripheral.
flaghacker #3
Posted 29 June 2014 - 05:20 PM
http://www.reddit.com/r/feedthebeast/comments/21is9p/automatic_mystcraft_page_collecting_with/

I have never used the trading station as a peripheral before, but I'm certainly goin to check it out after seeing that post on reddit.

I don't have computer access for the next week, though :(/>
sjonky #4
Posted 30 June 2014 - 07:30 AM
You need to place a chest adjacent to your trading station and put the emeralds in there. Turtles inventory dosent seem to work with that mechanic.