- ComputerCraft | Programmable Computers for Minecraft
- → crazyguymgd's Content
crazyguymgd's Content
There have been 139 items by crazyguymgd (Search limited from 30-March 23)
#71430 Check if a modem exists
Posted by crazyguymgd on 09 January 2013 - 04:34 PM in Ask a Pro
#71803 Stair Building Help w/ Gravel
Posted by crazyguymgd on 10 January 2013 - 08:50 AM in Ask a Pro
local height = 10 function forward() while not(turtle.forward()) do turtle.dig() turtle.attack() sleep(0.25) end end function up() while not(turtle.up()) do turtle.digUp() turtle.attackUp() end end function digUp() while turtle.detectUp() do turtle.digUp() sleep(0.25) end end for i = 1, height do turtle.place() up() digUp() forward() turtle.turnRight() end
That's my crack at this. Make sure to give him some cobble or something in slot 1 because he'll put it down if he comes across a spot that needs it.
#71808 [ERROR] Having a rough start with my first Computercraft program.
Posted by crazyguymgd on 10 January 2013 - 08:58 AM in Ask a Pro
Conlan99, on 10 January 2013 - 08:47 AM, said:
term.clear() term.setCursorPos(1,1) textutils.slowPrint("Hello, and welcome to Conlan99's automatic miner's\nmining program.") sleep(1) print("\nThe automatic miner is starting.\nTo stop the automatic miner, please enter Stop.") repeat local input = read() redstone.setOutput("right",true) sleep(0.25) redstone.setOutput("right",false) sleep(1) redstone.setOutput("back",true) sleep(0.25) redstone.setOutput("back",false) sleep(0.25) if input ~= "stop" or input ~= "Stop" or input ~= "exit" or input ~= "Exit" or input ~= "quit" or input ~= "Quit" then print("Unrecognisable command. Please try again.") until input == "stop" or input == "Stop" or input == "exit" or input == "Exit" or input == "quit" or input == "Quit" then textutils.slowPrint("Goodbye.") sleep(0.25) os.shutdown() end
think you just need an end after print("Unrecognisable command. Please try again.")
#71810 Stair Building Help w/ Gravel
Posted by crazyguymgd on 10 January 2013 - 09:02 AM in Ask a Pro
xInDiGo, on 10 January 2013 - 09:00 AM, said:
Quote
so you're saying he'll place cobble if theres none where there should be? thats pretty smart! i'm going to run this through and see what i can do! i was able to tweak the other one and get it to work pretty well! but question how does the turtle know if it needs to place a block? i don't understand that part of the script.
he doesn't really know. he just tries to place it and if there is already a block there he will just fail and move on.
#71818 [ERROR] Having a rough start with my first Computercraft program.
Posted by crazyguymgd on 10 January 2013 - 09:11 AM in Ask a Pro
#71843 [ERROR] Having a rough start with my first Computercraft program.
Posted by crazyguymgd on 10 January 2013 - 09:30 AM in Ask a Pro
term.clear() term.setCursorPos(1,1) textutils.slowPrint("Hello, and welcome to Conlan99's automatic miner's\nmining program.") sleep(1) print("\nThe automatic miner is starting.\nTo stop the automatic miner, please enter Stop.") repeat local input = read() redstone.setOutput("right",true) sleep(0.25) redstone.setOutput("right",false) sleep(1) redstone.setOutput("back",true) sleep(0.25) redstone.setOutput("back",false) sleep(0.25) if input ~= "stop" and input ~= "Stop" and input ~= "exit" and input ~= "Exit" and input ~= "quit" and input ~= "Quit" then print("Unrecognisable command. Please try again.") end until input == "stop" or input == "Stop" or input == "exit" or input == "Exit" or input == "quit" or input == "Quit" do textutils.slowPrint("Goodbye.") sleep(0.25) os.shutdown() end
Changes from your code:
end to close if statement.
ors in the if changed to ands
do added at the end of the until condition
#71849 [lua] Need help writing a program
Posted by crazyguymgd on 10 January 2013 - 09:37 AM in Ask a Pro
#71853 Stair Building Help w/ Gravel
Posted by crazyguymgd on 10 January 2013 - 09:38 AM in Ask a Pro
xInDiGo, on 10 January 2013 - 09:37 AM, said:
crazyguymgd, on 10 January 2013 - 09:02 AM, said:
thats great! this worked perfect! i'm gonna play around with the code and make sure i understand why it works! thanks again for all your help! but believe me, this won't be my last post
glad I could help
#71859 Player Detector List
Posted by crazyguymgd on 10 January 2013 - 09:46 AM in Ask a Pro
dobbylego, on 09 January 2013 - 02:19 PM, said:
I am trying to add a player detector to my password door so i know who tryed to access it, but what i cant figure out is how to actually make it write to a list on another program. Can anyone help me?
Thanks!
-Will
Save it to a file, then the other program can read in the file and do what it wants with that data?
#71868 Detecting Disk?
Posted by crazyguymgd on 10 January 2013 - 09:59 AM in Ask a Pro
#71889 INPUT NEEDED - Spam
Posted by crazyguymgd on 10 January 2013 - 10:38 AM in Forum Discussion
AfterLifeLochie, on 10 January 2013 - 10:20 AM, said:
tiin57, on 10 January 2013 - 10:14 AM, said:
Cranium, on 10 January 2013 - 10:10 AM, said:
Cloudy, dan, Lyqyd, Cruor, Lochie, FuzzyPurp, casper (is he still alive?) and other assorted forum staff; have you thought about adding more moderators?
The number of moderators is certainly not the issue, I'll tell you that.
The fact of the matter is, the quantity and the rate of the spam becomes unmanageable. Last night I just sat on the forums, and after I'd delete three spam users, another two would reappear and litter the place with posts. I had to sit here and entirely devote my attention to watching the forums like a hawk and remove stuff straight away - and when I wake up, it's the same thing - go through the list of reports and clear them all out. There is an almost unbroken wall of spam-reports in the Reports Center, stretching back to at least, and if not further than, Page 8 now.
I still really, really suggest we approve new member's (<10) posts. It's much easier to delete content before it appears - and it keeps the Reports system in a manageable state.
I don't know what the number of spam posts really is but I sorted New content by Past 24 hours and found 15 posts on the first page, started by users with < 25 posts. Would approving all these new posts and disapproving all the spam posts be any better than just deleting spam posts?
#71896 Detecting Disk?
Posted by crazyguymgd on 10 January 2013 - 10:45 AM in Ask a Pro
#71913 [Lua][Error]
Posted by crazyguymgd on 10 January 2013 - 11:09 AM in Ask a Pro
#71915 How to update turtles
Posted by crazyguymgd on 10 January 2013 - 11:11 AM in Ask a Pro
#71922 Detecting Disk?
Posted by crazyguymgd on 10 January 2013 - 11:17 AM in Ask a Pro
shell.run("cd disk")
I think that's what you're looking for.
#71924 How to update turtles
Posted by crazyguymgd on 10 January 2013 - 11:18 AM in Ask a Pro
#71926 [lua] turtle compare statements not working as expected
Posted by crazyguymgd on 10 January 2013 - 11:20 AM in Ask a Pro
hopefully that's your only problem
#71929 Detecting Disk?
Posted by crazyguymgd on 10 January 2013 - 11:21 AM in Ask a Pro
#71930 [Lua][Question] Storing Functions in a Table
Posted by crazyguymgd on 10 January 2013 - 11:23 AM in Ask a Pro
ChunLing, on 10 January 2013 - 11:01 AM, said:
Like:
funcName = read() if turtle[funcName] then turtle[funcName]() endThere, now I can use user input to decide which turtle function to call, cause they are all in a table (and indexed by strings).
Well that is incredibly useful for a project I'm working on
#71938 How to update turtles
Posted by crazyguymgd on 10 January 2013 - 11:32 AM in Ask a Pro
#71941 INPUT NEEDED - Spam
Posted by crazyguymgd on 10 January 2013 - 11:34 AM in Forum Discussion
zekesonxx, on 10 January 2013 - 11:31 AM, said:
Ha that was kind of fun too.
#71949 Could someone help me with RedNet?
Posted by crazyguymgd on 10 January 2013 - 11:40 AM in Ask a Pro
#71955 Could someone help me with RedNet?
Posted by crazyguymgd on 10 January 2013 - 11:50 AM in Ask a Pro
while true do message = rednet.receive() print(message) response = read() rednet.broadcast(response) end
Is a simple get message, send message loop.
#71961 How to update turtles
Posted by crazyguymgd on 10 January 2013 - 12:00 PM in Ask a Pro
Short answer, stop being lazy
#71968 [Turtle][Programming] Trouble with a variable
Posted by crazyguymgd on 10 January 2013 - 12:05 PM in Ask a Pro
- ComputerCraft | Programmable Computers for Minecraft
- → crazyguymgd's Content