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 ➜ SMAUG coding ➜ Mental State problems at AV

Mental State problems at AV

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


Posted by Dralnu   USA  (277 posts)  Bio
Date Sun 12 Jun 2005 12:05 AM (UTC)
Message
To start, I havn't touched the mental_state code, but it seems that without eating, avatars still loose their mental_state for some reason. Code follows:

case COND_FULL:
if( ch->level < LEVEL_AVATAR && ch->Class != CLASS_VAMPIRE )
{
set_char_color( AT_HUNGRY, ch );
send_to_char( "You are STARVING!\n\r", ch );
act( AT_HUNGRY, "$n is starved half to death!", ch, NULL, NULL, TO_ROOM );
if( !IS_PKILL( ch ) || number_bits( 1 ) == 0 )
worsen_mental_state( ch, 1 );
retcode = damage( ch, ch, 1, TYPE_UNDEFINED );
}
break;

case COND_THIRST:
if( ch->level < LEVEL_AVATAR && ch->Class != CLASS_VAMPIRE )
{
set_char_color( AT_THIRSTY, ch );
send_to_char( "You are DYING of THIRST!\n\r", ch );
act( AT_THIRSTY, "$n is dying of thirst!", ch, NULL, NULL, TO_ROOM );
worsen_mental_state( ch, IS_PKILL( ch ) ? 1 : 2 );
retcode = damage( ch, ch, 2, TYPE_UNDEFINED );
}
break;

case COND_BLOODTHIRST:
if( ch->level < LEVEL_AVATAR )
{
set_char_color( AT_BLOOD, ch );
send_to_char( "You are starved to feast on blood!\n\r", ch );
act( AT_BLOOD, "$n is suffering from lack of blood!", ch, NULL, NULL, TO_ROOM );
worsen_mental_state( ch, 2 );
retcode = damage( ch, ch, ch->max_hit / 20, TYPE_UNDEFINED );
}
break;

help. I don't see the problem in the code. The ch->level < Avatar seems to be right, I just don't see what could be causing the loss of mst
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #1 on Sun 12 Jun 2005 12:38 AM (UTC)
Message
Are they still getting hungry? IE, still getting those messages?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #2 on Sun 12 Jun 2005 12:56 AM (UTC)
Message
no, its still in Score though, but they still have the mst problems
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #3 on Sun 12 Jun 2005 01:03 AM (UTC)
Message
Well then, if they aren't getting those messages, that part of the code is fine, it's elsewhere that is changing their mental state.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #4 on Sun 12 Jun 2005 01:13 AM (UTC)
Message
I looked through the code, and that seemed like the only thing dealing with hunger and mst...
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #5 on Sun 12 Jun 2005 01:14 AM (UTC)
Message
That's basically the only thing to do with hunger, but not mentalstate at all.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #6 on Sun 12 Jun 2005 01:19 AM (UTC)
Message
I'll check again. Might be something with fighting...
Top

Posted by Gatewaysysop2   USA  (146 posts)  Bio
Date Reply #7 on Sun 12 Jun 2005 03:30 PM (UTC)
Message
I'm fairly certain that there's some code I've seen in fight.c someplace that lowers your mental state when you take a particularly hard hit. I forget exactly the specifics of what a "hard hit" is, but I do think that it lowers mental state during combat under some circumstances.

Maybe that's what you're having happen?

"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #8 on Sun 12 Jun 2005 05:04 PM (UTC)
Message
That really HURT!

ch->pcdata->maxhit / 4

something like that I think. I looked through, and it seemed like dying also messed up your mst, but I think it is still a bug somewhere in the eat/drinking part, but I'm not certant. I'e changes the hard hit part to maxhp/3, wich at this point is only one mob who can do that (Executioner, oddly enough).
Top

Posted by Gatewaysysop2   USA  (146 posts)  Bio
Date Reply #9 on Sun 12 Jun 2005 07:18 PM (UTC)
Message
Erm.. not exactly.

Look for calls to "worsen_mental_state" and that should answer your questions about where and how mental state is being lowered.

Hopefully that helps?

"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence
Top

Posted by Dralnu   USA  (277 posts)  Bio
Date Reply #10 on Sun 12 Jun 2005 10:29 PM (UTC)
Message
hopefully. I'm going to check into it in a bit
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.


27,398 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.