Posted 01 February 2013 - 09:28 AM
Hi I was working on my BlackJack script, and I made a little turtle ATM, so I tought to share it with the furum.
Features:
1: The turtle
(The turtle must be a wireless one)
2: The bank
3: The arrival/departure chest (ADchest)
Put a chest on top of the turtle, this is where all the items are going to be put/extract by/from the turtle, you can put tubes or pipes to transport the items in and out from the turtle.
http://i47.tinypic.com/ndnehv.jpg
Or, as I like to do, put an enderchest on top so all items will be instantly tranported, just make sure no one can open the chest when the don't need to.
Commands:
All the commands needs to be sent trought rednet using
The code can be found here: http://pastebin.com/81E4qRvT
Features:
- Up to 4 currency
- Fully automaded
- No need for fuel
- It works with everything
1: The turtle
Spoiler
http://i49.tinypic.com/359mvt1.jpg- Iron = 1 credit
- Gold = 5 credits
- Emerald = 10 credits
- DIamond = 50 credits
(The turtle must be a wireless one)
2: The bank
Spoiler
http://i46.tinypic.com/284cpf.jpg- 1 credits = In front
- 5 credits = Right
- 10 credits = Back
- 50 credits = Left
3: The arrival/departure chest (ADchest)
Spoiler
http://i45.tinypic.com/13z3dra.jpgPut a chest on top of the turtle, this is where all the items are going to be put/extract by/from the turtle, you can put tubes or pipes to transport the items in and out from the turtle.
http://i47.tinypic.com/ndnehv.jpg
Or, as I like to do, put an enderchest on top so all items will be instantly tranported, just make sure no one can open the chest when the don't need to.
Commands:
All the commands needs to be sent trought rednet using
rednet.send(<atm id>, <command>)
, and it will return one value at a time trought rednet, the commands are:
"cashConnect" --Use this command the first time you try to connect to the turtle, it will return "cashConnected" if succesful
"cashTake" --Use this command to tell the turtle to pull out ALL the items in the ADchest into the bank. it will return "cashYes" if all the items were currency, "cashNo" if at least 1 item wasn't a currency and an int as the total value of all the items pulled out:
"cashGive" int ammount --Use this command to tell the turtle to give you ammount credits, the turtle will automatically give you as few items possible. The commands are 2 separate and have to be sent one after the other, it will return an int as the missing credits, if the bank didn't have enaught credits to fulfill your request:
After every operation the ATM is going to disconnect you to be able to cumunicate with others computers.The code can be found here: http://pastebin.com/81E4qRvT