Cache-Control: no-cache Moo Canada: Edit Generic Closed-Environment Message Receiving Animal (#7480)

View/Edit #7480:travel_to

Switch to edit mode.

Name(s): travel_to
1:  "Travel to a room and when arrive, send a message to this animal."
2:  {dest, msg} = args
3:  try
4:    this.travelling = 1
5:    this.state != "stand" && this:changestate("stand")
6:    path = $room_db:path_between(this.location, dest, this)
7:    for x in (path)
8:      from = #-1
9:      for y in ($get_property(x, "dest"):exits())
10:       if ($get_property(y, "dest") == this.location)
11:         from = y
12:         break
13:       endif
14:     endfor
15:     this:emote("casually walks ", $call_verb(x, "title", {}), ".")
16:     if (z = this in this.location.occupants)
17:       this.location:unoccupy(this.location.spots[z])
18:     endif
19:     $call_verb(x, "move", {this})
20:     this:emote("casually walks in", from != #-1 ? tostr(" from the ", $su:lowercase($call_verb(from, "title", {}))) | "", this.location == dest ? "." | " and keeps walking on through.")
21:     this.location != dest && suspend(this.travel_speed)
22:   endfor
23:   $hub:send({this}, msg, 0)
24: except e (ANY)
25:   #8084:tell("travel_to error: ", toliteral(e))
26: endtry
27: this.travelling = 0
28: "Last modified by Lao-Tzu (#8084) on Mon Aug 12 16:20:12 2002 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: michele (#9878)

You are not logged in.

[home | help | who | search | setup | code]