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
➜ Running the server
➜ Couple of questions
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| USER007
(124 posts) Bio
|
| Date
| Sun 13 Jun 2004 09:42 PM (UTC) Amended on Sun 13 Jun 2004 09:44 PM (UTC) by USER007
|
| Message
| 1) Say that I were to make my mud go public without any changes to the code in smaugFUSS and let the players gain exp points from killing mobs, now my question is this, if the player got around level 49 and he trained some more would he gain another level to 50 and them from 50 to 51 and so on?
2) On the who list, how would I go about to adding like another section just for mortals? Heres an example:
Currently:
2 Warrior Obed the Recruit.
-----------------------------------[ IMMORTALS ]------------------------------
Owner/Coder Anavel is known as "The Nightmare of Solomon".
There are 2 players on.
Now heres what I want to change it to:
-----------------------------------[ MORTALS ]------------------------------
2 Warrior Obed the Recruit.
-----------------------------------[ IMMORTALS ]------------------------------
Owner/Coder Anavel is known as "The Nightmare of Solomon".
There are 2 players on.
Any suggestions?
| | Top |
|
| Posted by
| Nick Cash
USA (626 posts) Bio
|
| Date
| Reply #1 on Sun 13 Jun 2004 10:49 PM (UTC) |
| Message
| Its pretty simple. Find this section of code:
for ( cur_who = first_mortal; cur_who; cur_who = next_who )
{
if ( !ch )
fprintf( whoout, cur_who->text );
else
send_to_pager( cur_who->text, ch );
next_who = cur_who->next;
DISPOSE( cur_who->text );
DISPOSE( cur_who );
}
DIRECTLY above it, add
if ( first_mortal )
{
if ( !ch )
fprintf( whoout, "\n\r-------------------------------[ MORTALS ]-------------------------\n\r\n\r" );
else
send_to_pager( "\n\r-------------------------------[ MORTALS ]--------------------------\n\r\n\r", ch );
}
I think that should fix ya up. |
~Nick Cash
http://www.nick-cash.com | | Top |
|
| Posted by
| Nick Cash
USA (626 posts) Bio
|
| Date
| Reply #2 on Sun 13 Jun 2004 10:51 PM (UTC) |
| Message
| Sry, forgot to give my two cents on question 1.
I do belive that the code prevents them from leveling past the maximum level of their class, and I'm pretty sure it definitely prevents them from gaining immortal levels. |
~Nick Cash
http://www.nick-cash.com | | Top |
|
| Posted by
| USER007
(124 posts) Bio
|
| Date
| Reply #3 on Mon 14 Jun 2004 04:39 PM (UTC) |
| Message
| | Yeah it worked thanks. Now heres another newbie question, how do I extend the hp when players create new chars? For example I want them to start at 100 hp instead of 25 hp. | | Top |
|
| Posted by
| Nick Cash
USA (626 posts) Bio
|
| Date
| Reply #4 on Mon 14 Jun 2004 08:18 PM (UTC) |
| Message
| I think its in clear_char (db.c). Change
ch->hit = 20;
ch->max_hit = 20;
to...
ch->hit = 100;
ch->max_hit = 100;
Also, if you want everyone to start with exactly 100 hp you will need to delete the line in nanny (which is in comm.c). So yeah, I -THINK- thats it. If its not let me know.
|
~Nick Cash
http://www.nick-cash.com | | Top |
|
| Posted by
| USER007
(124 posts) Bio
|
| Date
| Reply #5 on Mon 14 Jun 2004 09:19 PM (UTC) Amended on Mon 14 Jun 2004 09:34 PM (UTC) by USER007
|
| Message
| Yep it worked and it also helped me figure out another problem thanks. :D Now I'm going to search for the nanny.
=EDIT= Hmmm... this is what I found in comm.c:
ch->level = 1;
ch->exp = 0;
ch->max_hit += race_table[ch->race]->hit;
ch->max_mana += race_table[ch->race]->mana;
ch->hit = UMAX(1,ch->max_hit);
ch->mana = UMAX(1,ch->max_mana);
then further down :
case 'h':
stat = ch->hit;
break;
case 'H':
stat = ch->max_hit;
break;
case 'm':
Now I don't know which one to remove so yeah... little help here. :P | | Top |
|
| Posted by
| Nick Cash
USA (626 posts) Bio
|
| Date
| Reply #6 on Tue 15 Jun 2004 (UTC) |
| Message
| I think a better question is what are you trying to accomplish. I think you want everyone to start at 100 without racial modifiers, in which you would remove the following line:
ch->max_hit += race_table[ch->race]->hit;
If thats not what you were trying to do, please specify :) |
~Nick Cash
http://www.nick-cash.com | | Top |
|
| Posted by
| USER007
(124 posts) Bio
|
| Date
| Reply #7 on Tue 15 Jun 2004 01:00 AM (UTC) Amended on Tue 15 Jun 2004 01:19 AM (UTC) by USER007
|
| Message
| | Ok heres what I'm trying to do. I want the max HP for all the races to be 100, so that means their HP won't go above 100 no matter what, unless they get injured during a fight. :D And right now I'm going to try what you said. And while I'm at it whats the name of the file where you can remove the save requirement? Like this: "You must be at least level second to save." or something like that, so that way a newly created char can save when their at level one. I tried grep but it didn't give me anything. :/ | | Top |
|
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Reply #8 on Tue 15 Jun 2004 02:25 AM (UTC) |
| Message
| | In update.c, in the advance_level function, remove the add_hp var and all refrences to it to stop HP gains. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|
| Posted by
| USER007
(124 posts) Bio
|
| Date
| Reply #9 on Tue 15 Jun 2004 02:54 AM (UTC) |
| Message
| | Yes! It worked even though I got 2 warnings during the compiling phase. Thanks. :D | | Top |
|
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Reply #10 on Tue 15 Jun 2004 02:56 AM (UTC) |
| Message
| | And yes, its okay to remove those level checks. Such as in do_save, etc. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|
| Posted by
| Nick Cash
USA (626 posts) Bio
|
| Date
| Reply #11 on Tue 15 Jun 2004 03:53 PM (UTC) |
| Message
| | What were your compiling warnings? Unused variable? We can prolly help you remove those as well since warnings can be bothersome. |
~Nick Cash
http://www.nick-cash.com | | Top |
|
| Posted by
| USER007
(124 posts) Bio
|
| Date
| Reply #12 on Tue 15 Jun 2004 04:25 PM (UTC) Amended on Tue 15 Jun 2004 04:51 PM (UTC) by USER007
|
| Message
| Yeah thanks. Hmmm... I compiled update.c again and this time I didn't get any warnings. :o So I don't know...
=EDIT= Ok nvm, seems the file was back to its orignal version so I did the changes again. Heres what I got:
Owner@Unit 03 ~/smaugfuss/src
$ make
make -s smaug
Compiling o/update.o....
update.c: In function `advance_level':
update.c:133: warning: too few arguments for format
update.c:140: warning: too few arguments for format
Done compiling mud.
chmod: changing permissions of `smaug': No such file or directory
make[1]: *** [smaug] Error 1
make: *** [all] Error 2
=EDIT= Ok nvm I just removed "%d/%d hp," on lines 133 and 140 which was "Your gain is: %d/%d hp, %d/%d bp, %d/%d mv %d/%d prac.\n\r". Then I compiled it again and I didn't get any warnings. Thanks for helping. :D | | 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.
36,489 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top