1. Script Name: scr_act_ichor01
2. What it does: This is basically a cursed potion I created. It
temporarily lowers some statistics and animates the PC to look drunk.
3. Notes: Place the script in Module Properties | Events |
OnActivateItem. You'll need to change the tag to your item tag. When
creating the custom potion, Assign Property, "Unique Power Self Only".
This should be the only property (unless of course, you want others! -
haven't tested that).
4. The Script itself
NWScript: void main()
{
object oItemActivated = GetItemActivated();
if(GetTag(oItemActivated) == "Ichor01")
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectAbilityDecrease(ABILITY_INTELLIGENCE, 3), GetItemActivator(), 30.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectAbilityDecrease(ABILITY_DEXTERITY, 4), GetItemActivator(), 30.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectAbilityDecrease(ABILITY_CONSTITUTION, 0), GetItemActivator(), 30.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectAbilityDecrease(ABILITY_CHARISMA, 1),
GetItemActivator(), 30.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectAttackDecrease(1, ATTACK_BONUS_MISC),
GetItemActivator(), 30.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,
EffectSavingThrowDecrease(1, 1, SAVING_THROW_TYPE_ALL), GetItemActivator(), 30.0);
AssignCommand(GetItemActivator(),
ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_DRUNK, 1.0, 30.0));
}
}
I'm also going to put in a "knockdown" effect later
_________________
To crush your enemies, to see them driven before you and to hear the
lamentation of the women.
|