//14.11.02 //this is the latest version of the ags script //contents : matis city NPCs, bush fauna (low level-newbie zone) // link the common configuration file RootConfigFilename = "common.cfg"; DisplayedVariables += {"GlobalActorCount","GlobalActorMoves","GlobalActorUpdates"}; // by default, use localhost to find the naming service //NSHost = "ldserver:50000"; //NSHost = "gamedev4"; // load all continents UsedContinents = { // "fyros", // "tryker", "matis", // "zorai", }; Paths += { "data_leveldesign" /*, "data_common", "data_shard"*/ }; // StartCommands = { "loadPrim demo.prim" }; // .prim is an obsolete file format (it used to work for collision with trees) StartCommandsWhenMirrorReady = { // THIS IS GOOD NEW STUFF "checkGenerateAndRun ags_test_creatures1 1571 -5135 10 25 creature c????1.creature", "checkGenerateAndRun ags_test_creatures_testroom 1571 -4825 5 50 creature testroom_*.creature", /* // THIS IS OLD STUFF // to be removed later "checkGenerateAndRun ags_test_lvl_01 1721 -4805 5 20 creature *_lvl_01.creature", "checkGenerateAndRun ags_test_hom 1721 -4755 5 20 creature *_hom_*.creature", "checkGenerateAndRun ags_test_hof 1721 -4745 5 20 creature *_hof_*.creature", "checkGenerateAndRun ags_test_set 1721 -4735 5 20 creature *_set.creature", "checkGenerateAndRun ags_test_karavan 1721 -4725 5 20 creature karavan_*.creature", "checkGenerateAndRun ags_test_kami 1721 -4715 5 20 creature kami*_*.creature", */ /* "generateScript ags_test_lvl_01.script 1721 -5000 5 20 creature *_lvl_01.creature", "generateScript ags_test_hom.script 1721 -4950 5 20 creature *_hom_*.creature", "generateScript ags_test_hof.script 1721 -4940 5 20 creature *_hof_*.creature", "generateScript ags_test_set.script 1721 -4930 5 20 creature *_set.creature", "generateScript ags_test_karavan.script 1721 -4920 5 20 creature karavan_*.creature", "generateScript ags_test_kami.script 1721 -4910 5 20 creature kami*_*.creature", "runScript lvl_01 ags_test_lvl_01.script on", "runScript hom ags_test_hom.script on", "runScript hof ags_test_hof.script on", "runScript set ags_test_set.script on", "runScript karanvan ags_test_karavan.script on", "runScript kami ags_test_kami.script on", */ }; /* for scripting : one command per line, no surrounding " commands are : - cmd: Execute a service command ex: cmd help cmd actorCreatePosition demo-point-004 - setText: Set a variable as plain text. Value can be computed using other variables to compose strings (with the $(varname) syntax) ex: setText myVar myValue setText myVar $(myOtherVar) blah blah synonym: set$ works like setText - setNumeric: set a variable as numeric value. Value can be computed using other variables (no specific syntax, variable names are written in plain text) a variable existence can be tested by preceding its name by a ?. If the variable exists, the ?var is set to 1, otherwise 0. ex: setNumeric myVar 0.1234 setNumeric myVar myOtherVar*2.0+55690.1*sin(myVar) setNumeric isReady ?myVar synonym: set# works like setNumeric - erase: erases a variable. Variable is completely deleted. ?var returns 0 after until var is redefined ex: erase myVar - wait: halt script for n cycles ex: wait 10 - receive: halt script until expression is true (true is a value different from 0) common operators can be used (<, >, == etc.) ex: receive myVar>1.0 receive ?myVar - send: send a value to all running scripts. Couple variable/value will be defined then in all running scripts useful to synchronize scripts, or trigger events... value is text replaced using $(...) syntax ex: send myVar blah blah send myVar $(myOtherVar) - display: displays a string, text replaced using $(...) syntax ex: display myVar=$(myVar) display number of players=$(nbPlayers) - if: tests a condition, and runs alternative. alternative bloc can have an else part, and must be ended by endif ex: if myVar > 10 display myVar is greater than 10 else display myVar is less than 10 endif - while: execute a bloc while a condition is verified. bloc must be ended by endloop ex: while myVar > 10 set# myVar myVar-1 endloop */