Changes between Version 16 and Version 17 of ProtocolOne
- Timestamp:
- Jun 10, 2011 10:39:56 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TabularUnified ProtocolOne
v16 v17 3 3 = Usage = 4 4 To use quagents, you must have the Client directory in your filesystem. Create a class with a main method, and import the [[Necessary Classes]]. To create a Quagent, simply create a new client using the Client constructor. The constructor takes one argument, which must specify the IP address of the Quagents server. 5 5 6 ''Example'' 6 7 {{{Client quagent = new Client("127.0.0.1");}}} 7 8 8 9 Now, before the bot spawns, you may use initial commands to specify certain static parameters. These are optional. When you have completed these modifications, call the ready() function to initiate the live section of the session. 10 9 11 ''Example'' 10 12 {{{quagent.ready();}}} … … 12 14 During the live section, you are free to call any live commands, queries, queue management commands, or compound functions you wish. See the following for a list of currently supported functions. 13 15 ''Example'' 14 {{{ //this will make the Quagent face and shoot at the user. 16 {{{ 17 //this will make the Quagent face and shoot at the user. 18 15 19 while(true){client.faceEntityDirectoin(0,1);client.fireWeapon(1);}}}} 16 20