Nick said in reply to above: "I think the problem is, you don't necessarily know which is the last colourtell."
I don't know if that was the issue when I reread this thread.. I think Neva knows what 'order' the trigger lines were coming in (Neva: "All the multiple lines arrive at the exact same time, it's one set, the game just inserts line breaks"), even though they were all 'at once' so to speak, if I read it correctly, there still is an order to them?
I mean with this example Neva gave
sub Test1 (sTrigName,sTrigOutput,aWildcards)
world.colourtell "yellow", "blue", "Test."
world.colourtell "red", "blue", "Test."
end sub
just change that last bit to colournote instead of colourtell and it's fine.
..although, if Neva means that the above is one subroutine and then he wanted a separate subroutine to add on to the SAME line produced by the above one.. yeah then I see the problem. As I see it, World.ColourNote basically ends the line, anything following would be on a new line, right? Whereas World.ColourTell is waiting for another bit of script to follow it (whether it's world.ColourTell or World.ColourNote does not matter) before it will spit out the desired piece of that line in the correct format.
If that's the case, then this becomes something like multi-line triggering which is an entirely different matter. Am I on the right track here?
addon:
yeah rereading this thread again, and I think I'm on the right track. Nick you suggested on Thu 06 Feb 2003 04:09 PM what I would too, to use variables.
Neve replied "But, see, the tells themselves work. It merges into one line perfectly. ..The colors are the only thing that don't work properly"
and that's because the last one that is sent is a World.ColorTell and not a World.ColorNote.
In this example Neva gave:
Quote:
sub Test1 (sTrigName,sTrigOutput,aWildcards)
world.colourtell "yellow", "blue", "Test1."
end sub
sub Test2 (sTrigName,sTrigOutput,aWildcards)
world.colourtell "blue", "yellow", "Test2."
end sub
If Test1 is a Trigger that matches 'Blah1', and Test2 is a trigger that matches 'Blah2', both omitting from output, and each string arrives on a separate line one after the other, like so...
Blah1
Blah2
...then you'd expect that at the very least, you'd end up with the two colourtells on separate lines, but working otherwise. No such luck; what you get is:
Test2.
in plain output colors, no "Test1." anywhere to be seen.
if you changed the second one to World.ColourNote, does it work as desired? Guess I should try it for myself.
...( a few minutes later)
no it doesn't work, and that does not surprise me. They are still separate triggers and separate subroutines and the example above will only work if both are world.colorNote and then they display on separate lines.
The reason only Test2 came out in the above example is not immediately clear to me, I guess MC had to do something and that was it :) but it still sounds like multiline triggering as far as I can see.
For example, on the mud I play if I type: save demon
what comes back is:
demon saved.
items saved.
both arrive 'at the same time', but they are still separate lines.
Neva you said "But, see, the tells themselves work. It merges into one line perfectly. ..The colors are the only thing that don't work properly"
I don't see how it worked, because you then gave the example above which clearly doesn't work. Are you saying that somehow you already have 3 seperate subroutines that are each doing worldnotes and they all merge onto one line? Maybe I'm just confusing myself here, but I didn't think that was possible.
When I tried my example using your script above and 'save demon' from the mud I use as above, although I had omit from output selected, I still saw the output.. what I got was
demon saved.
Test2. items saved.
since you are repeating the same line but trying to repeat them in colour, maybe you thought it was merging the lines when in fact it wasn't. See what I mean? It's just spitting out whatever it can.. |