mail@pastecode.io avatar
9 days ago
19 kB
#using scripts\shared\util_shared;

#insert scripts\shared\shared.gsh;

#namespace zm_subtitles;

function autoexec init()
	wait 10;
    util::register_system( "subtitleMessage", &handleSubtitleStateUpdate );
	wait 2;

function initSubtitles()
	IPrintLnBold("INIT SUBS");
	registerSubtitle("zoey_hospital_trip", "Zoey", "^2", "Well, I guess we're going to the hospital.");
	registerSubtitle("zoey_get_to_hospital", "Zoey", "^2", "We've gotta get to the hospital.");
	registerSubtitle("zoey_come_this_way", "Zoey", "^2", "Come on, this way!");
	registerSubtitle("zoey_subway_smelled_bad", "Zoey", "^2", "The subway smelled bad, but this...");
	registerSubtitle("zoey_into_the_hospital", "Zoey", "^2", "Into the hospital.");
	registerSubtitle("zoey_safe_house_in_hospital", "Zoey", "^2", "There's a safe house in the hospital.");
	registerSubtitle("zoey_go_get_to_hospital", "Zoey", "^2", "Go, go! Get to the hospital!");
	registerSubtitle("zoey_hurry_get_to_hospital", "Zoey", "^2", "Hurry up, get to the hospital!");
	registerSubtitle("zoey_just_need_to_get_to_hospital", "Zoey", "^2", "We just need to get to the hospital.");
	registerSubtitle("zoey_louis_hospital_gown", "Zoey", "^2", "Louis... You'd look good in one of those hospital gowns.");
	registerSubtitle("zoey_going_back_to_normal", "Zoey", "^2", "You think one day it's all just gonna go back to normal?");
	registerSubtitle("zoey_game_over_man", "Zoey", "^2", "Game over man, game over!");
	registerSubtitle("zoey_short_laugh", "Zoey", "^2", "[Short Laugh]");
	registerSubtitle("zoey_what", "Zoey", "^2", "What?");
	registerSubtitle("zoey_fast_zombies", "Zoey", "^2", "I can't get over how FAST they all are, it's not even fair.");
	registerSubtitle("undefined_zombie_bullshit", "", "^2", "I'm calling zombie bullshit on that, you know? \nThey're not...ALLOWED to be so fast.");
	registerSubtitle("zoey_almost_there", "Zoey", "^2", "Almost there....Almost theeeeeeeeere...");
	registerSubtitle("zoey_helicopter_pilot", "Zoey", "^2", "That helicopter pilot better be there.");
	registerSubtitle("zoey_helicopter_coming", "Zoey", "^2", "Okay, the helicopter's comin");
	registerSubtitle("zoey_help_on_way", "Zoey", "^2", "Okay, guys. Help's on the way.");
	registerSubtitle("zoey_helicopter_here_let's_go", "Zoey", "^2", "The helicopter's here. Come on, let's go!");
	registerSubtitle("zoey_get_to_helicopter", "Zoey", "^2", "Come on, get to the helicopter!");
//	registerSubtitle("zoey_helicopter_here_let's_go", "Zoey", "^2", "Guys, the helicopter's here. Let's go!");
	registerSubtitle("zoey_everyone_in_helicopter", "Zoey", "^2", "Everyone in the helicopter!");

	registerSubtitle("louis_sounds_good", "Louis", "^2", "Sounds good.");
	registerSubtitle("louis_station_up_street", "Louis", "^2", "The station's just up the street.");
	registerSubtitle("louis_station_around_corner", "Louis", "^2", "Subway station's just around the corner.");
	registerSubtitle("louis_theres_the_station", "Louis", "^2", "There's the station!");
	registerSubtitle("louis_there_it_is", "Louis", "^2", "There it is.");
	registerSubtitle("louis_this_way", "Louis", "^2", "This way");
	registerSubtitle("louis_get_to_the_station", "Louis", "^2", "Get to the station.");
	registerSubtitle("louis_red_line_north_way", "Louis", "^2", "Red Line North is the way.");
	registerSubtitle("louis_red_line_to_mercy", "Louis", "^2", "The Red Line will take us to Mercy.");
	registerSubtitle("louis_red_line_north_mercy_hospital", "Louis", "^2", "We gotta take the Red Line North to Mercy Hospital.");
	registerSubtitle("louis_lines_blocked", "Louis", "^2", "Damn! The line's blocked.");
	registerSubtitle("louis_tracks_blocked_another_way", "Louis", "^2", "Tracks are blocked. We gotta find another way.");
	registerSubtitle("louis_get_out_of_subway", "Louis", "^2", "Alright, no problem. Now we just gotta get out of the subway.");
	registerSubtitle("louis_safe_house_pawn_shop", "Louis", "^2", "Safe house in the pawn shop!");
	registerSubtitle("louis_get_to_pawn_shop", "Louis", "^2", "Get to the pawn shop!");
	registerSubtitle("louis_around_here", "Louis", "^2", "Should be around here.");
	registerSubtitle("louis_think_this_way", "Louis", "^2", "I think it's this way.");
	registerSubtitle("louis_we_should_be_close", "Louis", "^2", "We should be close.");
	registerSubtitle("louis_hospital_past_water_works", "Louis", "^2", "Hospital's just past the water works.");
	registerSubtitle("louis_there_is_hospital", "Louis", "^2", "There's the hospital.");
	registerSubtitle("louis_use_that_lift", "Louis", "^2", "Excellent. We can use that lift.");
	registerSubtitle("louis_get_on_lift", "Louis", "^2", "Get on the lift!");
	registerSubtitle("louis_everybody_get_on_lift", "Louis", "^2", "Everybody, get on the lift.");
	registerSubtitle("louis_through_warehouse", "Louis", "^2", "Through the warehouse.");
	registerSubtitle("louis_a_little_further", "Louis", "^2", "Bet it's just a little further.");
	registerSubtitle("louis_cant_get_used_to_this", "Louis", "^2", "Still can't get used to this.");
	registerSubtitle("louis_not_sanitary", "Louis", "^2", "This is not going to be sanitary...");
	registerSubtitle("louis_gonna_be_messy", "Louis", "^2", "This... is gonna be messy.");
	registerSubtitle("louis_into_sewers", "Louis", "^2", "Well into the sewers we go.");
	registerSubtitle("louis_phew_francis", "Louis", "^2", "Phew, Francis.");
	registerSubtitle("louis_hospital_right_above_us", "Louis", "^2", "Mercy Hospital should be right above us.");
	registerSubtitle("louis_the_hospital", "Louis", "^2", "The hospital!");
	registerSubtitle("louis_hospital_we_made_it", "Louis", "^2", "The hospital! We made it!");
	registerSubtitle("louis_get_to_hospital", "Louis", "^2", "Get to the hospital!");
	registerSubtitle("louis_hurry_everyone", "Louis", "^2", "Hurry, everyone!");
	registerSubtitle("louis_doesnt_smell_like_hospital", "Louis", "^2", "This doesn't smell like a hospital.");
	registerSubtitle("louis_stairs_good_workout", "Louis", "^2", "Stairs are a good workout.");
	registerSubtitle("louis_good_for_you_bill_cardio", "Louis", "^2", "It's good for you Bill. Cardio!");
	registerSubtitle("louis_elevator_here", "Louis", "^2", "Elevator's here!");
	registerSubtitle("louis_into_elevator", "Louis", "^2", "Into the elevator!");
	registerSubtitle("louis_to_elevator", "Louis", "^2", "To the elevator!");
	registerSubtitle("louis_get_in_elevator", "Louis", "^2", "Get in the elevator!");
	registerSubtitle("louis_thats_what_im_talkin_about", "Louis", "^2", "That's what I'm talkin' about.");
	registerSubtitle("louis_short_laugh", "Louis", "^2", "[Short Laugh]");
	registerSubtitle("louis_access_to_roof", "Louis", "^2", "We need to find access to the roof!");
	registerSubtitle("louis_roof_access", "Louis", "^2", "We need to find roof access.");
	registerSubtitle("louis_roofs_this_way", "Louis", "^2", "The roof's this way.");
	registerSubtitle("louis_roof_this_way", "Louis", "^2", "Roof this way.");
	registerSubtitle("louis_lets_go", "Louis", "^2", "Let's go! LET'S GO!");
	registerSubtitle("louis_works_for_me", "Louis", "^2", "Works for me.");
	registerSubtitle("louis_chopper_pilot", "Louis", "^2", "Bet the chopper pilot'll be happy to hear from us!");
	registerSubtitle("louis_this_is_it", "Louis", "^2", "Well, this is it.");
	registerSubtitle("louis_find_radio", "Louis", "^2", "Let's find that radio.");
	registerSubtitle("louis_chopper_coming", "Louis", "^2", "Okay, the chopper's comin'.");
	registerSubtitle("louis_help_on_way", "Louis", "^2", "Help is on the way. \nI can't believe it, but I think we might actually make it outta here!");
	registerSubtitle("louis_heli_here_let's_go", "Louis", "^2", "The heli's here! Let's go!");
	registerSubtitle("louis_helicopter_here_let's_go", "Louis", "^2", "The helicopter's here! Let's go!");
	registerSubtitle("louis_everyone_in_helicopter_go", "Louis", "^2", "Everyone in the helicopter! Go!");
	registerSubtitle("louis_get_to_helicopter", "Louis", "^2", "Get to the helicopter!");

	registerSubtitle("bill_subway_tunnels", "Bill", "^2", "We can take the subway tunnels to the hospital. \nThere's a Red Line station not far from here.");
	registerSubtitle("bill_station_up_street", "Bill", "^2", "Station's just up the street.");
	registerSubtitle("bill_subway_around_corner", "Bill", "^2", "There's a subway station just around the corner.");
	registerSubtitle("bill_this_way_people", "Bill", "^2", "This way, people.");
	registerSubtitle("bill_this_way", "Bill", "^2", "This way!");
	registerSubtitle("bill_theres_the_station", "Bill", "^2", "There's the station!");
	registerSubtitle("bill_everyone_to_the_station", "Bill", "^2", "Everyone to the station!");
	registerSubtitle("bill_subway_full_of_zombies", "Bill", "^2", "Ahh shit, subway looks full of zombies!");
	registerSubtitle("bill_less_zombies_down_here", "Bill", "^2", "Was hoping there would be less zombies down here.");
	registerSubtitle("bill_red_line_north_straight", "Bill", "^2", "Red Line North will take us straight there.");
	registerSubtitle("bill_red_line_north_to_mercy", "Bill", "^2", "The Red Line North will take us to Mercy.");
	registerSubtitle("bill_red_line_north_to_hospital", "Bill", "^2", "The Red Line North will take us to the hospital.");
	registerSubtitle("bill_lines_blocked", "Bill", "^2", "Goddamnit, the line's blocked.");
	registerSubtitle("bill_find_another_way", "Bill", "^2", "Gotta find another way.");
	registerSubtitle("bill_seemed_too_easy", "Bill", "^2", "This seemed too easy.");
	registerSubtitle("bill_go_top_side", "Bill", "^2", "Going to have to go top side.");
	registerSubtitle("bill_keep_moving_down_street", "Bill", "^2", "We have to keep moving down the street.");
	registerSubtitle("bill_safehouse_pawnshop", "Bill", "^2", "Safehouse in the pawnshop.");
	registerSubtitle("bill_get_to_pawn_shop_people", "Bill", "^2", "Get to the pawn shop, people.");
	registerSubtitle("bill_keep_moving_safehouse_ahead", "Bill", "^2", "Keep moving, safehouse ahead!");
	registerSubtitle("bill_dont_know_through_here", "Bill", "^2", "I don't know which way. Through here, I think.");
	registerSubtitle("bill_hospital_other_side_water_works", "Bill", "^2", "Hospital's just on the other side of the water works.");
	registerSubtitle("bill_to_the_lift", "Bill", "^2", "To the lift.");
	registerSubtitle("bill_get_on_lift", "Bill", "^2", "Get on the lift!");
	registerSubtitle("bill_through_warehouse", "Bill", "^2", "Through the warehouse.");
	registerSubtitle("bill_right_direction", "Bill", "^2", "At least this is the right direction.");
	registerSubtitle("bill_people_went_this_way", "Bill", "^2", "Looks like people went this way.");
	registerSubtitle("bill_tried_to_escape", "Bill", "^2", "I think they tried to escape.");
	registerSubtitle("bill_into_sewers", "Bill", "^2", "Into the sewers we go.");
	registerSubtitle("bill_try_sewers", "Bill", "^2", "Well hell, let's try the sewers.");
	registerSubtitle("bill_no_zombies_in_sewers", "Bill", "^2", "Maybe there's no stinkin' zombies in the sewers?");
	registerSubtitle("bill_francis_or_sewer", "Bill", "^2", "Francis, is that you or the sewer?");
	registerSubtitle("bill_i've_smelled_worse", "Bill", "^2", "I've smelled worse.");
	registerSubtitle("bill_find_manhole", "Bill", "^2", "Need to find a manhole.");
	registerSubtitle("bill_way_up_ahead", "Bill", "^2", "Should be a way up ahead.");
	registerSubtitle("bill_find_manhole_hospital_above_us", "Bill", "^2", "Need to find a manhole, the hospital is above us.");
	registerSubtitle("bill_the_hospital", "Bill", "^2", "The HOSPITAL!");
	registerSubtitle("bill_there_is_hospital", "Bill", "^2", "There's the hospital!");
	registerSubtitle("bill_to_the_hospital", "Bill", "^2", "TO THE HOSPITAL!");
//	registerSubtitle("bill_there_is_hospital", "Bill", "^2", "There's the hospital!");
	registerSubtitle("bill_into_emergency_room", "Bill", "^2", "Into the emergency room, people!");
	registerSubtitle("bill_find_elevator", "Bill", "^2", "Let's find an elevator.");
	registerSubtitle("bill_almost_there", "Bill", "^2", "Almost there!");
//	registerSubtitle("bill_i've_smelled_worse", "Bill", "^2", "I've smelled worse...");
	registerSubtitle("bill_more_stairs", "Bill", "^2", "Ahh... more stairs.");
	registerSubtitle("bill_not_walking_to_roof", "Bill", "^2", "I ain't walking to the roof.");
	registerSubtitle("bill_elevator_here", "Bill", "^2", "Elevator's here!");
	registerSubtitle("bill_get_to_elevator", "Bill", "^2", "Get to the elevator!");
	registerSubtitle("bill_into_elevator", "Bill", "^2", "Into the elevator!");
	registerSubtitle("bill_war_doesnt_prepare", "Bill", "^2", "Even being in a war doesn't prepare you for this, they never stop. \n They come at ya, and come at ya, and they never goddamn stop.");
	registerSubtitle("bill_peace_on_earth", "Bill", "^2", "I'll see peace back on earth if I gotta murder every one of these bastards with my bare goddamn hands.");
	registerSubtitle("bill_damn_straight", "Bill", "^2", "Damn straight.");
	registerSubtitle("bill_what_the_hell", "Bill", "^2", "What the hell was that?");
	registerSubtitle("bill_bad_feeling", "Bill", "^2", "I have a bad feeling about this.");
	registerSubtitle("bill_short_laugh", "Bill", "^2", "[Short laugh]");
	registerSubtitle("bill_francis_dont_hate", "Bill", "^2", "Francis, is there anything you don't hate?");
	registerSubtitle("bill_promise_shoot_me", "Bill", "^2", "We been immune so far, but - well, \nif I start to turn, promise you'll shoot me.");
	registerSubtitle("bill_you_are_an_idiot", "Bill", "^2", "You are an idiot.");
	registerSubtitle("bill_service_mighta_slimmed_you_down", "Bill", "^2", "A few years in the service mighta slimmed you down and shut you up, Francis.");
	registerSubtitle("bill_head_up_ass", "Bill", "^2", "Speak up Francis, your voice got all muffled from your head being so far up your ass!");
	registerSubtitle("bill_who_will_survive", "Bill", "^2", "You know who's gonna survive this mess, Francis? \nIt ain't the fellow makin' jokes.");
	registerSubtitle("bill_dont_be_an_ass", "Bill", "^2", "Don't be an ass, Francis.");
	registerSubtitle("bill_open_eyes_aim_better", "Bill", "^2", "Close your mouth and open your eyes, Francis. You'll aim better.");
	registerSubtitle("bill_great_zombie_attack_1957", "Bill", "^2", "You call this a zombie apocalypse? \nIt don't hold a candle to the great zombie attack of 1957.");
	registerSubtitle("bill_horseshittin", "Bill", "^2", "Nah, I'm horseshittin' ya.");
	registerSubtitle("bill_now_to_roof", "Bill", "^2", "Now to the roof!");
	registerSubtitle("bill_safe_room_up_here", "Bill", "^2", "Safe room up here!");
	registerSubtitle("bill_get_to_roof", "Bill", "^2", "We can get to the roof through here.");
	registerSubtitle("bill_lets_get_out", "Bill", "^2", "Let's get the hell out of here!");
	registerSubtitle("bill_find_radio_and_pilot", "Bill", "^2", "Let's find the radio and get a hold of that pilot.");
	registerSubtitle("bill_find_radio", "Bill", "^2", "Let's find that radio.");
	registerSubtitle("bill_called_chopper", "Bill", "^2", "I called the chopper.");
	registerSubtitle("bill_get_to_chopper_go", "Bill", "^2", "Get to the chopper! GO!");
	registerSubtitle("bill_get_to_chopper", "Bill", "^2", "Get to the chopper!");
	registerSubtitle("bill_to_chopper_move_it", "Bill", "^2", "To the chopper. Come on, MOVE IT, MOVE IT, MOVE IT!");
	registerSubtitle("bill_get_to_lz", "Bill", "^2", "Get to the LZ!");
    registerSubtitle("bill_birdshere", "Bill", "^2", "The bird's here! Let's go!");
	registerSubtitle("bill_choppershere", "Bill", "^2", "Our chopper's here! Let's get the hell out of Dodge.");


	registerSubtitle("francis_hates_subways", "Francis", "^2", "I hate subways.");
	registerSubtitle("francis_get_to_hospital", "Francis", "^2", "We've got to get to the hospital.");
	registerSubtitle("francis_get_on_lift", "Francis", "^2", "Get on the lift!");
	registerSubtitle("francis_hate_sewers", "Francis", "^2", "I hate sewers.");
	registerSubtitle("francis_hey_hey", "Francis", "^2", "Hey! hey!");
	registerSubtitle("francis_uncalled_for", "Francis", "^2", "Oh hey, that is uncalled for!");
	registerSubtitle("francis_into_the_hospital", "Francis", "^2", "Into the hospital!");
	registerSubtitle("francis_safe_house_in_hospital", "Francis", "^2", "There's a safe house in the hospital.");
	registerSubtitle("francis_hate_stairs", "Francis", "^2", "I hate stairs.");
	registerSubtitle("francis_elevator_here", "Francis", "^2", "Elevator's here!");
	registerSubtitle("francis_get_on_elevator", "Francis", "^2", "Get on the elevator!");
	registerSubtitle("francis_hate_elevators_helicopters_hospitals", "Francis", "^2", "I hate elevators. I hate helicopters. I hate hospitals. \nand doctors and lawyers and cops...");
	registerSubtitle("francis_bright_side", "Francis", "^2", "Hey, look on the bright side: even if you don't make it, I'll still be really handsome.");
	registerSubtitle("francis_dont_hate_vests", "Francis", "^2", "You know what I don't hate? I don't hate vests.");
	registerSubtitle("francis_shoot_beard", "Francis", "^2", "What if just your beard starts to turn? Can I shoot that?");
	registerSubtitle("francis_nice_view_of_city", "Francis", "^2", "If he ain't at least we die with a nice view of the city.");
	registerSubtitle("francis_chopper_on_way", "Francis", "^2", "Chopper's on its way!");
	registerSubtitle("francis_chopper_here_let's_go", "Francis", "^2", "The chopper's here! Let's go!");
	registerSubtitle("francis_chopper_here_about_time", "Francis", "^2", "The chopper's here! About time, too...");
	registerSubtitle("francis_get_to_chopper", "Francis", "^2", "Get to the chopper!");
	registerSubtitle("francis_everybody_to_chopper", "Francis", "^2", "Everybody to the chopper!!");


function registerSubtitle(alias, speaker, speakerColor = "^2", message)
    DEFAULT(level.subtitleArr, []);

        IPrintLnBold("registerSubtitle() CSC: Alias " + alias + " already exists.");


        speaker = "";

    if(speaker.size < 1)
        colon = "";
        colon = ": ";

        speakerColor = "";

        IPrintLnBold("registerSubtitle() CSC: Message variable is not of type string.");


    level.subtitleArr[alias] = [];

	level.subtitleArr[alias]["duration"] = calculate_time(message);

    level.subtitleArr[alias]["subtitle"] = speakerColor + speaker + colon + "^7" + message;

function handleSubtitleStateUpdate(localClientNum, alias) 
	IPrintLnBold("CSC handleSubtitleStateUpdate");
        IPrintLnBold("handleSubtitleStateUpdate() CSC: level.subtitleArr is undefined.");

        IPrintLnBold("handleSubtitleStateUpdate() CSC: Subtitle alias is uninitialized.");

	IPrintLnBold("reached csc about to print");
	SubtitlePrint(localClientNum, level.subtitleArr[alias]["duration"], level.subtitleArr[alias]["subtitle"]);

function calculate_time(message = "")
    return message.size*75;

Leave a Comment