ApplyEffectToObject

The   NWScript command causes the indicated effect to affect the indicated object for the indicated duration. Not all effects are appropriate for all duration types, but this command does not enforce that; it is left up to the scripter to avoid such things.

This is the primary way to inject effects (other than some visual effects) into the game.

Definition
An effect is not guaranteed to persist for its entire duration, as there are several means of removing effects in the game. The effect will not persist for longer than the indicated duration, though. Note, however, that some effects have side-effects that will persist after the effect has expired. (In particular, damaging effects get applied instantly, but the damage is not spontaneously healed.)

Static placeables are intended to be unchanged while playing. As such, applying effects to them (i.e. attempting to change them) tends to be futile.