Sign in to follow this  
Deimos161

World Anchors and computer screens

Recommended Posts

Hey guys,

I have world anchors banned for non OPs but I have some placed under some computers in my spawn to keep them running at all times. But they don't` seem to be working. IE the computers are turning off.

Also I am having trouble with two of my monitor displays.(These displays, show my banned items on my server). Now the problem that I am having is that the text is disappearing of the screens until I break a monitor and replace it.

my monitor is 5wide by 6 high.

This is my code I am using

local w,h = term.getSize()



local function printCenter(line)

  local width = string.len(line)

    if width < w then

          local x,y = term.getCursorPos()

          term.setCursorPos(w/2 - width/2,y)

    end

  print(line)

end



printCenter 'Banned Items'

printCenter ''

print([[Abyss Helmet   Anchor Cart    Black Hole Band

Blaze Rods       Block Breaker  Builder

Cannon                                      Catalytic Lens

Collector MK1  Collector MK2  Collector MK3

DM pedestal    DM Hammer          Dest. Catalyst

DragonEgg         Dynamite         EnderChest

Evertide Amulet Filler      Gravity Greaves

HurricaneBoots HyperkineticLens Infernal Armor

MFE Cart           Mercurial Eye  Mining Laser

Nova Cataclysm Nova Catalyst  Nuke

Project Table  RM Armour          RM Furnace

RM Katar           RM MorningStar RM Tools

Ranged Weapons Ring of Arcana Ring of Ignition

SwiftWolf Ring Tank Cart          Teleport Tether

TnT                                                TnT Cart        

Triangulator                              Transmutation Tablet

Turtles     Void Ring     Volcanite Amulet

                   Watch of flowing time

World Anchor                              Zero Ring]])

printCenter ''

printCenter ''

printCenter 'Collectors, RM Tool, RM Armour and Swiftwolf'

printCenter 'are Donator only'

printCenter ''

printCenter 'These items may change at anytime,'

printCenter 'please check back often to see'

printCenter 'if anything has changed'

printCenter ''

printCenter 'Banned items will turn to dirt'

printCenter 'if you craft them.This is at your expense'

printCenter 'and staff will not refund the items'

Share this post


Link to post
Share on other sites

I'd just name the program you want to run all the time as "start" on either the local computer or a disk. Then whenever the chunk is loaded, that program will run.

Share this post


Link to post
Share on other sites

I'd just name the program you want to run all the time as "start" on either the local computer or a disk. Then whenever the chunk is loaded, that program will run.

It's startup isn't it? Do both start and startup work now?

Share this post


Link to post
Share on other sites

it is startup which I have done. The startup program is shell.run("monitor","top","rules") but if a chunk gets unloaded the computer has to be turned back on.

The aim of these screens are to display my banned items and rules.

Share this post


Link to post
Share on other sites

if the program is named startup it will load that program everytime the chunk is loaded. I had a similar setup with my own rules/banneditems not too long ago.

Share this post


Link to post
Share on other sites

well thats what I have. But computers do not automatically turn on when a chunk is loaded. You have to click the computer before it will turn on, then when the computer starts it runs what every program is in startup.

My problem is chunk loaders are not working :( and my monitors seems to be all kinds of mucked up.

Share this post


Link to post
Share on other sites

tell me what you do?

The code I am using is above (this is saved on my server via FTP)

  • I then click the computer
  • type: edit startup
  • type: shell.run("monitor","top","banned")
  • control - save
  • control - exit
  • type: startup so it runs

If I leave the chunk unloaded for a bit then return the computer has turned off.

Share this post


Link to post
Share on other sites

I see.... I just put the program in "startup" rather than try and run another program from it.

I'd also tend to test it using "reboot" to save having to unload the chunk etc...

p.s. in your post I do believe your missing a );

Share this post


Link to post
Share on other sites

It seems like it's something like your computer is turning on but it's being loaded before the monitor is and so when it tries to connect to the monitor it can't because it doesn't see it as being there, possibly try adding a delay at the top of the script to give the monitors chance to load before attempting to write to them..

Share this post


Link to post
Share on other sites

Hmm that is a good idea, thanks.

Oh I dont know who to add a delay to it. is it just

 sleep(1) ? 

Yeah, that should work. Chances are there's not anything more than a second gap between the computer and monitor being loaded.

Share this post


Link to post
Share on other sites

It's because your monitor and cpu are not in the same chunk. The entire thing must be in one chunk or you will have this problem. Turn on chunks with REI (or WorldEdit CUI with //chunk) and you can check to see if indeed that is your problem.

Share this post


Link to post
Share on other sites

If I am using shell.run("monitor","top","rule") that would mean my screen is on top of my computer, meaning that it is in the same chunk :P so that is not my problem.

No, that would just mean that your cpu is on top of your monitor. That doesn't necessarily mean it is the same chunk (Minecraft's 16x16x256 chunk).

I promise you that's your problem.

Edit: the WHOLE structure needs to be in one chunk. All the monitors and CPU.

Share this post


Link to post
Share on other sites

but a chunk is 256 blocks deep, meaning if my computer is the middle of a chunk (which it is) and then my display set up is on top of that. That would mean my display and computer are in the same chunk....

Share this post


Link to post
Share on other sites

What are you viewing chunks with?

We had the exact same problem in our spawn (which is permanently loaded with MultiVerse). Always had to open the cpu for 'startup' to work. Turns out the monitor was not completely in the chunk.

Share this post


Link to post
Share on other sites

If the monitor is above the computer, then it is definitely in the same chunk(unless it extends over the chunk borders). Chunk loaders load the whole chunk, not just a portion of it.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this