for( counter = 0; counter < MAX_DAM_TYPE - 1; counter++ )
void oedit_disp_damage_type_menu( DESCRIPTOR_DATA * d )
{
char buf[MAX_STRING_LENGTH];
CHAR_DATA *ch = d->character;
OLC_MODE( d ) = OLC_VALUE_5
int counter, col = 0;
ch_printf_color( d->character,"&D——————————————————————————–\n\r");
ch_printf_color( d->character,"&c Damage Type Menu EldhaMUD OLC\n\r", 0 );
ch_printf_color( d->character,"&D——————————————————————————–\n\r");
for( counter = 0; counter < MAX_DAM_TYPE - 1; counter++ )
{
sprintf( buf, "&P%2d&w) %-20.20s ", counter, attack_table[counter] );
if( ++col % 2 == 0 )
strcat( buf, "\n\r" );
send_to_char_color( buf, ch );
}
send_to_char( "\n\rEnter weapon damage type: ", ch );
return;
}
case OEDIT_VALUE_4:
number = atoi( arg );
switch ( obj->item_type )
{
case ITEM_PILL:
case ITEM_SCROLL:
case ITEM_POTION:
case ITEM_WAND:
case ITEM_STAFF:
min_val = -1;
max_val = top_sn - 1;
if( !is_number( arg ) )
number = skill_lookup( arg );
break;
case ITEM_WEAPON:
min_val = 0;
max_val = WEP_MAX - 1;
if( number < min_val || number > max_val )
{
oedit_disp_val4_menu( d );
return;
}
break;
default:
min_val = -32000;
max_val = 32000;
break;
}
obj->value[3] = URANGE( min_val, number, max_val );
olc_log( d, "Changed v3 to %d", obj->value[3] );
if( IS_OBJ_STAT( obj, ITEM_PROTOTYPE ) )
obj->pIndexData->value[3] = obj->value[3];
oedit_disp_val5_menu( d ); <———–This is Called and in there its set to OLC_MODE( d ) = OEDIT_VALUE_5;
break;
case OEDIT_VALUE_5:
number = atoi( arg );
switch ( obj->item_type )
{
case ITEM_SALVE:
if( !is_number( arg ) )
number = skill_lookup( arg );
min_val = -1;
max_val = top_sn - 1;
break;
case ITEM_FOOD:
min_val = 0;
max_val = 32000;
break;
case ITEM_WEAPON:
ch_printf_color( d->character,"VALUE5 item weapon case\n\r");
min_val = 0;
max_val = MAX_DAM_TYPE;
if( number < min_val || number > max_val )
{
oedit_disp_val5_menu( d );
return;
}
break;
default:
min_val = -32000;
max_val = 32000;
break;
}
OBJ_DATA *obj = d->character->dest_buf;
void oedit_disp_damage_type_menu( DESCRIPTOR_DATA * d )
{
char buf[MAX_STRING_LENGTH];
CHAR_DATA *ch = d->character;
int counter, col = 0;
ch_printf_color( d->character,"&D——————————————————————————–\n\r");
ch_printf_color( d->character,"&c Damage Type Menu EldhaMUD OLC\n\r" );
ch_printf_color( d->character,"&D——————————————————————————–\n\r");
for( counter = 0; counter < MAX_DAM_TYPE; counter++ )
{
sprintf( buf, "&P%2d&w) %-20.20s ", counter, attack_table[counter] );
if( ++col % 2 == 0 )
strcat( buf, "\n\r" );
send_to_char_color( buf, ch );
}
send_to_char( "\n\rEnter weapon damage type: ", ch );
OLC_MODE( d ) = OEDIT_VALUE_5;
return;
}
case OEDIT_VALUE_5:
number = atoi( arg );
switch ( obj->item_type )
{
case ITEM_SALVE:
if( !is_number( arg ) )
number = skill_lookup( arg );
min_val = -1;
max_val = top_sn - 1;
break;
case ITEM_FOOD:
min_val = 0;
max_val = 32000;
break;
case ITEM_WEAPON:
ch_printf_color( d->character,"VALUE5 item weapon case\n\r");
min_val = 0;
max_val = MAX_DAM_TYPE;
if( number < min_val || number > max_val )
{
oedit_disp_val5_menu( d );
return;
}
break;
default:
min_val = -32000;
max_val = 32000;
break;
}
obj->value[4] = URANGE( min_val, number, max_val );
olc_log( d, "Changed v4 to %d", obj->value[4] );
if( IS_OBJ_STAT( obj, ITEM_PROTOTYPE ) )
obj->pIndexData->value[4] = obj->value[4];
ch_printf_color( d->character,"calling dis 6\n\r");
oedit_disp_val6_menu( d );
return;
Condition : 100
Number of damage dice : 5
Size of damage dice : 11
——————————————————————————–
Weapons Type Menu EldhaMUD OLC
——————————————————————————–
0) Barehand 1) Sword
2) Dagger 3) Whip
4) Talon 5) Hammer
6) Archery 7) Blowgun
8) Sling 9) Axe
10) Spear 11) Staff
12) Polearm
Enter weapon type: 1
——————————————————————————–
Damage Type Menu EldhaMUD OLC
——————————————————————————–
0) hit 1) slash
2) stab 3) hack
4) crush 5) lash
6) pierce 7) thrust
8) slice 9) (null)
Enter weapon damage type: 0
VALUE5 item weapon case
calling dis 6
——————————————————————————–
Objects Main Menu EldhaMUD OLC
——————————————————————————–
– Item number : [96]
1) Name : Steel Masakari of Fate
2) S-Desc : a Steel Masakari of Fate
3) L-Desc :-
A Steel Masakari of Fate
4) A-Desc :-
5) Type : Weapon
6) Extra flags :
7) Wear flags : take wield
8) Weight : 15
9) Cost : 300
A) Rent(unused): 0
B) Timer : 0
C) Level : 3
D) Layers : 0
E) Values : 100 5 11 1 0 0
F) Affect menu
G) Extra descriptions menu
Q) Quit
Number of damage dice : 2 <—V1
Size of damage dice : 2 <—V2
——————————————————————————–
Weapons Type Menu EldhaMUD OLC <—V3
——————————————————————————–
0) Barehand 1) Sword
2) Dagger 3) Whip
4) Talon 5) Hammer
6) Archery 7) Blowgun
8) Sling 9) Axe
10) Spear 11) Staff
12) Polearm
Enter weapon type: 2
——————————————————————————–
Damage Type Menu EldhaMUD OLC <—V4
——————————————————————————–
0) hit 1) slash
2) stab 3) hack
4) crush 5) lash
6) pierce 7) thrust
8) slice
Enter weapon damage type:
– Item number : [4000]
1) Name : practice sword
2) S-Desc : a practice sword
3) L-Desc :-
q
4) A-Desc :-
5) Type : Weapon
6) Extra flags : metal antilife antidecay antigrowth
7) Wear flags : take wield
8) Weight : 1
9) Cost : 0
A) Rent(unused): 0
B) Timer : 0
C) Level : 45
D) Layers : 0
E) Values : 2 2 2 2 1 0
F) Affect menu
G) Extra descriptions menu
Q) Quit
Enter choice :
As you can see by the above game output, when it gets to damage type it just falls through back to the main menu.
For the life of me i cannot work out whats going on here. Anyone got any ideas for me, or want to take a look at all the code? LOL.