Give Me a Break - </br> -vs- |

I am using this mess in msgDrop:

msgDrop:"{ifHeld:itemName:{class:classOne:Text to print. |New Line Text}:Other text to print}",

When I use the | to break the line I lose the CSS formatting after the break.
However, when I use </br> the formatting sticks

msgDrop:"{ifHeld:itemName:{class:classOne:Text to print. </br>New Line Text}:Other text to print}",

The obvious way to mitigate this is to just use </br>. However if we can get | to work that would be great too.


The problem is that the vertical bar takes precedence; first Quest breaks the string where there are vertical bars, and then it does the text processor stuff. Using <br/> is a solution, but not a great one - I think you will find the line spacing is odd, as everywhere else Quest uses <p>. You may be able to use CSS to correct that. You could also try </p><p>; not sure how that will work out...

That said, "msgDrop" should only be used if the command is successful, which would only be if the item is held (hmm, NPCs dropping stuff may be different), so would you be better doing:

msgDrop:"{class:classOne:Text to print.}|{class:classOne:New Line Text}",

Or perhaps using an "afterDrop" function, depending on what that second line is?


Ha Ha.

Sorry that was a more confusing example then I intended it to be... In the code I am dropping the apple and testing for whether Columbus is holding Rudy to control if something is said in the voice of Rudy when the apple is dropped.

Anyway, I want to use the bar, so while your final example requires more typing for this lazy programmer (well a cut and paste...) that's the way to go.

Thanks


Log in to post a reply.

Support

Forums