211
Script Request / Respawn script?
« on: January 06, 2005, 09:25:53 AM »
Ok.. Better safe than sorry I guess.. I got the remove ffects striaght out of Lexicon so it should work..
Code: [Select]
void main()
{
object oPC = GetLastPlayerDied();
effect eBad = GetFirstEffect(oPC);
DelayCommand(5.0,ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPC));
DelayCommand(5.0,ForceRest(oPC));
while(GetIsEffectValid(eBad))
{
if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE ||
GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
GetEffectType(eBad) == EFFECT_TYPE_DEAF ||
GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL)
{
RemoveEffect(oPC, eBad);
}
eBad = GetNextEffect(oPC);
}
}