Jump to content

0099's Content

There have been 6 items by 0099 (Search limited from 31-March 19)

By content type

See this member's

Sort by                Order  

#257684 [MC 1.7.10][CC 1.75] Peripherals++ v1.3.6, MiscPeripherals reimagined! In...

Posted by 0099 on 07 August 2016 - 07:21 PM in Peripherals and Turtle Upgrades

View Postmonkeymacman, on 07 August 2016 - 04:38 AM, said:

I hate to ask here, but I can;t find it anywhere else, what is the "AI Chatbox" block?
It's an interface of Cleverbot wrapped into a peripheral. Unfortunately, doesn't work right now.

UPDATE: I found a way to make it work. PM me if interested.

#257542 [MC 1.7.10][CC 1.75] Peripherals++ v1.3.6, MiscPeripherals reimagined! In...

Posted by 0099 on 04 August 2016 - 11:19 PM in Peripherals and Turtle Upgrades

Suggestion for austinv11:

Make a way for the turtles to create teleporter links by themselves, without a player running between the stations with repeaters. As of right now, turtle.place() with a repeater selected doesn't work. Or, rather, the action itself succeeds, but it doesn't create any links. The only thing that does work (at least, the only thing I found) is using the Tool Manipulator from CCTweaks, which appears to actually perform right-clicks, as opposed to whatever magic turtle.place() is doing. The Tool Manipulator is a bit expensive though (8 diamonds a piece), and CCTweaks isn't in every modpack. So it would be nice to have something like that in this mod.

#240213 Strangely buggy strip mining program.

Posted by 0099 on 11 December 2015 - 10:38 PM in Ask a Pro

At the first glance, I see only 1 bug. At line 6, you check for the success of turtle.forward(). The program exits your while loop only when turtle.forward() finishes successfully. And then you call turtle.forward() one more time, so if the next block is air (for example, if it's a cave), it will move one extra block forward. On its way back, though, if goes exactly 10 blocks, so it doesn't get back to the starting point.

#240204 A little help please :P

Posted by 0099 on 11 December 2015 - 10:00 PM in Ask a Pro

View PostEnderslime, on 11 December 2015 - 09:43 PM, said:

draw was at the beggining a way to draw the screen, at this point its just become a function for calling anywhere in the code
But I was saying that if you start calling that function "anywhere in the code" then your computer will probably send way more rednet messages than it needs. I mean, it will send them if you fix the first problem, which is rednet.send never actually being called.

#240202 How can I use I code serialized?

Posted by 0099 on 11 December 2015 - 09:48 PM in Ask a Pro

In case you didn't know, there is an interesting seralizer at lua-users.org, which can serialize almost anything. And by "anything" I mean that it includes very complex objects, like a table with a metatable which has a __index function which refers to a table which in turn has a metatable. Or a table which contains itself, is a key for itself in itself, is the meta of itself and the __index of itself (How's that supposed to work, actually? Crash from infinite recursion?). Unfortunately, CC doesn't have debug library active, so certain features won't work, like upvalues and cleverly hidden completely sandboxed metatables. But still, this thing is very useful.
1. Download the code from http://lua-users.org/wiki/DataDumper and upload it somehow onto your CC computer.
2. In the beginning of your sender program, call dofile() with the name of the uploaded DataDumper.
3. When you want do dump something into a string, call DataDumper() with your object as a parameter.
4. DataDumper will return a bunch of text written in Lua, which, when executed, will create an exact copy of the original object. To execute this string from your receiver program, call loadstring() with this string, and it will return a function which you then should call. This function will return a copy of your object.

#240196 A little help please :P

Posted by 0099 on 11 December 2015 - 08:28 PM in Ask a Pro

The fact that that part is highlighted red is just a bug in the editor's way of processing strings, especially empty strings (like ""). This has nothing to do with the code. Concerning your code, I have 2 things to say:
1. In your multi-choice if statement the third option will never run. If linked~="" then it will execute lines 33 to 41 and exit the if statement. If linked=="" then it will execute lines 43 to 48 and exit. The variable "linked" either equals "" or it doesn't. So line 50 just won't run.
2. Why do you even send a rednet message in a function named "draw"? The point in "draw" functions is that you can call them anywhere you want any number of times and it will affect nothing but the screen. In your case, one extra "draw()" could potentially break the whole system.