thesynapse wrote:
How do I look at and use your code example? Is there some kind of plug-in registry?
open your game with an external editor and copy
<command name="use this">
<pattern>Use this #text#</pattern>
<script>
usethis (text)
</script>
</command>
<function name="usethis" parameters="text"><![CDATA[
myList = NewStringList()
foreach (element, ScopeReachable ()) {
if (element <> player and element.name <> text) {
list add (myList, element.name)
}
}
label = "use "+text+ " with"
x = ShowMenu ( label , myList , true )
if ( x = null) {
object2 = GetObject(text)
msg (DynamicTemplate("DefaultUseOn", object2, object2))
}
else {
msg ("> with " + x)
label = label + " " + x
HandleCommand (label)
}
]]></function>
to your file. Then you have to add "Use this" to Display verbs/Inventory verbs in the object-tab of your objects.