take {
if ($instr(#quest.command#;box)$>0) then msg <You don't need the box of pencils.>
else msg <You don't need the pencils.>
}You could also use the #quest.originalcommand# variable (correct?). I know #quest.command# is valid, but I think the alt names are replaced in #quest.command#, while #quest.originalcommand# is what is inputted by the player.
ANYWAY, use the $mid(5;#quest.originalcommand#)$ and you should have a string returned that is all that the player inputs AFTER 5 characters.
Of course, if you have multi-input support (#command1#,#command2#) then I think that may screw it up... So some other parsing would be in order (checking to see if it had an ',' I suppose) and then using:
$mid(5;%length%;#quest.originalcommand#)$
msg <You take the $mid(5;#quest.originalcommand#)$.>I personally would just refer to the whole object, seeing as how the display name is (I presume) 'box of pencils'?
MaDbRiT wrote:Steve
There's no way to read an ALT name to make a decision based on it, but why not just use this for the box's 'take' tag.take {
if ($instr(#quest.command#;box)$>0) then msg <You don't need the box of pencils.>
else msg <You don't need the pencils.>
}
That way if the player mentions 'box' in his take command, it'll respond with
"You don't need the box of pencils."
if he doesn't mention the box he'll get
"You don't need the pencils."
That do it?
Al (MaDbRiT)
So you are saying there are two choices of responses? So I can't say
-You don't need the box of pencils
-You don't need the pencils
-You don't need the wooden pencils
-You don't need the broken pencils
etc...
It's ok. I just thought it would be a nice little touch. It's not a big deal though.