How to stand at exit + pick lock w/ item? (SOLVED)
sevans425
22 Sept 2016, 17:31This is my first day using Quest, so I'm sorry if this is a noobish question, but...
Here's my code:
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Better than Harper's">
<gameid>41cda948-2c34-4091-9593-ace144f60284</gameid>
<version>1.0</version>
<firstpublished>2016</firstpublished>
<pov type="object">player</pov>
<gridmap />
<showhealth />
<feature_limitinventory />
<onhealthzero type="script">
msg ("You have fallen, brave warrior! But you must not give up yet!")
Ask ("Try again?") {
if (result = true) {
StartGame
}
else {
finish
}
}
</onhealthzero>
<start type="script">
msg ("You awake in a damp, dimly lit stonebrick cell. Your hands are chained to the wall. You hear the sound of water dripping down a long hallway, past the thick iron bars which enclose your cell.")
</start>
</game>
<object name="cell">
<inherit name="editor_room" />
<alias>cell</alias>
<descprefix type="string"></descprefix>
<description type="script">
LockExit (exit1.locked = true)
</description>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<maxvolume type="int">1000</maxvolume>
<volume type="int">100</volume>
<containerfullmessage>Your inventory is full. You should discard something if you really want this.</containerfullmessage>
<maxobjects type="int">100000</maxobjects>
<containermaxobjects>Your inventory is full. You should discard something if you really want this.</containermaxobjects>
<drop type="boolean">false</drop>
<attr name="feature_usegive" type="boolean">false</attr>
<attr name="feature_container" type="boolean">false</attr>
</object>
<object name="chains">
<inherit name="editor_object" />
<pull type="script"><![CDATA[
IncreaseObjectCounter (chains, "pullcount")
if (GetInt(chains, "pullcount") < 2) {
msg ("Your chains shake and rattle. They slip slightly out of the wall, and separate a little.")
}
else {
msg ("Your chains break, sending pieces of their aged, rusty links flying about your dimly lit cell.")
MakeObjectVisible
}
]]></pull>
<object name="chainpiece">
<inherit name="editor_object" />
<take />
<takemsg>The rusty, sharp piece of chain link makes a slight *shink* as you gingerly pick it up.</takemsg>
<pick type="script">
if () {
}
</pick>
</object>
</object>
<exit name="cellexit" alias="north" to="cell">
<inherit name="northdirection" />
<lookonly />
<look><![CDATA[Desired code goes here <------------------------------]]></look>
<locked />
<lockmessage>You struggle against the bars of your cell, but to no avail.</lockmessage>
</exit>
</object>
<object name="hallway1">
<inherit name="editor_room" />
</object>
<verb>
<property>pick</property>
<pattern>pick</pattern>
<defaultexpression>"You can't pick " + object.article + "."</defaultexpression>
</verb>
</asl>```
My goal is to have the player break their chains, pick up a piece, and pick the lock past their cell door, causing the chainpiece to break and be taken from the player. I can handle the rest. Thanks!