I've taken the liberty of changing the topic from "How to deal with the problem?" to "How to write trigger for text without newline?" to be more helpful for people trying to search for this later on.
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
Ahh, that explains a lot. Hmm... You might want to try enabling "Convert IAC EOR/GA to newline". It's in Game -> Configure -> Output, at the bottom of the list on the right.
If that doesn't work, there's not much more you can do. If all of these questions come in the same order every time, you can try triggering on a line right before the first question, and sending your answers all at once. It's a little hacky, but under the circumstances...
First, Mud send the question A to me. I make a trigger on question A and send $world->Send('2'); to script. But The mud can't send the question B to me. It Send the question B and C to me after I input the "enter" in command window. It only ask me answer the question C.
If I send the $world->Send('2');$world->Send('1'); to the script. It still can't display next question. Only after I inut the "enter", it send the the question B,C and Dto me and ask me answer the question D.
If I don't input the "enter", it can't trigger the trigger and send answer to server even I choice send it to world immediate with 2.
Amended on Sun 23 May 2010 03:11 AM (UTC) by Tianxz
Message
I use the Send and Execute to try it. But both can't work correctly.
The problem is
The mud ask me a Question A. Then the trigger will answer this question with 2. I use the command:/$world.Send('2');
Then the mud continue ask me another Question.
I trace it and find the trigger doesn't work before I input the "Enter". The trigger on question A only work after I input "enter". So I think the regular expression is good. It can't work after I input "enter" if it is wrong. I find when I input the "enter" just send the answer to question 2. But I don't know where is the problem.
Please make sure you're using Execute, not execute, and Send, not send. Other than that... well, please explain exactly what you mean by "can't work correctly".
Though, neither of them needs a newline at the end, they both add one automatically. Perhaps you should try quoting the number, that is, "2" instead of 2. $world->Execute("2") should work fine.
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.