Re: [NEWBIE] Questions

From: John Evans (evansj@HI-LINE.NET)
Date: 09/30/97

On Tue, 30 Sep 1997, Jeff Daum wrote:

> 1.) How can I set up a code where I have a moster fighting zone, where
> players see moster Fight monster. IE MOB v.S. MOB and can bet on which will
> win??

From what I've seen you would have to do that on your own, but there is
some ok arena code on both the snippets site and FTP site. They are for
player vs. player fights with people being able to bet on the players.
You should be able to easily change that code.

> 2.) How can I set a room where you die?? Say I die, I am then transported
> to the church, and a healer is there and heals me, you see this on a lot of
> MUDs.

In fight.c check out raw_kill(). You'll want to change the save_char(ch,
NOWHERE). You'll need to change the NOWHERE to the room number where the
healer is at. That should work for you.

> 3.) where and how do I see/set what immortal powers are to each god level,
> I would also like to add some levs of gods, say immortal, demi god, god,
> great god, implementor. Also how can I add comands to the WIZ comands.

I do believe that there is documentation on the FTP site for increasing
levels. Warning: Do not blindly do this, it will require a pwipe or
player-file conversion. As far as setting what level of immortal gets
what commands and 'powers', you'll need to set that in interpreter.c in
the cmd_info[] array. The fourth field in each element of the array is
the level required to have access to the command.

> 4.) How do I make a specil exit say assises from the useual n,s,e,w,u,d for
> some specil rooms I would have [enter cage] [portal] ect.

You would need to completely tear out the exit code, and replace it with
a linked list where each exit in a room had unique name(s). The rest of
the exit data should remain the same. Of course, this will trash out
several special procedures such as guild_guard and mayor. It might cause
some problems in other places. This is definately not something that a
newbie would want to try unless they have years of C programming
experience under their belt.

> 5.)anyway I could change the auto* stuff to something like tthis, you type
> auto, you get a list of all the auto and weather they are on or off for
> your char. then by typing autoexit, autoloot, ect. swiches thhat comand on
> off.

Check into do_gen_tog(). You'll probably have to trash the function and
re-code it from scratch, but using the same general logic. Instead of
checking the subcmd for which thing is being toggled, you would check the
argument that was passed to the function.

> 6.) Lastly, How can I edit a specil global that can be used by players to
> 'prey' to gods. exzample A char type prey message and the gods hear thhis
> message, but the god/gods individually have the power to block out that
> channel if need just so they don't see the message, like turning off gosip
> by typeing gossip think you get the idea.

You would probably want to add a new communications channel that would
only be sent to someone higher than LVL_IMMORT and that did not have the
PRF_NOPRAY flag set.
Side note:
prey: Something that is being hunted for sport or food.
pray: Asking someone/something more powerful than yourself for help.
(No, not Webster defs, so don't nit-pick with me, you get the idea.)

One other thing:
From the questions that you asked, you have some very good ideas for what
you want in your MUD, but you are just beginning so you have no idea
where to begin. You will find people more friendly and helpful if you
show proof that you attempted something before running to the list for
help. With this in mind I would strongly suggest that you, and any other
beginning coder, do some (if not all) of the following:

* Buy a book or three on C programming (not C++, Circle is in C).
* Find a command that you want to know what does (like consider), and trace
through the code and see what it does and how it works. If it calls
another function, then read through that function and see what it does as
well. It is almost impossible to code a MUD without knowing what the
functoins do. It's like driving without knowing what the pedals do. Do
this with several commands, mortal, immortal and otherwise.
* Read through and understand (not memorize) what is in structs.h.
* Learn to use grep. It's a lifesaver when looking for code.
* To figure out how combat works, read through the combat code in order
that it is executed (just like you did with consider). You'll want to
start in fight.c with perform_violence().
* If you intend on coding spells, find do_cast (remember to use grep) and
trace through that code just like you did with the "consider" command ad
perform_violence. It's convoluted and long, but well worth reading through.
* When asking the list... 'How to I....' ask yourself the question first
and THINK on it for a couple hours. Write out some ideas and even code a
few to see if any work. If your not getting anywhere or it's not working
quite right, THEN ask the list. We're here to help you, not code things
for you.
* One last thing.... Learn to use gdb. It's a lifesaver when trying to
find out where a program is crashing!

Once you do all of that you should have a decent grasp on how to get
started on some of your coding projects.

Good luck and best wishes!!!

John Evans <>

May the source be with you.

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/08/00 PST