Re: perform_violence problems

From: Laurence A. and Milena R. Rooks (mrj1@Ra.MsState.Edu)
Date: 12/08/94


On Thu, 8 Dec 1994, Sean P. Mountcastle wrote:

> Hi,
> 
> 	Last night in a coding frenzy, I added dbl, triple, and quad,
> attacks as skills.  I called these via perform_violence.  But it seems
> that every time a character who has any of these skills fights, the game
> crashes and dumps a core :(  I've looked through the core and changed the
> code, but now every crashes the game when they fight. :(
> 
> 	The code in perform violence looks somehitng like this:
>     after the original if (FIGHTING(ch) ......
>                             stop(fighting(ch);
>      		       else {
>     	  		  hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
>                           if (MOB_FLAGGED...... (you get the idea)
> 	I added:
> 
> 
>     if (FIGHTING(ch) == NULL || ch->in_room != FIGHTING(ch)->in_room)
>          stop_fighting(ch); 
>     else {
>         if (GET_SKILL(ch, SKILL_DBL_ATTACK) > 50)
>            hit(ch, FIGHTING(ch), TYPE_UNDEFINED); }
>     if (FIGHTING(ch) == NULL || ch->in_room != FIGHTING(ch)->in_room)
>          stop_fighting(ch); 
>     else {
>         if (GET_SKILL(ch, SKILL_TRI_ATTACK) > 70)
>             hit(ch, FIGHTING(ch), TYPE_UNDEFINED); 
>         if (MOB_FLAGGED(ch, MOB_SPEC) && mob_index[GET_MOB_RNUM(ch)].func
> != NU$
>            (mob_index[GET_MOB_RNUM(ch)].func) (ch, ch, 0, ""); }
>     if (FIGHTING(ch) == NULL || ch->in_room != FIGHTING(ch)->in_room)
>          stop_fighting(ch); 
>     else {
>         if (GET_SKILL(ch, SKILL_QUAD_ATTACK) > 90)
>            hit(ch, FIGHTING(ch), TYPE_UNDEFINED); 
> 
>     }
> 
> 
> 	Now it should check to see if the MOB is still alive before it
> tries to hit him again.....but with the code this way it keeps crashing.
> Before the code was just a bunch of nested if else statements.
> 	I would greatly appreciate it if someone could tell me what I am
> doing wrong and how I can correct this problem. :)
> 
> 	- Sean
> 
> P.S. Thanks for the help with the zone specific recall, but it still will
> not give me a vnum, only an rnum, even when I specify world[rec_loc].number
> 

Uhm, I tried that before, adding extra attacks, and I was told that the 
reason why it keeps crashing is because your playerfile has not been
updated.  I was told to delete the playerfile and then update it. *shrug*

Spawn

**************************************************************************
*                                    *                                   *
* Laurence Anthony Rooks             * Milena Renee Johnson              *
* Spawn/Silk                         * Syn/Synemin                       *
* tclr@convex1.tcs.tulane.edu        * mrj1@ra.msstate.edu               *
*                                    *                                   *
**************************************************************************
*                                    *                                   *
* "Life without a mud is boring.     * "If it ain't romance, it aint     *
*  But mud without a life is         *  shit."                           *
*  stupid."                          *                                   *
*                                    *                                   *
**************************************************************************



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