Manual:DIL Manual/getaffects()

From DikuMUD Wiki
< Manual:DIL Manual
Revision as of 22:24, 6 March 2022 by Papi (talk | contribs) (Created page with "= stringlist getaffects(u : unitptr) = u : The unit to scan for affects result : Returns stringlist of affects as described below. '''Example''': sl := getaffects(sel...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

stringlist getaffects(u : unitptr)

 u : The unit to scan for affects
 result : Returns stringlist of affects as described below.

Example:

 sl := getaffects(self);

For each affect on a unit, two strings are added to the stringlist. The first string is the description of what gets modified, e.g. an ability. The second string contains the three data value data0,data1 and data2, as well as the duration left.

Could look like this:

 {"Ability Adjustment", "6,6,0,-1",
  "Weapon adjustment", "12,14,0,-1"}

Use the split() command to separate the numerical values.


See also:

 > isaff()
 > addaff()
 > getaffects()