182 lines
5.1 KiB
Plaintext
182 lines
5.1 KiB
Plaintext
//Put this script OnUsed
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetLastUsedBy();
|
|
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
object oTarget;
|
|
oTarget = oPC;
|
|
|
|
effect eEffect;
|
|
eEffect = EffectHeal(1800);
|
|
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_ABILITY_DECREASE) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_ATTACK_DECREASE) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_BLINDNESS) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_CHARMED) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_CONFUSED) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_CURSE) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_CUTSCENEIMMOBILIZE) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_CUTSCENE_PARALYZE) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_DEAF) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_DAZED) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_FRIGHTENED) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_MOVEMENT_SPEED_DECREASE) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_NEGATIVELEVEL) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_POISON) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_SAVING_THROW_DECREASE) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_REGENERATE) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_SPELL_RESISTANCE_DECREASE) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_TEMPORARY_HITPOINTS) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_SILENCE) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_SKILL_DECREASE) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
eEffect = GetFirstEffect(oTarget);
|
|
while (GetIsEffectValid(eEffect))
|
|
{
|
|
if (GetEffectType(eEffect)==EFFECT_TYPE_VISUALEFFECT) RemoveEffect(oTarget, eEffect);
|
|
eEffect = GetNextEffect(oTarget);
|
|
}
|
|
|
|
//Visual effects can't be applied to waypoints, so if it is a WP
|
|
//the VFX will be applied to the WP's location instead
|
|
|
|
int nInt;
|
|
nInt = GetObjectType(oTarget);
|
|
|
|
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_TORNADO), oTarget);
|
|
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_TORNADO), GetLocation(oTarget));
|
|
|
|
}
|
|
|