do_simple_move

From: Stefan Rensing (rensing@uhura.biologie.uni-freiburg.de)
Date: 05/04/95


Hi all,

I made some changes in do_simple_move in act.movement.c of circle 3.0bpl7
in order to:
- include the WATERWALK affection (I made the spell functioning before),
- make ITEM_BOAT useable if it is WORN instead of CARRIED (was suggested
  by someone on the list earlier) - this is especially interesting for
  another item type I created, TRANSPORT, to travel AIR, SPACE and UNDER-
  WATER, respectively.

The problems are:
- AFF_WATERWALK works for a player on whom the spell was casted but not
  for NPC's with the flag set in the mob file (though stat shows AFF),
- The part with the WEAR eq crashes the mud :(

This is the code:

 /* if this room or the one we're going to needs a boat, check for one */
 if ((world[ch->in_room].sector_type == SECT_WATER_NOSWIM) ||
  (world[EXIT(ch, dir)->to_room].sector_type == SECT_WATER_NOSWIM))
 {

  /* player carries boat */          <- ORIGINAL
  if (!IS_NPC(ch)) {
  for (obj = ch->carrying; obj; obj = obj->next_content)
   if (GET_OBJ_TYPE(obj) == ITEM_BOAT)
   has_boat = TRUE;
  }

  /* flying transport is ok for water, too */   <- SPECIAL OF OUR MUD, WORKS
   if ((!has_boat) && IS_NPC(ch) && (MOB_SKILLED(ch, MSKILL_FLY)))
     has_boat = TRUE;

   /* aff waterwalk ? */               <- WORKS FOR PC ONLY
   if (!has_boat) {
     if (IS_AFFECTED(ch, AFF_WATERWALK))
     has_boat = TRUE;
   }
 
   /* wear instead of carry */               <- THIS PART CRASHES THE MUD
   if ((!has_boat) && (!IS_NPC(ch))) {
      for (equip_pos = 0; equip_pos < NUM_WEARS; equip_pos++) 
        if (GET_OBJ_TYPE(ch->equipment[equip_pos]) == ITEM_BOAT)
          has_boat = TRUE;  
     }  

  if (!has_boat)
  {
   send_to_char("You need a boat to go there.\r\n", ch);
   return 0;
  }
 }

Any suggestions appreciated. BTW, any suggestions on how to modify house.c
so that only a certain amount of items will be stored per house ?

- Stefan.

-- 
Stefan A. Rensing             Institute of Biology II/III - Schaenzlestr. 1
The SysOp Biologist         D-79104 Germany, FON: +49 761 203-2676 / FAX: 2675
e-mail: rensing@uhura.biologie.uni-freiburg.de  MUD: port 4242 on that <- host
http://www.biologie.uni-freiburg.de/data/people/lije.html IRC:Lije MUD:Aragorn
                                                      "I love you !" "I know."



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