Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set terminal to false.
- set tutorial_active to false.
- set tutorial_commands to "/me list - Lists available programs\n" +
- "/me run <program_name> - Runs a specific program\n" +
- "/me tutorial - Displays the Twitch Plays KSP Guide\n" +
- "/me exit - Exits the tutorial"
- set tutorial_text to "Welcome to Twitch Plays KSP Tutorial!\n" +
- "You can control the rocket by entering commands in Twitch Chat.\n" +
- "Use the following commands:\n" +
- tutorial_commands
- lock throttle to 0.
- run main.
- function main {
- wait until terminal {
- set user_input to terminal_input().
- if user_input = "/me tutorial" {
- set tutorial_active to true
- print tutorial_text
- }
- else if user_input = "/me exit" {
- set terminal to false
- set tutorial_active to false
- }
- else {
- execute_command(user_input)
- }
- }
- }
- function terminal_input {
- print "Enter your command or type 'exit' to quit: "
- set input_line to readline().
- return input_line.
- }
- function execute_command {
- parameter command.
- print "Executing command: " + command
- set user_input to "/me " + command
- execute user_input.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement