http://wiki.activeworlds.com/index.php?title=Category:SDK_World_Attributes
http://wiki.activeworlds.com/index.php?title=Category:SDK_Universe_Attributes
http://wiki.activeworlds.com/index.php?title=AW_EVENT_WORLD_ATTRIBUTES
http://wiki.activeworlds.com/index.php?title=AW_EVENT_UNIVERSE_ATTRIBUTES
wiki url:
http://wiki.activeworlds.com
read category %CAT%:
%WIKI%/index.php?title=Category:%CAT%
in html file:
find:
#<div id="mw-pages">(.*)</div>#mi (whatever the multiline modifier is)
after that, find each (this is a configurable regex with wildcard parsing like worldchatfilter):
<ul><li><a href="*" title="*">*</a></li>
%WIKI% + $1 above is a page url, load it
CALLBACK FUNCTION for each page:
parse out rights and capabilities
in page html file:
get everything after:
<div id="bodyContent">
find:
#<pre>AW_UNIVERSE_(.*)</pre>#mi
trim() it
find:
#<a name="Type"></a><h2>(.*)</h2>([\s]*)<p>([\w]+)([\s]*)</p>#mi
$2 above is the data type, strtolower() it and validate it
omnibot.pehjota.com/attribdefs/world.conf
# OmniBot AttribDefs - world attributes
[features]
AW_WORLD_ALLOW_3_AXIS_ROTATON = bool
AW_WORLD_ALLOW_AVATAR_COLLISION = bool
...
[rights]
AW_WORLD_BUILD_RIGHT = string
AW_WORLD_EJECT_RIGHT = string
...
AttributesManager class
$worldattributes and $universeattributes objects
bot would remoteRead file
extract substring starting at position of first occurence of:
"# OmniBot AttribDefs"
save contents locally (maybe to cache/worldattribs.conf)
read through bot_conf_read()
foreach on features and rights
if (!defined($key))
continue;
switch ($val) {
case "bool":
$this->types[constant($key)] = 0;
break;
case "int":
$this->types[constant($key)] = 1;
break;
case "float":
$this->types[constant($key)] = 2;
break;
case "string":
$this->types[constant($key)] = 3;
break;
}
get_type($attrib) - returns type name ("bool", "int", etc)
get_function($attrib) - returns attribute getter function name ("aw_bool", "aw_int", etc)
get_set_function($attrib) - returns attribute setter function name ("aw_bool_set", "aw_int_set", etc)
$attrib could be int (aw attribute) or string (parsable attribute name)