void Water_Exit(object oPC) { // Loop through effects on PC and remove movement rate decreases effect eSlow = GetFirstEffect(oPC); while(GetIsEffectValid(eSlow)) { if(GetEffectType(eSlow) == EFFECT_TYPE_MOVEMENT_SPEED_DECREASE) { RemoveEffect(oPC, eSlow); } eSlow = GetNextEffect(oPC); } // Mark the PC as not being under water now SetLocalInt(oPC, "UNDERWATER", 0); // The following will reset all counters, DCs, etc in case they fall in the trap again // Set the Drowning Round to zero SetLocalInt(oPC, "ROUND", 0); // Reset the DC of holding their breath SetLocalInt(oPC, "DC", 0); // Reset the Drown counter SetLocalInt(oPC, "DROWN", 0); }