[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  Area Editor
. -> [Folder]  General
. . -> [Subject]  Creation and Trainers
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

Creation and Trainers

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page

Posted by Zelfius   (3 posts)  [Biography] bio
Date Sat 10 Jul 2004 05:42 PM (UTC)  quote  ]
I am creating a new Rom Mud from scratch and I have a couple questions.

1. After creating a character is there a way to send or create the actual chracter to another room or vnum?

2. I can't seem to make a mob where I can train, learn, or gain points, What am I doing wrong? I tried and it says in the game that you can't do that here!

[Go to top] top

Posted by Nick Gammon   Australia  (19,672 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sat 10 Jul 2004 10:19 PM (UTC)  quote  ]
Even if you are not an experienced coder, looking at the source code always helps to answer questions like that. For instance, looking in the do_train function (in act_move.c) shows us this:

     * Check for trainer.
    for ( mob = ch->in_room->people; mob; mob = mob->next_in_room )
        if ( IS_NPC(mob) && IS_SET(mob->act, ACT_TRAIN) )

    if ( mob == NULL )
        send_to_char( "You can't do that here.\n\r", ch );

So, this puts us in the right spot. do_train is called when you type "train", and there is the error message "You can't do that here.".

Now we need to see what condition is met, to *not* get the error message. The ACT_TRAIN bit is needed (that sound logical).

So in the Area Editor you would set the "Train" flag in the "Actions" tab for the mob that you want to make a trainer.

For your other question, the room for new characters (I presume you mean new players), if you look in comm.c you see that when a new player is created this line is done:

char_to_room( ch, get_room_index( ROOM_VNUM_SCHOOL ) );

Also in merc.h we find this:

 * Well known room virtual numbers.
 * Defined in #ROOMS.
#define ROOM_VNUM_LIMBO               2
#define ROOM_VNUM_CHAT             1200
#define ROOM_VNUM_TEMPLE           3001
#define ROOM_VNUM_ALTAR            3054
#define ROOM_VNUM_SCHOOL           3700
#define ROOM_VNUM_BALANCE          4500
#define ROOM_VNUM_CIRCLE           4400
#define ROOM_VNUM_DEMISE           4201
#define ROOM_VNUM_HONOR            4300

So it seems clear that new players will be put into room 3700. To change that, change the line there to make 3700 into something else, and recompile everything, or at least the files that use ROOM_VNUM_SCHOOL (comm.c and db.c).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.


Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]