wpdev-commits Mailing List for Wolfpack Emu (Page 89)
Brought to you by:
rip,
thiagocorrea
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(121) |
Sep
(256) |
Oct
(59) |
Nov
(73) |
Dec
(120) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(259) |
Feb
(381) |
Mar
(501) |
Apr
(355) |
May
(427) |
Jun
(270) |
Jul
(394) |
Aug
(412) |
Sep
(724) |
Oct
(578) |
Nov
(65) |
Dec
|
From: Sebastian H. <dar...@us...> - 2004-06-27 19:24:51
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22047/python Modified Files: global.cpp Log Message: Documentation Index: global.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v retrieving revision 1.133 retrieving revision 1.134 diff -C2 -d -r1.133 -r1.134 *** global.cpp 15 Jun 2004 02:44:46 -0000 1.133 --- global.cpp 27 Jun 2004 19:24:37 -0000 1.134 *************** *** 125,130 **** } ! /*! ! Log a string */ static PyObject* wpConsole_log( PyObject* self, PyObject* args ) --- 125,134 ---- } ! /* ! \function wolfpack.console.log ! \param loglevel The loglevel for this message. See the ERROR_ constants in wolfpack/consts.py for ! details. ! \param text The text of the message. ! \description Sends a string to the console and the logfile. */ static PyObject* wpConsole_log( PyObject* self, PyObject* args ) *************** *** 143,148 **** } ! /*! ! Sends a string to the wolfpack console. */ static PyObject* wpConsole_send( PyObject* self, PyObject* args ) --- 147,154 ---- } ! /* ! \function wolfpack.console.send ! \param text The text of the message. ! \description Prints a string on the server console. */ static PyObject* wpConsole_send( PyObject* self, PyObject* args ) *************** *** 162,167 **** } ! /*! ! Sends a progress-bar to the wolfpack console */ static PyObject* wpConsole_sendprogress( PyObject* self, PyObject* args ) --- 168,175 ---- } ! /* ! \function wolfpack.console.sendprogress ! \param text The progress identifier. ! \description Prints a string on the console that identifies the start of a progress display. */ static PyObject* wpConsole_sendprogress( PyObject* self, PyObject* args ) *************** *** 169,174 **** Q_UNUSED( self ); char* message; ! if ( !PyArg_ParseTuple( args, "es", "utf-8", &message ) ) ! { return 0; } --- 177,181 ---- Q_UNUSED( self ); char* message; ! if (!PyArg_ParseTuple( args, "es", "utf-8", &message)) { return 0; } *************** *** 182,187 **** } ! /*! ! Sends a [done] progress section to the console */ static PyObject* wpConsole_senddone( PyObject* self, PyObject* args ) --- 189,195 ---- } ! /* ! \function wolfpack.console.senddone ! \description Indicates that a printed progress action is now done. */ static PyObject* wpConsole_senddone( PyObject* self, PyObject* args ) *************** *** 194,199 **** } ! /*! ! Sends a [fail] progress section to the console */ static PyObject* wpConsole_sendfail( PyObject* self, PyObject* args ) --- 202,208 ---- } ! /* ! \function wolfpack.console.sendfail ! \description Indicates that a printed progress action has failed. */ static PyObject* wpConsole_sendfail( PyObject* self, PyObject* args ) *************** *** 206,211 **** } ! /*! ! Sends a [skip] progress section to the console */ static PyObject* wpConsole_sendskip( PyObject* self, PyObject* args ) --- 215,221 ---- } ! /* ! \function wolfpack.console.sendskip ! \description Indicates that a printed progress action has been skipped. */ static PyObject* wpConsole_sendskip( PyObject* self, PyObject* args ) *************** *** 218,223 **** } ! /*! ! Returns a list of Strings (the linebuffer) */ static PyObject* wpConsole_getbuffer( PyObject* self, PyObject* args ) --- 228,234 ---- } ! /* ! \function wolfpack.console.getbuffer ! \return A list of the strings that have been sent to the console previously. */ static PyObject* wpConsole_getbuffer( PyObject* self, PyObject* args ) *************** *** 237,240 **** --- 248,255 ---- } + /* + \function wolfpack.console.shutdown + \description Shutdown the server. + */ static PyObject* wpConsole_shutdown( PyObject* self, PyObject* args ) { *************** *** 252,263 **** static PyMethodDef wpConsole[] = { ! { "send", wpConsole_send, METH_VARARGS, "Prints something to the wolfpack console" }, ! { "progress", wpConsole_sendprogress, METH_VARARGS, "Prints a .....[xxxx] block" }, ! { "progressDone", wpConsole_senddone, METH_NOARGS, "Prints a [done] block" }, ! { "progressFail", wpConsole_sendfail, METH_NOARGS, "Prints a [fail] block" }, ! { "progressSkip", wpConsole_sendskip, METH_NOARGS, "Prints a [skip] block" }, ! { "getbuffer", wpConsole_getbuffer, METH_NOARGS, "Gets the linebuffer of the console" }, ! { "log", wpConsole_log, METH_VARARGS, NULL }, ! { "shutdown", wpConsole_shutdown, METH_NOARGS, "Shut the server down" }, { NULL, NULL, 0, NULL } // Terminator --- 267,278 ---- static PyMethodDef wpConsole[] = { ! { "send", wpConsole_send, METH_VARARGS, 0 }, ! { "sendprogress", wpConsole_sendprogress, METH_VARARGS, 0 }, ! { "senddone", wpConsole_senddone, METH_NOARGS, 0 }, ! { "sendfail", wpConsole_sendfail, METH_NOARGS, 0 }, ! { "sendskip", wpConsole_sendskip, METH_NOARGS, 0 }, ! { "getbuffer", wpConsole_getbuffer, METH_NOARGS, 0 }, ! { "log", wpConsole_log, METH_VARARGS, 0 }, ! { "shutdown", wpConsole_shutdown, METH_NOARGS, 0 }, { NULL, NULL, 0, NULL } // Terminator *************** *** 487,492 **** } ! /*! ! Tries to find a region for a specific position. */ static PyObject* wpRegion( PyObject* self, PyObject* args ) --- 502,516 ---- } ! /* ! \function wolfpack.region ! \param x The x component of the coordinate. ! \param y The y component of the coordinate. ! \param map Which map should be looked on. ! <code>0 - Felucca ! 1 - Trammel ! 2 - Ilshenar ! 3 - Malas</code> ! \return A region object or None if there is no region at the given coordinates. ! \description Finds a region at the given coordinates. */ static PyObject* wpRegion( PyObject* self, PyObject* args ) |
From: Sebastian H. <dar...@us...> - 2004-06-27 11:48:38
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9818/wolfpack Modified Files: utilities.py Log Message: Documentation fixes. Index: utilities.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/utilities.py,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** utilities.py 27 Jun 2004 10:17:19 -0000 1.58 --- utilities.py 27 Jun 2004 11:48:29 -0000 1.59 *************** *** 54,61 **** """ \function wolfpack.utilities.hex2dec ! \param value ! \param default ! \return Integer ! \description Converts a given hex value into a decimal value. """ def hex2dec(value, default = 0): --- 54,63 ---- """ \function wolfpack.utilities.hex2dec ! \param value The string you want to convert. ! \param default Defaults to 0. ! The default value that will be returned if there is an error converting the given string. ! \return The string converted to an integer value. ! \description Converts a string to an integer value and accepts either a normal decimal number (<code>64</code>) or the ! standard hexadecimal notation (<code>0x40</code>). """ def hex2dec(value, default = 0): *************** *** 75,81 **** """ \function wolfpack.utilities.evenorodd ! \param value ! \return "even" or "odd" ! \description Takes a given int value and determines if it is even or odd. """ def evenorodd( value ): --- 77,83 ---- """ \function wolfpack.utilities.evenorodd ! \param value The integer value that should be checked. ! \return A string which is either "even" or "odd". ! \description Takes a given int value and determines if it is even or odd and returns a string with the result. """ def evenorodd( value ): *************** *** 87,94 **** """ \function wolfpack.utilities.itemsmatch ! \param item1 ! \param item2 ! \return Boolean ! \description Determines if the items match for stacking. """ def itemsmatch(a, b): --- 89,97 ---- """ \function wolfpack.utilities.itemsmatch ! \param item1 The first item. ! \param item2 The second item. ! \return True if the items could stack, false otherwise. ! \description Determines if the items match for stacking. This function does not check ! if the stacked amount is larger than the maximum. """ def itemsmatch(a, b): *************** *** 97,104 **** """ \function wolfpack.utilities.tobackpack ! \param item ! \param char ! \return Boolean ! \description Moves an object into a character's backpack. """ def tobackpack(item, char): --- 100,108 ---- """ \function wolfpack.utilities.tobackpack ! \param item The item you want to move to the backpack of the character. ! \param char The character in whose backpack you want to place the item. ! \return True if the item was stacked inside the characters backpack and is now invalid. ! False if the item has been put into the characters backpack and needs to be updated. ! \description Moves an object into a characters backpack and stacks it if possible. """ def tobackpack(item, char): *************** *** 108,115 **** """ \function wolfpack.utilities.tocontainer ! \param item ! \param container ! \return Boolean ! \description Moves an item to a container, stacks if possible. """ def tocontainer( item, container ): --- 112,120 ---- """ \function wolfpack.utilities.tocontainer ! \param item The item you want to move to the given container. ! \param container The container you want to move the item into. ! \return True if the item was stacked inside the container and has been deleted. ! False if the item has not been stacked and needs to be updated in order to be seen. ! \description Moves an object into a container and stacks it if possible. """ def tocontainer( item, container ): *************** *** 129,140 **** """ \function wolfpack.utilities.cont2cont ! \param container1 ! \param container2 ! \description Moves objects from container1 to container2. """ def cont2cont( container1, container2 ): for item in container1.content: ! tocontainer( item, container2 ) ! item.update() """ --- 134,145 ---- """ \function wolfpack.utilities.cont2cont ! \param container1 The source container. ! \param container2 The target container. ! \description Moves all objects from container1 to container2. """ def cont2cont( container1, container2 ): for item in container1.content: ! if not tocontainer( item, container2 ): ! item.update() """ *************** *** 439,473 **** """ - \function wolfpack.utilities.cleartag - \param self - \param args[ char, tagname ] - \description Removes a tagname from a character. - """ - def cleartag( self, args ): - char = args[0] - tagname = args[1] - self.deltag( tagname ) - return OK - - """ - \function wolfpack.utilities.rusmsg - \param player - \param locmsg - \description Sends a localized system message to a given player. - """ - def rusmsg( player, locmsg ): - player.socket.sysmessage( unicode( locmsg, 'cp1251') ) - return OK - - # - # Internal function for resource searches - # - """ \function wolfpack.utilities.checkresources ! \param container ! \param baseid ! \param amount ! \return Ineger ! \description Returns the amount of a resource to consume in a container from a given baseid. """ def checkresources(container, baseid, amount): --- 444,455 ---- """ \function wolfpack.utilities.checkresources ! \param container The container you want to search in. ! \param baseid The baseid of the resource you are looking for. ! \param amount The amount that is required of the given resource. ! \return 0 if all the required resources have been found. Otherwise the remaining amount of ! the resource that has not been found. ! \description Recursively searches for items with a given baseid in a container and checks if a ! given amount can be found. """ def checkresources(container, baseid, amount): *************** *** 485,500 **** return amount - # - # Internal Recursive function for consuming resources. - # Return the amount left to consume. - # - """ - \function wolfpack.utilities.consumeresourcesinternal - \param container - \param baseid - \param amount - \return Integer - \description Consumes an amount of resources from a container with the given baseid. - """ def consumeresourcesinternal(container, baseid, amount): for item in container.content: --- 467,470 ---- *************** *** 513,528 **** return amount - # - # Consume a certain amount of a certain resource. - # Return true if the resources have been consumed - # correctly. - # """ \function wolfpack.utilities.consumeresources ! \param container ! \param baseid ! \param amount ! \return Integer or False ! \description Consumes the amount of resources from a container with a given baseid. """ def consumeresources(container, baseid, amount): --- 483,493 ---- return amount """ \function wolfpack.utilities.consumeresources ! \param container The container you want to remove from. ! \param baseid The baseid of the items you want to remove. ! \param amount The amount of items you want to remove. ! \return True if the resource could be consumed, false otherwise. ! \description Removes a given amount of items with a given baseid recursively from a given container. """ def consumeresources(container, baseid, amount): *************** *** 533,545 **** """ ! \function magic.utilities.energydamage \param target The target that is taking damage. Only characters are allowed. \param source The source of the damage. May be None. \param amount The amount of damage dealt. ! \param physical The physical fraction of the damage. ! \param fire The fire fraction of the damage. ! \param cold The cold fraction of the damage. ! \param poison The poison fraction of the damage. ! \param energy The energy fraction of the damage. \description Deal damage to a target and take the targets energy resistances into account. """ --- 498,519 ---- """ ! \function wolfpack.utilities.energydamage \param target The target that is taking damage. Only characters are allowed. \param source The source of the damage. May be None. \param amount The amount of damage dealt. ! \param physical Defaults to 0. ! The physical fraction of the damage. This is an integer value ranging from 0 to 100. ! \param fire Defaults to 0. ! The fire fraction of the damage. This is an integer value ranging from 0 to 100. ! \param cold Defaults to 0. ! The cold fraction of the damage. This is an integer value ranging from 0 to 100. ! \param poison Defaults to 0. ! The poison fraction of the damage. This is an integer value ranging from 0 to 100. ! \param energy Defaults to 0. ! The energy fraction of the damage. This is an integer value ranging from 0 to 100. ! \param noreflect Defaults to 0. If this parameter is 1, no physical damage will be reflected back to ! the source. ! \param damagetype Defaults to DAMAGE_MAGICAL. This is the damagetype passed on to the internal damage function. ! You can ignore this most of the time. \description Deal damage to a target and take the targets energy resistances into account. """ *************** *** 594,599 **** """ \function wolfpack.utilities.createlockandkey ! \param item ! \description Makes a current container lockable and creates a key. """ def createlockandkey( container ): --- 568,573 ---- """ \function wolfpack.utilities.createlockandkey ! \param container The container you want to make lockable. ! \description Makes a current container lockable and creates a key in it. """ def createlockandkey( container ): |
From: Sebastian H. <dar...@us...> - 2004-06-27 11:48:37
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9818/skills Modified Files: __init__.py Log Message: Documentation fixes. Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/__init__.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** __init__.py 26 May 2004 13:07:24 -0000 1.13 --- __init__.py 27 Jun 2004 11:48:29 -0000 1.14 *************** *** 102,105 **** --- 102,111 ---- return char.strength + char.dexterity + char.intelligence + def cleartag( self, args ): + char = args[0] + tagname = args[1] + self.deltag( tagname ) + return OK + def antimacrocheck( char, skillid, object ): #Get or set antimacro tag: "AM" + SERIAL = COUNT *************** *** 113,117 **** return OOPS else: ! object.addtimer( ANTIMACRODELAY, "wolfpack.utilities.cleartag", [char, tagname] ) return OOPS else: --- 119,123 ---- return OOPS else: ! object.addtimer( ANTIMACRODELAY, "skills.cleartag", [char, tagname] ) return OOPS else: |
From: Sebastian H. <dar...@us...> - 2004-06-27 11:48:37
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9818/commands Modified Files: __init__.py Log Message: Documentation fixes. Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/__init__.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** __init__.py 26 May 2004 13:07:20 -0000 1.13 --- __init__.py 27 Jun 2004 11:48:28 -0000 1.14 *************** *** 3,6 **** --- 3,7 ---- from wolfpack import time from wolfpack.utilities import hex2dec + from wolfpack.gumps import cGump def season( socket, command, arguments ): *************** *** 179,183 **** --- 180,191 ---- socket.attachtarget("commands.followers_target", []) + def test(socket, command, arguments): + gump = cGump() + gump.addGump(0, 0, 0x67) + gump.addText(0, 0, "à¨Here is your bank box,".decode('utf-8'), 2) + gump.send(socket) + def onLoad(): + wolfpack.registercommand("test", test) wolfpack.registercommand("resendtooltip", resendtooltip) wolfpack.registercommand("season", season) |
From: Sebastian H. <dar...@us...> - 2004-06-27 10:17:29
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19770/wolfpack Modified Files: utilities.py Log Message: Documentation. Index: utilities.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/utilities.py,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** utilities.py 24 May 2004 14:14:56 -0000 1.57 --- utilities.py 27 Jun 2004 10:17:19 -0000 1.58 *************** *** 22,29 **** """ \function wolfpack.utilities.rolldice ! \param dice ! \param sides ! \param bonus ! \return Integer \description Rolls some dice and returns a result. """ --- 22,32 ---- """ \function wolfpack.utilities.rolldice ! \param dice This is either the number of dice you want to roll or a string representation of the number of dice, the sides ! and the bonus. One of the following would be valid: <code>"2d8+4", "2d8", "1d4-1", "20d10"</code>. ! \param sides Defaults to 6. ! The number of sides each dice should have. ! \param bonus Defaults to 0. ! The bonus that should be added to the result after the dice have been rolled. ! \return The result of the roll as an integer. \description Rolls some dice and returns a result. """ |
Update of /cvsroot/wpdev/xmlscripts/documentation/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8268/templates Modified Files: command.html commands.html event.html events.html index.html object.html objects.html Added Files: module.html modules.html Log Message: generation of module information Index: index.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/templates/index.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.html 26 Jun 2004 18:57:36 -0000 1.1 --- index.html 26 Jun 2004 21:51:28 -0000 1.2 *************** *** 63,67 **** <span class="sectiontitle">SCRIPTING LIBRARY</span><br /> Wolfpack comes with a sophisticated library of scripts. This section of the documentation provides an overview over the library and its functions.<br /> ! <a href="#">Read more... </a> </td> </tr> --- 63,67 ---- <span class="sectiontitle">SCRIPTING LIBRARY</span><br /> Wolfpack comes with a sophisticated library of scripts. This section of the documentation provides an overview over the library and its functions.<br /> ! <a href="modules.html">Read more... ({MODULES} modules)</a> </td> </tr> --- NEW FILE: modules.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Wolfpack Reference</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> <link href="style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- a:link { color: #0000FF; text-decoration: none; } a:visited { text-decoration: none; color: #0000FF; } a:hover { text-decoration: underline; } a:active { text-decoration: none; } --> </style></head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#004B2C"><a href="index.html"><img src="top_logo.jpg" width="586" height="87" border="0"/></a></td> </tr> <tr> <td height="3" bgcolor="#999999"><img src="spacer.gif" width="1" height="3" /></td> </tr> </table> <div align="center"> <p> <span class="maintitle">Wolfpack Library Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> <tr valign="top" align="left"> <td class="text"> <span class="sectiontitle">LIBRARY MODULES</span><br /> Choose one of the library modules to see the included functions.<br><br> </td> </tr> <tr valign="top" align="left"> <td class="text"> <table width="100%" border="0" cellspacing="0" cellpadding="2"> {OVERVIEW} </table><br> </td> </tr> <tr valign="top"> <td class="text"><a href="index.html">Back to the Wolfpack Reference</a></td> </tr> </table> <br> <span class="smalltext">Generated: {GENERATED} | Version: {VERSION}</span> <br /> <span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span> </div> </body> </html> Index: objects.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/templates/objects.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** objects.html 26 Jun 2004 18:52:24 -0000 1.1 --- objects.html 26 Jun 2004 21:51:28 -0000 1.2 *************** *** 46,50 **** <p> <span class="maintitle">Wolfpack Command Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top"> <td class="text"> <span class="sectiontitle">SCRIPTING OBJECTS</span><br /> --- 46,50 ---- <p> <span class="maintitle">Wolfpack Command Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top" align="left"> <td class="text"> <span class="sectiontitle">SCRIPTING OBJECTS</span><br /> *************** *** 53,57 **** </td> </tr> ! <tr valign="top"> <td class="text"> <table width="100%" border="0" cellspacing="0" cellpadding="2"> --- 53,57 ---- </td> </tr> ! <tr valign="top" align="left"> <td class="text"> <table width="100%" border="0" cellspacing="0" cellpadding="2"> Index: object.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/templates/object.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** object.html 26 Jun 2004 18:52:24 -0000 1.2 --- object.html 26 Jun 2004 21:51:28 -0000 1.3 *************** *** 51,55 **** <p><span class="maintitle">Wolfpack Object Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top"> <td class="text"> <p><span class="sectiontitle">OBJECT DESCRIPTION</span><br> --- 51,55 ---- <p><span class="maintitle">Wolfpack Object Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top" align="left"> <td class="text"> <p><span class="sectiontitle">OBJECT DESCRIPTION</span><br> Index: commands.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/templates/commands.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** commands.html 26 Jun 2004 18:52:24 -0000 1.2 --- commands.html 26 Jun 2004 21:51:28 -0000 1.3 *************** *** 46,50 **** <p> <span class="maintitle">Wolfpack Command Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top"> <td class="text"> <span class="sectiontitle">INGAME COMMANDS</span><br> --- 46,50 ---- <p> <span class="maintitle">Wolfpack Command Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top" align="left"> <td class="text"> <span class="sectiontitle">INGAME COMMANDS</span><br> *************** *** 54,58 **** </td> </tr> ! <tr valign="top"> <td class="text"><span class="sectiontitle">OTHER COMMANDS</span><br> <table width="100%" border="0" cellspacing="0" cellpadding="2"> --- 54,58 ---- </td> </tr> ! <tr valign="top" align="left"> <td class="text"><span class="sectiontitle">OTHER COMMANDS</span><br> <table width="100%" border="0" cellspacing="0" cellpadding="2"> Index: events.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/templates/events.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** events.html 26 Jun 2004 18:52:24 -0000 1.2 --- events.html 26 Jun 2004 21:51:28 -0000 1.3 *************** *** 45,49 **** <p> <span class="maintitle">Wolfpack Event Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top"> <td class="text"> <span class="sectiontitle">SCRIPTING EVENTS</span><br> --- 45,49 ---- <p> <span class="maintitle">Wolfpack Event Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top" align="left"> <td class="text"> <span class="sectiontitle">SCRIPTING EVENTS</span><br> *************** *** 52,56 **** <br></td> </tr> ! <tr valign="top"> <td class="text"><span class="sectiontitle">OTHER EVENTS </span><br> <table width="100%" border="0" cellspacing="0" cellpadding="2"> --- 52,56 ---- <br></td> </tr> ! <tr valign="top" align="left"> <td class="text"><span class="sectiontitle">OTHER EVENTS </span><br> <table width="100%" border="0" cellspacing="0" cellpadding="2"> Index: command.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/templates/command.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** command.html 26 Jun 2004 18:52:24 -0000 1.2 --- command.html 26 Jun 2004 21:51:28 -0000 1.3 *************** *** 46,50 **** <p> <span class="maintitle">Wolfpack Command Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top"> <td class="text"> <span class="sectiontitle">COMMAND DESCRIPTION</span><br> --- 46,50 ---- <p> <span class="maintitle">Wolfpack Command Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top" align="left"> <td class="text"> <span class="sectiontitle">COMMAND DESCRIPTION</span><br> --- NEW FILE: module.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Wolfpack Reference</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> <link href="style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- a:link { color: #0000FF; text-decoration: none; } a:visited { text-decoration: none; color: #0000FF; } a:hover { text-decoration: underline; } a:active { text-decoration: none; } .style2 { color: #999999; font-weight: bold; } --> </style></head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#004B2C"><a href="./index.php"><img src="top_logo.jpg" width="586" height="87" border="0"/></a></td> </tr> <tr> <td height="3" bgcolor="#999999"><img src="spacer.gif" width="1" height="3" /></td> </tr> </table> <a name="top"></a> <div align="center"> <p><span class="maintitle">Wolfpack Object Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> <tr valign="top" align="left"> <td class="text"> <p><span class="sectiontitle">MODULE DESCRIPTION</span><br> <br> <strong>Functions:</strong> <table width="100%" border="0" cellspacing="0" cellpadding="2"> {FUNCTIONOVERVIEW} </table> <p><span class="sectiontitle">MODULE FUNCTIONS</span><br> <br> {MODULEFUNCTIONS} <br> <br> </td> </tr> <tr valign="top"> <td class="text"><a href="modules.html">Back to the Module Overview </a><a href="index.html"><br> Back to the Wolfpack Reference</a></td> </tr> </table> <br> <span class="smalltext">Generated: {GENERATED} | Version: {VERSION}</span> <br /> <span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span> </div> </body> </html> Index: event.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/templates/event.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** event.html 26 Jun 2004 18:52:24 -0000 1.2 --- event.html 26 Jun 2004 21:51:28 -0000 1.3 *************** *** 45,49 **** <p> <span class="maintitle">Wolfpack Event Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top"> <td class="text"> <p><span class="sectiontitle">EVENT DESCRIPTION</span><br> --- 45,49 ---- <p> <span class="maintitle">Wolfpack Event Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top" align="left"> <td class="text"> <p><span class="sectiontitle">EVENT DESCRIPTION</span><br> |
From: Sebastian H. <dar...@us...> - 2004-06-26 21:51:37
|
Update of /cvsroot/wpdev/xmlscripts/documentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8268 Modified Files: generate.py generate_html.py parse.py Log Message: generation of module information Index: parse.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/parse.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** parse.py 6 Apr 2004 18:24:24 -0000 1.5 --- parse.py 26 Jun 2004 21:51:28 -0000 1.6 *************** *** 13,18 **** CALLCONDITION_PATTERN = re.compile('\\\\condition\s+(.*?)(?=\Z|[\s\n]+\\\\\w)', re.S) EVENT_NAME_PATTERN = re.compile("\\\\event\s(\w+)", re.S) ! PARAM_PATTERN = re.compile('\\\\param\s+(\w+)\s+(.*?)(?=\Z|[\s\n]+\\\\\w)', re.S) INHERIT_PATTERN = re.compile('\\\\inherit\s+(\w+)\s*(?=\Z|[\s\n]+\\\\\w)', re.S) VERSION = "Unknown" --- 13,19 ---- CALLCONDITION_PATTERN = re.compile('\\\\condition\s+(.*?)(?=\Z|[\s\n]+\\\\\w)', re.S) EVENT_NAME_PATTERN = re.compile("\\\\event\s(\w+)", re.S) ! PARAM_PATTERN = re.compile('\\\\param\s+(\w+)\s+([^\\\\]*?)\s*(?=\Z|[\s\n]+\\\\\w)', re.S) INHERIT_PATTERN = re.compile('\\\\inherit\s+(\w+)\s*(?=\Z|[\s\n]+\\\\\w)', re.S) + FUNCTION_NAME_PATTERN = re.compile("\\\\function\s([\w\.]+)", re.S) VERSION = "Unknown" *************** *** 155,158 **** --- 156,216 ---- 'prototype': processtext(prototype), } + + # + # Parse an object function comment + # + def parsefunction(text): + module = '' + name = '' + description = '' + prototype = '' + parameters = '' + returnvalue = '' + + # Get the object name we're documenting + result = FUNCTION_NAME_PATTERN.search(text) + if not result: + return None + else: + name = result.group(1).split('.') + if len(name) < 2: + return None + else: + module = '.'.join(name[:len(name)-1]) + name = name[len(name) - 1] + + # Search for the description + result = DESCRIPTION_PATTERN.search(text) + if result: + description = result.group(1) + + # Search for the returnvalue + result = RETURNVALUE_PATTERN.search(text) + if result: + returnvalue = result.group(1) + + parameters = [] # Generate a list of parameters + paramnames = [] + + results = PARAM_PATTERN.findall(text) + for result in results: + param = result[0].strip() + desc = result[1].strip() + if len(desc) > 0: + desc += "\n" + parameters.append("- <i>%s</i>\n%s" % (param, desc)) + paramnames.append(param) + + # Generate the prototype + prototype = "%s.%s(%s)" % (module, name, ', '.join(paramnames)) + + return { + 'module': processtext(module), + 'name': processtext(name), + 'description': processtext(description), + 'returnvalue': processtext(returnvalue), + 'parameters': processtext("\n".join(parameters)), + 'prototype': processtext(prototype), + } # *************** *** 222,225 **** --- 280,284 ---- commands = [] + functions = [] results = pattern.finditer(content) for result in results: *************** *** 229,233 **** if command: commands.append(command) ! return (commands, [], [], [], []) # --- 288,296 ---- if command: commands.append(command) ! elif text.startswith('\\function'): ! function = parsefunction(text) ! if function: ! functions.append(function) ! return (commands, [], [], [], [], functions) # *************** *** 245,248 **** --- 308,312 ---- events = [] objects = [] + functions = [] objectsmethods = [] objectsproperties = [] *************** *** 267,270 **** --- 331,338 ---- if method: objectsmethods.append(method) + elif text.startswith('\\function'): + function = parsefunction(text) + if function: + functions.append(function) elif text.startswith('\\property '): text = text[10:] *************** *** 341,343 **** BETA = result.group(1) ! return (commands, events, objects, objectsmethods, objectsproperties) --- 409,411 ---- BETA = result.group(1) ! return (commands, events, objects, objectsmethods, objectsproperties, functions) Index: generate_html.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/generate_html.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** generate_html.py 26 Jun 2004 18:57:35 -0000 1.2 --- generate_html.py 26 Jun 2004 21:51:28 -0000 1.3 *************** *** 14,27 **** objectsmethods = [] objectsproperties = [] if len(paths) == 0: ! print "Usage: python generate_html.py path1[,path2,...]" sys.exit() - try: - os.mkdir('output') - except: - pass - def examine(path): global commands --- 14,23 ---- objectsmethods = [] objectsproperties = [] + functions = [] if len(paths) == 0: ! print "Usage: python generate.py path1[,path2,...]" sys.exit() def examine(path): global commands *************** *** 30,33 **** --- 26,30 ---- global objectsmethods global objectsproperties + global functions #print "Examining %s..." % path *************** *** 36,42 **** for file in files: if os.path.isfile(file): ! (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties) = parsepython(file) commands += newcommands events += newevents files = glob(path + '/*.cpp') --- 33,40 ---- for file in files: if os.path.isfile(file): ! (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties, newfunctions) = parsepython(file) commands += newcommands events += newevents + functions += newfunctions files = glob(path + '/*.cpp') *************** *** 44,48 **** for file in files: if os.path.isfile(file): ! (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties) = parsecpp(file) commands += newcommands events += newevents --- 42,46 ---- for file in files: if os.path.isfile(file): ! (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties, newfunctions) = parsecpp(file) commands += newcommands events += newevents *************** *** 50,53 **** --- 48,52 ---- objectsmethods += newobjectsmethods objectsproperties += newobjectsproperties + functions += newfunctions files = glob(path + '/*.h') *************** *** 55,59 **** for file in files: if os.path.isfile(file): ! (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties) = parsecpp(file) commands += newcommands events += newevents --- 54,58 ---- for file in files: if os.path.isfile(file): ! (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties, newfunctions) = parsecpp(file) commands += newcommands events += newevents *************** *** 61,64 **** --- 60,64 ---- objectsmethods += newobjectsmethods objectsproperties += newobjectsproperties + functions += newfunctions # Get subdirectories and process them *************** *** 67,74 **** if os.path.isdir(entry): examine(entry) ! for path in paths: examine(path) ! def quote(text): return text.replace("'", "\\'") --- 67,74 ---- if os.path.isdir(entry): examine(entry) ! for path in paths: examine(path) ! def quote(text): return text.replace("'", "\\'") *************** *** 78,96 **** generated = time.strftime("%d.%m.%Y %H:%M") - # Generate index page - template = open('templates/index.html') - text = template.read() - template.close() - - text = text.replace('{GENERATED}', generated) - text = text.replace('{VERSION}', version) - text = text.replace('{COMMANDS}', str(len(commands))) - text = text.replace('{OBJECTS}', str(len(objects))) - text = text.replace('{EVENTS}', str(len(events))) - - output = open('output/index.html', "wt") - output.write(text) - output.close() - def namesort(a, b): return cmp(a['name'], b['name']) --- 78,81 ---- *************** *** 312,316 **** for col in range(0, cols): id = col * rows + row ! if id < len(methods): property = properties[id] overview += '<td>- <a href="#prop_%s">%s</a></td>' % (property['property'].lower(), property['property']) --- 297,301 ---- for col in range(0, cols): id = col * rows + row ! if id < len(properties): property = properties[id] overview += '<td>- <a href="#prop_%s">%s</a></td>' % (property['property'].lower(), property['property']) *************** *** 396,405 **** output.write(text) output.close() ! #print "INSERT INTO documentation_objects VALUES('%s', '%s');" % (quote(object['object']), quote(object['description'])) ! #for method in objectsmethods: ! #print "INSERT INTO documentation_objects_methods VALUES('%s', '%s', '%s', '%s', '%s', '%s');" % (quote(method['object']), quote(method['method']), quote(method['prototype']), quote(method['parameters']), quote(method['returnvalue']), quote(method['description'])) ! #for property in objectsproperties: ! #print "INSERT INTO documentation_objects_properties VALUES('%s', '%s', '%s', '%s');" % (quote(property['object']), quote(property['property']), quote(property['description']), quote(property['readonly'])) --- 381,523 ---- output.write(text) output.close() + + # Generate a module list + modules = [] + + for function in functions: + module = function['module'] + current = '' + fmodules = module.split('.') + for module in fmodules: + if current != '': + current += '.' + module + else: + current = module ! if current not in modules: ! modules.append(current) ! ! # Create an overview ! # Compile a command overview ! overview = '' ! cols = 7 ! rows = int(math.ceil(len(modules) / 7.0)) ! modules.sort() ! ! for row in range(0, rows): ! overview += "<tr>\n" ! ! for col in range(0, cols): ! id = col * rows + row ! if id < len(modules): ! module = modules[id] ! overview += '<td>- <a href="module_%s.html">%s</a></td>' % (module.replace('.', '_').lower(), module) ! else: ! overview += "<td> </td>\n"; ! ! overview += "</tr>\n" ! ! # Write an index file for the objects. ! template = open('templates/modules.html') ! text = template.read() ! template.close() ! ! text = text.replace('{OVERVIEW}', overview) ! text = text.replace('{GENERATED}', generated) ! text = text.replace('{VERSION}', version) ! ! output = open('output/modules.html', "wt") ! output.write(text) ! output.close() ! ! # Find every function for the module and write ! # a module index file. ! for module in modules: ! # Create a list of functions for this module ! localfunctions = [] ! for function in functions: ! if function['module'] == module: ! localfunctions.append(function) ! ! template = open('templates/module.html') ! text = template.read() ! template.close() ! text = text.replace('{GENERATED}', generated) ! text = text.replace('{VERSION}', version) ! # Create a function overview first ! overview = '' ! cols = 7 ! rows = int(math.ceil(len(localfunctions) / 7.0)) ! ! for row in range(0, rows): ! overview += "<tr>\n" ! ! for col in range(0, cols): ! id = col * rows + row ! if id < len(localfunctions): ! function = localfunctions[id] ! overview += '<td>- <a href="#func_%s">%s</a></td>' % (function['name'].lower(), function['name']) ! else: ! overview += "<td> </td>\n"; ! ! overview += "</tr>\n" ! ! text = text.replace('{FUNCTIONOVERVIEW}', overview) ! ! # Generate a list of methods ! overview = '' ! for i in range(0, len(localfunctions)): ! function = localfunctions[i] ! ! parameters = '' ! if len(function['parameters']) > 0: ! parameters = "%s<br/><br/>\n" % function['parameters'] ! ! returnvalue = '' ! if len(function['returnvalue']) > 0: ! returnvalue = "<span class=\"style2\">Return Value:</span><br/>%s<br/><br/>\n" % function['returnvalue'] ! ! description = '' ! if len(function['description']) > 0: ! description = "<span class=\"style2\">Description:</span><br />%s<br />\n" % function['description'] ! ! overview += "<a name=\"func_%(lowername)s\"></a> \ ! <b><code style=\"font-size: 12px\">%(prototype)s</code></b><br />\ ! <br/>%(parameters)s\n\ ! %(returnvalue)s\n\ ! %(description)s\n\ ! <br /><a href=\"#top\">Back to top</a>\n" % { ! 'lowername': function['name'].lower(), ! 'name': function['name'], ! 'prototype': function['prototype'], ! 'parameters': parameters, ! 'returnvalue': returnvalue, ! 'description': description ! } ! ! if i != len(localfunctions) - 1: ! overview += '<hr size="1">' ! ! text = text.replace('{MODULEFUNCTIONS}', overview) ! ! output = open('output/module_%s.html' % module.replace('.', '_').lower(), "wt") ! output.write(text) ! output.close() ! ! # Generate index page ! template = open('templates/index.html') ! text = template.read() ! template.close() ! ! text = text.replace('{GENERATED}', generated) ! text = text.replace('{VERSION}', version) ! text = text.replace('{COMMANDS}', str(len(commands))) ! text = text.replace('{OBJECTS}', str(len(objects))) ! text = text.replace('{EVENTS}', str(len(events))) ! text = text.replace('{MODULES}', str(len(modules))) ! ! output = open('output/index.html', "wt") ! output.write(text) ! output.close() \ No newline at end of file Index: generate.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/generate.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** generate.py 25 Jun 2004 20:52:04 -0000 1.7 --- generate.py 26 Jun 2004 21:51:28 -0000 1.8 *************** *** 13,16 **** --- 13,17 ---- objectsmethods = [] objectsproperties = [] + functions = [] if len(paths) == 0: *************** *** 24,27 **** --- 25,29 ---- global objectsmethods global objectsproperties + global functions #print "Examining %s..." % path *************** *** 30,36 **** for file in files: if os.path.isfile(file): ! (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties) = parsepython(file) commands += newcommands events += newevents files = glob(path + '/*.cpp') --- 32,39 ---- for file in files: if os.path.isfile(file): ! (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties, newfunctions) = parsepython(file) commands += newcommands events += newevents + functions += newfunctions files = glob(path + '/*.cpp') *************** *** 38,42 **** for file in files: if os.path.isfile(file): ! (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties) = parsecpp(file) commands += newcommands events += newevents --- 41,45 ---- for file in files: if os.path.isfile(file): ! (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties, newfunctions) = parsecpp(file) commands += newcommands events += newevents *************** *** 44,47 **** --- 47,51 ---- objectsmethods += newobjectsmethods objectsproperties += newobjectsproperties + functions += newfunctions files = glob(path + '/*.h') *************** *** 49,53 **** for file in files: if os.path.isfile(file): ! (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties) = parsecpp(file) commands += newcommands events += newevents --- 53,57 ---- for file in files: if os.path.isfile(file): ! (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties, newfunctions) = parsecpp(file) commands += newcommands events += newevents *************** *** 55,58 **** --- 59,63 ---- objectsmethods += newobjectsmethods objectsproperties += newobjectsproperties + functions += newfunctions # Get subdirectories and process them *************** *** 61,65 **** if os.path.isdir(entry): examine(entry) ! for path in paths: examine(path) --- 66,70 ---- if os.path.isdir(entry): examine(entry) ! for path in paths: examine(path) *************** *** 107,108 **** --- 112,114 ---- for property in objectsproperties: print "REPLACE INTO documentation_objects_properties VALUES('%s', '%s', '%s', '%s');" % (quote(property['object']), quote(property['property']), quote(property['description']), quote(property['readonly'])) + |
From: Sebastian H. <dar...@us...> - 2004-06-26 18:57:44
|
Update of /cvsroot/wpdev/xmlscripts/documentation/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12097/templates Added Files: index.html Log Message: Index file generation. --- NEW FILE: index.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Wolfpack Reference</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> <link href="style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- a:link { color: #0000FF; text-decoration: none; } a:visited { text-decoration: none; color: #0000FF; } a:hover { text-decoration: underline; } a:active { text-decoration: none; } --> </style></head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#004B2C"><a href="index.html"><img src="top_logo.jpg" width="586" height="87" border="0"/></a></td> </tr> <tr> <td height="3" bgcolor="#999999"><img src="spacer.gif" width="1" height="3" /></td> </tr> </table> <div align="center"> <p> <span class="maintitle">Wolfpack Reference </span></p> <table width="740" border="0" cellspacing="3" cellpadding="2"> <tr align="left" valign="top"> <td width="33%" class="text"> <div align="left"> <span class="sectiontitle">INGAME COMMANDS</span><br /> These commands can be used by players, gms and admins while in the game. This section gives you an overview over all available commands and how to use them.<br /> <a href="commands.html">Read more... ({COMMANDS} commands)</a><br /> <br /> </div> </td> <td width="33%" class="text"> <span class="sectiontitle">SCRIPTING OBJECTS</span><br /> This section of the documentation gives you an overview over available wolfpack specific objects, their properties and methods and in some cases how to create them.<br /> <a href="objects.html">Read more... ({OBJECTS} objects)</a> </td> <td width="33%" class="text"> <span class="sectiontitle">SCRIPTING LIBRARY</span><br /> Wolfpack comes with a sophisticated library of scripts. This section of the documentation provides an overview over the library and its functions.<br /> <a href="#">Read more... </a> </td> </tr> </table> <hr width="740" size="1" noshade="noshade" /> <table width="740" border="0" cellpadding="2" cellspacing="3"> <tr align="left" valign="top"> <td width="33%" class="text"> <span class="sectiontitle">SCRIPTING EVENTS</span><br /> This section describes the events your scripts will be notified about.<br /> <a href="events.html">Read more... ({EVENTS} events)</a><br /> </td> <td width="33%" class="text"> <span class="sectiontitle">DEFINITION TAGS</span><br /> This section provides an overview over the tags used in the Wolfpack XML definitions. <a href="#">Read more...</a> </td> <td width="33%" class="text"> <span class="sectiontitle">MISCELLANEOUS</span><br /> Miscelleneous information can be found in this section. Links, configuration and setup among other things.<br /> <a href="#">Read more...</a> </td> </tr> </table> <br /> <br> <span class="smalltext">Generated: {GENERATED} | Version: {VERSION}</span> <br /> <span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span> </div> </body> </html> |
From: Sebastian H. <dar...@us...> - 2004-06-26 18:57:44
|
Update of /cvsroot/wpdev/xmlscripts/documentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12097 Modified Files: generate_html.py Log Message: Index file generation. Index: generate_html.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/generate_html.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** generate_html.py 26 Jun 2004 18:52:25 -0000 1.1 --- generate_html.py 26 Jun 2004 18:57:35 -0000 1.2 *************** *** 78,84 **** generated = time.strftime("%d.%m.%Y %H:%M") ! print generated ! # print "INSERT INTO documentation_settings VALUES('generated', %u);" % int(time.time()) ! # print "INSERT INTO documentation_settings VALUES('version', '%s');" % (quote(getVersion())) def namesort(a, b): --- 78,95 ---- generated = time.strftime("%d.%m.%Y %H:%M") ! # Generate index page ! template = open('templates/index.html') ! text = template.read() ! template.close() ! ! text = text.replace('{GENERATED}', generated) ! text = text.replace('{VERSION}', version) ! text = text.replace('{COMMANDS}', str(len(commands))) ! text = text.replace('{OBJECTS}', str(len(objects))) ! text = text.replace('{EVENTS}', str(len(events))) ! ! output = open('output/index.html', "wt") ! output.write(text) ! output.close() def namesort(a, b): |
From: Sebastian H. <dar...@us...> - 2004-06-26 18:52:33
|
Update of /cvsroot/wpdev/xmlscripts/documentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11318 Added Files: generate_html.py Log Message: Enabled generation of flat file help files. --- NEW FILE: generate_html.py --- import math import time import os import os.path import sys from parse import parsepython, parsecpp, getVersion from glob import glob paths = sys.argv[1:] commands = [] events = [] objects = [] objectsmethods = [] objectsproperties = [] if len(paths) == 0: print "Usage: python generate_html.py path1[,path2,...]" sys.exit() try: os.mkdir('output') except: pass def examine(path): global commands global events global objects global objectsmethods global objectsproperties #print "Examining %s..." % path files = glob(path + '/*.py') for file in files: if os.path.isfile(file): (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties) = parsepython(file) commands += newcommands events += newevents files = glob(path + '/*.cpp') for file in files: if os.path.isfile(file): (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties) = parsecpp(file) commands += newcommands events += newevents objects += newobjects objectsmethods += newobjectsmethods objectsproperties += newobjectsproperties files = glob(path + '/*.h') for file in files: if os.path.isfile(file): (newcommands, newevents, newobjects, newobjectsmethods, newobjectsproperties) = parsecpp(file) commands += newcommands events += newevents objects += newobjects objectsmethods += newobjectsmethods objectsproperties += newobjectsproperties # Get subdirectories and process them entries = glob(path + '/*') for entry in entries: if os.path.isdir(entry): examine(entry) for path in paths: examine(path) def quote(text): return text.replace("'", "\\'") # Time version = getVersion() generated = time.strftime("%d.%m.%Y %H:%M") print generated # print "INSERT INTO documentation_settings VALUES('generated', %u);" % int(time.time()) # print "INSERT INTO documentation_settings VALUES('version', '%s');" % (quote(getVersion())) def namesort(a, b): return cmp(a['name'], b['name']) # Compile a command overview overview = '' cols = 7 rows = int(math.ceil(len(commands) / 7.0)) commands.sort(namesort) for row in range(0, rows): overview += "<tr>\n" for col in range(0, cols): id = col * rows + row if id < len(commands): command = commands[id] overview += '<td>- <a href="command_%s.html">%s</a></td>' % (command['name'].lower(), command['name']) else: overview += "<td> </td>\n"; overview += "</tr>\n" # Write an index file for the events. template = open('templates/commands.html') text = template.read() template.close() text = text.replace('{GENERATED}', generated) text = text.replace('{VERSION}', version) text = text.replace('{OVERVIEW}', overview) output = open('output/commands.html', "wt") output.write(text) output.close() for command in commands: template = open('templates/command.html') text = template.read() template.close() # Replace Tokens text = text.replace('{NAME}', command['name']) text = text.replace('{SHORTDESC}', command['description']) text = text.replace('{OVERVIEW}', overview) text = text.replace('{GENERATED}', generated) text = text.replace('{VERSION}', version) if len(command['usage']) > 0: usage = "<strong>Usage: </strong><br>%s<br><br>" % command['usage'] else: usage = "" text = text.replace('{USAGE}', usage) if len(command['notes']) > 0: notes = "<strong>Notes: </strong><br>%s<br><br>" % command['notes'] else: notes = "" text = text.replace('{NOTES}', notes) output = open('output/command_%s.html' % command['name'].lower(), "wt") output.write(text) output.close() # Compile an event overview overview = '' cols = 7 rows = int(math.ceil(len(events) / 7.0)) events.sort(namesort) for row in range(0, rows): overview += "<tr>\n" for col in range(0, cols): id = col * rows + row if id < len(events): event = events[id] overview += '<td><a href="event_%s.html">%s</a></td>' % (event['name'].lower(), event['name']) else: overview += "<td> </td>\n"; overview += "</tr>\n" # Write an index file for the events. template = open('templates/events.html') text = template.read() template.close() text = text.replace('{OTHEREVENTS}', overview) text = text.replace('{GENERATED}', generated) text = text.replace('{VERSION}', version) output = open('output/events.html', "wt") output.write(text) output.close() for event in events: template = open('templates/event.html') text = template.read() template.close() # Replace Tokens text = text.replace('{NAME}', event['name']) text = text.replace('{PROTOTYPE}', event['prototype']) text = text.replace('{PARAMETERS}', "<strong>Parameters:</strong><br>%s<br><br>" % event['parameters']) text = text.replace('{RETURNVALUE}', "<strong>Return Value:</strong><br>%s<br><br>" % event['returnvalue']) text = text.replace('{CALLCONDITION}', "<strong>Call Condition:</strong><br>%s<br><br>" % event['callcondition']) text = text.replace('{NOTES}', "<strong>Notes:</strong><br>%s<br><br>" % event['notes']) text = text.replace('{OTHEREVENTS}', overview) text = text.replace('{GENERATED}', generated) text = text.replace('{VERSION}', version) output = open('output/event_%s.html' % event['name'].lower(), "wt") output.write(text) output.close() def objectcmp(a, b): return cmp(a['object'], b['object']) def methodcmp(a, b): return cmp(a['method'], b['method']) def propertycmp(a, b): return cmp(a['property'], b['property']) objects.sort(objectcmp) # Compile an event overview overview = '' cols = 7 rows = int(math.ceil(len(objects) / 7.0)) for row in range(0, rows): overview += "<tr>\n" for col in range(0, cols): id = col * rows + row if id < len(objects): object = objects[id] overview += '<td><a href="object_%s.html">%s</a></td>' % (object['object'].lower(), object['object']) else: overview += "<td> </td>\n"; overview += "</tr>\n" # Write an index file for the objects. template = open('templates/objects.html') text = template.read() template.close() text = text.replace('{OVERVIEW}', overview) text = text.replace('{GENERATED}', generated) text = text.replace('{VERSION}', version) output = open('output/objects.html', "wt") output.write(text) output.close() for object in objects: # Compile a list of objects we inherit from (complete, recursive) inherited = object['inherit'][:] # Create a copy for i in range(0, len(objects)): o = objects[i] if o['object'] in inherited: inherited += o['inherit'] i = 0 # Begin anew # Compile a complete list of properties and methods # in this object and all parent classes methods = [] for method in objectsmethods: if method['object'] in inherited or method['object'] == object['object']: methods.append(method) properties = [] for property in objectsproperties: if property['object'] in inherited or property['object'] == object['object']: properties.append(property) properties.sort(propertycmp) methods.sort(methodcmp) # Generate the Template template = open('templates/object.html') text = template.read() template.close() # Compile an overview overview = '' cols = 7 rows = int(math.ceil(len(methods) / 7.0)) for row in range(0, rows): overview += "<tr>\n" for col in range(0, cols): id = col * rows + row if id < len(methods): method = methods[id] overview += '<td>- <a href="#meth_%s">%s</a></td>' % (method['method'].lower(), method['method']) else: overview += "<td> </td>\n"; overview += "</tr>\n" text = text.replace('{METHODOVERVIEW}', overview) # Compile an overview overview = '' cols = 7 rows = int(math.ceil(len(properties) / 7.0)) for row in range(0, rows): overview += "<tr>\n" for col in range(0, cols): id = col * rows + row if id < len(methods): property = properties[id] overview += '<td>- <a href="#prop_%s">%s</a></td>' % (property['property'].lower(), property['property']) else: overview += "<td> </td>\n"; overview += "</tr>\n" text = text.replace('{PROPERTYOVERVIEW}', overview) # Generate a list of methods overview = '' for i in range(0, len(methods)): method = methods[i] parameters = '' if len(method['parameters']) > 0: parameters = "%s<br/><br/>\n" % method['parameters'] returnvalue = '' if len(method['returnvalue']) > 0: returnvalue = "<span class=\"style2\">Return Value:</span><br/>%s<br/><br/>\n" % method['returnvalue'] description = '' if len(method['description']) > 0: description = "<span class=\"style2\">Description:</span><br />%s<br />\n" % method['description'] overview += "<a name=\"meth_%(lowername)s\"></a> \ <b><code style=\"font-size: 12px\">%(prototype)s</code></b><br />\ <br/>%(parameters)s\n\ %(returnvalue)s\n\ %(description)s\n\ <br /><a href=\"#top\">Back to top</a>\n" % { 'lowername': method['method'].lower(), 'name': method['method'], 'prototype': method['prototype'], 'parameters': parameters, 'returnvalue': returnvalue, 'description': description } if i != len(methods) - 1: overview += '<hr size="1">' text = text.replace('{OBJECTMETHODS}', overview) # Generate a list of properties overview = '' for i in range(0, len(properties)): property = properties[i] description = '' if len(property['description']) > 0: description = "<span class=\"style2\">Description:</span><br />%s<br />\n" % property['description'] readonly = '' if property['readonly'] == '1': readonly = ' (read only)' overview += """<a name="prop_%(lowername)s"></a>\ <b><code style="font-size: 12px">%(name)s</code></b>%(readonly)s<br /><br />\ %(description)s <br /><a href="#top">Back to top</a>\n""" % { 'lowername': property['property'].lower(), 'name': property['property'], 'description': description, 'readonly': readonly } if i != len(properties) - 1: overview += '<hr size="1">' text = text.replace('{OBJECTPROPERTIES}', overview) # Replace Tokens text = text.replace('{NAME}', object['object']) if len(object['description']) != 0: text = text.replace('{DESCRIPTION}', '<strong>Description:</strong><br>%s<br><br>' % object['description']) else: text = text.replace('{DESCRIPTION}', '') output = open('output/object_%s.html' % object['object'].lower(), "wt") output.write(text) output.close() #print "INSERT INTO documentation_objects VALUES('%s', '%s');" % (quote(object['object']), quote(object['description'])) #for method in objectsmethods: #print "INSERT INTO documentation_objects_methods VALUES('%s', '%s', '%s', '%s', '%s', '%s');" % (quote(method['object']), quote(method['method']), quote(method['prototype']), quote(method['parameters']), quote(method['returnvalue']), quote(method['description'])) #for property in objectsproperties: #print "INSERT INTO documentation_objects_properties VALUES('%s', '%s', '%s', '%s');" % (quote(property['object']), quote(property['property']), quote(property['description']), quote(property['readonly'])) |
From: Sebastian H. <dar...@us...> - 2004-06-26 18:52:33
|
Update of /cvsroot/wpdev/xmlscripts/documentation/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11318/templates Modified Files: command.html commands.html event.html events.html object.html Added Files: objects.html Log Message: Enabled generation of flat file help files. Index: events.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/templates/events.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** events.html 26 Jun 2004 16:36:21 -0000 1.1 --- events.html 26 Jun 2004 18:52:24 -0000 1.2 *************** *** 63,66 **** --- 63,68 ---- </table> <br> + <span class="smalltext">Generated: {GENERATED} | Version: {VERSION}</span> + <br /> <span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span></div> --- NEW FILE: objects.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Wolfpack Reference</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> <link href="style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- a:link { color: #0000FF; text-decoration: none; } a:visited { text-decoration: none; color: #0000FF; } a:hover { text-decoration: underline; } a:active { text-decoration: none; } --> </style></head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#004B2C"><a href="index.html"><img src="top_logo.jpg" width="586" height="87" border="0"/></a></td> </tr> <tr> <td height="3" bgcolor="#999999"><img src="spacer.gif" width="1" height="3" /></td> </tr> </table> <div align="center"> <p> <span class="maintitle">Wolfpack Command Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> <tr valign="top"> <td class="text"> <span class="sectiontitle">SCRIPTING OBJECTS</span><br /> An object in Wolfpack has several methods (functions working with the object) and property (data assigned to the object). This section will serve as a reference to all available classes of objects in Wolfpack. <br /> Choose one of the object classes from the list at the bottom.<br><br> </td> </tr> <tr valign="top"> <td class="text"> <table width="100%" border="0" cellspacing="0" cellpadding="2"> {OVERVIEW} </table><br> </td> </tr> <tr valign="top"> <td class="text"><a href="index.html">Back to the Wolfpack Reference</a></td> </tr> </table> <br> <span class="smalltext">Generated: {GENERATED} | Version: {VERSION}</span> <br /> <span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span> </div> </body> </html> Index: object.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/templates/object.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** object.html 26 Jun 2004 16:36:21 -0000 1.1 --- object.html 26 Jun 2004 18:52:24 -0000 1.2 *************** *** 87,90 **** --- 87,92 ---- </table> <br> + <span class="smalltext">Generated: {GENERATED} | Version: {VERSION}</span> + <br /> <span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span> Index: commands.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/templates/commands.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** commands.html 26 Jun 2004 16:36:21 -0000 1.1 --- commands.html 26 Jun 2004 18:52:24 -0000 1.2 *************** *** 64,68 **** </tr> </table> ! <br><span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span> </div> --- 64,71 ---- </tr> </table> ! <br> ! <span class="smalltext">Generated: {GENERATED} | Version: {VERSION}</span> ! <br /> ! <span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span> </div> Index: command.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/templates/command.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** command.html 26 Jun 2004 16:36:21 -0000 1.1 --- command.html 26 Jun 2004 18:52:24 -0000 1.2 *************** *** 68,72 **** </tr> </table> ! <br><span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span> </div> --- 68,75 ---- </tr> </table> ! <br> ! <span class="smalltext">Generated: {GENERATED} | Version: {VERSION}</span> ! <br /> ! <span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span> </div> Index: event.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/templates/event.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** event.html 26 Jun 2004 16:36:21 -0000 1.1 --- event.html 26 Jun 2004 18:52:24 -0000 1.2 *************** *** 70,73 **** --- 70,75 ---- </table> <br> + <span class="smalltext">Generated: {GENERATED} | Version: {VERSION}</span> + <br /> <span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span></div> |
From: Sebastian H. <dar...@us...> - 2004-06-26 16:36:29
|
Update of /cvsroot/wpdev/xmlscripts/documentation/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18555/templates Added Files: command.html commands.html event.html events.html object.html Log Message: New Templates for flat file documentation --- NEW FILE: object.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Wolfpack Reference</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> <link href="style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- a:link { color: #0000FF; text-decoration: none; } a:visited { text-decoration: none; color: #0000FF; } a:hover { text-decoration: underline; } a:active { text-decoration: none; } .style2 { color: #999999; font-weight: bold; } --> </style></head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#004B2C"><a href="./index.php"><img src="top_logo.jpg" width="586" height="87" border="0"/></a></td> </tr> <tr> <td height="3" bgcolor="#999999"><img src="spacer.gif" width="1" height="3" /></td> </tr> </table> <a name="top"></a> <div align="center"> <p><span class="maintitle">Wolfpack Object Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> <tr valign="top"> <td class="text"> <p><span class="sectiontitle">OBJECT DESCRIPTION</span><br> <br> <strong>Name:</strong> {NAME} <br> <br> {DESCRIPTION} <br> <strong>Methods:</strong> <table width="100%" border="0" cellspacing="0" cellpadding="2"> {METHODOVERVIEW} </table> <p> <strong>Properties:</strong> <table width="100%" border="0" cellspacing="0" cellpadding="2"> {PROPERTYOVERVIEW} </table> <p><span class="sectiontitle">OBJECT METHODS</span><br> <br> {OBJECTMETHODS} <span class="sectiontitle"><br> <br> OBJECT PROPERTIES </span><br> <br> {OBJECTPROPERTIES} <br> <br> </td> </tr> <tr valign="top"> <td class="text"><a href="objects.html">Back to the Object Overview </a><a href="index.html"><br> Back to the Wolfpack Reference</a></td> </tr> </table> <br> <span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span> </div> </body> </html> --- NEW FILE: commands.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Wolfpack Reference</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> <link href="style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- a:link { color: #0000FF; text-decoration: none; } a:visited { text-decoration: none; color: #0000FF; } a:hover { text-decoration: underline; } a:active { text-decoration: none; } --> </style></head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#004B2C"><a href="index.html"><img src="top_logo.jpg" width="586" height="87" border="0"/></a></td> </tr> <tr> <td height="3" bgcolor="#999999"><img src="spacer.gif" width="1" height="3" /></td> </tr> </table> <div align="center"> <p> <span class="maintitle">Wolfpack Command Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> <tr valign="top"> <td class="text"> <span class="sectiontitle">INGAME COMMANDS</span><br> To use one of the commands in this section, you have to know about your <em>Command Prefix</em> first. The default command prefix is the character <strong>'</strong>, but you can change it to any character you like in your wolfpack.xml file. If you know your command prefix, simply prepend it to the name of the command and say it ingame. The command will then be executed. <br> The name of the command is case insensitive.<br> You can see a list of all available commands at the bottom of this page.<br><br> </td> </tr> <tr valign="top"> <td class="text"><span class="sectiontitle">OTHER COMMANDS</span><br> <table width="100%" border="0" cellspacing="0" cellpadding="2"> {OVERVIEW} </table><br> </td> </tr> <tr valign="top"> <td class="text"><a href="index.html">Back to the Wolfpack Reference</a></td> </tr> </table> <br><span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span> </div> </body> </html> --- NEW FILE: events.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Wolfpack Reference</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> <link href="style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- a:link { color: #0000FF; text-decoration: none; } a:visited { text-decoration: none; color: #0000FF; } a:hover { text-decoration: underline; } a:active { text-decoration: none; } --> </style></head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#004B2C"><img src="top_logo.jpg" width="586" height="87"></td> </tr> <tr> <td height="3" bgcolor="#999999"><img src="spacer.gif" width="1" height="3"></td> </tr> </table> <div align="center"> <p> <span class="maintitle">Wolfpack Event Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> <tr valign="top"> <td class="text"> <span class="sectiontitle">SCRIPTING EVENTS</span><br> Your scripts will be notified of certain events by event functions. To use one of these events, simply place the event function in your script. The name of event functions are case sensitive.<br> You can see a list of all available events at the bottom of this page.<br> <br></td> </tr> <tr valign="top"> <td class="text"><span class="sectiontitle">OTHER EVENTS </span><br> <table width="100%" border="0" cellspacing="0" cellpadding="2"> {OTHEREVENTS} </table><br> </td> </tr> <tr valign="top"> <td class="text"><a href="index.html">Back to the Wolfpack Reference</a></td> </tr> </table> <br> <span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span></div> </body> </html> --- NEW FILE: command.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Wolfpack Reference</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> <link href="style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- a:link { color: #0000FF; text-decoration: none; } a:visited { text-decoration: none; color: #0000FF; } a:hover { text-decoration: underline; } a:active { text-decoration: none; } --> </style></head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#004B2C"><a href="index.html"><img src="top_logo.jpg" width="586" height="87" border="0"/></a></td> </tr> <tr> <td height="3" bgcolor="#999999"><img src="spacer.gif" width="1" height="3" /></td> </tr> </table> <div align="center"> <p> <span class="maintitle">Wolfpack Command Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> <tr valign="top"> <td class="text"> <span class="sectiontitle">COMMAND DESCRIPTION</span><br> <br> <strong>Command Name:</strong> {NAME}<br> <br> <strong>Short Description:</strong> {SHORTDESC}<br> <br> {USAGE} {NOTES} </td> </tr> <tr valign="top"> <td class="text"><span class="sectiontitle">OTHER COMMANDS</span><br> <table width="100%" border="0" cellspacing="0" cellpadding="2"> {OVERVIEW} </table><br> </td> </tr> <tr valign="top"> <td class="text"><a href="index.html">Back to the Wolfpack Reference</a></td> </tr> </table> <br><span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span> </div> </body> </html> --- NEW FILE: event.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Wolfpack Reference</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style> <link href="style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- a:link { color: #0000FF; text-decoration: none; } a:visited { text-decoration: none; color: #0000FF; } a:hover { text-decoration: underline; } a:active { text-decoration: none; } --> </style></head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#004B2C"><img src="top_logo.jpg" width="586" height="87"></td> </tr> <tr> <td height="3" bgcolor="#999999"><img src="spacer.gif" width="1" height="3"></td> </tr> </table> <div align="center"> <p> <span class="maintitle">Wolfpack Event Reference </span></p> <table width="780" border="0" cellspacing="3" cellpadding="0"> <tr valign="top"> <td class="text"> <p><span class="sectiontitle">EVENT DESCRIPTION</span><br> <br> <strong>Event Name:</strong> {NAME}<br> <br> <strong>Prototype:</strong><br> {PROTOTYPE}<br> <br> {PARAMETERS} {RETURNVALUE} {CALLCONDITION} {NOTES}</td> </tr> <tr valign="top"> <td class="text"><span class="sectiontitle">OTHER EVENTS </span><br> <table width="100%" border="0" cellspacing="0" cellpadding="2"> {OTHEREVENTS} </table><br> </td> </tr> <tr valign="top"> <td class="text"><a href="index.html">Back to the Wolfpack Reference</a></td> </tr> </table> <br> <span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span></div> </body> </html> |
From: Sebastian H. <dar...@us...> - 2004-06-26 16:35:11
|
Update of /cvsroot/wpdev/xmlscripts/documentation/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18313/templates Log Message: Directory /cvsroot/wpdev/xmlscripts/documentation/templates added to the repository |
From: Sebastian H. <dar...@us...> - 2004-06-25 20:52:30
|
Update of /cvsroot/wpdev/xmlscripts/documentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25167 Modified Files: generate.py Log Message: SQL Fix Index: generate.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/generate.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** generate.py 20 Jun 2004 20:15:45 -0000 1.6 --- generate.py 25 Jun 2004 20:52:04 -0000 1.7 *************** *** 77,81 **** # Time print "REPLACE INTO documentation_settings VALUES('generated', %u);" % int(time.time()) ! print "REPLACEINTO documentation_settings VALUES('version', '%s');" % (quote(getVersion())) for command in commands: --- 77,81 ---- # Time print "REPLACE INTO documentation_settings VALUES('generated', %u);" % int(time.time()) ! print "REPLACE INTO documentation_settings VALUES('version', '%s');" % (quote(getVersion())) for command in commands: |
From: Ki H. P. <kh...@us...> - 2004-06-22 12:05:40
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6582/wolfpack Modified Files: consts.py properties.py Log Message: more detailed arms lore skill Index: consts.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/consts.py,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** consts.py 2 Jun 2004 15:03:05 -0000 1.68 --- consts.py 22 Jun 2004 12:05:28 -0000 1.69 *************** *** 75,78 **** --- 75,82 ---- ITEM_RANGED = 5 # Ranged weapon + ITEM_PIERCING = 6 # fencing : type 1005 + ITEM_SLASHING = 7 # sword : type 1001, 1002 + ITEM_BASHING = 8 # mace : type 1003, 1004 + # Money Resource Types GOLD_COIN = 0xeed Index: properties.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/properties.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** properties.py 30 May 2004 13:22:41 -0000 1.3 --- properties.py 22 Jun 2004 12:05:29 -0000 1.4 *************** *** 271,273 **** --- 271,281 ---- return item.type == 1006 or item.type == 1007 + # Check weapon combat skill : only type check + if check == ITEM_SLASHING: + return item.type == 1001 or item.type == 1002 + if check == ITEM_BASHING: + return item.type == 1003 or item.type == 1004 + if check == ITEM_PIERCING: + return item.type == 1005 + return 0 |
From: Ki H. P. <kh...@us...> - 2004-06-22 12:05:40
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6582/skills Modified Files: armslore.py Log Message: more detailed arms lore skill Index: armslore.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/armslore.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** armslore.py 26 May 2004 13:07:24 -0000 1.10 --- armslore.py 22 Jun 2004 12:05:30 -0000 1.11 *************** *** 9,14 **** --- 9,17 ---- from wolfpack.utilities import * from wolfpack.time import * + from wolfpack.properties import * import wolfpack import skills + from wolfpack import weaponinfo + from wolfpack import armorinfo ARMSLORE_DELAY = 1000 *************** *** 55,58 **** --- 58,96 ---- char.socket.clilocmessage( 0x103319, "", 0x3b2, 3 ) + condi = 10 * item.health / item.maxhealth + if condi < 0: + condi = 0 + elif condi > 9: + condi = 9 + char.socket.clilocmessage( 1038285 + condi ) + if isweapon( item ): + layer_id = 0 + if item.twohanded: + layer_id = 1 + mindamage = fromitem( item, MINDAMAGE ) + maxdamage = fromitem( item, MAXDAMAGE ) + avdamage = ( mindamage + maxdamage ) / 2 + dmg_id = 9 * max( 0, min( int( avdamage / 5 ), 6 ) ) + if itemcheck( item, ITEM_PIERCING ): + char.socket.clilocmessage( 1038218 + layer_id + dmg_id ) + elif itemcheck( item, ITEM_SLASHING ): + char.socket.clilocmessage( 1038220 + layer_id + dmg_id ) + elif itemcheck( item, ITEM_BASHING ): + char.socket.clilocmessage( 1038222 + layer_id + dmg_id ) + elif itemcheck( item, ITEM_RANGED ): + char.socket.clilocmessage( 1038224 + dmg_id ) + else: + char.socket.clilocmessage( 1038216 + layer_id + dmg_id ) + # check if poisoned + if item.hastag( 'poisoning_uses' ): + char.socket.clilocmessage( 1038284 ) + else: + armor = fromitem( item, RESISTANCE_PHYSICAL ) + armor = armor + fromitem( item, RESISTANCE_FIRE ) + armor = armor + fromitem( item, RESISTANCE_COLD ) + armor = armor + fromitem( item, RESISTANCE_POISON ) + armor = armor + fromitem( item, RESISTANCE_ENERGY ) + arm_id = max( 0, min( int( armor / 5 ), 7 ) ) + char.socket.clilocmessage( 1038295 + arm_id ) return 1 else: |
From: Ki H. P. <kh...@us...> - 2004-06-20 20:34:37
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20482 Modified Files: poisoning.py Log Message: skill check Index: poisoning.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/poisoning.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** poisoning.py 20 Jun 2004 20:09:53 -0000 1.1 --- poisoning.py 20 Jun 2004 20:34:28 -0000 1.2 *************** *** 95,99 **** # FIXME : success / fail chance ! if skill < ( strength + 0.8 ) * 20: # failed to poison item char.socket.clilocmessage( 1010518 ) --- 95,99 ---- # FIXME : success / fail chance ! if skill < ( strength + 0.8 ) * 200: # failed to poison item char.socket.clilocmessage( 1010518 ) *************** *** 101,107 **** # check skill advance # FIXME : less / strong chance ! if random.randint( 0, 20 ) > ( skill - strength * 20 ): strength = strength - 1 if strength < 1: --- 101,108 ---- # check skill advance + char.checkskill( POISONING, 0, 1000 ) # FIXME : less / strong chance ! if random.randint( 0, 20 ) > ( skill - strength * 200 ): strength = strength - 1 if strength < 1: *************** *** 139,143 **** return skill = weapon.gettag( 'poisoning_skill' ) ! chance = int( skill / 4 ) if chance > random.randint( 0, 100 ): poison.poison( char, strength ) --- 140,144 ---- return skill = weapon.gettag( 'poisoning_skill' ) ! chance = int( skill / 40 ) if chance > random.randint( 0, 100 ): poison.poison( char, strength ) |
From: Richard M. <dr...@us...> - 2004-06-20 20:22:25
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8830 Modified Files: testlos.py Log Message: Documentation Error Fix. Dupes = Bad Index: testlos.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/testlos.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** testlos.py 19 Jun 2004 07:37:53 -0000 1.1 --- testlos.py 20 Jun 2004 20:22:17 -0000 1.2 *************** *** 7,14 **** """ ! \command decoration ! \description Places decoration read from a xml file. ! \notes The decoration will be read from a XML file called ! 'data\decoration.1.xml'. """ --- 7,13 ---- """ ! \command testlos ! \description Tests line of sight between you and the target? ! \notes Tests line of sight between you and the target? """ |
Update of /cvsroot/wpdev/xmlscripts/documentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7633 Modified Files: FAQ.html command.php config.inc.php event.php footer.inc.php header.inc.php index.php method.php object.php style.css Log Message: Updates. Cleaned up some small html bugs. Index: object.php =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/object.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** object.php 6 Apr 2004 21:52:53 -0000 1.5 --- object.php 20 Jun 2004 20:20:59 -0000 1.6 *************** *** 1,106 **** ! <? ! require_once('config.inc.php'); ! ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> ! <head> ! <title>Wolfpack Reference</title> ! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ! <style type="text/css"> ! <!-- ! body { ! margin-left: 0px; ! margin-top: 0px; ! margin-right: 0px; ! margin-bottom: 0px; ! } ! --> ! </style> ! <link href="style.css" rel="stylesheet" type="text/css"> ! <style type="text/css"> ! <!-- ! a:link { ! color: #0000FF; ! text-decoration: none; ! } ! a:visited { ! text-decoration: none; ! color: #0000FF; ! } ! a:hover { ! text-decoration: underline; ! } ! a:active { ! text-decoration: none; ! } ! .style2 { ! color: #999999; ! font-weight: bold; ! } ! --> ! </style></head> ! ! <body> ! <? ! require_once('header.inc.php'); ! ?> ! <a name="top"></a> ! <div align="center"> ! <p><span class="maintitle">Wolfpack Object Reference </span></p> ! <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top"> ! <td class="text"> ! <? $row = NULL; ! if ($_REQUEST['object']) { ! $name = mysql_escape_string($_REQUEST['object']); $result = mysql_query("SELECT `object`,`description` FROM `documentation_objects` WHERE `object` = '$name';"); ! if (mysql_num_rows($result) > 0) { ! $row = mysql_fetch_array($result); } ! mysql_free_result($result); } ! if ( $row || $row != NULL ) { ! ?> ! <p><span class="sectiontitle">OBJECT DESCRIPTION</span><br> ! <br> ! <strong>Name:</strong> <?=$row[0]?> ! <br> ! <br> ! <? ! if (strlen($row[1]) > 0) { ! ?> ! <strong>Description:</strong><br> ! <?=$row[1]?> ! <br> ! <? ! } ! ?> ! <br> ! <strong>Methods:</strong> ! <table width="100%" border="0" cellspacing="0" cellpadding="2"> ! <? $commands = array(); ! $result = mysql_query("SELECT `method` FROM `documentation_objects_methods` WHERE `object` = '$name' ORDER BY `method` ASC;"); ! while ($row = mysql_fetch_array($result)) { ! array_push($commands, $row[0]); } ! mysql_free_result($result); $cols = 7; ! $rows = ceil(sizeof($commands) / $cols); ! for ($row = 0; $row < $rows; ++$row) { echo "<tr>\n"; ! for ($col = 0; $col < $cols; ++$col) { $id = $col * $rows + $row; ! if ($id < sizeof($commands)) { ! ?> ! <td>- <a href="#meth_<?=$commands[$id]?>"><?=$commands[$id]?></a></td> ! <? ! } else { ! echo "<td> </td>\n"; } } --- 1,75 ---- ! <?php require_once('config.inc.php'); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> ! <head> ! <title>Wolfpack Reference</title> ! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> ! <link href="./style.css" rel="stylesheet" type="text/css" /> ! </head> ! <body> ! <?php require_once('header.inc.php'); ?> ! <a name="top"></a> ! <div align="center"> ! <p><span class="maintitle">Wolfpack Object Reference</span></p> ! <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top"> ! <td class="text"> ! <?php $row = NULL; ! if ( $_REQUEST['object'] ) ! { ! $name = mysql_escape_string( $_REQUEST['object'] ); $result = mysql_query("SELECT `object`,`description` FROM `documentation_objects` WHERE `object` = '$name';"); ! if ( mysql_num_rows( $result ) > 0 ) ! { ! $row = mysql_fetch_array( $result ); } ! mysql_free_result( $result ); } ! if ( $row || $row != NULL ) ! { ! ?> ! <p><span class="sectiontitle">OBJECT DESCRIPTION</span><br /><br /> ! <strong>Name:</strong> <?=$row[0]?><br /><br /> ! <?php ! if ( strlen( $row[1] ) > 0 ) ! { ! ?> ! <strong>Description:</strong><br /><?=$row[1]?><br /> ! <?php ! } ! ?> ! <br /> ! <strong>Methods:</strong> ! <table width="100%" border="0" cellspacing="0" cellpadding="2"> ! <?php $commands = array(); ! $result = mysql_query( "SELECT `method` FROM `documentation_objects_methods` WHERE `object` = '$name' ORDER BY `method` ASC;" ); ! while ( $row = mysql_fetch_array( $result ) ) ! { ! array_push( $commands, $row[0] ); } ! mysql_free_result( $result ); $cols = 7; ! $rows = ceil( sizeof( $commands ) / $cols ); ! for ( $row = 0; $row < $rows; ++$row ) ! { echo "<tr>\n"; ! for ( $col = 0; $col < $cols; ++$col ) ! { $id = $col * $rows + $row; ! if ( $id < sizeof( $commands ) ) ! { ! ?> ! <td>- <a href="#meth_<?=$commands[$id]?>"><?=$commands[$id]?></a></td> ! <?php ! } ! else ! { ! echo "<td> </td>\n"; } } *************** *** 108,137 **** } ?> ! </table> ! <p> ! <strong>Properties:</strong> ! <table width="100%" border="0" cellspacing="0" cellpadding="2"> ! <? $commands = array(); ! $result = mysql_query("SELECT `property` FROM `documentation_objects_properties` WHERE `object` = '$name' ORDER BY `property` ASC;"); ! while ($row = mysql_fetch_array($result)) { ! array_push($commands, $row[0]); } ! mysql_free_result($result); $cols = 7; ! $rows = ceil(sizeof($commands) / $cols); ! for ($row = 0; $row < $rows; ++$row) { echo "<tr>\n"; ! for ($col = 0; $col < $cols; ++$col) { $id = $col * $rows + $row; ! if ($id < sizeof($commands)) { ! ?> ! <td>- <a href="#prop_<?=$commands[$id]?>"><?=$commands[$id]?></a></td> ! <? ! } else { ! echo "<td> </td>\n"; } } --- 77,112 ---- } ?> ! </table> ! <p> ! <strong>Properties:</strong> ! <table width="100%" border="0" cellspacing="0" cellpadding="2"> ! <?php $commands = array(); ! $result = mysql_query( "SELECT `property` FROM `documentation_objects_properties` WHERE `object` = '$name' ORDER BY `property` ASC;" ); ! while ( $row = mysql_fetch_array( $result ) ) ! { ! array_push( $commands, $row[0] ); } ! mysql_free_result( $result ); $cols = 7; ! $rows = ceil( sizeof( $commands ) / $cols ); ! for ( $row = 0; $row < $rows; ++$row ) ! { echo "<tr>\n"; ! for ( $col = 0; $col < $cols; ++$col ) ! { $id = $col * $rows + $row; ! if ( $id < sizeof( $commands ) ) ! { ! ?> ! <td>- <a href="#prop_<?=$commands[$id]?>"><?=$commands[$id]?></a></td> ! <?php ! } ! else ! { ! echo "<td> </td>\n"; } } *************** *** 139,268 **** } ?> ! </table> ! <p><span class="sectiontitle">OBJECT METHODS</span><br> ! <br> ! <? ! // There could be multiple methods ! $i = 0; ! $result = mysql_query("SELECT `object`,`method`,`prototype`,`parameters`,`returnvalue`,`description` FROM `documentation_objects_methods` WHERE `object` = '$name' ORDER BY `method` ASC;"); ! $count = mysql_num_rows($result); ! while ($row = mysql_fetch_array($result)) { ! ?> ! <a name="meth_<?=$row[1]?>"></a> ! <b><code style="font-size: 12px"><?=$row[2]?></code></b><br> ! <br> ! <? ! if (strlen($row[3]) > 0) { ! ?> ! <?=$row[3]?> ! <br> ! <br> ! <? ! } ! if (strlen($row[4]) > 0) { ! ?> ! <span class="style2">Return Value: </span><br> ! <?=$row[4]?> ! <p> ! <? ! } ! if (strlen($row[5]) > 0) { ! ?> ! <span class="style2">Description:</span><br> ! <?=$row[5]?> ! <br> ! <? ! } ! ?> ! <br><a href="#top">Back to top</a> ! <? ! if (++$i < $count) { ! echo '<hr size="1" noshade>'; ! } } ! ?> ! <span class="sectiontitle"><br> ! <br> ! OBJECT PROPERTIES </span><br> ! <br> ! <? ! // There could be multiple methods ! $i = 0; ! $result = mysql_query("SELECT `property`,`description`,`readonly` FROM `documentation_objects_properties` WHERE `object` = '$name' ORDER BY `property` ASC;"); ! $count = mysql_num_rows($result); ! while ($row = mysql_fetch_array($result)) { ! ?> ! <a name="prop_<?=$row[0]?>"></a> <b><code style="font-size: 12px"> ! <?=$row[0]?> ! </code></b><? if ($row[2] == 1) { echo '(read only)'; } ?><br> ! <br> ! <? ! if (strlen($row[1]) > 0) { ! ?> ! <span class="style2">Description:</span><br> ! <?=$row[1]?> ! <br> ! <? } ! ?> ! <br><a href="#top">Back to top</a> ! <? ! if (++$i < $count) { echo '<hr size="1" noshade>'; } } ?> ! <br> ! <br> ! <? ! } else { ?> ! <span class="sectiontitle">SCRIPTING OBJECTS</span><br> ! An object in Wolfpack has several methods (functions working with the object) and property (data assigned to the object). This section will serve as a reference to all available classes of objects in Wolfpack. <br> ! Choose one of the object classes from the list at the bottom. </p> ! <table width="100%" border="0" cellspacing="0" cellpadding="2"> ! <? $commands = array(); $result = mysql_query("SELECT `object` FROM `documentation_objects` ORDER BY `object` ASC;"); ! while ($row = mysql_fetch_array($result)) { ! array_push($commands, $row[0]); } ! mysql_free_result($result); $cols = 7; ! $rows = ceil(sizeof($commands) / $cols); ! for ($row = 0; $row < $rows; ++$row) { echo "<tr>\n"; ! for ($col = 0; $col < $cols; ++$col) { $id = $col * $rows + $row; ! if ($id < sizeof($commands)) { ?> ! <td>- <a href="object.php?object=<?=$commands[$id]?>"><?=$commands[$id]?></a></td> ! <? ! } else { ! echo "<td> </td>\n"; } } echo "</tr>\n"; } ! ?> ! </table> ! <br> ! <? } - ?> - </td> - </tr> - <tr valign="top"> - <td class="text"><a href="index.php"></a><a href="object.php">Back to the Object Overview </a><a href="index.php"><br> - Back to the Wolfpack Reference</a></td> - </tr> - </table> - <br> - <? - require_once('footer.inc.php'); ?> ! </div> ! </body> </html> --- 114,247 ---- } ?> ! </table> ! <p> ! <span class="sectiontitle">OBJECT METHODS</span><br /> ! <br /> ! <?php ! // There could be multiple methods ! $i = 0; ! $result = mysql_query("SELECT `object`,`method`,`prototype`,`parameters`,`returnvalue`,`description` FROM `documentation_objects_methods` WHERE `object` = '$name' ORDER BY `method` ASC;"); ! $count = mysql_num_rows($result); ! while ($row = mysql_fetch_array($result)) ! { ! ?> ! <a name="meth_<?=$row[1]?>"></a> ! <b><code style="font-size: 12px"><?=$row[2]?></code></b><br /> ! <br /> ! <?php ! if ( strlen($row[3]) > 0 ) { ! ?> ! <?=$row[3]?><br /><br /> ! <?php } ! if ( strlen( $row[4] ) > 0 ) ! { ! ?> ! <span class="style2">Return Value:</span><br /><?=$row[4]?><br /> ! <?php ! } ! if ( strlen( $row[5] ) > 0 ) ! { ! ?> ! <span class="style2">Description:</span><br /> ! <?=$row[5]?><br /> ! <?php ! } ! ?> ! <br /><a href="#top">Back to top</a> ! <?php ! if ( ++$i < $count ) ! { ! echo '<hr size="1" noshade>'; ! } ! } ! ?> ! <span class="sectiontitle"><br /><br />OBJECT PROPERTIES</span><br /><br /> ! <?php ! // There could be multiple methods ! $i = 0; ! $result = mysql_query("SELECT `property`,`description`,`readonly` FROM `documentation_objects_properties` WHERE `object` = '$name' ORDER BY `property` ASC;"); ! $count = mysql_num_rows($result); ! while ($row = mysql_fetch_array($result)) ! { ! ?> ! <a name="prop_<?=$row[0]?>"></a><b><code style="font-size: 12px"><?=$row[0]?></code></b><? if ($row[2] == 1) { echo '(read only)'; } ?><br /><br /> ! <?php ! if ( strlen($row[1]) > 0 ) ! { ! ?> ! <span class="style2">Description:</span><br /> ! <?=$row[1]?><br /> ! <?php } ! ?> ! <br /><a href="#top">Back to top</a> ! <?php ! if ( ++$i < $count ) ! { echo '<hr size="1" noshade>'; } } ?> ! <br /><br /> ! <?php ! } ! else ! { ?> ! <span class="sectiontitle">SCRIPTING OBJECTS</span><br /> ! An object in Wolfpack has several methods (functions working with the object) and property (data assigned to the object). This section will serve as a reference to all available classes of objects in Wolfpack. <br /> ! Choose one of the object classes from the list at the bottom. ! </p> ! <table width="100%" border="0" cellspacing="0" cellpadding="2"> ! <?php $commands = array(); $result = mysql_query("SELECT `object` FROM `documentation_objects` ORDER BY `object` ASC;"); ! while ( $row = mysql_fetch_array( $result ) ) ! { ! array_push( $commands, $row[0] ); } ! mysql_free_result( $result ); $cols = 7; ! $rows = ceil( sizeof( $commands ) / $cols ); ! for ( $row = 0; $row < $rows; ++$row ) ! { echo "<tr>\n"; ! for ( $col = 0; $col < $cols; ++$col ) ! { $id = $col * $rows + $row; ! if ( $id < sizeof( $commands ) ) ! { ?> ! <td>- <a href="object.php?object=<?=$commands[$id]?>"><?=$commands[$id]?></a></td> ! <?php ! } ! else ! { ! echo "<td> </td>\n"; } } echo "</tr>\n"; } ! ?> ! </table> ! <br /> ! <?php } ?> ! </td> ! </tr> ! <tr valign="top"> ! <td class="text"> ! <a href="index.php"></a><a href="object.php">Back to the Object Overview </a><a href="index.php"><br /> ! Back to the Wolfpack Reference</a> ! </td> ! </tr> ! </table> ! <br /> ! <?php require_once('footer.inc.php'); ?> ! </div> ! </body> </html> Index: event.php =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/event.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** event.php 5 Apr 2004 18:19:19 -0000 1.2 --- event.php 20 Jun 2004 20:20:59 -0000 1.3 *************** *** 1,150 **** ! <? ! require_once('config.inc.php'); ! ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> ! <head> ! <title>Wolfpack Reference</title> ! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ! <style type="text/css"> ! <!-- ! body { ! margin-left: 0px; ! margin-top: 0px; ! margin-right: 0px; ! margin-bottom: 0px; ! } ! --> ! </style> ! <link href="style.css" rel="stylesheet" type="text/css"> ! <style type="text/css"> ! <!-- ! a:link { ! color: #0000FF; ! text-decoration: none; ! } ! a:visited { ! text-decoration: none; ! color: #0000FF; ! } ! a:hover { ! text-decoration: underline; ! } ! a:active { ! text-decoration: none; ! } ! --> ! </style></head> ! ! <body> ! <table width="100%" border="0" cellspacing="0" cellpadding="0"> ! <tr> ! <td bgcolor="#004B2C"><img src="top_logo.jpg" width="586" height="87"></td> ! </tr> ! <tr> ! <td height="3" bgcolor="#999999"><img src="spacer.gif" width="1" height="3"></td> ! </tr> ! </table> ! <div align="center"> ! <p> <span class="maintitle">Wolfpack Event Reference </span></p> ! <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top"> ! <td class="text"><? $row = NULL; ! if ($_REQUEST['name']) { ! $name = mysql_escape_string($_REQUEST['name']); ! $result = mysql_query("SELECT `name`,`prototype`,`parameters`,`returnvalue`,`callcondition`,`notes` FROM documentation_events WHERE `name` = '$name';"); ! if (mysql_num_rows($result) > 0) { ! $row = mysql_fetch_array($result); } ! mysql_free_result($result); } ! ! if ($row != NULL) { ! ?> ! <p><span class="sectiontitle">EVENT DESCRIPTION</span><br> ! <br> ! <strong>Event Name:</strong> <?=$row[0]?><br> ! <br> ! <strong>Prototype:</strong><br> ! <?=$row[1]?><br> ! <br> ! <? ! if (strlen($row[2]) > 0) { ! ?> ! <strong>Parameters:</strong><br> ! <?=$row[2]?><br> ! <br> <? ! } ! if (strlen($row[3]) > 0) { ?> ! <strong>Return Value: </strong><br> ! <?=$row[3]?><br> ! <br> ! <? ! } ! if (strlen($row[4]) > 0) { ! ?> ! <strong>Call Condition:</strong><br> ! <?=$row[4]?><br> ! <br> ! <? ! } ! if(strlen($row[5]) > 0) { ! ?> ! <strong>Notes:</strong><br> ! <?=$row[5]?><br> ! <br> ! <? ! } ! } else { ?> ! <span class="sectiontitle">SCRIPTING EVENTS</span><br> ! Your scripts will be notified of certain events by event functions. To use one of these events, simply place the event function in your script. The name of event functions are case sensitive.<br> ! You can see a list of all available events at the bottom of this page.<br> ! </p> ! <? ! } ! ?></td> ! </tr> ! <tr valign="top"> ! <td class="text"><span class="sectiontitle">OTHER EVENTS </span><br> ! <table width="100%" border="0" cellspacing="0" cellpadding="2"> ! <? ! $commands = array(); ! $result = mysql_query("SELECT name FROM documentation_events ORDER BY name ASC;"); ! while ($row = mysql_fetch_array($result)) { ! array_push($commands, $row[0]); } ! mysql_free_result($result); ! ! $cols = 7; ! $rows = ceil(sizeof($commands) / $cols); ! for ($row = 0; $row < $rows; ++$row) { ! echo "<tr>\n"; ! for ($col = 0; $col < $cols; ++$col) { ! $id = $col * $rows + $row; ! if ($id < sizeof($commands)) { ?> ! <td>- <a href="event.php?name=<?=$commands[$id]?>"><?=$commands[$id]?></a></td> ! <? ! } else { ! echo "<td> </td>\n"; ! } } - echo "</tr>\n"; } ?> ! </table><br> </td> ! </tr> ! <tr valign="top"> ! <td class="text"><a href="index.php">Back to the Wolfpack Reference</a></td> ! </tr> ! </table> ! <br> ! <? ! require_once('footer.inc.php'); ! ?></div> ! </body> </html> --- 1,132 ---- ! <?php require_once('config.inc.php'); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> ! <head> ! <title>Wolfpack Reference</title> ! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> ! <link href="./style.css" rel="stylesheet" type="text/css" /> ! </head> ! <body> ! <?php require_once('./header.inc.php'); ?> ! <div align="center"> ! <p><span class="maintitle">Wolfpack Event Reference</span></p> ! <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top"> ! <td class="text"> ! <?php $row = NULL; ! if ( $_REQUEST['name'] ) ! { ! $name = mysql_escape_string( $_REQUEST['name'] ); ! $result = mysql_query( "SELECT `name`,`prototype`,`parameters`,`returnvalue`,`callcondition`,`notes` FROM documentation_events WHERE `name` = '$name';" ); ! if ( mysql_num_rows( $result ) > 0 ) ! { ! $row = mysql_fetch_array( $result ); } ! mysql_free_result( $result ); } ! if ( $row != NULL ) ! { ! ?> ! <p> ! <span class="sectiontitle">EVENT DESCRIPTION</span><br /> ! <br /> ! <strong>Event Name:</strong> <?=$row[0]?><br /> ! <br /> ! <strong>Prototype:</strong><br /> ! <?=$row[1]?><br /> ! <br /> <? ! if ( strlen( $row[2] ) > 0 ) ! { ?> ! <strong>Parameters:</strong><br /> ! <?=$row[2]?><br /> ! <br /> ! <?php } ! if ( strlen( $row[3] ) > 0 ) ! { ! ?> ! <strong>Return Value:</strong><br /> ! <?=$row[3]?><br /> ! <br /> ! <?php ! } ! if ( strlen( $row[4] ) > 0 ) ! { ! ?> ! <strong>Call Condition:</strong><br /> ! <?=$row[4]?><br /> ! <br /> ! <?php ! } ! if( strlen( $row[5] ) > 0 ) ! { ! ?> ! <strong>Notes:</strong><br /> ! <?=$row[5]?><br /> ! <br /> ! <?php ! } ! } ! else ! { ! ?> ! <span class="sectiontitle">SCRIPTING EVENTS</span><br /> ! Your scripts will be notified of certain events by event functions. To use one of these events, simply place the event function in your script. The name of event functions are case sensitive.<br /> ! You can see a list of all available events at the bottom of this page.<br /> ! </p> ! <?php ! } ! ?> ! </td> ! </tr> ! <tr valign="top"> ! <td class="text"> ! <span class="sectiontitle">OTHER EVENTS </span><br /> ! <table width="100%" border="0" cellspacing="0" cellpadding="2"> ! <?php ! $commands = array(); ! $result = mysql_query( "SELECT name FROM documentation_events ORDER BY name ASC;" ); ! while ( $row = mysql_fetch_array( $result ) ) ! { ! array_push( $commands, $row[0] ); ! } ! mysql_free_result( $result ); ! $cols = 7; ! $rows = ceil( sizeof( $commands ) / $cols ); ! ! for ( $row = 0; $row < $rows; ++$row ) ! { ! echo "<tr>\n"; ! for ( $col = 0; $col < $cols; ++$col ) ! { ! $id = $col * $rows + $row; ! if ( $id < sizeof( $commands ) ) ! { ?> ! <td>- <a href="event.php?name=<?=$commands[$id]?>"><?=$commands[$id]?></a></td> ! <?php ! } ! else ! { ! echo "<td> </td>\n"; } } + echo "</tr>\n"; + } ?> ! </table> ! <br /> ! </td> ! </tr> ! <tr valign="top"> ! <td class="text"><a href="./index.php">Back to the Wolfpack Reference</a></td> ! </tr> ! </table> ! <br /> ! <?php require_once('footer.inc.php'); ?> ! </body> </html> Index: style.css =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/style.css,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** style.css 5 Apr 2004 20:52:44 -0000 1.2 --- style.css 20 Jun 2004 20:20:59 -0000 1.3 *************** *** 1,2 **** --- 1,10 ---- + + body { + margin-left: 0px; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + } + .maintitle { font-family: "Trebuchet MS", Arial, Helvetica; *************** *** 5,8 **** --- 13,17 ---- color: #336633; } + .smalltext { font-family: "Trebuchet MS", Arial, Helvetica; *************** *** 10,13 **** --- 19,23 ---- color: #999999; } + .sectiontitle { *************** *** 17,25 **** color: #666666; } .text { font-family: "Trebuchet MS", Arial, Helvetica; font-size: 12px; } img { border: 0; ! } \ No newline at end of file --- 27,55 ---- color: #666666; } + .text { font-family: "Trebuchet MS", Arial, Helvetica; font-size: 12px; } + img { border: 0; ! } ! ! a:link { ! color: #0000FF; ! text-decoration: none; ! } ! ! a:visited { ! text-decoration: none; ! color: #0000FF; ! } ! ! a:hover { ! text-decoration: underline; ! } ! ! a:active { ! text-decoration: none; ! } Index: index.php =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/index.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.php 6 Apr 2004 18:24:24 -0000 1.4 --- index.php 20 Jun 2004 20:20:59 -0000 1.5 *************** *** 1,3 **** ! <? require_once('config.inc.php'); global $SETTINGS; --- 1,3 ---- ! <?php require_once('config.inc.php'); global $SETTINGS; *************** *** 5,92 **** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> ! <head> ! <title>Wolfpack Reference</title> ! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ! <style type="text/css"> ! <!-- ! body { ! margin-left: 0px; ! margin-top: 0px; ! margin-right: 0px; ! margin-bottom: 0px; ! } ! --> ! </style> ! <link href="style.css" rel="stylesheet" type="text/css"> ! <style type="text/css"> ! <!-- ! a:link { ! color: #0000FF; ! text-decoration: none; ! } ! a:visited { ! text-decoration: none; ! color: #0000FF; ! } ! a:hover { ! text-decoration: underline; ! } ! a:active { ! text-decoration: none; ! } ! --> ! </style></head> ! ! <body> ! <? ! require_once('header.inc.php'); ! ?> ! <div align="center"><br><span class="maintitle">Wolfpack Reference</span><br> ! <br> ! <table width="740" border="0" cellspacing="3" cellpadding="2"> ! <tr align="left" valign="top"> ! <td width="33%" class="text"><div align="left"><span class="sectiontitle">INGAME COMMANDS</span><br> ! These commands can be used by players, gms and admins while in the game. This section gives you an overview over all available commands and how to use them.<br> ! <a href="command.php">Read more... (<? ! $result = mysql_query("SELECT COUNT(*) FROM documentation_commands;"); ! echo array_pop(mysql_fetch_array($result)); ! mysql_free_result($result); ! ?> commands)</a><br> ! <br> ! </div></td> ! <td width="33%" class="text"><span class="sectiontitle">SCRIPTING OBJECTS</span><br> ! This section of the documentation gives you an overview over available wolfpack specific objects, their properties and methods and in some cases how to create them.<br> ! <a href="object.php">Read more... (<? ! $result = mysql_query("SELECT COUNT(*) FROM documentation_objects;"); ! echo array_pop(mysql_fetch_array($result)); ! mysql_free_result($result); ! ?> objects)</a></td> ! <td width="33%" class="text"><span class="sectiontitle">SCRIPTING LIBRARY</span><br> ! Wolfpack comes with a sophisticated library of scripts. This section of the documentation provides an overview over the library and its functions.<br> ! <a href="#">Read more... </a></td> ! </tr> ! </table> ! <hr width="740" size="1" noshade> ! ! <table width="740" border="0" cellpadding="2" cellspacing="3"> ! <tr align="left" valign="top"> ! <td width="33%" class="text"><span class="sectiontitle">SCRIPTING EVENTS</span><br> ! This section describes the events your scripts will be notified about.<br> ! <a href="event.php">Read more... (<? ! $result = mysql_query("SELECT COUNT(*) FROM documentation_events;"); ! echo array_pop(mysql_fetch_array($result)); ! mysql_free_result($result); ! ?> events)</a><br></td><td width="33%" class="text"><span class="sectiontitle">DEFINITION TAGS</span><br> ! This section provides an overview over the tags used in the Wolfpack XML definitions. ! <a href="#">Read more...</a></td> ! <td width="33%" class="text"><span class="sectiontitle">MISCELLANEOUS</span><br> ! Miscelleneous information can be found in this section. Links, configuration and setup among other things.<br> ! <a href="#">Read more...</a> </td> ! </tr> ! </table> ! <br> ! <? ! require_once('footer.inc.php'); ! ?></div> ! </body> </html> --- 5,76 ---- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> ! <head> ! <title>Wolfpack Reference</title> ! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> ! <link href="./style.css" rel="stylesheet" type="text/css" /> ! </head> ! <body> ! <?php require_once('header.inc.php'); ?> ! <div align="center"> ! <br /> ! <span class="maintitle">Wolfpack Reference</span><br /> ! <br /> ! <table width="740" border="0" cellspacing="3" cellpadding="2"> ! <tr align="left" valign="top"> ! <td width="33%" class="text"> ! <div align="left"> ! <span class="sectiontitle">INGAME COMMANDS</span><br /> ! These commands can be used by players, gms and admins while in the game. This section gives you an overview over all available commands and how to use them.<br /> ! <a href="command.php">Read more... (<? ! $result = mysql_query("SELECT COUNT(*) FROM documentation_commands;"); ! echo array_pop(mysql_fetch_array($result)); ! mysql_free_result($result); ! ?> commands)</a><br /> ! <br /> ! </div> ! </td> ! <td width="33%" class="text"> ! <span class="sectiontitle">SCRIPTING OBJECTS</span><br /> ! This section of the documentation gives you an overview over available wolfpack specific objects, their properties and methods and in some cases how to create them.<br /> ! <a href="object.php">Read more... (<? ! $result = mysql_query("SELECT COUNT(*) FROM documentation_objects;"); ! echo array_pop(mysql_fetch_array($result)); ! mysql_free_result($result); ! ?> objects)</a> ! </td> ! <td width="33%" class="text"> ! <span class="sectiontitle">SCRIPTING LIBRARY</span><br /> ! Wolfpack comes with a sophisticated library of scripts. This section of the documentation provides an overview over the library and its functions.<br /> ! <a href="#">Read more... </a> ! </td> ! </tr> ! </table> ! <hr width="740" size="1" noshade="noshade" /> ! <table width="740" border="0" cellpadding="2" cellspacing="3"> ! <tr align="left" valign="top"> ! <td width="33%" class="text"> ! <span class="sectiontitle">SCRIPTING EVENTS</span><br /> ! This section describes the events your scripts will be notified about.<br /> ! <a href="event.php">Read more... (<? ! $result = mysql_query("SELECT COUNT(*) FROM documentation_events;"); ! echo array_pop(mysql_fetch_array($result)); ! mysql_free_result($result); ! ?> events)</a><br /> ! </td> ! <td width="33%" class="text"> ! <span class="sectiontitle">DEFINITION TAGS</span><br /> ! This section provides an overview over the tags used in the Wolfpack XML definitions. ! <a href="#">Read more...</a> ! </td> ! <td width="33%" class="text"> ! <span class="sectiontitle">MISCELLANEOUS</span><br /> ! Miscelleneous information can be found in this section. Links, configuration and setup among other things.<br /> ! <a href="#">Read more...</a> ! </td> ! </tr> ! </table> ! <br /> ! <?php require_once('footer.inc.php'); ?> ! </div> ! </body> </html> Index: config.inc.php =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/config.inc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** config.inc.php 5 Apr 2004 20:52:44 -0000 1.3 --- config.inc.php 20 Jun 2004 20:20:59 -0000 1.4 *************** *** 1,3 **** ! <? // Change these settings to whatever you need. $db_host = 'localhost'; --- 1,3 ---- ! <?php // Change these settings to whatever you need. $db_host = 'localhost'; Index: header.inc.php =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/header.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** header.inc.php 6 Apr 2004 18:24:24 -0000 1.2 --- header.inc.php 20 Jun 2004 20:20:59 -0000 1.3 *************** *** 1,8 **** ! <table width="100%" border="0" cellspacing="0" cellpadding="0"> ! <tr> ! <td bgcolor="#004B2C"><a href="./index.php"><img src="top_logo.jpg" width="586" height="87" border="0"/></a></td> ! </tr> ! <tr> ! <td height="3" bgcolor="#999999"><img src="spacer.gif" width="1" height="3" /></td> ! </tr> ! </table> \ No newline at end of file --- 1,9 ---- ! ! <table width="100%" border="0" cellspacing="0" cellpadding="0"> ! <tr> ! <td bgcolor="#004B2C"><a href="./index.php"><img src="./top_logo.jpg" width="586" height="87" border="0"/></a></td> ! </tr> ! <tr> ! <td height="3" bgcolor="#999999"><img src="./spacer.gif" width="1" height="3" /></td> ! </tr> ! </table> Index: footer.inc.php =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/footer.inc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** footer.inc.php 20 Jun 2004 20:15:45 -0000 1.3 --- footer.inc.php 20 Jun 2004 20:20:59 -0000 1.4 *************** *** 1,7 **** ! <span class="smalltext">Generated: <? ! echo date('d.m.Y H:M', $SETTINGS['generated']); ! ?> | Version: <? ! echo $SETTINGS['version']; ! ?></span><br> ! <span class="smalltext">© 2004 Wolfpack Team | ! <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span> \ No newline at end of file --- 1,4 ---- ! ! <span class="smalltext">Generated: <?=date('d.m.Y H:m', $SETTINGS['generated'])?> | Version: <?=$SETTINGS['version']?></span> ! <br /> ! <span class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org" target="_blank">http://www.wpdev.org</a></span> Index: method.php =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/method.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** method.php 5 Apr 2004 20:52:44 -0000 1.2 --- method.php 20 Jun 2004 20:20:59 -0000 1.3 *************** *** 1,148 **** ! <? ! require_once('config.inc.php'); ! ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> ! <head> ! <title>Wolfpack Reference</title> ! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ! <style type="text/css"> ! <!-- ! body { ! margin-left: 0px; ! margin-top: 0px; ! margin-right: 0px; ! margin-bottom: 0px; ! } ! --> ! </style> ! <link href="style.css" rel="stylesheet" type="text/css"> ! <style type="text/css"> ! <!-- ! a:link { ! color: #0000FF; ! text-decoration: none; ! } ! a:visited { ! text-decoration: none; ! color: #0000FF; ! } ! a:hover { ! text-decoration: underline; ! } ! a:active { ! text-decoration: none; ! } ! --> ! </style></head> ! ! <body> ! <? ! require_once('header.inc.php'); ! ?> ! <div align="center"> ! <p> <span class="maintitle">Wolfpack Object Reference </span></p> ! <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top"> ! <td class="text"><? $row = NULL; ! if ($_REQUEST['object'] && $_REQUEST['method']) { ! $object = mysql_escape_string($_REQUEST['object']); ! $method = mysql_escape_string($_REQUEST['method']); ! $result = mysql_query("SELECT `object`,`method`,`prototype`,`parameters`,`returnvalue`,`description` FROM documentation_objects_methods WHERE `object` = '$object' AND `method` = '$method';"); ! if (mysql_num_rows($result) > 0) { ! $row = mysql_fetch_array($result); ! $count = mysql_num_rows($result); } ! mysql_free_result($result); ! } ! ! if ($row != NULL) { ! ?><span class="sectiontitle"> METHOD DESCRIPTION</span><br> <br> ! <strong>Method Name:</strong> <?=$row[1]?> ! <br> ! <hr size="1" noshade> ! <? ! // There could be multiple methods ! $i = 0; ! $result = mysql_query("SELECT `object`,`method`,`prototype`,`parameters`,`returnvalue`,`description` FROM documentation_objects_methods WHERE `object` = '$object' AND `method` = '$method';"); ! while ($row = mysql_fetch_array($result)) { ! ?> <code><?=$row[2]?> </code><br> ! <br> ! <? ! if (strlen($row[3]) > 0) { ! ?> ! <?=$row[3]?> ! <br> ! <br> ! <? } ! if (strlen($row[4]) > 0) { ?> ! <strong>Return Value: </strong><br> ! <?=$row[4]?> <p> ! <? ! } ! if (strlen($row[5]) > 0) { ! ?> ! <strong>Description:</strong><br> ! <?=$row[5]?> ! <br> ! <? } ! ?> ! <hr size="1" noshade> ! <? ! } ! } ! ?> ! </p> </td> ! </tr> ! <tr valign="top"> ! <td class="text"><table width="100%" border="0" cellspacing="0" cellpadding="2"> ! <tr> ! <td colspan="7"><span class="sectiontitle">OBJECT METHODS</span></td> ! </tr> ! <? ! $commands = array(); ! $result = mysql_query("SELECT `method` FROM documentation_objects_methods ORDER BY `method` ASC;"); ! while ($row = mysql_fetch_array($result)) { ! array_push($commands, $row[0]); } ! mysql_free_result($result); ! $cols = 7; ! $rows = ceil(sizeof($commands) / $cols); ! for ($row = 0; $row < $rows; ++$row) { ! echo "<tr>\n"; ! for ($col = 0; $col < $cols; ++$col) { ! $id = $col * $rows + $row; ! if ($id < sizeof($commands)) { ?> ! <td>- <a href="method.php?object=<?=$_REQUEST['object']?>&method=<?=$commands[$id]?>"> ! <?=$commands[$id]?> ! </a></td> ! <? ! } else { ! echo "<td> </td>\n"; ! } } - echo "</tr>\n"; } ?> ! </table> ! <br></td> ! </tr> ! <tr valign="top"> ! <td class="text"><a href="object.php?object=<?=$_REQUEST['object']?>">Back to the Object Details </a><br> ! <a href="object.php">Back to the Object Reference </a><a href="index.php"><br> ! Back to the Wolfpack Reference</a></td> ! </tr> ! </table> ! <br> ! <? ! require_once('footer.inc.php'); ! ?></div> ! </body> </html> --- 1,125 ---- ! <?php require_once('config.inc.php'); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> ! <head> ! <title>Wolfpack Reference</title> ! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> ! <link href="./style.css" rel="stylesheet" type="text/css" /> ! </head> ! <body> ! <?php require_once('header.inc.php'); ?> ! <div align="center"> ! <p><span class="maintitle">Wolfpack Object Reference</span></p> ! <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top"> ! <td class="text"> ! <?php $row = NULL; ! if ( $_REQUEST['object'] && $_REQUEST['method'] ) ! { ! $object = mysql_escape_string( $_REQUEST['object'] ); ! $method = mysql_escape_string( $_REQUEST['method'] ); ! $result = mysql_query( "SELECT `object`,`method`,`prototype`,`parameters`,`returnvalue`,`description` FROM documentation_objects_methods WHERE `object` = '$object' AND `method` = '$method';" ); ! if ( mysql_num_rows( $result ) > 0 ) ! { ! $row = mysql_fetch_array( $result ); ! $count = mysql_num_rows( $result ); } ! mysql_free_result( $result ); } ! if ( $row != NULL ) ! { ! ?> ! <span class="sectiontitle">METHOD DESCRIPTION</span><br /><br /> ! <strong>Method Name:</strong> <?=$row[1]?><br /> ! <hr size="1" noshade="noshade" /> ! <?php ! // There could be multiple methods ! $i = 0; ! $result = mysql_query( "SELECT `object`,`method`,`prototype`,`parameters`,`returnvalue`,`description` FROM documentation_objects_methods WHERE `object` = '$object' AND `method` = '$method';" ); ! while ( $row = mysql_fetch_array( $result ) ) ! { ! ?> ! <code><?=$row[2]?></code><br /><br /> ! <?php ! if ( strlen( $row[3] ) > 0 ) ! { ! ?> ! <?=$row[3]?><br /><br /> ! <?php ! } ! if ( strlen( $row[4] ) > 0 ) ! { ! ?> ! <strong>Return Value:</strong><br /><?=$row[4]?><br /> ! <?php } ! if (strlen($row[5]) > 0) ! { ?> ! <strong>Description:</strong><br /><?=$row[5]?><br /> ! <?php ! } ! ?> ! <hr size="1" noshade="noshade" /> ! <?php } ! } ! ?> ! </td> ! </tr> ! <tr valign="top"> ! <td class="text"><table width="100%" border="0" cellspacing="0" cellpadding="2"> ! <tr> ! <td colspan="7"> ! <span class="sectiontitle">OBJECT METHODS</span></td><br /> ! <table width="100%" border="0" cellspacing="0" cellpadding="2"> ! <?php ! $commands = array(); ! $result = mysql_query( "SELECT `method` FROM documentation_objects_methods ORDER BY `method` ASC;" ); ! while ( $row = mysql_fetch_array( $result ) ) ! { ! array_push( $commands, $row[0] ); ! } ! mysql_free_result( $result ); ! $cols = 7; ! $rows = ceil(sizeof($commands) / $cols); ! for ( $row = 0; $row < $rows; ++$row ) ! { ! echo "<tr>\n"; ! for ( $col = 0; $col < $cols; ++$col ) ! { ! $id = $col * $rows + $row; ! if ( $id < sizeof( $commands ) ) ! { ?> ! <td>- <a href="method.php?object=<?=$_REQUEST['object']?>&method=<?=$commands[$id]?>"><?=$commands[$id]?></a></td> ! <?php ! } ! else ! { ! echo "<td> </td>\n"; } } + echo "</tr>\n"; + } ?> ! </table> ! <br /> ! </td> ! </tr> ! <tr valign="top"> ! <td class="text"> ! <a href="object.php?object=<?=$_REQUEST['object']?>">Back to the Object Details </a><br /> ! <a href="object.php">Back to the Object Reference </a><a href="index.php"><br /> ! Back to the Wolfpack Reference</a> ! </td> ! </tr> ! </table> ! <br /> ! <?php require_once('footer.inc.php'); ?> ! </div> ! </body> </html> Index: command.php =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/command.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** command.php 5 Apr 2004 20:52:44 -0000 1.3 --- command.php 20 Jun 2004 20:20:59 -0000 1.4 *************** *** 1,116 **** ! <? ! require_once('config.inc.php'); ! ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> ! <head> ! <title>Wolfpack Reference</title> ! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ! <style type="text/css"> ! <!-- ! body { ! margin-left: 0px; ! margin-top: 0px; ! margin-right: 0px; ! margin-bottom: 0px; ! } ! --> ! </style> ! <link href="style.css" rel="stylesheet" type="text/css"> ! <style type="text/css"> ! <!-- ! a:link { ! color: #0000FF; ! text-decoration: none; ! } ! a:visited { ! text-decoration: none; ! color: #0000FF; ! } ! a:hover { ! text-decoration: underline; ! } ! a:active { ! text-decoration: none; ! } ! --> ! </style></head> ! ! <body> ! <? ! require_once('header.inc.php'); ! ?> ! <div align="center"> ! <p> <span class="maintitle">Wolfpack Command Reference </span></p> ! <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top"> ! <td class="text"><? $row = NULL; ! if ($_REQUEST['name']) { ! $name = mysql_escape_string($_REQUEST['name']); ! $result = mysql_query("SELECT `name`,`description`,`usage`,`notes` FROM documentation_commands WHERE `name` = '$name';"); ! if (mysql_num_rows($result) > 0) { ! $row = mysql_fetch_array($result); } ! mysql_free_result($result); } ! ! if ($row != NULL) { ! ?><span class="sectiontitle">COMMAND DESCRIPTION</span><br> ! <br> <strong>Command Name:</strong> <?=$row[0]?><br> ! <br> ! <strong>Short Description:</strong> <?=$row[1]?><br> ! <br> ! <? ! if (strlen($row[2]) > 0) { ! ?> ! <strong>Usage:</strong><br> ! <?=$row[2]?><br> ! <br> ! <? } ! ! if (strlen($row[3]) > 0) { ! ?> ! <strong>Notes:</strong><br> ! <?=$row[3]?><br> ! <br> ! <? } - } else { ?> ! ! <span class="sectiontitle">INGAME COMMANDS</span><br> ! To use one of the commands in this section, you have to know about your <em>Command Prefix</em> first. The default command prefix is the character <strong>'</strong>, but you can change it to any character you like in your wolfpack.xml file. If you know your command prefix, simply prepend it to the name of the command and say it ingame. The command will then be executed. <br> ! The name of the command is case insensitive.<br> ! You can see a list of all available commands at the bottom of this page.<br><br> ! <? ! } ! ?></td> ! </tr> ! <tr valign="top"> ! <td class="text"><span class="sectiontitle">OTHER COMMANDS</span><br> ! <table width="100%" border="0" cellspacing="0" cellpadding="2"> ! <? ! $commands = array(); ! $result = mysql_query("SELECT name FROM documentation_commands ORDER BY name ASC;"); ! while ($row = mysql_fetch_array($result)) { ! array_push($commands, $row[0]); } ! mysql_free_result($result); $cols = 7; ! $rows = ceil(sizeof($commands) / $cols); ! for ($row = 0; $row < $rows; ++$row) { echo "<tr>\n"; ! for ($col = 0; $col < $cols; ++$col) { $id = $col * $rows + $row; ! if ($id < sizeof($commands)) { ?> ! <td>- <a href="command.php?name=<?=$commands[$id]?>"><?=$commands[$id]?></a></td> ! <? ! } else { ! echo "<td> </td>\n"; } } --- 1,98 ---- ! <?php require_once('config.inc.php'); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> ! <head> ! <title>Wolfpack Reference</title> ! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> ! <link href="./style.css" rel="stylesheet" type="text/css" /> ! </head> ! <body> ! <?php require_once('./header.inc.php'); ?> ! <div align="center"> ! <p><span class="maintitle">Wolfpack Command Reference </span></p> ! <table width="780" border="0" cellspacing="3" cellpadding="0"> ! <tr valign="top"> ! <td class="text"> ! <?php $row = NULL; ! if ( $_REQUEST['name'] ) ! { ! $name = mysql_escape_string( $_REQUEST['name'] ); ! $result = mysql_query( "SELECT `name`,`description`,`usage`,`notes` FROM documentation_commands WHERE `name` = '$name';" ); ! if ( mysql_num_rows( $result ) > 0 ) ! { ! $row = mysql_fetch_array( $result ); } ! mysql_free_result( $result ); } ! if ( $row != NULL ) ! { ! ?> ! <span class="sectiontitle">COMMAND DESCRIPTION</span><br /> ! <br /><strong>Command Name:</strong> <?=$row[0]?><br /> ! <br /> ! <strong>Short Description:</strong> <?=$row[1]?><br /> ! <br /> ! <?php ! if ( strlen( $row[2] ) > 0 ) ! { ! ?> ! <strong>Usage:</strong><br /> ! <?=$row[2]?><br /> ! <br /> ! <?php ! } ! if ( strlen( $row[3] ) > 0 ) ! { ! ?> ! <strong>Notes:</strong><br /> ! <?=$row[3]?><br /> ! <br /> ! <?php ! } } ! else ! { ! ?> ! <span class="sectiontitle">INGAME COMMANDS</span><br /> ! To use one of the commands in this section, you have to know about your <em>Command Prefix</em> first. The default command prefix is the character <strong>'</strong>, but you can change it to any character you like in your wolfpack.xml file. If you know your command prefix, simply prepend it to the name of the command and say it ingame. The command will then be executed. <br /> ! The name of the command is case insensitive.<br /> ! You can see a list of all available commands at the bottom of this page.<br /><br /> ! <?php } ?> ! </td> ! </tr> ! <tr valign="top"> ! <td class="text"> ! <span class="sectiontitle">OTHER COMMANDS</span><br /> ! <table width="100%" border="0" cellspacing="0" cellpadding="2"> ! <?php ! $commands = array(); ! $result = mysql_query( "SELECT name FROM documentation_commands ORDER BY name ASC;" ); ! while ( $row = mysql_fetch_array( $result ) ) ! { ! array_push( $commands, $row[0] ); } ! mysql_free_result( $result ); $cols = 7; ! $rows = ceil( sizeof( $commands ) / $cols ); ! for ( $row = 0; $row < $rows; ++$row ) ! { echo "<tr>\n"; ! for ( $col = 0; $col < $cols; ++$col ) ! { $id = $col * $rows + $row; ! if ( $id < sizeof( $commands ) ) ! { ?> ! <td>- <a href="command.php?name=<?=$commands[$id]?>"><?=$commands[$id]?></a></td> ! <?php ! } ! else ! { ! echo "<td> </td>\n"; } } *************** *** 118,131 **** } ?> ! </table><br> </td> ! </tr> ! <tr valign="top"> ! <td class="text"><a href="index.php">Back to the Wolfpack Reference</a></td> ! </tr> ! </table> ! <br> ! <? ! require_once('footer.inc.php'); ! ?></div> ! </body> </html> --- 100,114 ---- } ?> ! </table> ! <br /> ! </td> ! </tr> ! <tr valign="top"> ! <td class="text"><a href="index.php">Back to the Wolfpack Reference</a></td> ! </tr> ! </table> ! <br /> ! <?php require_once('./footer.inc.php'); ?> ! </div> ! </body> </html> Index: FAQ.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/FAQ.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FAQ.html 18 Jun 2004 22:45:47 -0000 1.3 --- FAQ.html 20 Jun 2004 20:20:59 -0000 1.4 *************** *** 133,136 **** --- 133,142 ---- font-family: Fixed, Arial; } + div.smalltext { + font-family: "Trebuchet MS", Arial, Helvetica; + font-size: 10px; + color: #999999; + text-align: center; + } --> </style> *************** *** 139,142 **** --- 145,149 ---- <div class="header"><img src="top_logo.jpg" style="width:586px;height:87px;" alt="" /></div> <div class="header2"><img src="spacer.gif" style="width:1px;height:3px;" alt="" /></div> + <a name="top"></a> <br /> <!-- QUESTIONS --> *************** *** 145,149 **** Frequently Asked Questions<br /> <br /> ! Table of Contents <ul class="toc"> <li><a href="#01">What is new in Wolfpack 13.x.x?</a></li> --- 152,156 ---- Frequently Asked Questions<br /> <br /> ! Table of Contents<br /> <ul class="toc"> <li><a href="#01">What is new in Wolfpack 13.x.x?</a></li> *************** *** 154,158 **** <ul> <li><a href="#05a">Using MSVC.</a></li> ! <li><a href="#05b">Using Cygwin/MinGW</a></li> </ul> </li> --- 161,165 ---- <ul> <li><a href="#05a">Using MSVC.</a></li> ! <li><a href="#05b">Using Cygwin/MinGW.</a></li> </ul> </li> *************** *** 191,194 **** --- 198,202 ---- </ul> </div> + <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> </li> <!-- Answer 02 --> *************** *** 202,205 **** --- 210,214 ---- </ul> </div> + <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> </li> <!-- Answer 03 --> *************** *** 224,227 **** --- 233,237 ---- Naturally, the better your hardware the better your server's performance will be. </div> + <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> </li> <!-- Answer 04 --> *************** *** 241,244 **** --- 251,255 ---- </ul> </div> + <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> </li> <!-- Answer 05 --> *************** *** 270,273 **** --- 281,285 ---- </li> </ul> + <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> </li> <!-- Answer 06 --> *************** *** 303,306 **** --- 315,319 ---- </div> </div> + <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> </li> <!-- Answer 07 --> *************** *** 322,325 **** --- 335,339 ---- </div> </div> + <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> </li> <!-- Answer 08 --> *************** *** 341,344 **** --- 355,359 ---- command as an alternative to using import. </div> + <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> </li> <!-- Answer 09 --> *************** *** 379,382 **** --- 394,398 ---- </ul> </div> + <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> </li> <!-- Answer 11 --> *************** *** 391,394 **** --- 407,411 ---- </ul> </div> + <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> </li> <!-- Answer 12 --> *************** *** 407,410 **** --- 424,428 ---- </div> </li> + <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> <!-- Answer 13 --> <li><a name="13" class="question">Where can I find the latest CVS Snapshots?</a><br /> *************** *** 413,419 **** --- 431,440 ---- <a href="http://wpdev.sourceforge.net/snapshots/">http://wpdev.sourceforge.net/snapshots/</a> </div> + <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> </li> </ul> </div> + <div class="smalltext">© 2004 Wolfpack Team | <a href="http://www.wpdev.org/">http://www.wpdev.org</a></div> + <br /> </body> </html> |
From: Sebastian H. <dar...@us...> - 2004-06-20 20:15:54
|
Update of /cvsroot/wpdev/xmlscripts/documentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3188 Modified Files: footer.inc.php generate.py Log Message: Fixes Index: generate.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/generate.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** generate.py 6 Apr 2004 18:24:24 -0000 1.5 --- generate.py 20 Jun 2004 20:15:45 -0000 1.6 *************** *** 76,87 **** # Time ! print "INSERT INTO documentation_settings VALUES('generated', %u);" % int(time.time()) ! print "INSERT INTO documentation_settings VALUES('version', '%s');" % (quote(getVersion())) for command in commands: ! print "INSERT INTO documentation_commands VALUES('%s', '%s', '%s', '%s');" % (quote(command['name']), quote(command['description']), quote(command['usage']), quote(command['notes'])) for event in events: ! print "INSERT INTO documentation_events VALUES('%s', '%s', '%s', '%s', '%s', '%s');" % (quote(event['name']), quote(event['prototype']), quote(event['parameters']), quote(event['returnvalue']), quote(event['callcondition']), quote(event['notes'])) for object in objects: --- 76,87 ---- # Time ! print "REPLACE INTO documentation_settings VALUES('generated', %u);" % int(time.time()) ! print "REPLACEINTO documentation_settings VALUES('version', '%s');" % (quote(getVersion())) for command in commands: ! print "REPLACE INTO documentation_commands VALUES('%s', '%s', '%s', '%s');" % (quote(command['name']), quote(command['description']), quote(command['usage']), quote(command['notes'])) for event in events: ! print "REPLACE INTO documentation_events VALUES('%s', '%s', '%s', '%s', '%s', '%s');" % (quote(event['name']), quote(event['prototype']), quote(event['parameters']), quote(event['returnvalue']), quote(event['callcondition']), quote(event['notes'])) for object in objects: *************** *** 100,108 **** objectsproperties.append(property) ! print "INSERT INTO documentation_objects VALUES('%s', '%s');" % (quote(object['object']), quote(object['description'])) for method in objectsmethods: ! print "INSERT INTO documentation_objects_methods VALUES('%s', '%s', '%s', '%s', '%s', '%s');" % (quote(method['object']), quote(method['method']), quote(method['prototype']), quote(method['parameters']), quote(method['returnvalue']), quote(method['description'])) for property in objectsproperties: ! print "INSERT INTO documentation_objects_properties VALUES('%s', '%s', '%s', '%s');" % (quote(property['object']), quote(property['property']), quote(property['description']), quote(property['readonly'])) --- 100,108 ---- objectsproperties.append(property) ! print "REPLACE INTO documentation_objects VALUES('%s', '%s');" % (quote(object['object']), quote(object['description'])) for method in objectsmethods: ! print "REPLACE INTO documentation_objects_methods VALUES('%s', '%s', '%s', '%s', '%s', '%s');" % (quote(method['object']), quote(method['method']), quote(method['prototype']), quote(method['parameters']), quote(method['returnvalue']), quote(method['description'])) for property in objectsproperties: ! print "REPLACE INTO documentation_objects_properties VALUES('%s', '%s', '%s', '%s');" % (quote(property['object']), quote(property['property']), quote(property['description']), quote(property['readonly'])) Index: footer.inc.php =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/footer.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** footer.inc.php 5 Apr 2004 01:12:13 -0000 1.2 --- footer.inc.php 20 Jun 2004 20:15:45 -0000 1.3 *************** *** 1,4 **** <span class="smalltext">Generated: <? ! echo date('d.m.Y H:m', $SETTINGS['generated']); ?> | Version: <? echo $SETTINGS['version']; --- 1,4 ---- <span class="smalltext">Generated: <? ! echo date('d.m.Y H:M', $SETTINGS['generated']); ?> | Version: <? echo $SETTINGS['version']; |
From: Ki H. P. <kh...@us...> - 2004-06-20 20:11:04
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32095/xmlscripts/definitions Modified Files: scripts.xml Log Message: poisoning script added Index: scripts.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/scripts.xml,v retrieving revision 1.133 retrieving revision 1.134 diff -C2 -d -r1.133 -r1.134 *** scripts.xml 19 Jun 2004 07:37:52 -0000 1.133 --- scripts.xml 20 Jun 2004 20:10:55 -0000 1.134 *************** *** 186,189 **** --- 186,190 ---- <script>skills.musicianship</script> <script>skills.peacemaking</script> + <script>skills.poisoning</script> <script>skills.provocation</script> <script>skills.spiritspeak</script> |
From: Ki H. P. <kh...@us...> - 2004-06-20 20:10:02
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30574/xmlscripts/scripts Modified Files: food.py Log Message: poisoning script Index: food.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/food.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** food.py 26 May 2004 13:07:19 -0000 1.4 --- food.py 20 Jun 2004 20:09:54 -0000 1.5 *************** *** 3,6 **** --- 3,7 ---- from wolfpack.consts import * from wolfpack.utilities import tobackpack + from system import poison # *************** *** 61,64 **** --- 62,77 ---- player.socket.clilocmessage(min(500872, 500868 + player.hunger)) + # Fidget animation and munch munch sound + player.soundeffect(random.choice([0x03a, 0x03b, 0x03c])) + player.action(ANIM_FIDGET3) + + player.hunger += 1 + + # poisoned food + if item.hastag( 'poisoning_char' ): + poison.poison( player, item.gettag( 'poisoning_strength' ) ) + player.socket.clilocmessage( 1010512 ) + skills.poisoning.wearoff( item ) + if item.amount > 1: item.amount -= 1 *************** *** 67,74 **** item.delete() - # Fidget animation and munch munch sound - player.soundeffect(random.choice([0x03a, 0x03b, 0x03c])) - player.action(ANIM_FIDGET3) - - player.hunger += 1 return 1 --- 80,82 ---- |
From: Ki H. P. <kh...@us...> - 2004-06-20 20:10:02
|
Update of /cvsroot/wpdev/xmlscripts/scripts/combat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30574/xmlscripts/scripts/combat Modified Files: aos.py Log Message: poisoning script Index: aos.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/combat/aos.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** aos.py 16 Jun 2004 20:18:43 -0000 1.14 --- aos.py 20 Jun 2004 20:09:53 -0000 1.15 *************** *** 8,11 **** --- 8,12 ---- from math import floor, ceil from system.debugging import DEBUG_COMBAT_INFO + from skills import poisoning # *************** *** 318,321 **** --- 319,325 ---- # Wear out the weapon if weapon: + # poisoning + if weapon.hastag( 'poisoning_uses' ): + poisoning.hitEffect( defender, weapon ) # 4% chance for losing one hitpoint if 0.04 >= random.random(): |
From: Ki H. P. <kh...@us...> - 2004-06-20 20:10:01
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30574/xmlscripts/scripts/skills Added Files: poisoning.py Log Message: poisoning script --- NEW FILE: poisoning.py --- ################################################################# # ) (\_ # WOLFPACK 13.0.0 Scripts # # (( _/{ "-; # Created by: khpae # # )).-' {{ ;'` # Revised by: # # ( ( ;._ \\ ctr # Last Modification: Created # ################################################################# from wolfpack.consts import * from wolfpack.time import * from wolfpack.utilities import tobackpack import skills import wolfpack import random from system import poison POISONING_DELAY = 1000 # Button for AnimalTaming pressed on skill gump def poisoning( char, skill ): # you cannot use skill while dead if char.dead: char.socket.clilocmessage( 502796 ) return if skill != POISONING: return # assign target request char.socket.clilocmessage( 502137 ) char.socket.attachtarget("skills.poisoning.selectpotion") return 1 def selectpotion(char, args, target): # check if the targetted item is a poison potion potion = target.item if ( not potion.hastag( 'potiontype' ) ) or ( potion.gettag( 'potiontype' ) < 14 and potion.gettag( 'potiontype' ) > 17 ): char.socket.clilocmessage( 502139 ) return # assign target request char.socket.clilocmessage( 502142 ) char.socket.attachtarget( "skills.poisoning.selecttarget", [ potion ] ) return 1 def selecttarget( char, args, target ): # you cannot use skill while dead if char.dead: socket.clilocmessage( 502796 ) return potion = args[ 0 ] if not potion: return # target item must exists in backpack #if not target.item.getoutmostitem() == char.backpack: # char.socket.clilocmessage( 500295 ) # return # check target type : food / blades if not target.item: char.socket.clilocmessage( 502145 ) return if not ( 'food' in target.item.events or 'blades' in target.item.events ): char.socket.clilocmessage( 502145 ) return # already poisoned #if target.hastag( 'poisoning' ): # return # sound / effect char.soundeffect( 0x4F ) # apply poison to the item char.addtimer( POISONING_DELAY, "skills.poisoning.poisonit", [ potion, target.item ] ) return 1 def poisonit( char, args ): potion = args[ 0 ] item = args[ 1 ] if not potion or not item: return skill = char.skill[ POISONING ] # poison strength : lesser(1), normal, greater, deadly(4) strength = int( potion.gettag( 'potiontype' ) ) - 13 # consume the potion / add a blank bottle potion.delete() bottle = wolfpack.additem( 'f0e' ) if not tobackpack( bottle, char ): bottle.moveto( char.pos.x, char.pos.y, char.pos.z, char.pos.map ) bottle.update() # FIXME : success / fail chance if skill < ( strength + 0.8 ) * 20: # failed to poison item char.socket.clilocmessage( 1010518 ) return 1 # check skill advance # FIXME : less / strong chance if random.randint( 0, 20 ) > ( skill - strength * 20 ): strength = strength - 1 if strength < 1: # failed to poison char.socket.clilocmessage( 502148 ) return 1 char.socket.clilocmessage( 1010518 ) else: char.socket.clilocmessage( 1010517 ) # decrease karma / fame # set poisoning infos as tags item.settag( 'poisoning_char', char.serial ) item.settag( 'poisoning_strength', strength ) item.settag( 'poisoning_skill', skill ) # weapon : poison chance when hit % = char.skill[ POISONING ] / 4 # number of uses before the poison wears off if 'blades' in item.events: item.settag( 'poisoning_uses', 20 - strength * 2 ) return 1 def hitEffect( char, weapon ): if not char or not weapon: return if not weapon.hastag( 'poisoning_uses' ): return uses = weapon.gettag( 'poisoning_uses' ) if uses < 1: skills.poisoning.wearoff( weapon ) return strength = weapon.gettag( 'poisoning_strength' ) if not strength or not ( strength > 0 and strength < 5 ): skills.poisoning.wearoff( weapon ) return skill = weapon.gettag( 'poisoning_skill' ) chance = int( skill / 4 ) if chance > random.randint( 0, 100 ): poison.poison( char, strength ) uses = uses - 1 if uses > 0: weapon.deltag( 'poisoning_uses' ) weapon.settag( 'poisoning_uses', uses ) else: skills.poisoning.wearoff( weapon ) def wearoff( item ): if item.hastag( 'poisoning_uses' ): item.deltag( 'poisoning_uses' ) if item.hastag( 'poisoning_strength' ): item.deltag( 'poisoning_strength' ) if item.hastag( 'poisoning_skill' ): item.deltag( 'poisoning_skill' ) if item.hastag( 'poisoning_char' ): item.deltag( 'poisoning_char' ) def onLoad(): skills.register( POISONING, poisoning ) |
From: Richard M. <dr...@us...> - 2004-06-20 18:51:51
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27799/commands Modified Files: export.py import.py Log Message: Export Updates Added newline tweaks, should do newlines by system type... Well, posix should do \n and rest \r\n. I think BSD falls under posix. So all should be good. Index: export.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/export.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** export.py 3 Jun 2004 00:28:21 -0000 1.3 --- export.py 20 Jun 2004 18:51:42 -0000 1.4 *************** *** 43,46 **** --- 43,50 ---- import wolfpack from wolfpack.gumps import cGump + import os + + # BaseID's not to save. + nonsaves = ['gem','ore_gem','wood_gem'] def exportcmd( socket, command, arguments ): *************** *** 126,174 **** warnings = '' item = iterator.first i = 0 while item: ! # Build our string ! if format == 1: # Sphere 51a ! output.write( "[WORLDITEM 0%x]\r\n" % item.id ) ! output.write( "SERIAL=0%x\r\n" % item.serial ) ! if item.name != '#': ! output.write( "NAME=%s\r\n" % item.name ) ! output.write( "ID=0%x\r\n" % item.id ) ! output.write( "COLOR=0%x\r\n" % item.color ) ! output.write( "P=%d,%d,%i\r\n\r\n" % ( item.pos.x, item.pos.y, item.pos.z ) ) ! elif format == 2: # WSC ! output.write( "SECTION WORLDITEM %d\r\n{\r\n" % i ) ! output.write( "SERIAL %d\r\n" % item.serial ) ! if item.baseid != '': ! output.write( "BASEID %s\r\n" % item.baseid ) ! if item.name != '#': ! output.write( "NAME %s\r\n" % item.name ) ! output.write( "ID %d\r\n" % item.id ) ! output.write( "X %d\r\n" % item.pos.x ) ! output.write( "Y %d\r\n" % item.pos.y ) ! output.write( "Z %i\r\n" % item.pos.z ) ! output.write( "MAP %i\r\n" % item.pos.map ) ! output.write( "CONT -1\r\n" ) ! output.write( "TYPE 255\r\n" ) # Useful for World Freezes ! output.write( "AMOUNT %d\r\n" % item.amount ) ! output.write( "COLOR %d\r\n" % item.color ) ! output.write( "}\r\n\r\n" ) ! else: # Text ! output.write( "%s 0x%x %i %i %i %i 0x%x\r\n" % ( item.baseid, item.id, item.pos.x, item.pos.y, item.pos.z, item.pos.map, item.color ) ) ! pass if item.amount > 1: ! warnings += 'Item %s has an amount of %d. This information will be lost when made static.<br><br>' % ( hex( item.serial ), item.amount ) eventlist = item.eventlist if len( eventlist ) > 0: ! warnings += 'Item %s has events (%s) assigned to it. It wont be usable when made static.<br><br>' % ( hex( item.serial ), eventlist ) if item.type != 0: ! warnings += 'Item %s is of type %d. It wont be usable when made static.<br><br>' % ( hex( item.serial ), item.type ) i += 1 --- 130,188 ---- warnings = '' + if os.name == 'posix': + newline = "\n" + else: + newline = "\r\n" + item = iterator.first i = 0 while item: ! if not item.baseid in nonsaves: ! # Build our string ! if format == 1: # Sphere 51a ! output.write( "[WORLDITEM 0%x]%s" % ( item.id, newline ) ) ! output.write( "SERIAL=0%x%s" % ( item.serial, newline ) ) ! if item.name != '#': ! output.write( "NAME=%s%s" % ( item.name, newline ) ) ! output.write( "ID=0%x%s" % ( item.id, newline ) ) ! output.write( "COLOR=0%x%s" % ( item.color, newline ) ) ! output.write( "P=%i,%i,%i%s%s" % ( item.pos.x, item.pos.y, item.pos.z, newline ) ) ! elif format == 2: # WSC, Lonewolf Style, Compatible with Linux Worldforge ! output.write( "SECTION WORLDITEM%s" % newline ) ! output.write( "{%s" % newline ) ! output.write( "SERIAL %i%s" % ( item.serial, newline ) ) ! output.write( "ID %i%s" % ( item.id, newline ) ) ! if item.baseid != '': ! output.write( "BASEID %s%s" % ( item.baseid, newline ) ) ! if item.name != '#' or item.name != '': ! output.write( "NAME %s%s" % ( item.name, newline ) ) ! output.write( "X %i%s" % ( item.pos.x, newline ) ) ! output.write( "Y %i%s" % ( item.pos.y, newline ) ) ! output.write( "Z %i%s" % ( item.pos.z, newline ) ) ! output.write( "MAP %i%s" % ( item.pos.map, newline ) ) ! if item.type: ! output.write( "TYPE %i%s" % ( item.type, newline ) ) # World Freeze Requirement ! else: ! output.write( "TYPE 255%s" % newline ) # World Freeze Requirement ! output.write( "COLOR %i%s" % ( item.color, newline ) ) ! output.write( "CONT -1%s" % newline ) ! output.write( "}%s%s" ( newline, newline ) ) ! else: # Text ! output.write( "%s 0x%x %i %i %i %i 0x%x%s" % ( item.baseid, item.id, item.pos.x, item.pos.y, item.pos.z, item.pos.map, item.color, newline ) ) ! # Older Format, no baseid/map saved ! #output.write( "0x%x %i %i %i 0x%x%s" % ( item.id, item.pos.x, item.pos.y, item.pos.z, item.color, newline ) ) if item.amount > 1: ! warnings += 'Item %i has an amount of %i. This information will be lost when made static.<br><br>' % ( hex( item.serial ), item.amount ) eventlist = item.eventlist if len( eventlist ) > 0: ! warnings += 'Item %i has events (%s) assigned to it. It wont be usable when made static.<br><br>' % ( hex( item.serial ), eventlist ) if item.type != 0: ! warnings += 'Item %i is of type %i. It wont be usable when made static.<br><br>' % ( hex( item.serial ), item.type ) i += 1 Index: import.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/import.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** import.py 3 Jun 2004 00:28:21 -0000 1.6 --- import.py 20 Jun 2004 18:51:42 -0000 1.7 *************** *** 48,51 **** --- 48,52 ---- from wolfpack import console from string import lstrip + import os def import_command( socket, command, arguments ): *************** *** 212,216 **** item.id = itemid item.color = color ! item.moveto(x, y, z, map, 1) item.update() count += 1 --- 213,217 ---- item.id = itemid item.color = color ! item.moveto( x, y, z, map ) item.update() count += 1 *************** *** 325,331 **** newitem = wolfpack.additem( "%s" % baseid ) # Generate a new serial for us - #if not newitem: - # newitem = wolfpack.newitem( 1 ) # Generate a new serial for us - newitem.decay = 0 newitem.color = color --- 326,329 ---- |