View/Edit #3310:tell_exits

Switch to edit mode.

Name(s): tell_exits
1:  "Checks to see if it needs to show exits."
2:  "Then checks if the exit will accept the player, and shows the exit if a"
3:  "positive check."
4:  if (!this:get_room_option("show_exits"))
5:    return
6:  endif
7:  exits = {}
8:  for x in (args[1])
9:    if (x.obvious && x:is_unlocked_for(player))
10:     exits = setadd(exits, x)
11:   endif
12: endfor
13: if (!exits)
14:   return player:tell("There are no obvious exits from here.")
15: else
16:   player:tell("Exits from here:")
17: endif
18: if (player:display_pueblo() && player.location == this)
19:   return this:do_pueblo_exits(exits)
20: else
21:   for x in (exits)
22:     alias = `$list_utils:shortest(x.aliases) ! ANY => 0'
23:     name = $string_utils:lowercase(x:title())
24:     if (!alias || alias == name)
25:       player:tell("      ", name, " leads to ", x.dest:title())
26:     else
27:       player:tell("      ", name, " [", alias, "] leads to ", x.dest:title())
28:     endif
29:   endfor
30: endif
31: "Last modified by Jay (#8438) on Tue Jan 23 13:35:10 2001 MST."

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

You are not logged in.

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