<!--Saved by Quest 5.5.5173.27901-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="PaintText2">
<version>1.0</version>
<firstpublished>2014</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
<object name="book">
<inherit name="editor_object" />
<look>It looks like an old textbook. {if book.painted: It is defaced with paint spelling out "{book.paintedtext}".}</look>
</object>
<object name="desk">
<inherit name="editor_object" />
<look></look>
<look>It's an old-fashioned hardwood desk {if desk.painted: with "{desk.paintedtext}" painted on it.}</look>
</object>
<object name="wall">
<inherit name="editor_object" />
<scenery />
<look>The wall is covered in gaudy wallpaper. {if wall.painted: You see something paint on it: "{wall.paintedtext}".}</look>
</object>
</object>
<command name="PaintText">
<pattern>paint #text# on #object#</pattern>
<script>
msg ("You spray the words '" + text + "' onto the " + GetDisplayAlias(object))
object.paintedtext = text
object.painted = true
</script>
</command>
</asl>
I typed in paint "Read after nuclear war." on book, but the command wasn't understood.
<function name="HandleCommand" parameters="command, metadata">
<![CDATA[
handled = false
if (game.menucallback <> null) {
if (HandleMenuTextResponse(command)) {
handled = true
}
else {
if (game.menuallowcancel) {
ClearMenu
}
else {
handled = true
}
}
}
if (not handled) {
StartTurnOutputSection
if (StartsWith (command, "*")) {
msg ("")
msg (SafeXML (command))
}
else {
shownlink = false
if (game.echocommand) {
if (metadata <> null and game.enablehyperlinks and game.echohyperlinks) {
foreach (key, metadata) {
if (EndsWith(command, key)) {
objectname = StringDictionaryItem(metadata, key)
object = GetObject(objectname)
if (object <> null) {
msg ("")
msg ("> " + Left(command, LengthOf(command) - LengthOf(key)) + "{object:" + object.name + "}" )
shownlink = true
}
}
}
}
if (not shownlink) {
msg ("")
OutputTextRaw ("> " + SafeXML(command))
}
}
if (game.command_newline) {
msg ("")
}
commands = Split(command, "")
game.pov.commandmetadata = metadata
if (ListCount(commands) = 1) {
game.pov.commandqueue = null
HandleSingleCommand (Trim(command))
}
else {
game.pov.commandqueue = commands
HandleNextCommandQueueItem
}
}
}
]]>
</function>