r/ComputerCraft • • Apr 28 '15

TIL Angry Birds was coded in Lua

Thumbnail
imgur.com
3 Upvotes

r/ComputerCraft • • Feb 07 '23

Fixed Double Click script for those who struggle with the one from forums

0 Upvotes

I made some tweaks to the script found on this forum because it wasn't working for me.

Here it is:

Use it by require("")ing the file with the code below, and replace your os.pullEvent() with os_customPullEvent(). It pulls same events as before except it adds mouse_doubleclick event.

local _dctimer = nil
local _dcinterval = 0.25
local _captured = false

function lib_customPullEvent(_type)
	local _event = {os.pullEvent()}
	
	if _event[1] == "mouse_click" then
		if _captured then
			_event[1] = "mouse_doubleclick"
			_captured = false
			return unpack(_event)
		elseif not (_dctimer == nil) and not _captured then
			_event[1] = "mouse_doubleclick"
			--No consecutive double-clicks.
			_captured = true
			
		elseif _dctimer == nil and not _captured then
			--Prepare for double click
			_dctimer = os.startTimer(_dcinterval)
		end
		return unpack(_event)
		
	elseif _event[1] == "timer" and _event[2] == _dctimer then
		_dctimer = nil
		_captured = false
		
	else
		if _dctimer then _captured = true end
		return unpack(_event)
	end
	
end

--Sets the length of the interval for a doubleclick
setDoubleClickInterval = function(_val)
	if _val and type(_val) == "number" and
		  _val > 0 then
		_dcinterval = _val
	end
end

r/ComputerCraft • • Jul 17 '24

animatronics

0 Upvotes

can any explain how i use animatronics i try to use them and it never works can soemone please help me the mod is cc:c bridge


r/ComputerCraft • • Jul 21 '24

[string "xXHf6mVZ"] :20: <eof> expected near 'end'

0 Upvotes

I am trying to make a simple code for a simple tree farm in skyfactory 1 with the turtle, just because I feel like it would be easier for me to not have to go back and forth between areas each time I need to get wood, mainly because its not only boring but its a waste of time when oing something important, I can send my code, and so far everything up until then worked perfectly fine https://pastebin.com/xXHf6mVZ like I said I am making a simple code not an advanced super intellectual mastermind amazing code for this, the eof 20 error thing ig is supposed to be in front/near end, idk what that means if you figure it out please let me know, ive been trying to find and make codes for like 2 days now, and its genuienly annoying me. I am grateful for any help.


r/ComputerCraft • • Feb 02 '15

ComputerCraft Networking in Tekkit Classic (1.2.5)

0 Upvotes

Hello, I run a Tekkit Classic Server, and My friend and I have created a wireless email system. Upon sending a message using: lua> rednet.broadcast("Message") I get this error message in console: 18:58:08 [INFO] ComputerCraft: Warning! Computer task queue overflowed. I have no idea what is wrong, and neither does my friend. Here is the code: Networking Computer: repeat rednet.open("right") id, message = rednet.receive() rednet.broadcast(message) os.startTimer(10) until(0==1)

Sending/Receiving Computer: repeat rednet.open("left") print("Checking For Mail...") id, message = rednet.receive() print(message) until(0==1)

We had 3 computer originally, and it worked fine, but due to the 64 block range of the wireless modem in this version, we had to add 19 computers that take the message, and send it to the next in line. Does anyone know how to fix this??

Thanks


r/ComputerCraft • • May 08 '23

how to make a buttons in ComputerCraft 1.12.2

0 Upvotes

How to make a Buttons in CC 1.12.2 ?


r/ComputerCraft • • May 25 '23

Tips for getting started

0 Upvotes

I want to make an arcade on my mc server using the mod, how would i go about doing that? I dont know how to code so i might just use AI to do the programming for me as thats not my focus. I want to know what j need to make, how to make it, and how to use it. Thanks in advance, lmk if you have any ideas!


r/ComputerCraft • • Jun 12 '23

Trying to make my first Computer Craft Project but the code just won't work

4 Upvotes

I have been attempting to make this function work for three hours, but unfortunately, I haven't been successful in achieving the desired functionality. The purpose of the code is to extract items from a chest, identify each item, and subsequently distribute each stack into its designated chest. However, my code only manages to handle two stacks before halting, and my most recent attempt at fixing the issue resulted in the code malfunctioning entirely. I would greatly appreciate any assistance. Thank you very much.

Please find the code at this link: https://pastebin.com/Esc5Hp2M


r/ComputerCraft • • Jun 01 '23

looking for turtle app that fills 5 x 5 area

0 Upvotes

i dont need to mine anything i just need it to fill rectancle


r/ComputerCraft • • Jan 18 '16

[Program] The simplest tree felling program

4 Upvotes
while turtle.digUp() do turtle.up() end while turtle.down() do end

to use replace the bottom log with a turtle (with an axe or a pickaxe) and then run.


r/ComputerCraft • • Nov 20 '13

Help with a program

0 Upvotes

Would it be easy to write a program that has the turtle constantly refilling? If so copy/paste it please :)


r/ComputerCraft • • Jan 04 '15

Help with redstone output

0 Upvotes

I would like help with outputting a redstone signal via bundled cable computer I am using dw20's button api and his demo program to test it button: http://pastebin.com/HRbMF1Eg demo: http://pastebin.com/eCNcgV3V

I would like help with when button[name]["active"] = true it will output a redstone signal via bundled cable (Project Red) to a color specific to that name.


r/ComputerCraft • • May 08 '15

ComputerCraft Community Challenge: Yey/Ney?

4 Upvotes

So, I've had this idea for a little while now, the idea is that people use paste-bin to upload post code code to survive using only a turtle, and make videos of it.

This is something that I've not seen anywhere, and I think it'd be interesting to do. I'm not going to go through with it unless I can actually get some attention for it, otherwise my first episode would be me saying "Well hello there! I've got nothing!" and nobody wants that.

So I'm thinking that each posted program would have the paste-bin id, a short description, and name. I'm also hoping that if a program doesn't work, I can de-bug it on camera.

So, what do you guys think about this idea?


r/ComputerCraft • • Feb 28 '21

Ottomated - Blackjack

4 Upvotes

Hello! I recently just purchased the access to ottomatted's blackjack for computer craft to set it up on an smp i play. I realised there was no tutorial or anything on how to do it?

Can anyone help me out with setting it up or got a guide, even a past stream or video of him setting it up?


r/ComputerCraft • • Nov 19 '24

Can i have 2 independent speakers?

4 Upvotes

Im trying to play music though the, such as a midi file and im having trouble with notes that overlap. Is it possible to have multiple speakers to deal with this or does it just combine it as 1 speaker?


r/ComputerCraft • • Nov 17 '23

Any good apple notes like program

0 Upvotes

r/ComputerCraft • • Nov 11 '23

Does anyone have a program that just builds a big cube?

0 Upvotes

r/ComputerCraft • • Dec 13 '22

Make the turtle go back to previously saved coordinates and facing direction

0 Upvotes

How could this be possible ? All i found was a incomprehensible code from the "excavate" program


r/ComputerCraft • • Oct 14 '24

mining turtle problem

0 Upvotes

why does the mining turtle broke when entering program in 1.18.2? pls help


r/ComputerCraft • • Dec 21 '20

Can anyone help with changes?

0 Upvotes

Hey everyone! I currently do no know tua but I would like to make edits to the code I currently have and would be willing to pay someone. This is the code I currently have https://pastebin.com/UA1V4Ez5. I would want the person to make the turtle once its full to return back to the chest, which will be placed right behind it when it first spawns. If anyone is interested let me know. Thank you! Also if anyone has lua code for mining turtles that is premium than I would be interested getting in contact with you!


r/ComputerCraft • • Mar 07 '26

I have been thinking of making a server with the Create mod, Computercraft, and many others. Anybody interested if I do?

Thumbnail reddit.com
4 Upvotes

r/ComputerCraft • • Aug 13 '25

How do I enable this?

Post image
9 Upvotes

I'm trying to create a program in a server with this, but it says that I need http API. It says to enable it in the CC tweaked computer config but I'm not the host of the server. How do I enable this?


r/ComputerCraft • • Feb 16 '25

does anybody know windows like program or something that i can install and run with CC: Tweaked?

9 Upvotes

r/ComputerCraft • • Sep 01 '21

Shears behavior

5 Upvotes

I can use the scissors for sheeps but it does not work for hives or leaves, is this intentional or a bug?