by adding to the end of the function:
Code: Select all
if (gDelayCondition[0]) {
CHAR szCond[MAX_STRING];
strcpy_s(szCond, gDelayCondition);
ParseMacroParameter(GetCharInfo()->pSpawn, szCond);
DOUBLE Result;
if (!Calculate(szCond, Result)) {
FatalError("Failed to parse /delay condition '%s', non-numeric encountered", szCond);
return;
}
if (Result != 0) {
// DebugSpewNoFile("/delay ending early, conditions met");
gDelay = 0;
bRunNextCommand = true;
}
}


donations for this month's patches.