Im looking to add a new power in the game and i just want to know if this is possible, basically the power would replace the targeted npc model with a different one for a specified duration (i.e 1 or 2 rounds) and add a confuse spell to the same npc the same duration

Edit: ok i know i have to do this via script, however since im at work , , and i dont have access to any kotor files or scripts would the script be similiar to this

Code:

void main()
{
// This is the Object to apply the effect to.
object oTarget = OBJECT_SELF;
// Create the effect to apply: the "*" is whatever i want
effect ePoly = EffectPolymorph(POLYMORPH_TYPE_*);
// Create the visual portion of the effect. This is instantly
// applied and not persistant with wether or not we have the
// above effect.
effect eVis = EffectVisualEffect(VFX_IMP_EVIL_HELP);
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
// Apply the visual effect to the target
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
// Apply the effect to the object
ApplyEffectToObject(DURATION_TYPE_PERMANENT, ePoly, oTarget);
// Apply the duration effect for fDuration.
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oPC, fDuration);
}

just need help figuring out how to implement the

Code:

ActionCastSpellAtObject

Function to the script as well as implementing on attack of force power