Jump to content




Ways to turn on a computer over a long distance?


  • You cannot reply to this topic
14 replies to this topic

#1 Awesome As

  • Members
  • 11 posts

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

#2 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

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.

#3 Himself12794

  • Members
  • 56 posts

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.

#4 Awesome As

  • Members
  • 11 posts

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

#5 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

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.

#6 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 07 February 2013 - 04:51 AM

i use bukkitForge and i dont have to use a different version of CC >_>

#7 Awesome As

  • Members
  • 11 posts

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

#8 LBPHacker

  • Members
  • 766 posts
  • LocationBudapest, Hungary

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)

#9 Awesome As

  • Members
  • 11 posts

Posted 08 February 2013 - 12:43 AM

The load GUI stuff says Tekkit Launcher (so do the file in appdata).

#10 Awesome As

  • Members
  • 11 posts

Posted 08 February 2013 - 12:54 AM

Thx, found it! :P

#11 Awesome As

  • Members
  • 11 posts

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

#12 LBPHacker

  • Members
  • 766 posts
  • LocationBudapest, Hungary

Posted 09 February 2013 - 07:15 AM

Now I'm confused...

#13 LBPHacker

  • Members
  • 766 posts
  • LocationBudapest, Hungary

Posted 09 February 2013 - 07:17 AM

What's the first line of the code anyways? http.request(something), isn't it?

#14 AnDwHaT5

  • Members
  • 244 posts

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.

#15 Awesome As

  • Members
  • 11 posts

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





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users