[一些很基本的资料]
 
Function 的种类:
 
efun: (external function) 这些是在 driver 里定义的 function.
      随时可以被呼叫. 这是执行速度最快的一种 function.
lfun: 这些是 'local' 的 function, 可能是定义於 daemon 里, 可
      能是在 inheritable object 如: room, user 里. 只要你是
      inherit 那个 object, 你就可以用该 object 里所提供的 function.
simul_efun: 跟 efun 类似, 但不在 driver 里而是在 /adm/obj/simul_efun
      里定义的, 随时都可以呼叫. simul_efun 的目地是「模拟」 efun,
      或是取代 efun. 所以如果某个 simul_efun 和 efun 的名字相同, 则
      simul_efun 会被使用.
apply: mudlib object 里所定义的 local function, 如 create(), init()..
      等. 通常都是由 driver 来呼叫. (所以如果 driver 找不到这些
      function, game 会 crash :) 但如果有必要, 任何 mudlib object 也
      都可以呼叫这些 function.
 
*********************
 
如何找 help:
 
    几乎所有的 function 都有 man page, 打 help <function name> 即可.
有时因为某个 function 与指令名重覆, 则需告知 help 跳过 'general
help' 而改到某个特定的目录搜询.
 
范例: 查询 cat() 的用法
 
> help cat
.... 先找到 _cat.c, cat 指令的 help, 不是我们要的.
想一想... cat()「应该」算是那一类的 function 呢? 当然是 efun.
直接叫 help 指令去 efuns 找吧:
 
> help efuns cat
Bingo! 找到了. 慢慢看吧.
 
如果你很明确的知道你要找的 help 内容在 /doc 底下某个 topic 内, 则你可
以用 'help <topic> <name>' 来查询. 常用的 <topic> 有:
help, wizhelp, commands, efuns, lfuns, simul_efuns, applies,
concepts, and lpc.
 
*********************
 
如何找 function:
 
    如果你想做某件事, 但不知道要用那一个 function, 或是一时忘记
function 的名字, 怎麽办呢? 用 apropos.
 
举例来说, 我想知道那些 function 跟处理「时间」(time) 有关:
输入:
> apropos time
输出:
efuns: ctime() - return a time string
efuns: error - generate a run-time error
efuns: localtime() - convert to local time
efuns: set_reset - modify the time until reset on an object
efuns: time() - return the number of seconds since January 1, 1970
efuns: time_expression() - return the amount of real time that an expression took
efuns: uptime() - return the number of seconds elapsed since the last driver reboot
lfuns: more() - display a file to the user, one screen at a time.
simul_efuns: format_time - "Converts an int to a string representation of the time.
 
输出格式为: function 种类, function 名称, 简介.
 
再用 help <function> 去看详细的解说即可.
找不到你要的? 换一个 keyword 再找找看.
 
[注: ES 的 apropos database 可能很久没有 update 过, 但基本的资料
库还是很完全, 只是可能有某些新的 lfuns 未被列入.]
 
*********************
 
FTP:
 
ES 的 FTP 在同一台机器的 port 8008 上. 如果你 ftp 过去时没看到
'cisppc2 LPmud FTP server' 等字样, quit, 去打听一下要如何 ftp
到一个指定的 port 再来试.
login 及 password 跟你在 mud 上一样. 不论你在 mud 里的权限如何,
你只有在 /open 和自己的工作目录下有读写权. (如果你自己有目录的话)
不会用 ftp 的, 去问人, 去学. 如果你不想学 ftp, 学怎麽用 ed 吧.
没有 ftp 死不了人的. :)
目前已知不能用的 ftp 指令为: mget, 所以不要再问有关这个的问题. :)
 
*********************
 
ED:
 
虽然 ftp 很方便, 但有时只是要修改, 或增加一小段东西, 这时 ed 指
令就派上用场了. 其实 ed 的功用满齐的, 缺点就是它是 line editor,
有一大堆 mode changes. 我们在此不多说 ed 的指令, 有兴趣的人可以用
'help ed' 查询. (注: ed 的 help 档「永远」都不会有中文解说, 除非
有人自告奋勇去写.) 在 ed 下常用的指令:
有 ':' prompt 时表示你在 'command mode' 下, 可以下指令.
否则你就是在 'edit mode'. 刚启动 ed 时你一定会在 'command mode'.
要启动 'edit mode' 你要下一个跟 'edit' 有关的指令, 要跳出 'edit
mode', 在任何一个空白行的起点输入 '.' 再按 'enter' 键.
 
$ - 这个符号在 command mode 永远都代表最後一行的行号.
 
:[n,m]p    -- 列出档案内容, n 为开始行号, m 为结束行号. 如果没有
              m,n 则列出 'pointer' 所在行的内容. 刚启动 ed 时
              'pointer' 应该在第一行. 如果 'p' 前只有一个数字, 则
              列出数字所指行号的内容.
:[n,m]d    -- 删除由 n 到 m 行的内容.
:[n]a      -- 在 n 行後加入东西. 这个指令会让你进入 'edit mode'
:[n]i      -- 在 n 行前加入东西. 这个指令会让你进入 'edit mode'
:[n]c      -- 修改第 n 行的内容. 这个指令会让你进入 'edit mode', 之後
              你所打入的东西都会取代第 n 行原有的内容. [注: 这个指令
              的「有效」范围是一行, 超过一行并不会让你修改 n+1 行的东
              西.]
 
在下'a', 'i' 和 'c' 等指令时, 如果没有指定行号, 则以 'pointer' 所在
行为准.
:w [filename] -- 将档案内容写回去. 如果没有指定档名, 则 ed 假定你要
                 写回原来的档案内.
:q        -- 离开 ed. [注: 此指令只适用於当档案已经储存过後, 或是档案
             没有被更动过.]
:Q        -- 如果档案被动过, 但你不想写入被更动的内容, 你可以用这个指
             令离开 ed.
:!<cmd>   -- 在 ed 下执行某些 mud 指令.
 
有关 ed 的其他指令请看 help.
 