Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Compiling the server ➜ Adventures guide

Adventures guide

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Chris   (37 posts)  Bio
Date Sun 15 Jul 2001 12:23 AM (UTC)
Message
Can you make the "Adventures guide" to,exsample:
A book of willows?? And how can i edit the eq that you start off with?

BTW,thanks for the help and the quick responses :-)
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 15 Jul 2001 01:27 AM (UTC)
Message
Making a guide like that just sounds like creating a new object in the area editor or area file.

As for the initial stuff, that is picked up as you go through the initial area. I suggest you edit that area if you want to make other things available.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Chris   (37 posts)  Bio
Date Reply #2 on Sun 15 Jul 2001 04:12 PM (UTC)
Message
I mean can i make it so that for instants i start with a book,a shirt,a sword etc. when i enter?
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 15 Jul 2001 11:50 PM (UTC)
Message
There are examples of doing that in the function "newbieset". Here is an example of doing it:




/* vnums */
#define OBJ_VNUM_SCHOOL_VEST 10308
#define OBJ_VNUM_SCHOOL_SHIELD 10310
#define OBJ_VNUM_SCHOOL_BANNER 10311

OBJ_DATA *obj;

obj = create_object( get_obj_index(OBJ_VNUM_SCHOOL_VEST), 1 );
obj_to_char(obj, victim);
obj = create_object( get_obj_index(OBJ_VNUM_SCHOOL_SHIELD), 1 );
obj_to_char(obj, victim);
obj = create_object( get_obj_index(OBJ_VNUM_SCHOOL_BANNER), 1 );
obj_to_char(obj, victim);


"victim" is the character you are equipping.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Chris   (37 posts)  Bio
Date Reply #4 on Mon 16 Jul 2001 12:30 AM (UTC)
Message
Can i do it so that ALL characters starts off with the SAME equipment and not have to victim a person every time??
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #5 on Mon 16 Jul 2001 01:10 AM (UTC)
Message
What I meant was to change the "nanny" function, which processes the logon messages, to equip you with those things when you create a new character. You will see an example, around line 2388 in comm.c, where the code already gives a new character the adventurer's guide.

Now if you want to make the adventurer's guide *different* then simply modify object 10333, which it already loads (ie. give it a different description).

If you want to give new characters more stuff, simply duplicate the lines of code below for the extra vnums.


/* Added by Brittany, Nov 24/96. The object is the adventurer's guide
to the realms of despair, part of Academy.are. */
{
OBJ_INDEX_DATA *obj_ind = get_obj_index( 10333 );
if ( obj_ind != NULL )
{
obj = create_object( obj_ind, 0 );
obj_to_char( obj, ch );
equip_char( ch, obj, WEAR_HOLD );
}


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Chris   (37 posts)  Bio
Date Reply #6 on Mon 16 Jul 2001 05:58 PM (UTC)
Message
Ok,i have tried to remove "10333" and typed in my new object vnum,but when i start a new character he/her/n doesnt start with anything!?
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #7 on Tue 17 Jul 2001 07:10 AM (UTC)
Message
Because of the test for NULL in the code, presumably it didn't find your object. Does the object exist? Is the area in the area.lst file?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Chris   (37 posts)  Bio
Date Reply #8 on Tue 17 Jul 2001 12:51 PM (UTC)
Message
Yes,the area exist i did a remake of newacad.are and changed it to my own area,so it is in the area.lst,should i change the Null option to something?
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #9 on Wed 18 Jul 2001 05:23 AM (UTC)
Message
No, the word NULL is just to check that the object was found.

Did you compile and link it OK? Are you actually using your new version, or do new players still get the old adventurer's guide?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Chris   (37 posts)  Bio
Date Reply #10 on Wed 18 Jul 2001 01:14 PM (UTC)
Message
No,they dont start off with anything,hmmm
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #11 on Thu 19 Jul 2001 01:00 AM (UTC)
Message
It's a mystery. I would check that you are going through the new code by adding a couple of lines like this:



write_to_buffer( d, "Loading adventurer's guide...", 0 );
OBJ_INDEX_DATA *obj_ind = get_obj_index( 10333 );
if ( obj_ind == NULL )
write_to_buffer( d, "Could not find adventurer's guide", 0 );


Then make a new character. If you don't see any of those messages, then you are not using your new code. If you do, then you need to work out why it can't find that object. Change 10333 to whatever the correct vnum is, of course.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


26,733 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.