Going to just do "sh_hungerer" for now because I've had better luck reproducing the bug with the acid cloud but I still can't do it most of the time. And it doesn't seem odd to me -- somehow an infinite loop seems to be occurring (bear gets hit with acid damage 14+ times in a split second) which both causes an error in the script controlling the acid damage and the script firing when the acid damage is taken.
Editing/modifying some stuff which isn't relevant to the acid cloud itself...
#include "sh_library"
#include "nw_i0_2q4luskan"
void Hungerer();
void main()
{
AdjustLocalInt(OBJECT_SELF, "siphon", 1);
AdjustLocalInt(OBJECT_SELF, "global", 1);
DelayCommand(6.0, AdjustLocalInt(OBJECT_SELF, "global", -1));
SpeakString("*Chitter chitter*");
Hungerer();
}
void Hungerer()
{
[Makes sure boss isn't dead]
else
{
[Do some stuff on the first call]
else if (!GetLocalInt(OBJECT_SELF, "global") && !GetLocalInt(OBJECT_SELF, "spit"))
{
Spit(25, 6.0, 18.0);
}
DelayCommand(1.0, Hungerer());
AdjustLocalInt(OBJECT_SELF, "timer", 1);
}
}
"sh_library" has the Spit functions which are...
//// - Spits acid on the ground, dealing increasing damage to anything in
//// it every second for 30 seconds
void Spit(int nDam, float fGlobal, float fCooldown)
{
AdjustLocalInt(OBJECT_SELF, "spit", 1);
DelayCommand(fCooldown, AdjustLocalInt(OBJECT_SELF, "spit", -1));
AdjustLocalInt(OBJECT_SELF, "global", 1);
DelayCommand(fGlobal, AdjustLocalInt(OBJECT_SELF, "global", -1));
// Get the nearest PC within 30 meters
object oTarget = GetNearestPCTarget();
if (!GetIsObjectValid(oTarget))
{
return;
}
SpeakString("*" + GetName(OBJECT_SELF, TRUE) + " SPITS ACID*");
location lTarget = GetLocation(oTarget);
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectAreaOfEffect(AOE_PER_FOGACID, "sh_blank", "sh_blank", "sh_blank"), lTarget, 36.0);
Spit2(lTarget, 36, nDam);
}
void Spit2(location lTarget, int nDur, int nDam)
{
int nAdjust;
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 4.0, lTarget);
while (GetIsObjectValid(oTarget))
{
if (GetIsEnemy(oTarget))
{
nAdjust = AdjustDamage(nDam, oTarget);
AssignCommand(oTarget, SpeakString("Took damage from cloud"));
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nAdjust), oTarget);
}
oTarget = GetNextObjectInShape(SHAPE_SPHERE, 4.0, lTarget);
}
if (!GetIsDead(OBJECT_SELF) && nDur > 0)
{
nDam = (3*nDam)/2;
if (nDam > 1000)
{
nDam = 1000;
}
DelayCommand(1.0, Spit2(lTarget, --nDur, nDam));
}
}
I can post the whole code if desired but that's the stuff that has any relation to the acid cloud.