Show polsysem.html syntax highlighted
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>POL Scripting Reference</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="POL, EScript, documentation" name=keyword>
<META content="Racalac, Rykard" name=Author>
<STYLE type=text/css>BODY {
FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
TD {
FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
P {
FONT-WEIGHT: normal; FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
</STYLE>
</HEAD>
<BODY bgColor=#f0f0f0><?xml version="1.0" encoding="UTF-8"?>
<P style="FONT-WEIGHT: bold; FONT-SIZE: 14pt; TEXT-ALIGN: left">File:
POLsys.em</P>
<P style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; TEXT-ALIGN: left">Description:
Functions to access POL system data.<BR>Last Modified: 6/18/2003</P>
<TABLE cellSpacing=0 cellPadding=1 rules=groups width="75%" align=center
bgColor=#dddddd border=1 frame=box>
<TBODY>
<TR><A name=#GetItemDescriptor>
<TH align=middle colSpan=2>GetItemDescriptor(objtype)</TH></A></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Parameters:</TH></TR></TBODY>
<TBODY>
<TR bgColor=#d4d4d4>
<TD>Name</TD>
<TD>Type</TD></TR></TBODY>
<TBODY>
<TR>
<TD width="50%"><VAR>objtype</VAR></TD>
<TD>int Objtype OR string ObjtypeName</TD></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Explanation</TH></TR></TBODY>
<TBODY>
<TR>
<TD colSpan=2>Returns a struct of all itemdesc.cfg properties for the
objtype.</TD></TR>
<TR>
<TD colSpan=2>The keys are the property names, i.e. "Color", "Desc", etc.
The values can be String, Integer, Real. The exceptions are "CProps" and
"StackingIgnoresCProps". "CProps" is a dictionary where the CProp name is
the key, and the value can be any packable type (i.e. array, struct,
etc.). "StackingIgnoresCProps" is an array of strings.</TD></TR>
<TR>
<TD colSpan=2>The primary use of this function is to pass it to any of the
item creation functions, and the values in the struct will be used in
place of the static itemdesc.cfg values. Use it to assign specific
properties to an item during creation, rather than after. This allows
easier stacking with existing item stacks.</TD></TR>
<TR>
<TD colSpan=2>Note not all properties can be assigned per-item, so editing
the value in the descriptor struct will not be passed to the new item.
</TD></TR>
<TR>
<TD colSpan=2><PRE>//For example, to stack with an existing stack with color 0x10 and cprop
use uo;
use polsys;
program testdesc(who,objtype)
var ret := GetItemDescriptor(CInt(objtype));
ret.Color := 0x10;
ret.CProps.insert("blah","1"); //assuming the existing stack have this color and cprop
ret.StackingIgnoresCProps.append("blingbling");
var item := CreateItemInBackpack(who,ret,10);
if(item)
print("OK!");
endif
endprogram</PRE></TD></TR>
<TR>
<TD colSpan=2><PRE>To print the contents of the struct:
var ret := GetItemDescriptor(objtype);
foreach thing in ret
print(_thing_iter + ": " + thing);
endforeach</PRE></TD></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Return values</TH></TR></TBODY>
<TBODY>
<TR>
<TD colSpan=2>A struct of all itemdesc.cfg properties and
values.</TD></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Errors</TH></TR></TBODY>
<TBODY>
<TR>
<TD colSpan=2>"Invalid parameter type"</TD></TR>
<TR>
<TD colSpan=2>"Itemdesc.cfg entry for objtype X not found."</TD></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Related Configs</TH></TR></TBODY>
<TBODY>
<TR>
<TD colSpan=2><A
href="configfiles.html#itemdesc.cfg"><B>itemdesc.cfg</B></A></TD></TR></TBODY></TABLE><BR><BR><BR>
<TABLE cellSpacing=0 cellPadding=1 rules=groups width="75%" align=center
bgColor=#dddddd border=1 frame=box>
<TBODY>
<TR><A name=#Packages>
<TH align=middle colSpan=2>Packages()</TH></A></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Explanation</TH></TR></TBODY>
<TBODY>
<TR>
<TD colSpan=2>Get an array of "package objects", with "name" and
"supports_http" members. (more info TBD)</TD></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Return values</TH></TR></TBODY>
<TBODY>
<TR>
<TD colSpan=2>An array of package objects.</TD></TR></TBODY></TABLE><BR><BR><BR>
<TABLE cellSpacing=0 cellPadding=1 rules=groups width="75%" align=center
bgColor=#dddddd border=1 frame=box>
<TBODY>
<TR><A name=#ReadMillisecondClock>
<TH align=middle colSpan=2>ReadMillisecondClock()</TH></A></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Explanation</TH></TR></TBODY>
<TBODY>
<TR>
<TD colSpan=2>Returns a long integer of the current millisecond clock.
TBD: timebase of clock, saved with server?</TD></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Return values</TH></TR></TBODY>
<TBODY>
<TR>
<TD colSpan=2>Current time in
milliseconds.</TD></TR></TBODY></TABLE><BR><BR><BR>
<TABLE cellSpacing=0 cellPadding=1 rules=groups width="75%" align=center
bgColor=#dddddd border=1 frame=box>
<TBODY>
<TR><A name=#ReloadConfiguration>
<TH align=middle colSpan=2>ReloadConfiguration()</TH></A></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Explanation</TH></TR></TBODY>
<TBODY>
<TR>
<TD colSpan=2>reloads pol.cfg (most entries) and npcdesc.cfg</TD></TR>
<TR>
<TD colSpan=2>Linux: HUP signal will cause ReloadConfiguration to be
called.</TD></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Return values</TH></TR></TBODY>
<TBODY>
<TR>
<TD colSpan=2>1</TD></TR></TBODY></TABLE><BR><BR><BR>
<TABLE cellSpacing=0 cellPadding=1 rules=groups width="75%" align=center
bgColor=#dddddd border=1 frame=box>
<TBODY>
<TR><A name=#SetSysTrayPopupText>
<TH align=middle colSpan=2>SetSysTrayPopupText(text)</TH></A></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Parameters:</TH></TR></TBODY>
<TBODY>
<TR bgColor=#d4d4d4>
<TD>Name</TD>
<TD>Type</TD></TR></TBODY>
<TBODY>
<TR>
<TD width="50%"><VAR>text</VAR></TD>
<TD>String tooltip text for systray icon</TD></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Explanation</TH></TR></TBODY>
<TBODY>
<TR>
<TD colSpan=2>Sets the systray icon's tooltip text (win32
only)</TD></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Return values</TH></TR></TBODY>
<TBODY>
<TR>
<TD colSpan=2>1</TD></TR></TBODY></TABLE><BR><BR><BR>
<TABLE cellSpacing=0 cellPadding=1 rules=groups width="75%" align=center
bgColor=#dddddd border=1 frame=box>
<TBODY>
<TR><A name=#StorageAreas>
<TH align=middle colSpan=2>StorageAreas()</TH></A></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Explanation</TH></TR></TBODY>
<TBODY>
<TR>
<TD colSpan=2>Get an array of "Storage area objects", with "count" member,
and [] operator. (more info TBD)</TD></TR></TBODY>
<TBODY>
<TR bgColor=#cccccc>
<TH align=left colSpan=2>Return values</TH></TR></TBODY>
<TBODY>
<TR>
<TD colSpan=2>?</TD></TR></TBODY></TABLE><BR><BR><BR>
<HR>
<P style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; TEXT-ALIGN: center">If you know if
any information is incorrect on these pages, mail your corrections to
racalac@burdell.org </P>
<P style="FONT-WEIGHT: bold; FONT-SIZE: 7pt; TEXT-ALIGN: center">Copyright ©2003
David Carpman, all rights reserved. DO NOT REPRODUCE, MIRROR, ALTER, SPINDLE,
MUTILATE, OR SIT ON. </P></BODY></HTML>
See more files for this project here