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

Emergency Alert System in CC

Started by minebuild02, 31 March 2015 - 08:34 AM
minebuild02 #1
Posted 31 March 2015 - 10:34 AM
Project temporarily abandoned. I will provide only bugfixes, due to a lack of time.

2 bugs have been reported and fixed
Development of 1.7 is in progress
EAS 1.6 is now available on Github
DannySMc's App Store version of EAS is outdated, update to 1.5 is coming

This program is based on the real Emergency Alert System.
It uses real SAME Event Codes to display alerts.

[GitHub Repository] <<< Report issues here! <<<

Usage: Follow on-screen instructions.

Download:
Server: pastebin get rFUxZUEP eas
Decoder: pastebin get GBx74V4m decoder

Changelog:
v1.7:
  • Added Meteor Strike Warning
  • Minor bugfixes
v1.6:
  • Added Tsunami, Flood and Volcano Warnings
  • Added Raw transmissions
v1.5:
  • Added Debug Mode
  • Added Food Contamination Warning
  • Added Water Contamination Warning
  • Added Senders - Now the alerts are more realistic!
  • Fixed a bug in Decoder
v1.4:
  • Added basic touch screen capabilities
  • Minor changes in decoder
v1.3:
  • Added redstone reaction on alert appearance
  • Fixed a bug in Server
  • Replaced shell.run("clear")
[Previous versions not listed here]

P.S. I'd like to thank DannySMc for his constructive criticism.
Edited on 10 June 2015 - 06:57 AM
DannySMc #2
Posted 31 March 2015 - 12:34 PM
I am a little confused on the use of this? Not that it is bad, but when would it be used? Especially if you have to type it in? and then it only prints out on the screen? You have just typed it? So you know what the hazard is?:SSSS

Okay lets add some constructive criticism:
  1. Make it an API and it returns the string? or something? Because if you have to go and type it? You know the hazard and you're alerting yourself? Of the hazard you just typed? Little confused here.
  2. Make it so it can maybe broadcast a rednet alert with that string.
minebuild02 #3
Posted 31 March 2015 - 02:25 PM
Understood, will update soon.
DannySMc #4
Posted 31 March 2015 - 02:27 PM
Understood, will update soon.

Awesome!
minebuild02 #5
Posted 31 March 2015 - 03:42 PM
Updated!
DannySMc #6
Posted 31 March 2015 - 03:49 PM
Let's give you some more constructive criticism:

Never ever use
shell.run("clear")
it's lazy! Use:
term.clear()
term.setCursorPos(1,1)

And also try and use some colours? Maybe make it monitor compatible?

It's cool you've made a program but make it more unique and something that people are going to use, make it pretty and even use touch screen? (I have made a tutorial on touch screen (if you need) ), also make the server part maybe send some kind of pulsating red stone signal? Then you could connect this to lights etc? As this would be useful for players on my server :P/>

Good job for taking the ideas and developing them! :D/>
Edited on 31 March 2015 - 01:50 PM
minebuild02 #7
Posted 31 March 2015 - 04:02 PM
colours
touch screen
I actually made it for both normal &amp; advanced computers.

send some kind of pulsating red stone signal
A good idea! Implementing right now..

Never ever use
shell.run("clear")
it's lazy! Use:
term.clear()
term.setCursorPos(1,1)
Will replace.
DannySMc #8
Posted 31 March 2015 - 04:12 PM
colours
touch screen
I actually made it for both normal &amp; advanced computers.

send some kind of pulsating red stone signal
A good idea! Implementing right now..

Never ever use
shell.run("clear")
it's lazy! Use:
term.clear()
term.setCursorPos(1,1)
Will replace.
I couldn't see any kind of code for touch screen?

Awesome that would be useful thank you!
minebuild02 #9
Posted 31 March 2015 - 04:19 PM
Updated once more, thank you, DannySMc!

I couldn't see any kind of code for touch screen?
It isn't included for compatibilty with non-Advanced Computers. If you want, I will implement it, but it will lose compatibilty.
Basic touch screen capabilities added in 1.4!
Edited on 31 March 2015 - 03:01 PM
DannySMc #10
Posted 31 March 2015 - 04:36 PM
No it won't?

You can check whether it is advanced or not using:

if term.isColour() then
	-- This means it is advanced
else
	-- This means it is normal
end

Updated once more, thank you, DannySMc!

On this, it is cool, do you want to upload it to my app store? add the server version and decoder? and name them like EAS Server and EAS Decoder? That would be cool?

My app store post
Edited on 31 March 2015 - 02:33 PM
minebuild02 #11
Posted 31 March 2015 - 04:40 PM
All right, will implement!
Implemented on basic level
Edited on 31 March 2015 - 03:02 PM
DannySMc #12
Posted 31 March 2015 - 04:56 PM
All right, will implement!
Do submit to app store :D/> would be cool to have it on there :')
minebuild02 #13
Posted 31 March 2015 - 05:03 PM
How do I submit?
DannySMc #14
Posted 31 March 2015 - 05:06 PM
How do I submit?

Download the store on to your computer using the pastebin link,
then register an account in program using:
account -> register
then go to control -> upload and fill out details, and when doing versions it should be 1.0.0 (R) or 1.1.0 (R) okay?
minebuild02 #15
Posted 31 March 2015 - 05:11 PM
Will upload NOW!

I added touch screen, as you asked.
When you end specifying event code and message, a screen will appear. To confirm, you need to click [Broadcast (Y)] (on Adv. Computers) or press [Y] (for Normal Computers).
DannySMc #16
Posted 31 March 2015 - 05:23 PM
Awesome!
minebuild02 #17
Posted 01 April 2015 - 03:13 PM
A bug in Decoder has been found and fixed. The Pastebin code will be updated soon.
A feature is being added to Server. The Pastebin code will be updated soon.

Updated
Edited on 01 April 2015 - 04:13 PM
DannySMc #18
Posted 01 April 2015 - 04:19 PM
A feature is being added to Server. The Pastebin code will be updated soon.
Please don't use this colour >.< I can't even read it -.-
minebuild02 #19
Posted 01 April 2015 - 06:12 PM
Okay
H4X0RZ #20
Posted 01 April 2015 - 08:25 PM
A feature is being added to Server. The Pastebin code will be updated soon.
Please don't use this colour >.< I can't even read it -.-
You can, if you
1. Use a CSS mod to make the forums darker
2. Select the text with your mouse

:P/>

SpoilerThis makes the forums a lot more readable actually xD

* {
  background-color: #333 !important;
  color: #eee !important;
}
Edited on 01 April 2015 - 06:33 PM
minebuild02 #21
Posted 02 April 2015 - 04:55 PM
EAS v1.6 Pre-Release is now available, you can find the code in the first post.
logsys #22
Posted 03 April 2015 - 12:09 AM
Wow, one of the things I like doing on minecraft(modded) is building some military bases.. so I was wondering if you could add red alert, yellow alert.. etc.. also a lockdown and abandon building(a.k.a. self-destruct activated)
minebuild02 #23
Posted 03 April 2015 - 02:31 PM
Wow, one of the things I like doing on minecraft(modded) is building some military bases.. so I was wondering if you could add red alert, yellow alert.. etc.. also a lockdown and abandon building(a.k.a. self-destruct activated)
It's a server-wide alert system. But I can make a new version of it…
minebuild02 #24
Posted 04 April 2015 - 05:06 PM
Custom alerts/versions of EAS can now be requested.

For alerts, specify the SAME code (the link to Wikipedia's SAME page is at the beginning of topic), the name of alert, and the description (if it's for a custom build, the original EAS makes you enter the message). Such as:
Requesting Example Alert to be added, with SAME code EXA. It means that EAS test is commencing.

For custom EAS builds, specify the name of the build, ALL of the alerts to be included (use prev. template) and the name of protocol used to transmit messages. Such as:
Requesting a custom build, named Example Notification System, with alerts EXA (Example Alert), EXW (Example Warning) and EXN (Example Notification). Protocol is "example_protocol"
Edited on 06 April 2015 - 12:05 PM
minebuild02 #25
Posted 06 April 2015 - 02:07 PM
Introducing first custom EAS build, requested by logsys…
LOCAL ALERT SYSTEM

Got all of needed alerts for a base: from a Red Alert to a Lockdown Alert.

It is now being tested. Testing results: Stable version

Pastebin code: yN6aJfRZ
Edited on 06 April 2015 - 01:09 PM
ProjectB #26
Posted 20 May 2015 - 03:43 AM
Looks great, but I found a bug in your program, if you press any key during your broadcast confirmation screen it will crash your program, it returns this error

eas:9: attempt to compare nil with number
After looking through your code, it just looks like your forgot to make the mouse click event a string

function mouse_wrapper(minX, maxX, Y)
event, button, xPos, yPos = os.pullEvent(mouse_click) -- <-- Put parenthesis around the event, or else it checks for all events because it's nil.
if (xPos >= minX or xPos <= maxX and yPos == Y) then
  return true
else
  return false
end
end
This issue also appears to affect your pre version, but other than that great job!
minebuild02 #27
Posted 06 June 2015 - 02:42 PM
Returned to development. Bug will be fixed
PokeAcer #28
Posted 06 June 2015 - 05:35 PM
Hi,
I've got this working for my server (great job maker!) via BitNet.
If anyone wants to know how, you need:

2x Computer running the bitnetrepeat program (Supports mini antennae and full towers) - pastebin get eaq0ucSi bitnetrepeat
1x Computer for EAS - these two need to be linked via either a wireless or wired modem (I personally would choose wired, no way for wireless security issues then - just cover the cable)
*1*x Computer for decoding - Unless you have a city then obviously you have more
Either 2x BitNet Mini Antennae (For local range city use) or 1x BitNet Mini Antenna and 1x Full BitNet Tower

If you are doing this per house (no city):
SpoilerYou need to have a bitnet repeater per computer for decoding, have them connected, and then do the same on the EAS side, and just send.

If you have a city
SpoilerHave in one spot (I recommend the town hall or something) a bitnet tower, with the repeater connected. Then, lay down wired network cables down to each house (you can have >1 computer per cable) and place a computer down with the decoding code downloaded (label). Then,
just run the decoder and use the EAS software

Of course there is better ways (maybe change the code a bit) but this way IMO is better because you go RedNet Communication -<>- BitNet Tower ))) BitNet towers -<>- RedNet Communication (Basically the bitnetrepeat program is like a modem, turn RedNet (binary) into BitNet (telephone tones) and back again)
Edited on 06 June 2015 - 03:50 PM
minebuild02 #29
Posted 06 June 2015 - 06:04 PM
Hi,
I've got this working for my server (great job maker!) via BitNet.
If anyone wants to know how, you need:

2x Computer running the bitnetrepeat program (Supports mini antennae and full towers) - pastebin get eaq0ucSi bitnetrepeat
1x Computer for EAS - these two need to be linked via either a wireless or wired modem (I personally would choose wired, no way for wireless security issues then - just cover the cable)
*1*x Computer for decoding - Unless you have a city then obviously you have more
Either 2x BitNet Mini Antennae (For local range city use) or 1x BitNet Mini Antenna and 1x Full BitNet Tower

If you are doing this per house (no city):
SpoilerYou need to have a bitnet repeater per computer for decoding, have them connected, and then do the same on the EAS side, and just send.

If you have a city
SpoilerHave in one spot (I recommend the town hall or something) a bitnet tower, with the repeater connected. Then, lay down wired network cables down to each house (you can have >1 computer per cable) and place a computer down with the decoding code downloaded (label). Then,
just run the decoder and use the EAS software

Of course there is better ways (maybe change the code a bit) but this way IMO is better because you go RedNet Communication -<>- BitNet Tower ))) BitNet towers -<>- RedNet Communication (Basically the bitnetrepeat program is like a modem, turn RedNet (binary) into BitNet (telephone tones) and back again)
Will try it
PokeAcer #30
Posted 06 June 2015 - 06:52 PM
minebuild02, I'd be happy to give you a coder rank on my modpack server and you can come test it.

Server Forum Link - http://www.computercraft.info/forums2/index.php?/topic/23457-1710-technic-modpack-computech/