#include "x2_inc_itemprop"
//The include is for the IPSafeAddItemProperty function

//Makes the PC speaker's onhand weapon glow electrically. Doesn't affect
//the damage it deals, and it will only work on melee weapons


//This is to make sure you don't stack visual effect, replace the one
//that is currently on the weapon.

void IPSafeAddItemProperty(
    object oItem,
    itemproperty nip,
    float fDuration = 0.0f,
    int nAddItemPropertyPolicy = X2_IP_ADDPROP_POLICY_REPLACE_EXISTING,
    int bIgnoreDurationType = FALSE,
    int bIgnoreSubType = FALSE
);


void main()
{
object oPC = GetPCSpeaker();
object oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
if (!GetIsObjectValid(oItem)) return;

itemproperty ipAdd = ItemPropertyVisualEffect(ITEM_VISUAL_ACID);

IPSafeAddItemProperty(oItem, ipAdd);
}