These two are close to un-codable, as far as I know. You'd have to combine a talking NPC with a selling NPC which of I'm not sure if it is even possible and the @ali2, @ali3 etc command has been suggested a lot of times already and experienced developers have explained that this, as well, would be very hard to do.