The problem is not the random text as such, as that you are using a script. Quest creates a prefix, "thing 1: ". If the object has a message, it adds that message to the prefix, then prints the lot, so it goes on one line. If the object has a script instead, it prints the prefix on one line, then runs the script. Your script then has its own "msg" command, where it prints your text on its own line.
One way to solve it would be to copy the DoTake function to your game, and replace this:
case ("script") {
if (ismultiple) {
msg (prefix)
}
do (object, "take")
takemsg = ""
}
With this:
case ("script") {
if (ismultiple) {
do (object, "takemultiple")
}
else {
do (object, "take")
}
takemsg = ""
}
Then for each object that you have a script for taking, add another script called "takemultiple", which does the same, except the message has "thing 2: " at the start.