User Tools

Site Tools


public_scripts:trapqvartext

TrapQVarText

Shows text on-screen when turned on. The text will be formatted with quest variable substitutions.

If you write… You get…
%{qvar} The value of the quest variable.
%?{qvar}[a][b] a if the quest variable is non-zero and b otherwise.
%=num{qvar}[a][b] a if the quest variable is equal to a number, b if it isn’t.
%>num{qvar}[a][b] The same, but if the quest variable is greater than the number.
%>num{qvar}[a][b] The same, but if the quest variable is less than the number.

After making a substitution, the new text is checked for more substitutions. You can omit the second set of square braces if you only want to optionally show the a text.

Example

%{bob} %=1{bob}[bottle][bottles] of beer on the wall.
%{bob} %=1{bob}[bottle][bottles] of beer.
%>0{bob}[Take one down and pass it around.
%{bob} %=1{bob}[bottle][bottles] of beer on the wall.][It's time to buy more beer!]
Inherits BaseTrap, BaseQVarText
public_scripts/trapqvartext.txt · Last modified: 2010/11/22 19:07 (external edit)