// per-campaign-level configuration file. Used to execute scripts and other commands for campaign levels // do NOT attempt to set cvars here! Those cvars must be set from the campaign file properly // this is only for scripts and other commands you wish to run for a given level // ---------------------------------------------------------------- // Automated chat bot code: // ---------------------------------------------------------------- // this is a chat bot system, used in campaign levels to simulate dialogues between the player and bots // it only makes the player automatically speak certain messages, just like manually be typing them // eg. In a campaign level where you try to advance to the next area, you can make the script say "Bot: I will not let you pass!" // that does print "My-Playername: Bot: message", but it's the best this script can do // chat script settings set chatbot_msg_count 8 "number of messages (chatbot_msg_# cvars)" set chatbot_msg_time 15 "each message is posted after this many seconds" set chatbot_tmp_counter 0 "chatbot system variable, used to cycle the messages (do not set this manualy)" // chat script messages set chatbot_msg_0 "^1Guard: ^7You! How did you escape? Get back in your cell, now!" set chatbot_msg_1 "^2Self: ^7Who are you? Where am I? And why am I being held here?" set chatbot_msg_2 "^1Guard: ^7I need backup! We have a prisoner on the loose!" set chatbot_msg_3 "^2Self: ^7I want to know what's going on! What am I being held for? What happened?" set chatbot_msg_4 "^1Guard: ^7I'm hit! Someone please come over here! I can't take this one down by myself!" set chatbot_msg_5 "^2Self: ^7If you don't wish to let me go, I have no choice but to brake out of here!" set chatbot_msg_6 "^1Guard: ^7Shut up and get back in there, or you will regret this! You hear me?" set chatbot_msg_7 "^2Self: ^7I have nothing against you, just let me get out of here!" // chat script system alias chatbot_count "qc_cmd rpn /chatbot_tmp_counter chatbot_tmp_counter 1 add $chatbot_msg_count mod def" alias chatbot_say "say ${$1}" alias chatbot_do "chatbot_say chatbot_msg_$chatbot_tmp_counter;chatbot_count" alias chatbot_loop "chatbot_do;defer $chatbot_msg_time chatbot_loop" // kill the chat script when the match ends alias cl_hook_campaign_gameend "alias chatbot_loop \"\"" // start the chat script defer $chatbot_msg_time chatbot_loop // ---------------------------------------------------------------- // End of automated chat bot code. // ----------------------------------------------------------------