/*******************************************************************************
* _ | File Name: addcarry.txt
* / \ _-' | Description: This is a mset add-on
* _/| \-''- _ / | It allows an immortal witht the set
* __-' | \ | set command to add number of extra items
* / \ | and/or number of extra carry lbs that a
* / "o. |o | | character is allowed to carry.
* | \ ; | *It is permanent!
* ', |
* \_ __\ | (c) 2000-2001 TAKA
* ''-_ \.// | (c) 2000-2001 The GhostMud Project Team
* / '-____' |
* / | You may use this code under GNU license restriction
* _' The Wolf | 1) This header block remains in the code.
* _-' strikes! | 2) You email me at a_ghost_dancer@excite.com
*_________________________| letting me know you are using this code
* please incluse your name, your mud name
* All rights reserved your mud address, your email and this file
* GhostMud is copyrighted name.
* by TAKA 3) In your help files mention me where appropriate
* IE: help snippets.
*********************************************************************************/
/*
* This allows an immortal to se the carry items and weight
* bonus for a player.
*/
in MERC.H
find
struct pc_data
{
add near the bottom of this structure
int xcarry;
int xweight;
in SAVE.C
find
void fwrite_char( CHAR_DATA *ch, FILE *fp )
{
add somewhere after age
fprintf( fp, "Xcry %d %d\n", ch->pcdata->xcarry, ch->pcdata->xweight);
find
bool load_char_obj( DESCRIPTOR_DATA *d, char *name )
{
add
ch->pcdata->xcarry = 0;
ch->pcdata->xweight = 0;
after title initialize
add
case 'X':
if ( !str_cmp( word, "Xcry" ))
{
ch->pcdata->xcarry = fread_number( fp );
ch->pcdata->xweight = fread_number( fp );
fMatch = TRUE;
break;
}
break;
in the switch statement...X is a new case for the switch
in ACT_WIZ.C
find
void do_mset( CHAR_DATA *ch, char *argument )
{
add near the bottom
/* more taka set changes */
if ( !str_prefix( arg2, "carry" ) )
{
if ( IS_NPC( victim ) )
{
send_to_char( "{RNot on NPC's.{x\n\r", ch );
return;
}
if ( !is_number( arg3 ) )
{
send_to_char( "{RValue must be numeric.{x\n\r", ch );
return;
}
value = atoi( arg3 );
if ( value < 0 || value > 300 )
{
send_to_char( "{RCarry value must be 0 to 300!{x\n\r", ch );
return;
}
victim->pcdata->xcarry = value;
return;
}
if ( !str_prefix( arg2, "weight" ) )
{
if ( IS_NPC( victim ) )
{
send_to_char( "{RNot on NPC's.{x\n\r", ch );
return;
}
if ( !is_number( arg3 ) )
{
send_to_char( "{RValue must be numeric.{x\n\r", ch );
return;
}
value = atoi( arg3 );
if ( value < 0 || value > 30000 )
{
send_to_char( "{RWeight value must be 0 to 30,000!{x\n\r", ch );
return;
}
victim->pcdata->xweight = value;
return;
}
in HANDLER.C
find and replace these proceedures
/*
* Retrieve a character's carry capacity.
*/
int can_carry_n (CHAR_DATA * ch)
{
if (!IS_NPC (ch) && ch->level >= LEVEL_IMMORTAL)
return 1000;
if (IS_NPC (ch) && IS_SET (ch->act, ACT_PET))
return 0;
if(!IS_NPC(ch))
return MAX_WEAR + 2 * get_curr_stat (ch, STAT_DEX) + ch->level + ch->pcdata->xcarry;
else
return MAX_WEAR + 2 * get_curr_stat (ch, STAT_DEX) + ch->level;
}
/*
* Retrieve a character's carry capacity.
*/
int can_carry_w (CHAR_DATA * ch)
{
if (!IS_NPC (ch) && ch->level >= LEVEL_IMMORTAL)
return 10000000;
if (IS_NPC (ch) && IS_SET (ch->act, ACT_PET))
return 0;
if(!IS_NPC(ch))
return str_app[get_curr_stat (ch, STAT_STR)].carry * 10 + (ch->level * 25) + ch->pcdata->xweight;
else
return str_app[get_curr_stat (ch, STAT_STR)].carry * 10 + (ch->level * 25);
}
viola you are done :)