char.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html><head><title>Python: char</title>
  3. </head><body bgcolor="#f0f0f8">
  4. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
  5. <tr bgcolor="#7799ee">
  6. <td valign=bottom>&nbsp;<br>
  7. <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>char</strong></big></big></font></td
  8. ><td align=right valign=bottom
  9. ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br>(built-in)</font></td></tr></table>
  10. <p><tt>Contains&nbsp;the&nbsp;Python&nbsp;wrapper&nbsp;for&nbsp;characters,&nbsp;and&nbsp;utilities&nbsp;for&nbsp;searching,<br>
  11. storing,&nbsp;and&nbsp;generating&nbsp;NPCs&nbsp;from&nbsp;mob&nbsp;prototypes.</tt></p>
  12. <p>
  13. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  14. <tr bgcolor="#ee77aa">
  15. <td colspan=3 valign=bottom>&nbsp;<br>
  16. <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
  17. <tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  18. <td width="100%"><dl>
  19. <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
  20. </font></dt><dd>
  21. <dl>
  22. <dt><font face="helvetica, arial"><a href="char.html#Char">Char</a>
  23. </font></dt></dl>
  24. </dd>
  25. </dl>
  26. <p>
  27. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  28. <tr bgcolor="#ffc8d8">
  29. <td colspan=3 valign=bottom>&nbsp;<br>
  30. <font color="#000000" face="helvetica, arial"><a name="Char">class <strong>Char</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
  31. <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
  32. <td colspan=2><tt><a href="#Char">Char</a>/Mob&nbsp;objects<br>&nbsp;</tt></td></tr>
  33. <tr><td>&nbsp;</td>
  34. <td width="100%">Methods defined here:<br>
  35. <dl><dt><a name="Char-__cmp__"><strong>__cmp__</strong></a>(...)</dt><dd><tt>x.<a href="#Char-__cmp__">__cmp__</a>(y)&nbsp;&lt;==&gt;&nbsp;cmp(x,y)</tt></dd></dl>
  36. <dl><dt><a name="Char-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#Char-__hash__">__hash__</a>()&nbsp;&lt;==&gt;&nbsp;hash(x)</tt></dd></dl>
  37. <dl><dt><a name="Char-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Char-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>
  38. <dl><dt><a name="Char-act"><strong>act</strong></a>(...)</dt><dd><tt><a href="#Char-act">act</a>(command)<br>
  39. &nbsp;<br>
  40. Simulate&nbsp;a&nbsp;character&nbsp;typing&nbsp;in&nbsp;a&nbsp;command.</tt></dd></dl>
  41. <dl><dt><a name="Char-append_look"><strong>append_look</strong></a>(...)</dt><dd><tt><a href="#Char-append_look">append_look</a>(text)<br>
  42. &nbsp;<br>
  43. Adds&nbsp;text&nbsp;to&nbsp;the&nbsp;character's&nbsp;current&nbsp;look&nbsp;buffer.</tt></dd></dl>
  44. <dl><dt><a name="Char-attach"><strong>attach</strong></a>(...)</dt><dd><tt><a href="#Char-attach">attach</a>(trigger)<br>
  45. &nbsp;<br>
  46. Attach&nbsp;a&nbsp;trigger&nbsp;to&nbsp;the&nbsp;character&nbsp;by&nbsp;key&nbsp;name.</tt></dd></dl>
  47. <dl><dt><a name="Char-aux"><strong>aux</strong></a>(...)</dt><dd><tt>Alias&nbsp;for&nbsp;char.<a href="#Char">Char</a>.<a href="#Char-getAuxiliary">getAuxiliary</a>(name)</tt></dd></dl>
  48. <dl><dt><a name="Char-cansee"><strong>cansee</strong></a>(...)</dt><dd><tt><a href="#Char-cansee">cansee</a>(thing)<br>
  49. &nbsp;<br>
  50. Returns&nbsp;whether&nbsp;a&nbsp;character&nbsp;can&nbsp;see&nbsp;the&nbsp;specified&nbsp;<a href="__builtin__.html#object">object</a>,&nbsp;exit,&nbsp;or&nbsp;other<br>
  51. character.</tt></dd></dl>
  52. <dl><dt><a name="Char-clear_look"><strong>clear_look</strong></a>(...)</dt><dd><tt><a href="#Char-clear_look">clear_look</a>()<br>
  53. &nbsp;<br>
  54. Clear&nbsp;the&nbsp;character's&nbsp;current&nbsp;look&nbsp;buffer.</tt></dd></dl>
  55. <dl><dt><a name="Char-copy"><strong>copy</strong></a>(...)</dt><dd><tt><a href="#Char-copy">copy</a>()<br>
  56. &nbsp;<br>
  57. Returns&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;character.</tt></dd></dl>
  58. <dl><dt><a name="Char-deletevar"><strong>deletevar</strong></a>(...)</dt><dd><tt><a href="#Char-deletevar">deletevar</a>(name)<br>
  59. &nbsp;<br>
  60. Deletes&nbsp;a&nbsp;special&nbsp;variable&nbsp;from&nbsp;a&nbsp;character&nbsp;if&nbsp;they&nbsp;have&nbsp;one&nbsp;by&nbsp;the<br>
  61. given&nbsp;name.</tt></dd></dl>
  62. <dl><dt><a name="Char-delvar"><strong>delvar</strong></a>(...)</dt><dd><tt>Alias&nbsp;for&nbsp;char.<a href="#Char">Char</a>.<a href="#Char-deletevar">deletevar</a>(name)</tt></dd></dl>
  63. <dl><dt><a name="Char-detach"><strong>detach</strong></a>(...)</dt><dd><tt><a href="#Char-detach">detach</a>(trigger)<br>
  64. &nbsp;<br>
  65. Detach&nbsp;a&nbsp;trigger&nbsp;from&nbsp;the&nbsp;character&nbsp;by&nbsp;key&nbsp;name.</tt></dd></dl>
  66. <dl><dt><a name="Char-do_trigs"><strong>do_trigs</strong></a>(...)</dt><dd><tt><a href="#Char-do_trigs">do_trigs</a>(type,&nbsp;ch=None,&nbsp;obj=None,&nbsp;room=None,&nbsp;exit=None,&nbsp;cmd=None,<br>
  67. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arg=None,&nbsp;opts=None)<br>
  68. &nbsp;<br>
  69. Run&nbsp;triggers&nbsp;of&nbsp;the&nbsp;specified&nbsp;type&nbsp;on&nbsp;the&nbsp;character.&nbsp;By&nbsp;default,&nbsp;the<br>
  70. trigger&nbsp;owner&nbsp;is&nbsp;'me'.&nbsp;Other&nbsp;variables&nbsp;can&nbsp;be&nbsp;specified.&nbsp;The&nbsp;opts<br>
  71. variable&nbsp;can&nbsp;be&nbsp;a&nbsp;dictionary&nbsp;that&nbsp;maps&nbsp;optional&nbsp;variable&nbsp;names&nbsp;to&nbsp;their<br>
  72. values.</tt></dd></dl>
  73. <dl><dt><a name="Char-equip"><strong>equip</strong></a>(...)</dt><dd><tt><a href="#Char-equip">equip</a>(obj,&nbsp;positions=None,&nbsp;forced=False)<br>
  74. &nbsp;<br>
  75. Attempts&nbsp;to&nbsp;equip&nbsp;an&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;to&nbsp;the&nbsp;character's&nbsp;body.&nbsp;Positions&nbsp;can&nbsp;be&nbsp;a<br>
  76. comma-separated&nbsp;list&nbsp;of&nbsp;position&nbsp;names&nbsp;or&nbsp;position&nbsp;types.&nbsp;If&nbsp;positions<br>
  77. is&nbsp;None&nbsp;and&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;is&nbsp;of&nbsp;type&nbsp;'worn',&nbsp;attempt&nbsp;to&nbsp;equip&nbsp;the&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;to<br>
  78. its&nbsp;default&nbsp;positions.&nbsp;Setting&nbsp;forced&nbsp;to&nbsp;True&nbsp;allows&nbsp;non-worn&nbsp;objects<br>
  79. to&nbsp;be&nbsp;equipped,&nbsp;or&nbsp;worn&nbsp;objects&nbsp;to&nbsp;be&nbsp;equipped&nbsp;to&nbsp;their&nbsp;non-default<br>
  80. positions.&nbsp;Returns&nbsp;success&nbsp;of&nbsp;attempt.</tt></dd></dl>
  81. <dl><dt><a name="Char-getAuxiliary"><strong>getAuxiliary</strong></a>(...)</dt><dd><tt><a href="#Char-getAuxiliary">getAuxiliary</a>(name)<br>
  82. &nbsp;<br>
  83. Returns&nbsp;character's&nbsp;auxiliary&nbsp;data&nbsp;of&nbsp;the&nbsp;specified&nbsp;name.</tt></dd></dl>
  84. <dl><dt><a name="Char-get_alias"><strong>get_alias</strong></a>(...)</dt><dd><tt><a href="#Char-get_alias">get_alias</a>(name)<br>
  85. &nbsp;<br>
  86. Return&nbsp;character's&nbsp;alias&nbsp;by&nbsp;the&nbsp;specified&nbsp;name,&nbsp;or&nbsp;None.</tt></dd></dl>
  87. <dl><dt><a name="Char-get_bodypct"><strong>get_bodypct</strong></a>(...)</dt><dd><tt><a href="#Char-get_bodypct">get_bodypct</a>(posnames)<br>
  88. &nbsp;<br>
  89. Returns&nbsp;the&nbsp;percent&nbsp;mass&nbsp;of&nbsp;the&nbsp;character's&nbsp;body&nbsp;taken&nbsp;up&nbsp;by&nbsp;the<br>
  90. specified&nbsp;parts.&nbsp;Bodyparts&nbsp;must&nbsp;be&nbsp;a&nbsp;comma-separated&nbsp;list.</tt></dd></dl>
  91. <dl><dt><a name="Char-get_equip"><strong>get_equip</strong></a>(...)</dt><dd><tt><a href="#Char-get_equip">get_equip</a>(bodypart)<br>
  92. &nbsp;<br>
  93. Returns&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;currently&nbsp;equipped&nbsp;to&nbsp;the&nbsp;character's&nbsp;bodypart,&nbsp;or&nbsp;None.</tt></dd></dl>
  94. <dl><dt><a name="Char-get_slot_types"><strong>get_slot_types</strong></a>(...)</dt><dd><tt><a href="#Char-get_slot_types">get_slot_types</a>(obj)<br>
  95. &nbsp;<br>
  96. Returns&nbsp;a&nbsp;list&nbsp;of&nbsp;the&nbsp;bodypart&nbsp;types&nbsp;currently&nbsp;occupied&nbsp;by&nbsp;the&nbsp;<a href="__builtin__.html#object">object</a>.<br>
  97. Returns&nbsp;an&nbsp;empty&nbsp;list&nbsp;of&nbsp;the&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;is&nbsp;not&nbsp;equipped&nbsp;to&nbsp;this&nbsp;character.</tt></dd></dl>
  98. <dl><dt><a name="Char-get_slots"><strong>get_slots</strong></a>(...)</dt><dd><tt><a href="#Char-get_slots">get_slots</a>(obj)<br>
  99. &nbsp;<br>
  100. Returns&nbsp;a&nbsp;comma-separated&nbsp;list&nbsp;of&nbsp;bodypart&nbsp;names&nbsp;currently&nbsp;occupied&nbsp;by<br>
  101. the&nbsp;<a href="__builtin__.html#object">object</a>.</tt></dd></dl>
  102. <dl><dt><a name="Char-getvar"><strong>getvar</strong></a>(...)</dt><dd><tt><a href="#Char-getvar">getvar</a>(name)<br>
  103. &nbsp;<br>
  104. Return&nbsp;value&nbsp;of&nbsp;a&nbsp;special&nbsp;variable.&nbsp;Return&nbsp;0&nbsp;if&nbsp;no&nbsp;value&nbsp;has&nbsp;been&nbsp;set.</tt></dd></dl>
  105. <dl><dt><a name="Char-hasPrefs"><strong>hasPrefs</strong></a>(...)</dt><dd><tt><a href="#Char-hasPrefs">hasPrefs</a>(char_prefs)<br>
  106. &nbsp;<br>
  107. Return&nbsp;whether&nbsp;character&nbsp;has&nbsp;any&nbsp;of&nbsp;the&nbsp;specified&nbsp;character&nbsp;preferences.<br>
  108. Multiples&nbsp;can&nbsp;be&nbsp;specified&nbsp;as&nbsp;a&nbsp;comma-separated&nbsp;string.</tt></dd></dl>
  109. <dl><dt><a name="Char-hasvar"><strong>hasvar</strong></a>(...)</dt><dd><tt><a href="#Char-hasvar">hasvar</a>(name)<br>
  110. &nbsp;<br>
  111. Return&nbsp;True&nbsp;if&nbsp;a&nbsp;character&nbsp;has&nbsp;the&nbsp;given&nbsp;special&nbsp;variable.&nbsp;False&nbsp;otherwise.</tt></dd></dl>
  112. <dl><dt><a name="Char-interrupt"><strong>interrupt</strong></a>(...)</dt><dd><tt><a href="#Char-interrupt">interrupt</a>()<br>
  113. &nbsp;<br>
  114. Cancel&nbsp;any&nbsp;action&nbsp;the&nbsp;character&nbsp;is&nbsp;currently&nbsp;taking.</tt></dd></dl>
  115. <dl><dt><a name="Char-isActing"><strong>isActing</strong></a>(...)</dt><dd><tt><a href="#Char-isActing">isActing</a>()<br>
  116. &nbsp;<br>
  117. Returns&nbsp;True&nbsp;if&nbsp;the&nbsp;character&nbsp;is&nbsp;currently&nbsp;taking&nbsp;an&nbsp;action,&nbsp;and&nbsp;False<br>
  118. otherwise.</tt></dd></dl>
  119. <dl><dt><a name="Char-isInGroup"><strong>isInGroup</strong></a>(...)</dt><dd><tt><a href="#Char-isInGroup">isInGroup</a>(usergroup)<br>
  120. &nbsp;<br>
  121. Returns&nbsp;whether&nbsp;a&nbsp;character&nbsp;belongs&nbsp;to&nbsp;a&nbsp;specified&nbsp;user&nbsp;group.</tt></dd></dl>
  122. <dl><dt><a name="Char-isinstance"><strong>isinstance</strong></a>(...)</dt><dd><tt><a href="#Char-isinstance">isinstance</a>(prototype)<br>
  123. &nbsp;<br>
  124. returns&nbsp;whether&nbsp;the&nbsp;character&nbsp;inherits&nbsp;from&nbsp;a&nbsp;specified&nbsp;mob&nbsp;prototype.</tt></dd></dl>
  125. <dl><dt><a name="Char-page"><strong>page</strong></a>(...)</dt><dd><tt><a href="#Char-page">page</a>(text)<br>
  126. &nbsp;<br>
  127. Send&nbsp;text&nbsp;to&nbsp;the&nbsp;character&nbsp;in&nbsp;paginated&nbsp;form&nbsp;e.g.,&nbsp;for&nbsp;helpfiles&nbsp;and<br>
  128. .other&nbsp;large&nbsp;blocks&nbsp;of&nbsp;text.</tt></dd></dl>
  129. <dl><dt><a name="Char-see_as"><strong>see_as</strong></a>(...)</dt><dd><tt><a href="#Char-see_as">see_as</a>(thing)<br>
  130. &nbsp;<br>
  131. Returns&nbsp;the&nbsp;name&nbsp;by&nbsp;which&nbsp;a&nbsp;character&nbsp;sees&nbsp;a&nbsp;specified&nbsp;<a href="__builtin__.html#object">object</a>,&nbsp;exit,&nbsp;or<br>
  132. other&nbsp;character.</tt></dd></dl>
  133. <dl><dt><a name="Char-send"><strong>send</strong></a>(...)</dt><dd><tt><a href="#Char-send">send</a>(mssg,&nbsp;dict&nbsp;=&nbsp;None,&nbsp;newline&nbsp;=&nbsp;True)<br>
  134. &nbsp;<br>
  135. Sends&nbsp;message&nbsp;to&nbsp;the&nbsp;character.&nbsp;Messages&nbsp;can&nbsp;have&nbsp;scripts&nbsp;embedded&nbsp;in<br>
  136. them,&nbsp;using&nbsp;[&nbsp;and&nbsp;].&nbsp;If&nbsp;so,&nbsp;a&nbsp;variable&nbsp;dictionary&nbsp;must&nbsp;be&nbsp;provided.&nbsp;By<br>
  137. default,&nbsp;'me'&nbsp;references&nbsp;the&nbsp;character&nbsp;being&nbsp;sent&nbsp;the&nbsp;message.</tt></dd></dl>
  138. <dl><dt><a name="Char-send_raw"><strong>send_raw</strong></a>(...)</dt><dd><tt><a href="#Char-send_raw">send_raw</a>(mssg)<br>
  139. &nbsp;<br>
  140. Sends&nbsp;message&nbsp;to&nbsp;the&nbsp;character&nbsp;with&nbsp;no&nbsp;newline&nbsp;appended.</tt></dd></dl>
  141. <dl><dt><a name="Char-sendaround"><strong>sendaround</strong></a>(...)</dt><dd><tt><a href="#Char-sendaround">sendaround</a>(mssg,&nbsp;dict&nbsp;=&nbsp;None,&nbsp;cansee_only&nbsp;=&nbsp;False,&nbsp;newline=True)<br>
  142. &nbsp;<br>
  143. Sends&nbsp;a&nbsp;message&nbsp;to&nbsp;everyone&nbsp;in&nbsp;the&nbsp;character's&nbsp;room.&nbsp;Messages&nbsp;can&nbsp;have<br>
  144. scripts&nbsp;embedded&nbsp;in&nbsp;them&nbsp;using&nbsp;[&nbsp;and&nbsp;].&nbsp;If&nbsp;so,&nbsp;a&nbsp;variable&nbsp;dictionary<br>
  145. must&nbsp;be&nbsp;provided.&nbsp;By&nbsp;default,&nbsp;'me'&nbsp;references&nbsp;the&nbsp;person&nbsp;sendaround&nbsp;is<br>
  146. called&nbsp;on,&nbsp;and&nbsp;'ch'&nbsp;references&nbsp;each&nbsp;character&nbsp;being&nbsp;sent&nbsp;a&nbsp;message.</tt></dd></dl>
  147. <dl><dt><a name="Char-set_alias"><strong>set_alias</strong></a>(...)</dt><dd><tt><a href="#Char-set_alias">set_alias</a>(name,&nbsp;value)<br>
  148. &nbsp;<br>
  149. Set&nbsp;a&nbsp;character's&nbsp;alias.&nbsp;Value&nbsp;must&nbsp;be&nbsp;a&nbsp;string.</tt></dd></dl>
  150. <dl><dt><a name="Char-set_routine"><strong>set_routine</strong></a>(ch, routine, repeat<font color="#909090">=False</font>, checks<font color="#909090">=None</font>)</dt><dd><tt>Sets&nbsp;a&nbsp;routine&nbsp;to&nbsp;a&nbsp;character.&nbsp;Routine&nbsp;steps&nbsp;can&nbsp;constain&nbsp;commands<br>
  151. (character&nbsp;strings),&nbsp;functions&nbsp;(one&nbsp;argument,&nbsp;ch),&nbsp;or&nbsp;tuples<br>
  152. (delay,&nbsp;string&nbsp;|&nbsp;function).&nbsp;If&nbsp;a&nbsp;tuple&nbsp;is&nbsp;not&nbsp;supplied,&nbsp;the&nbsp;default<br>
  153. step&nbsp;time&nbsp;is&nbsp;used</tt></dd></dl>
  154. <dl><dt><a name="Char-setvar"><strong>setvar</strong></a>(...)</dt><dd><tt><a href="#Char-setvar">setvar</a>(name,&nbsp;val)<br>
  155. &nbsp;<br>
  156. Set&nbsp;value&nbsp;of&nbsp;a&nbsp;special&nbsp;variable&nbsp;for&nbsp;the&nbsp;character.&nbsp;Values&nbsp;must&nbsp;be<br>
  157. strings&nbsp;or&nbsp;numbers.&nbsp;This&nbsp;function&nbsp;is&nbsp;intended&nbsp;to&nbsp;allow&nbsp;scripts&nbsp;and<br>
  158. triggers&nbsp;to&nbsp;open-endedly&nbsp;add&nbsp;variables&nbsp;to&nbsp;characters.</tt></dd></dl>
  159. <dl><dt><a name="Char-startAction"><strong>startAction</strong></a>(...)</dt><dd><tt><a href="#Char-startAction">startAction</a>(delay,&nbsp;on_complete,&nbsp;on_interrupt=None,&nbsp;data=None,&nbsp;arg='')<br>
  160. &nbsp;<br>
  161. Begins&nbsp;a&nbsp;new&nbsp;delayed&nbsp;action&nbsp;for&nbsp;the&nbsp;character.&nbsp;Delay&nbsp;is&nbsp;in&nbsp;seconds.<br>
  162. on_complete&nbsp;is&nbsp;a&nbsp;function&nbsp;taking&nbsp;three&nbsp;arguments:&nbsp;the&nbsp;character,&nbsp;the<br>
  163. data,&nbsp;and&nbsp;the&nbsp;argument.&nbsp;Argument&nbsp;must&nbsp;be&nbsp;a&nbsp;string,&nbsp;data&nbsp;can&nbsp;be&nbsp;anything.<br>
  164. on_interrupt&nbsp;takes&nbsp;the&nbsp;same&nbsp;arguments&nbsp;as&nbsp;on_complete,&nbsp;but&nbsp;is&nbsp;instead<br>
  165. called&nbsp;if&nbsp;the&nbsp;character's&nbsp;action&nbsp;is&nbsp;interrupted.</tt></dd></dl>
  166. <dl><dt><a name="Char-store"><strong>store</strong></a>(...)</dt><dd><tt><a href="#Char-store">store</a>()<br>
  167. &nbsp;<br>
  168. Return&nbsp;a&nbsp;storage&nbsp;set&nbsp;representing&nbsp;the&nbsp;character.</tt></dd></dl>
  169. <hr>
  170. Data descriptors defined here:<br>
  171. <dl><dt><strong>age</strong></dt>
  172. <dd><tt>Value&nbsp;is&nbsp;the&nbsp;difference&nbsp;between&nbsp;the&nbsp;character's&nbsp;creation&nbsp;time&nbsp;and&nbsp;the<br>
  173. current&nbsp;system&nbsp;time.&nbsp;Immutable.</tt></dd>
  174. </dl>
  175. <dl><dt><strong>aliases</strong></dt>
  176. <dd><tt>A&nbsp;list&nbsp;of&nbsp;all&nbsp;aliases&nbsp;the&nbsp;character&nbsp;currently&nbsp;has&nbsp;defined.&nbsp;Immutable.</tt></dd>
  177. </dl>
  178. <dl><dt><strong>birth</strong></dt>
  179. <dd><tt>Value&nbsp;is&nbsp;the&nbsp;character's&nbsp;creation&nbsp;time&nbsp;(system&nbsp;time).&nbsp;Immutable.</tt></dd>
  180. </dl>
  181. <dl><dt><strong>bodyparts</strong></dt>
  182. <dd><tt>An&nbsp;immutable&nbsp;list&nbsp;naming&nbsp;all&nbsp;of&nbsp;the&nbsp;character's&nbsp;bodyparts.</tt></dd>
  183. </dl>
  184. <dl><dt><strong>desc</strong></dt>
  185. <dd><tt>A&nbsp;character's&nbsp;verbose&nbsp;description&nbsp;for&nbsp;e.g.,&nbsp;when&nbsp;they&nbsp;are&nbsp;looked&nbsp;at.</tt></dd>
  186. </dl>
  187. <dl><dt><strong>eq</strong></dt>
  188. <dd><tt>An&nbsp;immutable&nbsp;list&nbsp;of&nbsp;the&nbsp;character's&nbsp;worn&nbsp;equipment.<br>
  189. See&nbsp;equip()&nbsp;and&nbsp;unequip()&nbsp;for&nbsp;altering&nbsp;a&nbsp;characters&nbsp;worn&nbsp;items.</tt></dd>
  190. </dl>
  191. <dl><dt><strong>gender</strong></dt>
  192. <dd><tt>Alias&nbsp;for&nbsp;char.Char.sex</tt></dd>
  193. </dl>
  194. <dl><dt><strong>heshe</strong></dt>
  195. <dd><tt>Value&nbsp;is&nbsp;'he',&nbsp;'she',&nbsp;or&nbsp;'it'.&nbsp;Immutable.</tt></dd>
  196. </dl>
  197. <dl><dt><strong>hidden</strong></dt>
  198. <dd><tt>Integer&nbsp;value&nbsp;representing&nbsp;how&nbsp;hidden&nbsp;the&nbsp;character&nbsp;is.&nbsp;Default&nbsp;is&nbsp;0.</tt></dd>
  199. </dl>
  200. <dl><dt><strong>himher</strong></dt>
  201. <dd><tt>Value&nbsp;is&nbsp;'him',&nbsp;'her',&nbsp;or&nbsp;'it'.&nbsp;Immutable.</tt></dd>
  202. </dl>
  203. <dl><dt><strong>hisher</strong></dt>
  204. <dd><tt>Value&nbsp;is&nbsp;'his',&nbsp;'her',&nbsp;or&nbsp;'its'.&nbsp;Immutable.</tt></dd>
  205. </dl>
  206. <dl><dt><strong>inv</strong></dt>
  207. <dd><tt>An&nbsp;immutable&nbsp;list&nbsp;of&nbsp;objects&nbsp;in&nbsp;the&nbsp;character's&nbsp;inventory.<br>
  208. See&nbsp;obj.Obj.carrier&nbsp;for&nbsp;altering&nbsp;an&nbsp;item's&nbsp;carrier.</tt></dd>
  209. </dl>
  210. <dl><dt><strong>is_npc</strong></dt>
  211. <dd><tt>Value&nbsp;is&nbsp;True&nbsp;if&nbsp;character&nbsp;is&nbsp;an&nbsp;NPC,&nbsp;and&nbsp;False&nbsp;otherwise.&nbsp;Immutable.</tt></dd>
  212. </dl>
  213. <dl><dt><strong>is_pc</strong></dt>
  214. <dd><tt>Value&nbsp;is&nbsp;negation&nbsp;of&nbsp;char.Char.is_npc</tt></dd>
  215. </dl>
  216. <dl><dt><strong>keywords</strong></dt>
  217. <dd><tt>A&nbsp;comma-separated&nbsp;list&nbsp;of&nbsp;the&nbsp;keywords&nbsp;for&nbsp;referencing&nbsp;the&nbsp;character.</tt></dd>
  218. </dl>
  219. <dl><dt><strong>last_room</strong></dt>
  220. <dd><tt>The&nbsp;last&nbsp;room&nbsp;a&nbsp;character&nbsp;was&nbsp;in.&nbsp;Immutable.&nbsp;Value&nbsp;is&nbsp;None&nbsp;if&nbsp;character<br>
  221. was&nbsp;not&nbsp;previously&nbsp;in&nbsp;a&nbsp;room.</tt></dd>
  222. </dl>
  223. <dl><dt><strong>look_buf</strong></dt>
  224. <dd><tt>When&nbsp;characters&nbsp;look&nbsp;at&nbsp;something,&nbsp;the&nbsp;thing's&nbsp;description&nbsp;is&nbsp;copied&nbsp;to<br>
  225. the&nbsp;character's&nbsp;look&nbsp;buffer&nbsp;for&nbsp;processing&nbsp;before&nbsp;being&nbsp;sent.</tt></dd>
  226. </dl>
  227. <dl><dt><strong>mdesc</strong></dt>
  228. <dd><tt>The&nbsp;equivalent&nbsp;of&nbsp;mname,&nbsp;for&nbsp;room&nbsp;descriptions.</tt></dd>
  229. </dl>
  230. <dl><dt><strong>mname</strong></dt>
  231. <dd><tt>The&nbsp;character's&nbsp;name&nbsp;for&nbsp;describing&nbsp;packs,&nbsp;e.g.,<br>
  232. a&nbsp;horde&nbsp;of&nbsp;9001&nbsp;mosquitos.&nbsp;The&nbsp;number&nbsp;should&nbsp;be&nbsp;replaced&nbsp;by&nbsp;%d,&nbsp;or&nbsp;not<br>
  233. included.</tt></dd>
  234. </dl>
  235. <dl><dt><strong>mob_class</strong></dt>
  236. <dd><tt>The&nbsp;main&nbsp;prototype&nbsp;the&nbsp;mobile&nbsp;inherits&nbsp;from.&nbsp;Immutable.</tt></dd>
  237. </dl>
  238. <dl><dt><strong>name</strong></dt>
  239. <dd><tt>The&nbsp;characer's&nbsp;name,&nbsp;e.g.,&nbsp;Grunald&nbsp;the&nbsp;Baker.</tt></dd>
  240. </dl>
  241. <dl><dt><strong>notepad</strong></dt>
  242. <dd><tt>Returns&nbsp;the&nbsp;character's&nbsp;notepad,&nbsp;if&nbsp;any</tt></dd>
  243. </dl>
  244. <dl><dt><strong>objs</strong></dt>
  245. <dd><tt>An&nbsp;alias&nbsp;for&nbsp;inv&nbsp;to&nbsp;be&nbsp;consistent&nbsp;with&nbsp;how&nbsp;room&nbsp;and&nbsp;object&nbsp;contents&nbsp;are<br>
  246. accessed.</tt></dd>
  247. </dl>
  248. <dl><dt><strong>on</strong></dt>
  249. <dd><tt>The&nbsp;furniture&nbsp;the&nbsp;character&nbsp;is&nbsp;sitting&nbsp;on/at.&nbsp;Value&nbsp;is&nbsp;None&nbsp;if&nbsp;character<br>
  250. is&nbsp;not&nbsp;currently&nbsp;on&nbsp;furniture.&nbsp;Set&nbsp;value&nbsp;to&nbsp;None&nbsp;to&nbsp;remove&nbsp;a&nbsp;character<br>
  251. from&nbsp;their&nbsp;furniture.</tt></dd>
  252. </dl>
  253. <dl><dt><strong>pos</strong></dt>
  254. <dd><tt>Alias&nbsp;for&nbsp;char.Char.position.</tt></dd>
  255. </dl>
  256. <dl><dt><strong>position</strong></dt>
  257. <dd><tt>The&nbsp;character's&nbsp;current&nbsp;position&nbsp;(e.g.,&nbsp;standing,&nbsp;sleeping,&nbsp;sitting).</tt></dd>
  258. </dl>
  259. <dl><dt><strong>prototypes</strong></dt>
  260. <dd><tt>A&nbsp;comma-separated&nbsp;list&nbsp;of&nbsp;prototypes&nbsp;the&nbsp;mobile&nbsp;inherits&nbsp;from.&nbsp;Immutable.</tt></dd>
  261. </dl>
  262. <dl><dt><strong>race</strong></dt>
  263. <dd><tt>The&nbsp;character's&nbsp;race.</tt></dd>
  264. </dl>
  265. <dl><dt><strong>rdesc</strong></dt>
  266. <dd><tt>The&nbsp;character's&nbsp;description&nbsp;when&nbsp;seen&nbsp;in&nbsp;a&nbsp;room,&nbsp;e.g.,&nbsp;<br>
  267. Bob&nbsp;is&nbsp;here,&nbsp;baking&nbsp;a&nbsp;cake.</tt></dd>
  268. </dl>
  269. <dl><dt><strong>room</strong></dt>
  270. <dd><tt>The&nbsp;current&nbsp;room&nbsp;a&nbsp;character&nbsp;is&nbsp;in.&nbsp;Can&nbsp;be&nbsp;set&nbsp;by&nbsp;room&nbsp;or&nbsp;room&nbsp;key.</tt></dd>
  271. </dl>
  272. <dl><dt><strong>sex</strong></dt>
  273. <dd><tt>The&nbsp;character's&nbsp;sex.&nbsp;Can&nbsp;be&nbsp;male,&nbsp;female,&nbsp;or&nbsp;neutral.</tt></dd>
  274. </dl>
  275. <dl><dt><strong>sock</strong></dt>
  276. <dd><tt>Alias&nbsp;for&nbsp;char.Char.socket</tt></dd>
  277. </dl>
  278. <dl><dt><strong>socket</strong></dt>
  279. <dd><tt>The&nbsp;current&nbsp;socket&nbsp;this&nbsp;character&nbsp;is&nbsp;attached&nbsp;to.&nbsp;Value&nbsp;is&nbsp;None&nbsp;if&nbsp;<br>
  280. socket&nbsp;does&nbsp;not&nbsp;exist.&nbsp;Immutable.&nbsp;Use&nbsp;mudsys.attach_char_socket&nbsp;to&nbsp;<br>
  281. attach&nbsp;a&nbsp;character&nbsp;and&nbsp;socket&nbsp;to&nbsp;each&nbsp;other.</tt></dd>
  282. </dl>
  283. <dl><dt><strong>uid</strong></dt>
  284. <dd><tt>The&nbsp;character's&nbsp;unique&nbsp;identification&nbsp;number.&nbsp;Immutable.</tt></dd>
  285. </dl>
  286. <dl><dt><strong>user_groups</strong></dt>
  287. <dd><tt>A&nbsp;comma-separated&nbsp;list&nbsp;of&nbsp;user&nbsp;groups&nbsp;the&nbsp;character&nbsp;belongs&nbsp;to.<br>
  288. Use&nbsp;char.Char.isInGroup(group)&nbsp;to&nbsp;check&nbsp;for&nbsp;a&nbsp;specific&nbsp;group.&nbsp;Immutable.</tt></dd>
  289. </dl>
  290. <dl><dt><strong>weight</strong></dt>
  291. <dd><tt>Floating&nbsp;point&nbsp;value&nbsp;representing&nbsp;how&nbsp;heavy&nbsp;the&nbsp;character&nbsp;is.</tt></dd>
  292. </dl>
  293. <hr>
  294. Data and other attributes defined here:<br>
  295. <dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object at 0x6f380&gt;<dd><tt>T.<a href="#Char-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>
  296. </td></tr></table></td></tr></table><p>
  297. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  298. <tr bgcolor="#eeaa77">
  299. <td colspan=3 valign=bottom>&nbsp;<br>
  300. <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
  301. <tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  302. <td width="100%"><dl><dt><a name="-char_list"><strong>char_list</strong></a>(...)</dt><dd><tt><a href="#-char_list">char_list</a>()<br>
  303. &nbsp;<br>
  304. Return&nbsp;a&nbsp;list&nbsp;of&nbsp;every&nbsp;character&nbsp;in&nbsp;game.</tt></dd></dl>
  305. <dl><dt><a name="-count_mobs"><strong>count_mobs</strong></a>(...)</dt><dd><tt><a href="#-count_mobs">count_mobs</a>(keyword,&nbsp;loc&nbsp;=&nbsp;None)<br>
  306. &nbsp;<br>
  307. count&nbsp;how&nbsp;many&nbsp;occurences&nbsp;of&nbsp;a&nbsp;mobile&nbsp;with&nbsp;the&nbsp;specified&nbsp;keyword,&nbsp;uid,<br>
  308. or&nbsp;prototype&nbsp;exist&nbsp;at&nbsp;a&nbsp;location.&nbsp;If&nbsp;loc&nbsp;is&nbsp;None,&nbsp;search&nbsp;the&nbsp;entire&nbsp;mud.<br>
  309. Loc&nbsp;can&nbsp;be&nbsp;a&nbsp;room,&nbsp;room&nbsp;prototype,&nbsp;or&nbsp;furniture&nbsp;<a href="__builtin__.html#object">object</a>.</tt></dd></dl>
  310. <dl><dt><a name="-find_char_key"><strong>find_char_key</strong></a>(...)</dt><dd><tt>Function&nbsp;has&nbsp;been&nbsp;deprecated.&nbsp;Entrypoint&nbsp;for&nbsp;generic_find()<br>
  311. Use&nbsp;mud.parse_args&nbsp;instead.</tt></dd></dl>
  312. <dl><dt><a name="-is_abstract"><strong>is_abstract</strong></a>(...)</dt><dd><tt><a href="#-is_abstract">is_abstract</a>(proto)<br>
  313. &nbsp;<br>
  314. Returns&nbsp;whether&nbsp;a&nbsp;specified&nbsp;mob&nbsp;prototype&nbsp;is&nbsp;abstract.&nbsp;Also&nbsp;return&nbsp;True<br>
  315. if&nbsp;the&nbsp;prototype&nbsp;does&nbsp;not&nbsp;exist.</tt></dd></dl>
  316. <dl><dt><a name="-load_mob"><strong>load_mob</strong></a>(...)</dt><dd><tt><a href="#-load_mob">load_mob</a>(proto,&nbsp;room,&nbsp;pos&nbsp;=&nbsp;'standing')<br>
  317. &nbsp;<br>
  318. Generate&nbsp;a&nbsp;new&nbsp;mobile&nbsp;from&nbsp;the&nbsp;specified&nbsp;prototype.&nbsp;Add&nbsp;it&nbsp;to&nbsp;the<br>
  319. given&nbsp;room.&nbsp;Return&nbsp;the&nbsp;created&nbsp;mobile.</tt></dd></dl>
  320. <dl><dt><a name="-read"><strong>read</strong></a>(...)</dt><dd><tt><a href="#-read">read</a>(storage_set)<br>
  321. &nbsp;<br>
  322. Read&nbsp;and&nbsp;return&nbsp;a&nbsp;character&nbsp;from&nbsp;a&nbsp;storage&nbsp;set.</tt></dd></dl>
  323. </td></tr></table>
  324. </body></html>