Clear out experimental .35 files

Clear out experimental .35 files
This commit is contained in:
Jaysyn904
2024-02-11 13:04:14 -05:00
parent 2112b92e24
commit 618cd42b82
22356 changed files with 0 additions and 1248956 deletions

View File

@@ -1,34 +0,0 @@
void WrapperDelayRemoval(float fDuration);
void CheckAndRemove(int nSpellId, int nTimesCast, object oTarget);
void main() // This would be the spell script.
{
float fDuration = 4.0; // fDuration = the duration of the tempoary effect
WrapperDelayRemoval(fDuration);// Put this at the end of all spell scripts with polymorph in
}
void WrapperDelayRemoval(float fDuration)
{
int nSpell = GetSpellId();
int nCastTimes = GetLocalInt(OBJECT_SELF, "TIMES_CAST" + IntToString(nSpell));
nCastTimes++; // Add one to cast times
SetLocalInt(OBJECT_SELF, "TIMES_CAST" + IntToString(nSpell), nCastTimes);
DelayCommand(fDuration, CheckAndRemove(nSpell, nCastTimes, OBJECT_SELF));
}
void CheckAndRemove(int nSpellId, int nTimesCast, object oTarget)
{
if(GetHasSpellEffect(nSpellId, oTarget) &&
GetLocalInt(oTarget, "TIMES_CAST" + IntToString(nSpellId)) == nTimesCast)
{
effect eCheck = GetFirstEffect(oTarget);
while(GetIsEffectValid(eCheck))
{
if(GetEffectSpellId(eCheck) == nSpellId)
{
RemoveEffect(oTarget, eCheck);
}
eCheck = GetNextEffect(oTarget);
}
}
}