71 posts
Posted 13 December 2013 - 10:21 PM
Originally released on the SKCraft server by sk89q (best to use on a server with players or you'd just gift yourself once :P/>) but decided to release this to the public!Who needs a ChristmasCraft tree when we have ComputerCraft! This program is made for those out there feeling a little generous this holiday .Using a computer, a player detector, some redwire, and a dispenser, you can easily setup your own Christmas gift-giving stand where players just need to right clickon a player detector to get their present! Once they interact with the detector, their name is logged into a database (including a human-readable 'Christmas List' file) sothey cannot get multiple gifts.Tutorial:Step 1 - Setup your computer (usually want this hidden), player detector, and your dispenser. You can do this anyway you want as long as the player detector is touchingthe computer, and the redwire is like so:Note: You can setup the redwire, and player detector on any side of the computer as shown here:Step 2 - Load the program onto the computer and name it 'startup' then restart. Enter the side that your redwire is on:Step 3 - Have your people interact with the player detector to get their presents! I would suggest a bag of holding or similar.Question: Would there be any interest for a naughty/nice list where you can specify who doesn't get a present or where you specifythe only people who can?Download: pastebin get 2W9BXSKb startup
gist get 7955418http://hastebin.com/beyigagiwe.jsCredits: Config API by ben657Happy Holidays, everyone!
Edited on 14 December 2013 - 03:00 AM
621 posts
Location
U.S.A.
Posted 13 December 2013 - 10:36 PM
Merry Christmas! And coal for you all!
Looks cool, may try it out!
2151 posts
Location
Auckland, New Zealand
Posted 13 December 2013 - 11:52 PM
Nice idea, it is possible to put leaves on those trees right?
I suppose, for most people it's winter at christmas and many trees loose their leaves. In Australia, however, sometimes we get 40˚C christmases… hot hot hot.
621 posts
Location
U.S.A.
Posted 13 December 2013 - 11:55 PM
Nice idea, it is possible to put leaves on those trees right?
I suppose, for most people it's winter at christmas and many trees loose their leaves. In Australia, however, sometimes we get 40˚C christmases… hot hot hot.
That would be nice. Here in Ohio, we are at 40 degrees farhenheit. Practically freezing!
71 posts
Posted 14 December 2013 - 04:01 AM
Merry Christmas! And coal for you all!
Looks cool, may try it out!
Thanks! Let me know how you like it and what I can change! Remember that this works best on a server :D/>
Nice idea, it is possible to put leaves on those trees right?
I suppose, for most people it's winter at christmas and many trees loose their leaves. In Australia, however, sometimes we get 40˚C christmases… hot hot hot.
Yes, sir it is possible.
Edited on 14 December 2013 - 03:02 AM
604 posts
Location
Spring Hill, Fl
Posted 14 December 2013 - 08:37 AM
Looks Nice, Merry christmas :D/> Will try out.
Ha, I live in florida and its… Around now 65 Deg F . 2 Days ago we had 80 Deg F XD (Its winter here)
71 posts
Posted 14 December 2013 - 02:52 PM
Haha, here in Hawaii it's a 80F sunny day. We're not affected by seasons nor do we get snow :D/>
621 posts
Location
U.S.A.
Posted 14 December 2013 - 04:01 PM
And I'm stuck in Ohio. :P/>
Today we are getting 4-6 inches of snow. Yay.
Edited on 14 December 2013 - 03:02 PM
135 posts
Posted 15 December 2013 - 12:41 PM
I get a startup error!
71 posts
Posted 15 December 2013 - 03:31 PM
I get a startup error!
Mind providing the error mate? Works fine here.
18 posts
Posted 21 March 2014 - 05:09 AM
Yeah I Can Here:
startup:15: attempt to index ? (a nil value)
function create()
file = fs.open(path,"a")
file.close()
end
:huh:/>
1852 posts
Location
Sweden
Posted 21 March 2014 - 06:57 PM
Yeah I Can Here:
startup:15: attempt to index ? (a nil value)
function create()
file = fs.open(path,"a")
file.close()
end
:huh:/>
If I'm correct it may be because the file that the variable path is equal to doesn't exist, Since it opens append mode.
Or it's because path haven't been set to anything, Try doing this at the top of the program
local path = "test_file"
and see if that fixes anything
18 posts
Posted 23 March 2014 - 01:18 AM
Nope
Here My Setup:
http://imgur.com/a/ShXOz#0Im Making it so when people join my server they will get a
free pair of terminal glasses. And Im making it so they cant get another pair.
The cable goes to the player detector
and the white wire goes to the dropper.