// Load any other scripts that we will need. ExecScript("et_utilities.gm"); ExecScript( "difficulty.gm" ); // Register default profiles for the game classes. RegisterDefaultProfile(CLASS.SOLDIER, "def_bot.gm"); RegisterDefaultProfile(CLASS.MEDIC, "def_bot.gm"); RegisterDefaultProfile(CLASS.ENGINEER, "def_bot.gm"); RegisterDefaultProfile(CLASS.FIELDOPS, "def_bot.gm"); RegisterDefaultProfile(CLASS.COVERTOPS, "def_bot.gm"); // Set up a list of Names, optionally associated with a script. //Names[" ^1Maelle^7Rickter^1! "] = ""; Names[" ^1Alexandre^7Bilodeau^1! "] = "Moguls Gold";(CLASS.MEDIC, "def_bot.gm"); //Names[" ^1Mike^7Robertson^1! "] = ""; //Names[" ^1Jennifer^7Heil^1! "] = "Moguls Silver"; //Names[" ^1Christine^7Nesbitt^1! "] = "Speed skating"; //Names[" ^1Kristina^7Groves^1! "] = ""; //Names[" ^1Jon^7Montgomery^1! "] = ""; //Names[" ^7Team^1Canada^7! "] = ""; //Names[" ^4Shaun^7White^1! "] = ""; //Names[" ^4Lindsey^6Vonn^1! "] = ""; //Names[" ^4Hannah^7kearney^1! "] = ""; //Names[" ^1Marianne^7St-Gelais^1! "] = "Speed Skating silver"; //Names[" ^7Team^1U^7S^4A^1! "] = ""; //Names[" ^4Shani^7Davis^1! "] = "Speed Skating"; //Names[" ^4Seth^7Wescott^1!"] = ""; //Names[" ^4Julie^7Mancuso^1! "] = ""; //Names[" ^4Anton^7Ohno^1! "] = "Speed Skating"; //Names[" ^4Johnny^7Spillane^1! "] = ""; //Names[" ^4Evan^7Lysacek^1! "] = ""; //Names[" ^4Hannah^7Teter^1! "] = ""; //Names[" ^4Bode^7Miller^1! "] = ""; //Names[" ^7Olympions^4! "] = ""; //Names[" ^1Clara^7Hughes^1! "] = "Speed Skating"; //Names[" ^1Ladies^73000mRelay^1! "] = "^1Jessica^7Gregg,^1Kalyna^7Roberge,^1Marianne^7St-Gelais,^1Tania^7Vincent"; //Names[" ^1Tessa^7Virtue^1"] = ""; //Names[" ^1Scott^7Moir^1! "] = ""; //Names[" ^1Ashleigh^7McIvor^1! "] = ""; //Names[" ^1Heather^7Moyse^1! "] = ""; //Names[" ^1Kaillie^7Humphries^1! "] = ""; //Names[" ^1Women^7Hockey^1! "] = ""; //Names[" ^1Roberto^7Luon^=GOLD^1! "] = "Hockey Gold"; //Names[" ^1Shelley-Ann^7Brown^1! "] = ""; //Names[" ^1Kalyna^7Roberge^1! "] = ""; //Names[" ^1Jessica^7Gregg^1! "] = "Short Track Ladies' 3000m Relay"; //Names[" ^1Jessica^7Gregg^1! "] = ""; //Names[" ^1Kalyna^7Roberge^1! "] = ""; //Names[" ^1Tania^7vincent^1!"] = ""; //Names[" ^1Sidney^7Crosby^1!"] = "Hockey Gold"; //Names[" ^1Jennifer^7Botterill^1!"] = ""; //Names[" ^1Hayley^7Wickenheiser^1!"] = ""; //Names[" ^1Francois-Louis^7Tremblay^1!"] = "Speed Skating Gold"; //Names[" ^1Charles^7Hamelin^1!"] = "Speed Skating Gold"; //Names[" ^Olivie^7Jean^1!"] = "Speed Skating Gold"; //Names[" ^1François^7Hamelin^1!"] = "Speed Skating Gold"; //Names[" ^1Mathieu^7Giroux^1!"] = "Speed Skating Gold"; //Names[" ^1Denny^7Morrison^1!"] = "Speed Skating Gold"; //Names[" ^1Lucas^7Makowsky^1!"] = "Speed Skating Gold"; //Names[" ^1Scott^7Niedermayer^1!"] = "Hockey"; //Names[" ^1Jasey-Jay^7Anderson^!"] = ""; //Names[" ^1Tessa^7Virtue^1!"] = "Ice Dancing couples"; //Names[" ^mhttp^7://^=ggclanz^7.^mcom"] = ""; //Names[" ^1Scott^7Moir^1!"] = "Ice Dancing couples"; //Names[" ^1Joannie^7Rochette^1!"] = "Single Ice Dancing"; //Names[" ^1Kristie^7Moore^1!"] = "Curling"; //Names[" ^1Chery^7Bernardl^1!"] = "Curling"; //Names[" ^1Susan^7O'Connor^1!"] = "Curling"; //Names[" ^1Carolyn^7Darbyshire^1!"] = "Curling"; //Names[" ^1Cori^7Bartel^1!"] = "Curling"; //Names[" ^=208^1.^=167^1.^=242 ^1.^=216"] = ""; //Names[" ^1Adam^7Enright^1!"] = "Curling"; //Names[" ^1John^7Morris^1!"] = "Curling"; //Names[" ^1Ben^7Hebert^1!"] = "Curling"; //Names[" ^=208^1.^=167^1.^=242 ^1.^=216"] = ""; //Names[" ^1Kevin^7Martin ^1!"] = "Curling"; //Names[" ^1Marc^7Kennedy ^1!"] = ""; //Names[" ^1Mens^7Hockey^1!"] = ""; //Names[" ^1Shelley-Ann^7Brown^1!"] = "Bobsleigh"; //Names[" ^1Helen^7Upperton^1!"] = "Bobsleigh"; //Names[" ^1Heather^7Moyse^1! "] = "Bobsleigh"; //Names[" ^1Kaillie^7Humphries^1! "] = "Bobsleigh"; //Names[" ^1Lyndon^7Rush^1! "] = "Bobsleigh"; //Names[" ^1Chris^7LeBihan^1! "] = "Bobsleigh"; //Names[" ^1Lascelles^7Brown^1! "] = "Bobsleigh"; //Names[" ^1David^7Bissett^1! "] = "Bobsleigh"; //Names[" ^1Womans^7Curling^1! "] = ""; //Names[" ^1Mens^7Curling^1! "] = ""; //Names[" ^1Shannon^7Szabados^1! "] = "Womans Hockey Golie"; // Register a bot with a script. Uncomment this line to try the sample bot. //Names["samplebot"] = "sample.gm"; // Set minbots/maxbots on map start MinBots(10); MaxBots(10); // This is optional for ET. By default breakable objects won't be targeted, because this // distance defaults to 0. Set this to some low value to allow bots to target breakable objects. // This number is the distance that bots are allowed to target breakable entities at. // It must be a global variable. // global TargetBreakableDist = 10.0; print("ET Script Executed"); // Uncomment this line to dump a list of all global function Names and constants // to a file called globals.txt in the game directory //DumpGlobals("globals.txt"); // This function runs an infinite loop of adding and kicking bots. It is used to illustrate // how custom script functions can be run continuously to provide custom control over // things like the number of bots. Additional behaviors like forcing bots to 1 team can be // implemented by starting a similar function to this from a custom command. global stresstest = function() { sleep(10.0); dowhile(1) { //DumpGlobals("globals.txt"); ran = UnitRandom(); if(ran > 0.98) { //KickAll(); } else if(ran < 0.5) { AddBot(); } else { foreach ( gameId and bot in BotTable ) { if(bot) { print(bot); KickBot(bot.Name); break; } } } // Pause for 10 seconds between loop iterations. sleep(RandRange(0.0, 3.0)); } }; // This is a Game Monkey Script function that creates a thread using the function we defined above. // Uncomment the following line if you want to run the function above. //thread(stresstest); // It is also possible to register custom commands, that will be called in a similar way to the other bot commands, // such as /bot waypoint. These command functions will recieve a table that is filled with all the additional options // that were part of the command. // For example, if the user typed the following command into the games console // testme hi how are you // This testcommand function would be called, and the params variable would be a table that contains 4 items // These items can be referenced by a number, such as params[0], params[1], etc... // Script commands are an easy way to bind complex script functions to a command that can be executed from // the games console. Commands["testme"] = function(_params) { print("Test Command"); foreach ( name and val in _params ) { print( val ); } }; Commands["showweapons"] = function(_params) { print("Printing Weapon List"); foreach ( name and Id in WEAPON ) { print("Weapon " + name +" : id " + Id); } }; Commands["showevents"] = function(_params) { print("Printing Event List"); foreach ( name and Id in EVENT ) { print("Event " + name +" : id " + Id); } }; Commands["dumpglobals"] = function(_params) { dumpGlobals("globals_functions.gm", DUMP.FUNCTIONS); dumpGlobals("globals_references.gm", DUMP.REFERENCES); dumpGlobals("globals_typefunctions.gm", DUMP.TYPEFUNCTIONS); dumpGlobals("globals_all.gm", DUMP.ALL); dumpGlobals("globals_all2.gm"); }; Commands["showscriptgoals"] = function(_params) { print("Printing Bot Script Goals"); foreach ( gameId and bot in BotTable ) { print(bot, bot.scriptgoal); } }; Commands["mywpmode"] = function(_params) { ExecCommand("waypoint_view 1"); Util.EnableWaypointAutoSave( true, 20 ); }; Commands["numthreads"] = function(_params) { allThreads = threadAllIds(); print("Number of threads", tableCount(allThreads)); }; Commands["goal_exp"] = function(_params) { goallist = table(); GetGoals(goallist, 0, _params[0]); print("goal_exp"); foreach ( index and goal in goallist ) { print(index, goal, goal.GetName()); } };