quite easy, though i am impressed by the question
it's actually rare when someone asks a question that require thinking Oo
ok here is what you do:
make 26 new heroes, one for each english letter
name each of them something like #^s9$ or whatever
in your message do something like:
\n[10]\n[5]
and then make a common parallel process (common event set as parallel trigger, you will need a switch, turn some switch on when the game starts)
and it should look like:
if item X is possessed then
-change hero name(10): h
else
-change hero name(10): #
if item Z is possed then
-change hero name(5): i
else
-change hero name(5): +
and then when you'll talk to the npc it will say
%+
or
h+
or
%i
or
hi
depending on the items