精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>游戏元素>>● 游戏开发>>程序开发>>网络开发>>每天一点开发mud技巧

主题:每天一点开发mud技巧
发信人: fenking()
整理人: nhyjq(2003-01-05 15:48:38), 站内信件
Service: emotetService: emoteto 

The originator will deliver the following packet to the target mud ove
r the in-band
network (to its router): 

({
(string) "emoteto",
(int) 5,
(string) originator_mudname,
(string) originator_username,
(string) target_mudname,
(string) target_username,
(string) orig_visname,
(string) message
})

At the target mud, the message will be delivered to target_username wi
th the
appropriate formatting. The message will contain $N tokens for substit
uting the
originator's name. This name is typically formatted using: sprintf("%s
@%s",
orig_visname, originator_mudname). 

The target_username should be lower-cased by the originating mud. 

A simple example would be a message such as, "$N smiles at you." which
 would
be transformed into something like, "Joe@PutzMud smiles at you." 

If the router or target mud fails to deliver the packet for some reaso
n, it will return
an error packet. 

Service: who

The originator will deliver the following packet over the in-band netw
ork (to its
router): 

({
(string) "who-req",
(int) 5,
(string) originator_mudname,
(string) originator_username,
(string) target_mudname,
(string) 0
})

The router will route the packet to another router or to the target mu
d. The target
mud returns: 

({
(string) "who-reply",
(int) 5,
(string) originator_mudname,
(string) 0,
(string) target_mudname,
(string) target_username,
(mixed *) who_data
})

where who_data is an array containing an array of the following format
 for each
user on the mud: 

({
(string) user_visname,
(int) idle_time,
(string) xtra_info
})

Each user_visname should specify the user's visual name. idle_time sho
uld be
measured in seconds and xtra_info should be a string. 

If the router fails to deliver the packet for some reason, it will ret
urn an error
packet. 

--
()()()()()()()()()()()()()()()()()(()()()()()()()()()()()()
    +                     我的最爱                     +
    +               欢迎来到游戏开发者天堂             +
    +           好的意见,好的方法,好的论题           +
    +                     在这里解决                   +
============================================================             

※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 202.101.177.166]

[关闭][返回]