/* Use the ladder/rope.
 *
 * The tag of the waypoint destination must be set to
 * DST_<tag of ladder>.
 *
 * This goes in the OnUsed event handler of the actual
 * ladder or rope object.
 */

#include "x0_i0_common"

void main()
{
  object oUser = GetLastUsedBy();
  SendMessageToPC(oUser,"You climb up a ladder");
  string sDestTag = "DST_" + GetTag(OBJECT_SELF);
  object oWaypoint = GetObjectByTag(sDestTag);
  if (GetIsObjectValid(oWaypoint))
    TransportToWaypoint(oUser, oWaypoint);
}
