CreateTable2Item
Contents |
[edit] CreateTable2Item(object, object, int)
Randomly creates an item on an object.
void CreateTable2Item( object oTarget, object oAdventurer, int nSpecific = 0 );
[edit] Parameters
oTarget
Object to receive the item (Most likely a placeable with an inventory.)
oAdventurer
PC whose class is to be used for creating item.
nSpecific
If 0, a generic item is created. If 1, a specific item is created. (Default: 0)
[edit] Description
* if nSpecific is = 1 then spawn in 'named' items at the higher levels
Based upon the class of the PC provided as oAdventurer, this function will randomly call one of a list of functions used for creating items on objects, such as CreateGenericHeavyArmor or CreateSpecificMartial.
[edit] Remarks
Found in: nw_o2_coninclude.nss: 4008
Remarks: Class of PC is found using nDetermineClassToUse, which is a function that does exactly the same as DetermineClassToUse in nw_i0_generic. Very nice of them to give it a different name so it is possible to include both these include files in a script without getting a duplicate function error (try using nw_i0_plot and nw_i0_tool in the same script â wonât work!)
Then, depending on the class found, probabilities for each type of item is determined, and compared with a d100 roll to create the item. The actual item creation takes place by calling other functions in nw_i0_coninclude.
This can be used to create the item in any object with an inventory.
[edit] Requirements
#include " nw_o2_coninclude "
[edit] Version
1.61
[edit] See Also
author: Lilac Soul, additional contributor(s): Lilac Soul