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

WClear - Clear the Weather Automatically

Started by Lego Stax, 18 September 2015 - 11:11 PM
Lego Stax #1
Posted 19 September 2015 - 01:11 AM
I was surprised that no one had already made this. So I made it myself since it's so simple.

The concept is pretty simple. Run the program and it clears the weather for you every 999,999 ticks by default (the maximum you can put in the /weather clear command)

Download here or run:

pastebin get 4F9eqMv6 wclear
Or
packman install wclear

Furthermore, you can set a custom wait time and run other programs simultaneously. By default, it runs the shell. Here's how to use it:

wclear [ticks_to_wait] [program_to_run]

Feedback is always appreciated.
Edited on 11 August 2016 - 07:50 PM
Thefdjurt #2
Posted 19 September 2015 - 01:31 AM
It should be

...
  commands.exec("/weather clear "..ticksToWait)
...
Lego Stax #3
Posted 19 September 2015 - 02:02 AM
Why would you want to clear weather for a shorter amount of time? I guess I could change it though.

Edit: Spelling fail.
Edited on 20 September 2015 - 12:45 PM
Bomb Bloke #4
Posted 19 September 2015 - 03:48 AM
Bear in mind all Command Computers run multishell - launching the script using the bg command would have much the same effect as your use of the parallel API.
Lego Stax #5
Posted 20 September 2015 - 02:44 PM
Bear in mind all Command Computers run multishell - launching the script using the bg command would have much the same effect as your use of the parallel API.
I forgot about that. However, the user does have to remember to type 'bg'. This way, they don't.