• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ OLC_MODE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中OLC_MODE函数的典型用法代码示例。如果您正苦于以下问题:C++ OLC_MODE函数的具体用法?C++ OLC_MODE怎么用?C++ OLC_MODE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了OLC_MODE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: zedit_disp_arg1

/*
 * Print the appropriate message for the command type for arg1 and set
 * up the input catch clause  
 */
void zedit_disp_arg1(struct descriptor_data *d)
{
  switch (OLC_CMD(d).command) {
  case 'M':
    SEND_TO_Q("Input mob's vnum : ", d);
    OLC_MODE(d) = ZEDIT_ARG1;
    break;
  case 'O':
  case 'E':
  case 'P':
  case 'G':
    SEND_TO_Q("Input object vnum : ", d);
    OLC_MODE(d) = ZEDIT_ARG1;
    break;
  case 'D':
  case 'R':
    /*
     * Arg1 for these is the room number, skip to arg2  
     */
    OLC_CMD(d).arg1 = real_room(OLC_NUM(d));
    zedit_disp_arg2(d);
    break;
  default:
    /*
     * We should never get here.
     */
    cleanup_olc(d, CLEANUP_ALL);
    mudlog("SYSERR: OLC: zedit_disp_arg1(): Help!", BRF, LVL_BUILDER, TRUE);
    SEND_TO_Q("Oops...\r\n", d);
    return;
  }
}
开发者ID:vedicveko,项目名称:Aarait,代码行数:36,代码来源:zedit.c


示例2: redit_disp_exit_edit

void redit_disp_exit_edit( DESCRIPTOR_DATA *d )
{
	char				flags[MSL];
	EXIT_DATA		   *pexit = d->character->spare_ptr;
	int					x;

	flags[0] = '\0';
	for ( x = 0;  x < MAX_EXIT;  x++ )
	{
		if ( pexit->flags && HAS_BIT(pexit->flags, x) )
		{
			strcat( flags, code_name(NULL, x, CODE_EXIT) );
			strcat( flags, " " );
		}
	}

	OLC_MODE(d) = REDIT_EXIT_EDIT;
	write_to_buffer( d, "50\x1B[;H\x1B[2J", 0 );

	ch_printf( d->character, "&g1&w) Direction  : &c%s\r\n",	code_name(NULL, pexit->vdir, CODE_DIR) );
	ch_printf( d->character, "&g2&w) To Vnum	: &c%d\r\n",	(pexit->to_room)  ?  pexit->to_room->vnum  :  -1 );
	ch_printf( d->character, "&g3&w) Key		: &c%d\r\n",	pexit->key );
	ch_printf( d->character, "&g4&w) Keyword	: &c%s\r\n",	(VALID_STR(pexit->keyword))  ?  pexit->keyword  :  "(none)" );
	ch_printf( d->character, "&g5&w) Flags      : &c%s\r\n",	(VALID_STR(flags))  ?  flags  :  "(none)" );
	ch_printf( d->character, "&g6&w) Description: &c%s\r\n",	(VALID_STR(pexit->description))  ?  pexit->description  :  "(none)" );
	send_to_char( d->character, "&gQ&w) Quit\r\n" );
	send_to_char( d->character, "\r\nEnter choice: " );
}
开发者ID:Onirik79,项目名称:bardmud,代码行数:28,代码来源:olc_redit.c


示例3: redit_disp_exit_flag_menu

/* For exit flags */
void redit_disp_exit_flag_menu( DESCRIPTOR_DATA *d )
{
	EXIT_DATA		   *pexit = d->character->spare_ptr;
	char				buf[MSL];
	int					x;

	write_to_buffer( d, "50\x1B[;H\x1B[2J", 0 );

	for ( x = 0;  x < MAX_EXIT;  x++ )
	{
		if ( (x == EXIT_RES1) || (x == EXIT_RES2) || (x == EXIT_PORTAL) )
			continue;
		ch_printf( d->character, "&g%2d&w) %-20.20s\r\n", x+1, code_name(NULL, x, CODE_EXIT) );
	}

	buf[0] = '\0';
	for ( x = 0;  x < MAX_EXIT;  x++ )
	{
		if ( HAS_BIT(pexit->flags, x) )
		{
			strcat( buf, code_name(NULL, x, CODE_EXIT) );
			strcat( buf, " " );
		}
	}

	ch_printf( d->character, "\r\nExit flags: &c%s&w\r\n"
		"Enter room flags, 0 to quit: ", buf );
	OLC_MODE(d) = REDIT_EXIT_FLAGS;
}
开发者ID:Onirik79,项目名称:bardmud,代码行数:30,代码来源:olc_redit.c


示例4: sedit_rooms_menu

static void sedit_rooms_menu(struct descriptor_data *d)
{
  struct shop_data *shop;
  int i;
  room_rnum rnum;

  shop = OLC_SHOP(d);
  get_char_colors(d->character);

  clear_screen(d);
  write_to_output(d, "##     VNUM     Room\r\n\r\n");
  for (i = 0; S_ROOM(shop, i) != NOWHERE; i++) {
    rnum = real_room(S_ROOM(shop, i));
    /* if the room has been deleted, this may crash us otherwise. */
    /* set to 0 to be deletable.   -- Welcor 09/04                */
    if (rnum == NOWHERE)
      S_ROOM(shop, i) = rnum = 0;

    write_to_output(d, "%2d - [%s%5d%s] - %s%s%s\r\n", i, cyn, S_ROOM(shop, i), nrm,
	    yel, world[rnum].name, nrm);
  }
  write_to_output(d, "\r\n"
	  "%sA%s) Add a new room.\r\n"
	  "%sD%s) Delete a room.\r\n"
	  "%sC%s) Compact Display.\r\n"
	  "%sQ%s) Quit\r\n"
	  "Enter choice : ", grn, nrm, grn, nrm, grn, nrm, grn, nrm);

  OLC_MODE(d) = SEDIT_ROOMS_MENU;
}
开发者ID:tbamud,项目名称:tbamud,代码行数:30,代码来源:sedit.c


示例5: sedit_compact_rooms_menu

static void sedit_compact_rooms_menu(struct descriptor_data *d)
{
  struct shop_data *shop;
  int i;

  shop = OLC_SHOP(d);
  get_char_colors(d->character);

  clear_screen(d);
  for (i = 0; S_ROOM(shop, i) != NOWHERE; i++) {
    if (real_room(S_ROOM(shop, i)) != NOWHERE) {
      write_to_output(d, "%2d - [@\t%5d\tn] - \ty%s\tn\r\n", i, S_ROOM(shop, i), world[real_room(S_ROOM(shop, i))].name);
    } else {
      write_to_output(d, "%2d - [\tR!Removed Room!\tn]\r\n", i);
    }
  }
  write_to_output(d, "\r\n"
	  "%sA%s) Add a new room.\r\n"
	  "%sD%s) Delete a room.\r\n"
	  "%sL%s) Long display.\r\n"
	  "%sQ%s) Quit\r\n"
	  "Enter choice : ", grn, nrm, grn, nrm, grn, nrm, grn, nrm);

  OLC_MODE(d) = SEDIT_ROOMS_MENU;
}
开发者ID:tbamud,项目名称:tbamud,代码行数:25,代码来源:sedit.c


示例6: find_context_medit

int find_context_medit(struct descriptor_data *d)
{
  switch (OLC_MODE(d)) {
    case MEDIT_MAIN_MENU:         return CONTEXT_MEDIT_MAIN_MENU;
    case MEDIT_ALIAS:             return CONTEXT_MEDIT_ALIAS;
    case MEDIT_S_DESC:            return CONTEXT_MEDIT_S_DESC;
    case MEDIT_L_DESC:            return CONTEXT_MEDIT_L_DESC;
    case MEDIT_D_DESC:            return CONTEXT_MEDIT_D_DESC;
    case MEDIT_NPC_FLAGS:         return CONTEXT_MEDIT_NPC_FLAGS;
    case MEDIT_AFF_FLAGS:         return CONTEXT_MEDIT_AFF_FLAGS;
    case MEDIT_CONFIRM_SAVESTRING:return CONTEXT_MEDIT_CONFIRM_SAVESTRING;
    case MEDIT_SEX:               return CONTEXT_MEDIT_SEX;
    case MEDIT_HITROLL:           return CONTEXT_MEDIT_HITROLL;
    case MEDIT_DAMROLL:           return CONTEXT_MEDIT_DAMROLL;
    case MEDIT_NDD:               return CONTEXT_MEDIT_NDD;
    case MEDIT_SDD:               return CONTEXT_MEDIT_SDD;
    case MEDIT_NUM_HP_DICE:       return CONTEXT_MEDIT_NUM_HP_DICE;
    case MEDIT_SIZE_HP_DICE:      return CONTEXT_MEDIT_SIZE_HP_DICE;
    case MEDIT_ADD_HP:            return CONTEXT_MEDIT_ADD_HP;
    case MEDIT_AC:                return CONTEXT_MEDIT_AC;
    case MEDIT_EXP:               return CONTEXT_MEDIT_EXP;
    case MEDIT_GOLD:              return CONTEXT_MEDIT_GOLD;
    case MEDIT_POS:               return CONTEXT_MEDIT_POS;
    case MEDIT_DEFAULT_POS:       return CONTEXT_MEDIT_DEFAULT_POS;
    case MEDIT_ATTACK:            return CONTEXT_MEDIT_ATTACK;
    case MEDIT_LEVEL:             return CONTEXT_MEDIT_LEVEL;
    case MEDIT_ALIGNMENT:         return CONTEXT_MEDIT_ALIGNMENT;
    case OLC_SCRIPT_EDIT:         return find_context_script_edit(d);
    default: return NOTHING;
  }
}
开发者ID:nitetrip,项目名称:nitetripCode,代码行数:31,代码来源:context_help.c


示例7: find_context_sedit

int find_context_sedit(struct descriptor_data *d)
{
  switch (OLC_MODE(d)) {
    case SEDIT_MAIN_MENU:         return CONTEXT_SEDIT_MAIN_MENU;
    case SEDIT_CONFIRM_SAVESTRING:return CONTEXT_SEDIT_CONFIRM_SAVESTRING;
    case SEDIT_NOITEM1:           return CONTEXT_SEDIT_NOITEM1;
    case SEDIT_NOITEM2:           return CONTEXT_SEDIT_NOITEM2;
    case SEDIT_NOCASH1:           return CONTEXT_SEDIT_NOCASH1;
    case SEDIT_NOCASH2:           return CONTEXT_SEDIT_NOCASH2;
    case SEDIT_NOBUY:             return CONTEXT_SEDIT_NOBUY;
    case SEDIT_BUY:               return CONTEXT_SEDIT_BUY;
    case SEDIT_SELL:              return CONTEXT_SEDIT_SELL;
    case SEDIT_PRODUCTS_MENU:     return CONTEXT_SEDIT_PRODUCTS_MENU;
    case SEDIT_ROOMS_MENU:        return CONTEXT_SEDIT_ROOMS_MENU;
    case SEDIT_NAMELIST_MENU:     return CONTEXT_SEDIT_NAMELIST_MENU;
    case SEDIT_NAMELIST:          return CONTEXT_SEDIT_NAMELIST;
    case SEDIT_OPEN1:             return CONTEXT_SEDIT_OPEN1;
    case SEDIT_OPEN2:             return CONTEXT_SEDIT_OPEN2;
    case SEDIT_CLOSE1:            return CONTEXT_SEDIT_CLOSE1;
    case SEDIT_CLOSE2:            return CONTEXT_SEDIT_CLOSE2;
    case SEDIT_KEEPER:            return CONTEXT_SEDIT_KEEPER;
    case SEDIT_BUY_PROFIT:        return CONTEXT_SEDIT_BUY_PROFIT;
    case SEDIT_SELL_PROFIT:       return CONTEXT_SEDIT_SELL_PROFIT;
    case SEDIT_TYPE_MENU:         return CONTEXT_SEDIT_TYPE_MENU;
    case SEDIT_DELETE_TYPE:       return CONTEXT_SEDIT_DELETE_TYPE;
    case SEDIT_DELETE_PRODUCT:    return CONTEXT_SEDIT_DELETE_PRODUCT;
    case SEDIT_NEW_PRODUCT:       return CONTEXT_SEDIT_NEW_PRODUCT;
    case SEDIT_DELETE_ROOM:       return CONTEXT_SEDIT_DELETE_ROOM;
    case SEDIT_NEW_ROOM:          return CONTEXT_SEDIT_NEW_ROOM;
    case SEDIT_SHOP_FLAGS:        return CONTEXT_SEDIT_SHOP_FLAGS;
    case SEDIT_NOTRADE:           return CONTEXT_SEDIT_NOTRADE;
    default: return NOTHING;
  }
}
开发者ID:nitetrip,项目名称:nitetripCode,代码行数:34,代码来源:context_help.c


示例8: oedit_disp_val3_menu

/*
 * Object value #3
 */
void oedit_disp_val3_menu(struct descriptor_data *d)
{
  OLC_MODE(d) = OEDIT_VALUE_3;
  switch (GET_OBJ_TYPE(OLC_OBJ(d))) {
  case ITEM_LIGHT:
    write_to_output(d, "Number of hours (0 = burnt, -1 is infinite) : ");
    break;
  case ITEM_SCROLL:
  case ITEM_POTION:
    oedit_disp_spells_menu(d);
    break;
  case ITEM_WAND:
  case ITEM_STAFF:
    write_to_output(d, "Number of charges remaining : ");
    break;
  case ITEM_WEAPON:
    write_to_output(d, "Size of damage dice : ");
    break;
  case ITEM_CONTAINER:
    write_to_output(d, "Vnum of key to open container (-1 for no key) : ");
    break;
  case ITEM_DRINKCON:
  case ITEM_FOUNTAIN:
    oedit_liquid_type(d);
    break;
  default:
    oedit_disp_menu(d);
  }
}
开发者ID:mysidia,项目名称:circle31dgpy,代码行数:32,代码来源:oedit.c


示例9: oedit_disp_val2_menu

/*
 * Object value #2
 */
void oedit_disp_val2_menu(struct descriptor_data *d)
{
  OLC_MODE(d) = OEDIT_VALUE_2;
  switch (GET_OBJ_TYPE(OLC_OBJ(d))) {
  case ITEM_SCROLL:
  case ITEM_POTION:
    oedit_disp_spells_menu(d);
    break;
  case ITEM_WAND:
  case ITEM_STAFF:
    write_to_output(d, "Max number of charges : ");
    break;
  case ITEM_WEAPON:
    write_to_output(d, "Number of damage dice : ");
    break;
  case ITEM_FOOD:
    /*
     * Values 2 and 3 are unused, jump to 4...Odd.
     */
    oedit_disp_val4_menu(d);
    break;
  case ITEM_CONTAINER:
    /*
     * These are flags, needs a bit of special handling.
     */
    oedit_disp_container_flags_menu(d);
    break;
  case ITEM_DRINKCON:
  case ITEM_FOUNTAIN:
    write_to_output(d, "Initial drink units : ");
    break;
  default:
    oedit_disp_menu(d);
  }
}
开发者ID:mysidia,项目名称:circle31dgpy,代码行数:38,代码来源:oedit.c


示例10: find_context_oedit

int find_context_oedit(struct descriptor_data *d)
{
  switch (OLC_MODE(d)) {
    case OEDIT_MAIN_MENU:             return CONTEXT_OEDIT_MAIN_MENU;
    case OEDIT_EDIT_NAMELIST:         return CONTEXT_OEDIT_EDIT_NAMELIST;
    case OEDIT_SHORTDESC:             return CONTEXT_OEDIT_SHORTDESC;
    case OEDIT_LONGDESC:              return CONTEXT_OEDIT_LONGDESC;
    case OEDIT_ACTDESC:               return CONTEXT_OEDIT_ACTDESC;
    case OEDIT_TYPE:                  return CONTEXT_OEDIT_TYPE;
    case OEDIT_EXTRAS:                return CONTEXT_OEDIT_EXTRAS;
    case OEDIT_WEAR:                  return CONTEXT_OEDIT_WEAR;
    case OEDIT_WEIGHT:                return CONTEXT_OEDIT_WEIGHT;
    case OEDIT_COST:                  return CONTEXT_OEDIT_COST;
    case OEDIT_COSTPERDAY:            return CONTEXT_OEDIT_COSTPERDAY;
    case OEDIT_TIMER:                 return CONTEXT_OEDIT_TIMER;
    case OEDIT_VALUE_1:               return CONTEXT_OEDIT_VALUE_1;
    case OEDIT_VALUE_2:               return CONTEXT_OEDIT_VALUE_2;
    case OEDIT_VALUE_3:               return CONTEXT_OEDIT_VALUE_3;
    case OEDIT_VALUE_4:               return CONTEXT_OEDIT_VALUE_4;
    case OEDIT_APPLY:                 return CONTEXT_OEDIT_APPLY;
    case OEDIT_APPLYMOD:              return CONTEXT_OEDIT_APPLYMOD;
    case OEDIT_EXTRADESC_KEY:         return CONTEXT_OEDIT_EXTRADESC_KEY;
    case OEDIT_CONFIRM_SAVEDB:        return CONTEXT_OEDIT_CONFIRM_SAVEDB;
    case OEDIT_CONFIRM_SAVESTRING:    return CONTEXT_OEDIT_CONFIRM_SAVESTRING;
    case OEDIT_PROMPT_APPLY:          return CONTEXT_OEDIT_PROMPT_APPLY;
    case OEDIT_EXTRADESC_DESCRIPTION: return CONTEXT_OEDIT_EXTRADESC_DESCRIPTION;
    case OEDIT_EXTRADESC_MENU:        return CONTEXT_OEDIT_EXTRADESC_MENU;
    case OEDIT_LEVEL:                 return CONTEXT_OEDIT_LEVEL;
    case OEDIT_PERM:                  return CONTEXT_OEDIT_PERM;
    case OLC_SCRIPT_EDIT:             return find_context_script_edit(d);
    default: return NOTHING;
  }
}
开发者ID:nitetrip,项目名称:nitetripCode,代码行数:33,代码来源:context_help.c


示例11: zedit_disp_arg2

/*
 * Print the appropriate message for the command type for arg2 and set
 * up the input catch clause.
 */
void zedit_disp_arg2(struct descriptor_data *d)
{
  int i;

  switch (OLC_CMD(d).command) {
  case 'M':
  case 'O':
  case 'E':
  case 'P':
  case 'G':
    SEND_TO_Q("Input the maximum number that can exist on the mud : ", d);
    break;
  case 'D':
    for (i = 0; *dirs[i] != '\n'; i++) {
      sprintf(buf, "%d) Exit %s.\r\n", i, dirs[i]);
      SEND_TO_Q(buf, d);
    }
    SEND_TO_Q("Enter exit number for door : ", d);
    break;
  case 'R':
    SEND_TO_Q("Input object's vnum : ", d);
    break;
  default:
    /*
     * We should never get here, but just in case...
     */
    cleanup_olc(d, CLEANUP_ALL);
    mudlog("SYSERR: OLC: zedit_disp_arg2(): Help!", BRF, LVL_BUILDER, TRUE);
    SEND_TO_Q("Oops...\r\n", d);
    return;
  }
  OLC_MODE(d) = ZEDIT_ARG2;
}
开发者ID:vedicveko,项目名称:Aarait,代码行数:37,代码来源:zedit.c


示例12: zedit_disp_arg4

void zedit_disp_arg4(struct descriptor_data *d)
{

  switch (OLC_CMD(d).command) {
  case 'M':
  case 'O':
  case 'E':
  case 'G':
    SEND_TO_Q("Enter The Load % : ", d);
    break;
  case 'P':
  case 'D':
  case 'R':
    break;
  default:
    /*
     * We should never get here, but just in case...
     */
    cleanup_olc(d, CLEANUP_ALL);
    mudlog("SYSERR: OLC: zedit_disp_arg4(): Help!", BRF, LVL_BUILDER, TRUE);
    SEND_TO_Q("Oops...\r\n", d);
    return;
  }
  OLC_MODE(d) = ZEDIT_ARG4;
}
开发者ID:vedicveko,项目名称:Aarait,代码行数:25,代码来源:zedit.c


示例13: redit_disp_exit_menu

/* For exits */
void redit_disp_exit_menu( DESCRIPTOR_DATA *d )
{
	ROOM_DATA	*room = d->character->dest_buf;
	EXIT_DATA	*pexit;
	int			 cnt;

	OLC_MODE(d) = REDIT_EXIT_MENU;
	write_to_buffer( d, "50\x1B[;H\x1B[2J", 0 );

	for ( cnt = 0, pexit = room->first_exit;  pexit;  pexit = pexit->next )
	{
		ch_printf( d->character,
			"&g%2d&w) %-10.10s to %-5d.  Key: %d  Keywords: %s  Flags: %s.\r\n",
			++cnt,
			code_name(NULL, pexit->vdir, CODE_DIR),
			(pexit->to_room)  ?  pexit->to_room->vnum  :  0,
			pexit->key,
			code_bit(NULL, pexit->flags, CODE_EXIT),
			(VALID_STR(pexit->keyword))  ?  pexit->keyword  :  "(none)" );
	}

	if ( room->first_exit )
		send_to_char( d->character, "\r\n" );

	send_to_char( d->character, "&gA&w) Add a new exit\r\n" );
	send_to_char( d->character, "&gR&w) Remove an exit\r\n" );
	send_to_char( d->character, "&gQ&w) Quit\r\n" );

	send_to_char( d->character, "\r\nEnter choice: " );
}
开发者ID:Onirik79,项目名称:bardmud,代码行数:31,代码来源:olc_redit.c


示例14: zedit_disp_arg3

/*
 * Print the appropriate message for the command type for arg3 and set
 * up the input catch clause.
 */
void zedit_disp_arg3(struct descriptor_data *d)
{
  int i = 0;

  switch (OLC_CMD(d).command) {
  case 'E':
    while (*equipment_types[i] != '\n') {
      sprintf(buf, "%2d) %26.26s %2d) %26.26s\r\n", i,
	   equipment_types[i], i + 1, (*equipment_types[i + 1] != '\n') ?
	      equipment_types[i + 1] : "");
      SEND_TO_Q(buf, d);
      if (*equipment_types[i + 1] != '\n')
	i += 2;
      else
	break;
    }
    SEND_TO_Q("Location to equip : ", d);
    break;
  case 'P':
    SEND_TO_Q("Virtual number of the container : ", d);
    break;
  case 'D':
    SEND_TO_Q(	"0)  Door open\r\n"
		"1)  Door closed\r\n"
		"2)  Door locked\r\n"
		"Enter state of the door : ", d);
    break;
  case 'V':
    send_to_char("Enter the global name: ", d->character);
    OLC_MODE(d) = ZEDIT_SARG1;
    return;
  case 'M':
  case 'O':
  case 'R':
  case 'G':
  default:
    /*
     * We should never get here, just in case.
     */
    cleanup_olc(d, CLEANUP_ALL);
    mudlog("SYSERR: OLC: zedit_disp_arg3(): Help!", BRF, LVL_BUILDER, TRUE);
    SEND_TO_Q("Oops...\r\n", d);
    return;
  }
  OLC_MODE(d) = ZEDIT_ARG3;
}
开发者ID:ryantm,项目名称:deimos-mud,代码行数:50,代码来源:zedit.c


示例15: oedit_disp_apply_menu

/* The actual apply to set. */
static void oedit_disp_apply_menu(struct descriptor_data *d)
{
  get_char_colors(d->character);
  clear_screen(d);
  column_list(d->character, 0, apply_types, NUM_APPLIES, TRUE);
  write_to_output(d, "\r\nEnter apply type (0 is no apply) : ");
  OLC_MODE(d) = OEDIT_APPLY;
}
开发者ID:tbamud,项目名称:tbamud,代码行数:9,代码来源:oedit.c


示例16: oedit_liquid_type

/* Ask for liquid type. */
static void oedit_liquid_type(struct descriptor_data *d)
{
  get_char_colors(d->character);
  clear_screen(d);
  column_list(d->character, 0, drinks, NUM_LIQ_TYPES, TRUE);
  write_to_output(d, "\r\n%sEnter drink type : ", nrm);
  OLC_MODE(d) = OEDIT_VALUE_3;
}
开发者ID:tbamud,项目名称:tbamud,代码行数:9,代码来源:oedit.c


示例17: sedit_disp_menu

/* Display main menu. */
static void sedit_disp_menu(struct descriptor_data *d)
{
  char buf1[MAX_STRING_LENGTH];
  char buf2[MAX_STRING_LENGTH];
  struct shop_data *shop;

  shop = OLC_SHOP(d);
  get_char_colors(d->character);

  clear_screen(d);
  sprintbit(S_NOTRADE(shop), trade_letters, buf1, sizeof(buf1));
  sprintbit(S_BITVECTOR(shop), shop_bits, buf2, sizeof(buf2));
  write_to_output(d,
	  "-- Shop Number : [%s%d%s]\r\n"
	  "%s0%s) Keeper      : [%s%d%s] %s%s\r\n"
          "%s1%s) Open 1      : %s%4d%s          %s2%s) Close 1     : %s%4d\r\n"
          "%s3%s) Open 2      : %s%4d%s          %s4%s) Close 2     : %s%4d\r\n"
	  "%s5%s) Sell rate   : %s%1.2f%s          %s6%s) Buy rate    : %s%1.2f\r\n"
	  "%s7%s) Keeper no item : %s%s\r\n"
	  "%s8%s) Player no item : %s%s\r\n"
	  "%s9%s) Keeper no cash : %s%s\r\n"
	  "%sA%s) Player no cash : %s%s\r\n"
	  "%sB%s) Keeper no buy  : %s%s\r\n"
	  "%sC%s) Buy success    : %s%s\r\n"
	  "%sD%s) Sell success   : %s%s\r\n"
	  "%sE%s) No Trade With  : %s%s\r\n"
	  "%sF%s) Shop flags     : %s%s\r\n"
	  "%sR%s) Rooms Menu\r\n"
	  "%sP%s) Products Menu\r\n"
	  "%sT%s) Accept Types Menu\r\n"
          "%sW%s) Copy Shop\r\n"
	  "%sQ%s) Quit\r\n"
	  "Enter Choice : ",

	  cyn, OLC_NUM(d), nrm,
	  grn, nrm, cyn, S_KEEPER(shop) == NOBODY ? -1 : mob_index[S_KEEPER(shop)].vnum,
	  nrm, yel, S_KEEPER(shop) == NOBODY ? "None" : mob_proto[S_KEEPER(shop)].player.short_descr,
	  grn, nrm, cyn, S_OPEN1(shop), nrm,
	  grn, nrm, cyn, S_CLOSE1(shop),
	  grn, nrm, cyn, S_OPEN2(shop), nrm,
	  grn, nrm, cyn, S_CLOSE2(shop),
	  grn, nrm, cyn, S_BUYPROFIT(shop), nrm,
	  grn, nrm, cyn, S_SELLPROFIT(shop),
	  grn, nrm, yel, S_NOITEM1(shop),
	  grn, nrm, yel, S_NOITEM2(shop),
	  grn, nrm, yel, S_NOCASH1(shop),
	  grn, nrm, yel, S_NOCASH2(shop),
	  grn, nrm, yel, S_NOBUY(shop),
	  grn, nrm, yel, S_BUY(shop),
	  grn, nrm, yel, S_SELL(shop),
	  grn, nrm, cyn, buf1,
	  grn, nrm, cyn, buf2,
	  grn, nrm, grn, nrm, grn, nrm, grn, nrm, grn, nrm
  );

  OLC_MODE(d) = SEDIT_MAIN_MENU;
}
开发者ID:tbamud,项目名称:tbamud,代码行数:58,代码来源:sedit.c


示例18: medit_string_cleanup

void medit_string_cleanup(struct descriptor_data *d, int terminator) {
    switch (OLC_MODE(d)) {

        case MEDIT_D_DESC:
        default:
            medit_disp_menu(d);
            break;
    }
}
开发者ID:mystickdreamer,项目名称:tba365,代码行数:9,代码来源:medit.c


示例19: redit_disp_menu

/*
 * Il menu principale.
 */
void redit_disp_menu( DESCRIPTOR_DATA *d )
{
	char	 	 buf[MSL];
	ROOM_DATA	*room = d->character->dest_buf;
	char		*sect;


	switch ( room->sector )
	{
	  default:					sect = "None";			break;
	  case SECTOR_INSIDE:			sect = "Inside";		break;
	  case SECTOR_CITY:			sect = "City";			break;
	  case SECTOR_FIELD:			sect = "Field";			break;
	  case SECTOR_FOREST:			sect = "Forest";		break;
	  case SECTOR_HILLS:			sect = "Hills";			break;
	  case SECTOR_MOUNTAIN:		sect = "Mountains";		break;
	  case SECTOR_WATER_SWIM:		sect = "Swim";			break;
	  case SECTOR_WATER_NOSWIM:	sect = "Noswim";		break;
	  case SECTOR_UNDERWATER:		sect = "Underwater";	break;
	  case SECTOR_AIR:			sect = "Air";			break;
	  case SECTOR_DESERT:			sect = "Desert";		break;
	  case SECTOR_OCEANFLOOR:		sect = "Oceanfloor";	break;
	  case SECTOR_UNDERGROUND:	sect = "Underground";	break;
	}

	write_to_buffer( d, "50\x1B[;H\x1B[2J", 0 );

	sprintf( buf,
		"&w-- Room number : [&c%d&w]	  Room area: [&c%-30.30s&w]\r\n"
		"&g1&w) Name		: &O%s\r\n"
		"&g2&w) Description :\r\n&O%s"
		"&g3&w) Room flags  : &c%s\r\n"
		"&g4&w) Sector type : &c%s\r\n"
		"&g5&w) Tunnel	  : &c%d\r\n"
		"&g6&w) TeleDelay   : &c%d\r\n"
		"&g7&w) TeleVnum	: &c%d\r\n"
		"&gA&w) Exit menu\r\n"
		"&gB&w) Extra descriptions menu\r\n"
		"&gQ&w) Quit\r\n"
		"Enter choice : ",

		OLC_NUM(d),
		(room->area)  ?  room->area->name  :  "None???",
		room->name,
		room->description,
		code_bit(NULL, room->flags, CODE_ROOM),
		sect,
		room->tunnel,
		room->tele_delay,
		room->tele_vnum );

	set_char_color( AT_PLAIN, d->character );
	send_to_char( d->character, buf );

	OLC_MODE(d) = REDIT_MAIN_MENU;
}
开发者ID:Onirik79,项目名称:bardmud,代码行数:59,代码来源:olc_redit.c


示例20: oedit_disp_val1_menu

/* Object value #1 */
static void oedit_disp_val1_menu(struct descriptor_data *d)
{
  OLC_MODE(d) = OEDIT_VALUE_1;
  switch (GET_OBJ_TYPE(OLC_OBJ(d))) {
  case ITEM_LIGHT:
    /* values 0 and 1 are unused.. jump to 2 */
    oedit_disp_val3_menu(d);
    break;
  case ITEM_SCROLL:
  case ITEM_WAND:
  case ITEM_STAFF:
  case ITEM_POTION:
    write_to_output(d, "Spell level : ");
    break;
  case ITEM_WEAPON:
    /* This doesn't seem to be used if I remember right. */
    write_to_output(d, "Modifier to Hitroll : ");
    break;
  case ITEM_ARMOR:
    write_to_output(d, "Apply to AC : ");
    break;
  case ITEM_CONTAINER:
    write_to_output(d, "Max weight to contain (-1 for unlimited) : ");
    break;
  case ITEM_DRINKCON:
  case ITEM_FOUNTAIN:
    write_to_output(d, "Max drink units (-1 for unlimited) : ");
    break;
  case ITEM_FOOD:
    write_to_output(d, "Hours to fill stomach : ");
    break;
  case ITEM_MONEY:
    write_to_output(d, "Number of gold coins : ");
    break;
  case ITEM_FURNITURE:
    write_to_output(d, "Number of people it can hold : ");
    break;
  case ITEM_NOTE:  // These object types have no 'values' so go back to menu
  case ITEM_OTHER:
  case ITEM_WORN:
  case ITEM_TREASURE:
  case ITEM_TRASH:
  case ITEM_KEY:
  case ITEM_PEN:
  case ITEM_BOAT:
  case ITEM_FREE:   /* Not implemented, but should be handled here */
  case ITEM_FREE2:  /* Not implemented, but should be handled here */
    oedit_disp_menu(d);
    break;
  default:
    mudlog(BRF, LVL_BUILDER, TRUE, "SYSERR: OLC: Reached default case in oedit_disp_val1_menu()!");
    break;
  }
}
开发者ID:tbamud,项目名称:tbamud,代码行数:55,代码来源:oedit.c



注:本文中的OLC_MODE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ OLE2T函数代码示例发布时间:2022-05-30
下一篇:
C++ OK函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap