Creating visual effects through scripting works much the same way in NWN2 as it did in NWN1. Use EffectVisualEffect() to create an effect, then ApplyEffectToObject() or ApplyEffectAtLocation() to place that effect in the game.
From the official NWN2 Documentation:
"Visual effects are composed of effect files, which are individual components of an effect (a particle system, a trail, a billboard, etc.), and SEF files, which point to the effect files and organize them into a more complex visual effect."
Effect constants start with "VFX_".
- Apply VFX_IMP_ constants instantly, to a target.
- Apply VFX_DUR_ constants for a duration, either permanent or temporary, to a target.
- Apply VFX_FNF_ constants instantly, and only at a location.