Re: [Circle] [CODE] EQ Positions

From: Jerry Gilreath (gilreath@worldinfonet.com)
Date: 08/31/96


The original circle code reads as such:

8<---- snip ---->8
ACMD(do_equipment)
{
  int i, found = 0;

  send_to_char("You are using:\r\n", ch);
  for (i = 0; i < NUM_WEARS; i++) {
    if (GET_EQ(ch, i)) {
      if (CAN_SEE_OBJ(ch, GET_EQ(ch, i))) {
        send_to_char(where[i], ch);
        show_obj_to_char(GET_EQ(ch, i), ch, 1);
        found = TRUE;
      } else {    
8<---- snip ---->8

simply fix it to read something similar to:

8<---- snip ---->8
ACMD(do_equipment)
{
  int i, k, found = 0; /* Added int k */

  /* Added eq_remap .. insert CORRECT # of locations and order you'd want
them displayed */
  const int eq_remap[NUM_WEARS] = {	28, 16, 17, 18, 11,
				 	 0, 19,  6, 29, 23, 
					24, 22,  3,  4, 25,
				 	10, 14, 15,  9,  1, 
					 2, 20,  5, 12, 13, 
					21,  7, 26, 27,  8 };


  send_to_char("You are using:\r\n", ch);
  for (k = 0; k < NUM_WEARS; k++) { /* changed i to k }
    i = eq_remap[k]; {set i = value to display in which position */
    if (GET_EQ(ch, i)) {
      if (CAN_SEE_OBJ(ch, GET_EQ(ch, i))) {
        send_to_char(where[i], ch);
        show_obj_to_char(GET_EQ(ch, i), ch, 1);
        found = TRUE;
      } else {    
8<---- snip ---->8

pretty simple .. took about 5 minutes for mods and re-compile :) ..

be sure to put YOUR eq positions into eq_remap .. Let me know if you need
help or if you find any problems.

Jerry
AstroMUD (mud.arc.net 2447)                                       

----------
> > > From: Leonard Burns IV <lburns@continet.com>
> > > To: circle@cspo.queensu.ca
> > > Subject: [Circle] [CODE] EQ Positions
> > > Date: Friday, August 30, 1996 6:01 PM
> > >
> > > I've added a few new eq postions on my mud, like ears and ankles,
what
> > I've tried to do is change the order
> > > that the eq is listed when you type 'eq' in the mud, i changed all
the
> > references in constants.c and in
> > > act.item.c, which resulted in the eq being on weird places, like
wearing
> > an anklet on your wrists, or an
> > > earring on your leg, is there a way to do this without having to
change
> > the ITEM_WEAR bitvectors?
> > > --
> > > Leonard Burns IV
> > > lburns@continet.com
> > look in act.item.c:
> > find the void perform_wear(.....
> > 
> >  int wear_bitvectors[] = {
> >         all of these bitvectors have to correspond to the eq positions
listed when
> > you type eq
> > ex.
> > head
> > eyes
> > face
> > neck
> > neck
> > ......
> > would be
> > ITEM_WEAR_HEAD, ITEM_WEAR_EYES, ITEM_WEAR_FACE, ITEM_WEAR_NECK,
> > ITEM_WEAR_NECK, ......
> > 
> > if these correspond correctly you shouldn't have any problems
> > also make sure messages are in the correct order
> 
> What he's describing is: he's changed all that from stock, I didn 
> something similar on mine...Anyways, one solution would be to write a 
> converter to convert all of the .obj files to the new format.
> Or you could just nuke the whole world and start from scratch, or just 
> sit down and ttry to find every obj in the game and do it by hand (this 
> is VERY tedious and time consuming, but works)
> 
> any other suggestions as to how to avoid this sort of thing?
> > you are already wearing something on your ....etc.
> > and such
> > that should work if you have any more questions mail me and I will help
if
> > I can.
> > 
> > John
> > 
> 
> 
> Caendar Ciandorin
> ProphecyMUD
> CLOSED for development.
> +-----------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> |   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
> +-----------------------------------------------------------+
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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