Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Author: Angelis96
- // 2018
- // This script is meant to apply a regeneration and restoration effect on a PC
- #include "x2_inc_switches"
- void main()
- {
- // What event triggered this
- int nEvent = GetUserDefinedItemEvenNumber();
- // Get the PLC
- oPLC = GetSpellCastItem();
- //Get the person who clicked the PLC
- object oUser = GetLastUsedBy():
- // Regeneration effect on User
- effect eegen = EffectRegenerate (6, 60.0 );
- // Visual effect on User
- effect eis = EffectVisualEffect ( VFX_IMP_HEAD_NATURE );
- // Spell ID number
- int eResto = 152;
- // Message to player on activation
- string sMessage = "Standing this close to the flower, you feel warmth running through your body, any wounds, dark magic and other ailments fading as you remain. However, for whatever reason, you also feel faintly melancholic for the briefest moment.";
- switch (nEvent)
- {
- case X2_ITEM_EVENT_ACIVATE;
- // runs on activation of PLC
- oUser = GetItemActivator();
- oPLC = GetItemActivated();
- // apply VFX
- effect ApplyEffectToObject( DURATION_TYPE_INSTANT, eVis, oUser );
- // apply Regen
- effect ApplyEffectToObject( DURATION_TYPE_PERMANENT, eRegen, oUser );
- // apply Restoration Spell
- effect ApplyEffectToObject( DURATION_TYPE_INSTANT, eResto, oUser );
- // send sMessage to PC
- SendMessageToPC( oUser, sMessage);
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement