This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Awesome As's profile picture

Ways to turn on a computer over a long distance?

Started by Awesome As, 07 February 2013 - 02:03 AM
Awesome As #1
Posted 07 February 2013 - 03:03 AM
Title:Ways to turn on a computer over a long distance?

Hi there, just… a few days ago, I got Tekkit (with ComputerCraft, ofc xP nvm)
So: Since I've tried programming Lua for a few years (not normal lua though), I've tried making something… I guess it's neither easy or extreme hard.

Jush, but I've decided to make a bank system (no tutorials on the internet > :o/>?)


Now: I have 2 computers, a main computer and a terminal. But what happens when everyone leave the server? Then the computers turn off!

No big problem? When a user come back, they're still turned off, and if the user then uses the terminal while the main computer is turned off (it's inside a bedrock room, no one can enter), then I've got somewhat of a problem.

I'm not much of dragging long lines of redwires or whatever it's named (red alloy wire?), and I cannot find a way to turn the main computer on when someone enter the game.


If you have any suggestions, a solution or something incredible smart that I haven't thought of, then post it below and I'll try it. :D/>

Thx u for your time,
- Awesome As
xuma202 #2
Posted 07 February 2013 - 03:46 AM
As far as i know you can't turn on a computer neither with redstone or wirelessly. You can only try using a chunk loading block to keep the computer running. Since unloading the chunk is why the computer turns off I believe.
Himself12794 #3
Posted 07 February 2013 - 04:22 AM
Well if the computer was on when the server was turned off, once the chunk it's in gets loaded, it should automatically run the startup program. I have a Hamachi server for a couple friends and I, and whenever I turn the server off then back on, that's what it does. It may not do that in the Tekkit Classic version of Computercraft though.
Awesome As #4
Posted 07 February 2013 - 04:37 AM
Hm.

Now, when I leave, I'm most likely just a few blocks away from the main computer. I don't know if it could be some of the settings that make it turn off.
(Tried to log in after a few seconds. Turned off.)


Gotta wait for the owner to come on. Thx. :D/>

- Awesome As
theoriginalbit #5
Posted 07 February 2013 - 04:39 AM
It could be tied into this bug, sadly it means if it is and gets fixed, Tekkit ppl have to wait since I'm pretty sure they still are running a Bukkit build and not a legit one.
PixelToast #6
Posted 07 February 2013 - 04:51 AM
i use bukkitForge and i dont have to use a different version of CC >_>
Awesome As #7
Posted 07 February 2013 - 10:47 PM
Hm, he haven't come on yet.

So; I've finally copied the code into notepad for experimental use ect. (Nah, idk why)



But… to make this stuff a possibility, I've decided using the HTTP api and store data and important functions on my website, allowing for terminals everywhere in a map ect.

Then I've got a problem… again… :/ The HTTP api seems not to work (I tried the example at the wiki, line 1 errored in something with '?')
So I've tried to find the config file, which I couldn't. I guess it's because I'm using tekkit.

If you know how to enable the HTTP api on tekkit, or what could be the problem, then post it below :P/>

- Awesome As
LBPHacker #8
Posted 07 February 2013 - 11:46 PM
What are you using? Tekkit Launcher? Cuz if so, the config file is %appdata%\.techniclauncher\tekkit\config\mod_ComputerCraft.cfg (enableAPI_http=1)
Awesome As #9
Posted 08 February 2013 - 12:43 AM
The load GUI stuff says Tekkit Launcher (so do the file in appdata).
Awesome As #10
Posted 08 February 2013 - 12:54 AM
Thx, found it! :P/>
Awesome As #11
Posted 09 February 2013 - 07:11 AM
Ok, I've contacted the owner of the server and he has set enableAPI_http to 1 (true).

Yet, when I use http.request(someURL), output says 'test:1: attempt to index ? (a nil value)', which make me wonder if it's still turned off or whatever could have happened.


Well, I hope there's a simple reason for this problem D:
- Awesome As
LBPHacker #12
Posted 09 February 2013 - 07:15 AM
Now I'm confused…
LBPHacker #13
Posted 09 February 2013 - 07:17 AM
What's the first line of the code anyways? http.request(something), isn't it?
AnDwHaT5 #14
Posted 09 February 2013 - 08:04 AM
there are ways to send programs, make the computer use a file or command. Think about it the only way to start a computer is with a right click. If a turtle can right click it will work but lol it cant so hmmm. As stated you can use a world anchor (if using technic launcher) or keep the block loaded but thats the best you can do.
Awesome As #15
Posted 09 February 2013 - 08:34 AM
It's actually line 6, but it doesn't really matter… I guess. Since the previous lines are to declare the url.


Line 6 is just:
http.request("[url="http://pastebin.com/raw.php?i=Tk19jv43"]http://pastebin.com/raw.php?i=Tk19jv43[/url]")
(The example URL from the wiki, I don't really like posting my IP website thing URL here. :/ Yet, this results in the same error.)

Hm, this "World Anchor" seems interesting. Gotta read about it.

- Awesome As