You do not need two script. Use same script for both up/down and then use the status variable to see if its up/down as I already posted above:
http://forum.mikrotik.com/t/tool-using-splunk-to-analyse-mikrotik-logs-4-0-graphing-everything/153043/3
Any reason for using global variable in the script? Use local variable if you do not intend to store the data for later use or use in another script.