![]() |
| Home > Games > games > mud-faq > |
FAQ: [diku] rec.games.mud.diku FAQ |
Section 2 of 2 - Prev - Next
5. Many other helpful tips are given in the C.A.W. Builders'
Handbook, and are available online at:
http://democracy.queensu.ca/~fletcher/VieMud/Caw/Bhndbk/tips.html
"Ok, I think I can start my own, but I hear there are bugs with the
stock code, what are these?"
Unfortunatly, all code will have bugs, here are some of the
more well known bugs that should be looked at when starting
your own bugs.
(NOTE: These are all fixes that require knowledge of C... told
you you needed to know C.)
+ Problem with realloc() in db.c with the world, and to a
lesser extent mob_index and obj_index.
+ Problem in do_pour. This bug allows players to preform 'pour
cup cup' and have an infinite water supply.
+ Problem on do_taste. A player can taste the bread, but when
he tastes the bread, it will apply the breads fill value
without actually eating the bread, thus having an infinite
bread supply.
+ Problem in nanny(). In nanny(), if a player answers 'no' to
the 'is that really your name?', the name pointer is never
set to NULL. So, when you drop link, the same pointer will be
free [using free()] again inside free_char().
+ Problem in generic_find(). Uses str_cmp() instead of isname()
in FIND_OBJ_EQUIP.
+ Problem in affect_from_char(). The variable hjp is given the
value hjp-next after hjp has been free()'d.
+ Problem in shop.c. A has the scroll 'a tattered scroll' he
wishes to sell. Upon selling the item, a check is made for
the keyword scroll in the shopkeeper's inventory. Since
scrolls of identify and scrolls of recall are produced by the
shop and have the keywords 'scroll', the game assumes that
the first scroll is one of these items and destroys the item
and never places it back for resale.
+ Problem in the init_socket. The ports do not seem to clear
freely, so you end up with a lot of port binds. Here is a
patch provided by Dean Gaudet
int init_socket(int port)
{
int s, sbuf, opt;
struct sockaddr_in sa;
struct linger ld;
memset(&sa, 0, sizeof(struct sockaddr_in));
sa.sin_family = AF_INET;
sa.sin_port = htons(port);
if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
exit(0);
}
opt = 1;
if (setsockopt(s,SOL_SOCKET,SO_REUSEADDR, (char *)&opt, sizeof(opt)) < 0)
{
exit(1);
}
ld.l_onoff = 0; /* let's make sure this isn't on */
ld.l_linger = 1000; /* who cares what this is */
if (setsockopt(s, SOL_SOCKET, SO_LINGER, (char *)&ld, sizeof(ld)) < 0) {
exit(1);
}
......
if (bind(s, (struct sockaddr *)&sa, sizeof(sa)) < 0) {
if( close(s) ) {
syslogf("init_socket: error closing socket: %s", strerror(errno));
exit(1);
}
exit(0);
}
if( listen(s, 5) < 0 ) {
exit(1);
}
return(s);
}
+ Check for unused variables by compiling with the -Wunused
flag. This will help in streamlining your code.
+ Many typos, especially look in constants.c, act.obj1.c and
act.other.c
+ Echo on/off:
in interpreter.c, add this to the other includes:
#include
create the following strings:
char echo_off[]={IAC,WILL,TELOPT_ECHO,'\0'};
char echo_on[]={IAC,WONT,TELOPT_ECHO,'\n','\r','\0'};
make the following macros:
#define ECHO_ON(d) SEND_TO_Q(echo_on,(d))
#define ECHO_OFF(d) SEND_TO_Q(echo_off,(d))
Then place in appropriate places where you want to turn
echo'ing on or off.
"Are the any RFC's of interest?"
The following RFC's can be of interest to Diku Implementors:
+ RFC 1413: Telnet Identification Protocol
+ RFC 854: Telnet Protocol
+ RFC 857: Telnet Echo Option
RFC's are located on many sites including nic.ddn.mil and
wuarchive.wustl.edu.
"What runs on Linux?"
CircleMUD and ROM 2.4 were both developped on Linux, so neither
should have any problems compiling on Linux. Other muds such as
MercMUD and EnvyMUD have been reported to compile with very few
problems.
"How can I make the original DikuMud run on Linux?"
From Derek J. Middleton with corrections from Russell Schutlz
To port DikuMud gamma 0.0 over to Linux, there are a couple
things that should be modified. This may not be everything, but
here is what needs to be done right off the bat:
1. Add this to your #include section:
#if defined(linux) || defined(SYSV)
#include
#include
#endif
2. Change all calls to the srandom() function to srand()
3. I believe there are two references like this. Change:
gettimeofday(&last_time, (struct timeval *) 0);
to:
gettimeofday(&last_time, (struct timezone *) 0);
4. In addition, the init_socket() function needs to be re-worked
quite a bit. This is what I have:
int init_socket(int port) {
int s;
char opt = 1;
struct sockaddr_in sa;
struct hostent *hp;
struct linger ld;
struct utsname hostinfo;
char *hostname;
/* get the current hostname */
if (uname(&hostinfo)<0) {
perror("uname");
exit(1);
}
hostname = hostinfo.nodename;
memset(&sa, 0, sizeof(sa));
hp = gethostbyname(hostname);
if (hp == NULL)
{
perror("gethostbyname");
exit(1);
}
sa.sin_family = hp->h_addrtype;
sa.sin_port = htons(port);
s = socket(AF_INET, SOCK_STREAM, 0);
if (s < 0)
{
perror("Init-socket");
exit(1);
}
if (setsockopt (s, SOL_SOCKET, SO_REUSEADDR,
&opt, sizeof (opt)) < 0)
{
perror ("setsockopt REUSEADDR");
exit (1);
}
ld.l_onoff = 1;
ld.l_linger = 1000;
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &ld, sizeof(ld)) < 0)
{
perror("setsockopt LINGER");
exit(1);
}
if (bind(s, (struct sockaddr *) &sa, sizeof(sa)) < 0)
{
perror("bind");
close(s);
exit(1);
}
listen(s, 3);
return(s);
}
Once this is done, you should be well on your way to having the
Gamma DikuMud running on your Linux system.
"Are there any books of interest to admins?"
Yes, these should be available at your local bookstore:
_Unix Network Programming_
Stevens, Richard W.
Prentice Hall, 1990
_The C Programming Language_
Kernighan, Brian W.
Ritchie, Dennis M.
Prentice Hall, 1988
[This is THE bible on C programming]
"Are there any muds available with online creation?"
The Isles is a Merc based DikuMud with Online Creation among a
lot of other enhancements.
There is a copy of Envy mud with a ported version of The Isles
OLC in it.
SMAUG, a newer code release based on Merc has a built in OLC
system.
Circle 3.x is also going to have online creation. (See the next
question)
"When is Circle 3.0 going to be released?"
See the CircleMUD FAQ for more details on CircleMUD 3.x
"Are there any mailing lists for administrators?"
CircleMUD has a mailing list at . To
subscribe, send it a piece of mail with the body 'subscribe
circle '.
MercMUD and EnvyMUD have a mailing list at
To subscribe to this, send a piece of mail to that address with
the word 'subscribe' in the body.
ROM also has a mailing list now. This can be found at
. To subscribe, send a piece of mail to
this address with the word 'subscribe' in it.
"Do I need to follow the license agreement?"
YES YES YES YES YES!! No matter how much you have or think you
have changed in the code, you must included both the 'credits'
file and the names of the authors in the initial logon screen.
There are no ifs, ands, or buts about this.
"Should I credit my area authors too?"
Of course you should! The best way to do this is to either have
a help entry for 'areas' or 'zones' with a listing of zones and
their authors. Another way to do this would be to use the Merc
family method of having an 'areas' command which lists the
areas and authors. A final method would be to list them in the
credits of your mud. If all of your authors are credited
publically, it gives people more incentive to release areas to
the public and to create areas for your mud.
To aid this, Nino Ruffini (Steppin of JediMUD) has lent his
time in order to compile a fairly extensive listing of areas
and their authors. This has been posted once to rgmd, and will
soon be found on a web page near you! Keep your eyes peeled for
it.
_________________________________________________________________
Resources
Below is a list of commonly used sites for DikuMud related items. All
sites/contents are subject to change.
Web Resources
There are a good number of resource sites online and more seem to crop
up every day. The following is by no means a definitive list of
available resources, but should serve as a good starting point.
http://www.dikumud.com/diku/
The official DikuMud homepages.
http://www.efn.org/~rtaylor/
This is the official release site of ROM.
http://www.circlemud.org/
The official CircleMUD homepages, complete with links to the
CircleMUD FAQ, various documentation for running a CircleMUD,
etc.
http://democracy.queensu.ca/~fletcher/Circle/
This is the official CircleMUD FAQ site, as well as being the
official home of this FAQ. Also found here are a number of
CircleMUD code snippets, and links to CircleMUD area updates.
http://democracy.queensu.ca/~fletcher/VieMud/Caw/
The official Curious Areas Workshop homepages. These pages
include area releases and the C.A.W. Builders' Handbook.
http://www.mudconnect.com/
The Mud Connector. This site has links to many online
resources, as well as links to over 400 muds.
http://www.eden.com/~hsoi/mud/
This site is the quintessential Macintosh Mudding Resource
site, with links to Mac Clients, code, and so forth.
http://www.goodnet.com/~esnible/mudinfo.html
A site with many links to building resources online, as well as
links to several area archives.
http://www.game.org/heirarchy.html
A page listing the approximate family tree of the DikuMud
server, complete with links to the home sites of many of the
DikuMuds listed.
http://tf.tcp.com/~hawkeye/tf/
This is the homepage of the TinyFugue Client. This page gives
complete instructions on how to go about using the client and
how to get it.
FTP Resources
ftp://ftp.math.okstate.edu/pub/muds/
This site contains a general mishmash of mud related software.
Unfortunately, it is somewhat out of date in general.
ftp://ftp.pvv.unit.no/pub/mud/
This has the server software for MUME as well as a few
utilities for DikuMuds. There are also some clients available
here.
ftp://ftp.tcp.com/pub/mud/
This site is mostly out of date, but has a fairly large amount
of mud related items, including having the most recent releases
of the TinyFugue client.
ftp://marble.bu.edu/pub/diku/
This site is an older site pertaining to DikuMuds.
ftp://grind.isca.uiowa.edu/unix/mud/dikumud/
This site contains a fair number of servers as well as a few
areas, but does not tend to be updated very often.
ftp://ftp.envy.com/pub/mud/
This is the official release site of EnvyMud.
ftp://ftp.game.org/pub/mud/diku/
Probably one of the largest and most up to date FTP sites. It
contains almost every single DikuMud related server that has
been publically released.
ftp://ftp.circlemud.org/pub/CircleMUD/
This is the offical site of the CircleMUD distribution. It
contains various releases of the CircleMUD server, as well as a
plethora of CircleMUD administrator contributed code and areas.
ftp://ftp.io.com/pub/mud/
This site contains a number of items relevant to DikuMuds, as
well as being the homesite for the Hidden Worlds Mud.
ftp://democracy.queensu.ca/pub/USERS/fletcher/Caw
The official release site of Curious Areas Workshop, an area
building group, also known for the C.A.W. Builders' Handbook.
ftp://ftp.cis.ufl.edu/pub/src/games/mud/
The official site of the SillyMUD distribution.
ftp://ftp.lysator.liu.se/pub/lpmud/clients/
A site for PMF, an alternative client to TinTin.
ftp://princeton.edu/pub/tintin++/dist/
The official release site of the TinTin++ client.
_________________________________________________________________
Final Word
Playing a mud of any sort is NOT a right. The people who run the game
and the people who owns/runs the system that you are playing from are
not required to let you play. If you abuse your privledge of playing,
there are good chances that it will be taken away.
_________________________________________________________________
--
Erm... Yeah. Whatever.
Section 2 of 2 - Prev - Next
| Back to category mud-faq - Use Smart Search |
| Home - Smart Search - About the project - Feedback |
© allanswers.org | Terms of use