Difference between revisions of "IPRemoveAllItemProperties"

From NWN Lexicon
Jump to: navigation, search
(ca20jlyb)
(Undo revision 11654 by 46.161.9.51 (talk))
 
Line 1: Line 1:
wh0cd111183 <a href=http://sildenafil247.us.com/>Buy Sildenafil Online</a> <a href=http://stromectol247.us.com/>Stromectol</a> <a href=http://cymbaltacost.us.org/>cymbalta generic</a>
+
=IPRemoveAllItemProperties(object, int)=
 +
 
 +
Removes all itemproperties from an item.
 +
 
 +
<nwscript>
 +
void IPRemoveAllItemProperties(
 +
    object oItem,
 +
    DURATION_TYPE_TEMPORARY
 +
);
 +
</nwscript>
 +
 
 +
====Parameters====
 +
 
 +
''oItem''
 +
 
 +
Item to remove the properties from.
 +
 
 +
''nItemPropertyDuration''
 +
 
 +
[[ duration_type | DURATION_TYPE_TEMPORARY ]])
 +
 
 +
<br />
 +
 
 +
====Description====
 +
 
 +
Removes ALL item properties from oItem matching nItemPropertyDuration
 +
 
 +
<br /><br />
 +
 
 +
====Remarks====
 +
 
 +
The value for nItemPropertyDuration must be either DURATION_TYPE_PERMANENT or DURATION_TYPE_TEMPORARY. The instant duration does not apply to itemproperties. <br /><br /> If the value provided is DURATION_TYPE_PERMANENT, all permanent itemproperties are removed, leaving all temporary ones behind. And vice versa for DURATION_TYPE_TEMPORARY.
 +
 
 +
<br />
 +
 
 +
====Known Bugs====
 +
 
 +
Uses RemoveItemProperty, which has an accumulator <br /> bug that may give an erroneous Stacking error message or affect subsequent functions in the same script.- 1/16/04, NWN Toolset version vts026, game version 1.61.8042 English <br />
 +
 
 +
<br />
 +
 
 +
====Requirements====
 +
 
 +
<nowiki>#include "</nowiki>[[ x2_inc_itemprop | x2_inc_itemprop ]]"
 +
 
 +
====Version====
 +
 
 +
1.61
 +
 
 +
====Example====
 +
 
 +
<nwscript>
 +
<nowiki>#include "x2_inc_itemprop"
 +
</nowiki>
 +
//Remove all properties from entering PC's helmet.
 +
 
 +
void main()
 +
{
 +
//Entering object
 +
object oPC=GetEnteringObject();
 +
 
 +
//Only PCs
 +
if (!GetIsPC(oPC)) return;
 +
 
 +
//That PC's helmet
 +
object oItem=GetItemInSlot(INVENTORY_SLOT_HEAD, oPC);
 +
 
 +
//Stop script if the PC had no helmet on
 +
if (!GetIsObjectValid(oItem)) return;
 +
 
 +
IPRemoveAllItemProperties(oItem, DURATION_TYPE_PERMANENT);
 +
IPRemoveAllItemProperties(oItem, DURATION_TYPE_TEMPORARY);
 +
}
 +
</nwscript>
 +
 
 +
====See Also====
 +
 
 +
{| class="seealso"
 +
| width="1px" align="right" valign="top" | <font color="gray">functions: </font>
 +
|
 +
[[  RemoveItemProperty  | RemoveItemProperty ]]
 +
|-
 +
|-
 +
| width="1px" align="right" valign="top" | <font color="gray">constants: </font>
 +
|
 +
[[ duration_type | DURATION_TYPE_* Constants  ]]
 +
|}
 +
 
 +
<br />
 +
----
 +
<font color="gray">  author: Lilac Soul, editor: Peter Busby</font><br />  <br />
 +
[[Category:Functions]]
 +
[[Category:Item_Creation_Functions]]
 +
[[Category:Item_Properties_Functions]]

Latest revision as of 22:00, 12 October 2017

IPRemoveAllItemProperties(object, int)

Removes all itemproperties from an item.

void IPRemoveAllItemProperties(
    object oItem,
    DURATION_TYPE_TEMPORARY
);

Parameters

oItem

Item to remove the properties from.

nItemPropertyDuration

DURATION_TYPE_TEMPORARY )


Description

Removes ALL item properties from oItem matching nItemPropertyDuration



Remarks

The value for nItemPropertyDuration must be either DURATION_TYPE_PERMANENT or DURATION_TYPE_TEMPORARY. The instant duration does not apply to itemproperties.

If the value provided is DURATION_TYPE_PERMANENT, all permanent itemproperties are removed, leaving all temporary ones behind. And vice versa for DURATION_TYPE_TEMPORARY.


Known Bugs

Uses RemoveItemProperty, which has an accumulator
bug that may give an erroneous Stacking error message or affect subsequent functions in the same script.- 1/16/04, NWN Toolset version vts026, game version 1.61.8042 English


Requirements

#include " x2_inc_itemprop "

Version

1.61

Example

<nowiki>#include "x2_inc_itemprop"
</nowiki>
//Remove all properties from entering PC's helmet.
 
void main()
{
//Entering object
object oPC=GetEnteringObject();
 
//Only PCs
if (!GetIsPC(oPC)) return;
 
//That PC's helmet
object oItem=GetItemInSlot(INVENTORY_SLOT_HEAD, oPC);
 
//Stop script if the PC had no helmet on
if (!GetIsObjectValid(oItem)) return;
 
IPRemoveAllItemProperties(oItem, DURATION_TYPE_PERMANENT);
IPRemoveAllItemProperties(oItem, DURATION_TYPE_TEMPORARY);
}

See Also

functions: 

RemoveItemProperty

constants: 

DURATION_TYPE_* Constants



 author: Lilac Soul, editor: Peter Busby