Changes between Version 21 and Version 22 of ProtocolOne
- Timestamp:
- Jun 10, 2011 10:43:50 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ProtocolOne
v21 v22 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'' 7 {{{Client quagent = new Client("127.0.0.1");}}} 6 ''Example:'' 7 {{{ 8 Client quagent = new Client("127.0.0.1"); 9 }}} 8 10 9 11 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 12 11 ''Example'' 12 {{{quagent.ready();}}} 13 ''Example:'' 14 {{{ 15 quagent.ready(); 16 }}} 13 17 14 18 During the live section, you are free to call any [[ProtocolZero]] or [[ProtocolOne]] functions you wish (with the exception of initial commands). 15 ''Example'' 19 20 ''Example:'' 16 21 {{{ 17 22 //this will make the Quagent face and shoot at the user.