Never use rand(), use lichking->GetPositionX() + frand(-5.0f, 5.0f)