public int SetMemory(Creature other, int value) { value = Math.Max(0, value); other.Vars.Perm["npc_memory_" + this.Name] = value; other.Vars.Perm["npc_memory_change_" + this.Name] = DateTime.Now; return value; }