//@unloadnpc golive
//@loadnpc npc/amatsu/golive.txt

-	script	golive	-1,{
end;


OnMinute05:
OnMinute10:
OnMinute15:
OnMinute20:
OnMinute25:
OnMinute30:
OnMinute35:
OnMinute40:
OnMinute45:
OnMinute50:
OnMinute55:
OnMinute00:
	if(.golive1) announce "ProGames TV will be streaming LIVE at "+.time$+" later. Watch and SHARE the live stream later to win as much as 10,000 Cash Points and tons of supplies.",bc_all;
	if(.golive2) announce "ProGames TV is currently streaming LIVE at our Facebook Group. Watch the live stream and SHARE to win as much as 10,000 Cash Points and tons of supplies.",bc_all;
end;
OnAnnounce:
	while(1) {
		switch(select(
		 ((!.golive1)?"- Stream Announce [ ^ff0000Off^000000 ]:":"- Stream Announce [ ^28bf00On^000000 ]:")+
		 ((!.golive2)?"- Stream is ongoing [ ^ff0000Off^000000 ]:":"- Stream is ongoing [ ^28bf00On^000000 ]:")+
 		 "- ^777777Close^000000"
		)) {
		case 1:
			if (!.golive1) { 
				input .time$;
				if(.time$ == "") {
					dispbottom "Invalid Time.";
					break;
				}	
				.golive1 = 1;
				.golive2 = 0;
				announce "ProGames TV will be streaming LIVE at "+.time$+" later. Watch and SHARE the live stream later to win as much as 10,000 Cash Points and tons of supplies.",bc_all;
				dispbottom "Streaming notice is sent"; 
			} else { 
				.golive1 = 0;
				.golive2 = 0;
				dispbottom "Streaming notice is now disabled.";
			} 
			break;	
		case 2:
			if (!.golive2) { 
				.golive2 = 1;
				.golive1 = 0;
				 announce "ProGames TV is currently streaming LIVE at our Facebook Group. Watch the live stream and SHARE to win as much as 10,000 Cash Points and tons of supplies.",bc_all;
				dispbottom "Ongoing streaming notice is sent"; 
			} else { 
				.golive1 = 0;
				.golive2 = 0;
				dispbottom "Ongoing streaming notice is now disabled.";
			} 
			break;
		default:
			end;
		}

	}
	end;

OnInit:
	bindatcmd("golive","golive::OnAnnounce",99,99);
	.golive1 = 0;
	.golive2 = 0;
	.time$ = "";
end;

}

