On Activate Poison Damage.
TheTinman
Member Posts: 74
Is there a way to add poison damage to a weapon via on activate item? I know this script does not compile because after writing it i realized there is no CONST_ONHIT_POISON
void main() { // Get the player character who activated the item object oPC = GetItemActivator(); // Get the weapon in the player's right hand object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC); // If no weapon is found, exit the script if (oWeapon == OBJECT_INVALID) { return; } // Create an "On Hit: Poison" property itemproperty ipPoison = ItemPropertyOnHitProps(IP_CONST_ONHIT_POISON, 1); // Apply the poison property to the weapon for 600 seconds (10 minutes) AddItemProperty(DURATION_TYPE_TEMPORARY, ipPoison, oWeapon, 600.0f); }
0
Comments
Looks like you'll need:
itemproperty ip = ItemPropertyOnHitProps(IP_CONST_ONHIT_ITEMPOISON,nSaveDC,nPoisonType);
They use
#include "x2_inc_itemprop"
IPSafeAddItemProperty(oTarget, ip,IntToFloat(nDuration),X2_IP_ADDPROP_POLICY_KEEP_EXISTING,TRUE,TRUE);
But you can probably do it your way.