| Message
| Yeah, the full function would probably help, heh.
void do_embed( CHAR_DATA *ch, char *argument )
{
char arg [MAX_INPUT_LENGTH];
OBJ_DATA *shard;
char buf[MAX_STRING_LENGTH];
one_argument( argument, arg );
if ( IS_NPC(ch))
return;
for (shard = ch->first_carrying; shard; shard = shard->next_content)
{
if (shard->pIndexData->vnum == 91)
{
if ( arg[0] == '\0' )
{
send_to_char( "&wEmbed the Shikon Shard where?\n\r(arm, leg, head, neck, foot, hand, torso, shoulder)\n\r ", ch$
return;
}
}
if ( !str_cmp( arg, "arm" ) )
{
send_to_char( "&PYou embed a shard into your arm.\n\r", ch );
act(AT_GREY,"&P$n embeds a shard into $s arm.", ch, NULL, NULL, TO_CANSEE);
ch->arm_shards++;
ch->hit -= ch->hit * 0.01;
separate_obj ( shard );
obj_from_char( shard );
sprintf(buf, "%s embeded a shard into their arm", ch->name );
to_channel( buf, CHANNEL_SHARDMONITOR, "ShardMonitor", LEVEL_IMMORTAL );
extract_obj( shard );
return;
}
if ( !str_cmp( arg, "leg" ) )
{
send_to_char( "&PYou embed a shard into your leg.\n\r", ch );
act(AT_GREY,"&P$n embeds a shard into $s leg.", ch, NULL, NULL, TO_CANSEE);
ch->leg_shards++;
ch->hit -= ch->hit * 0.01;
separate_obj ( shard );
obj_from_char( shard );
sprintf(buf, "%s embeded a shard into their leg", ch->name );
to_channel( buf, CHANNEL_SHARDMONITOR, "ShardMonitor", LEVEL_IMMORTAL );
extract_obj( shard );
return;
}
if ( !str_cmp( arg, "head" ) )
{
send_to_char( "&PYou embed a shard into your head.\n\r", ch );
act(AT_GREY,"&P$n embeds a shard into $s head.", ch, NULL, NULL, TO_CANSEE);
ch->head_shards++;
ch->hit -= ch->hit * 0.01;
separate_obj ( shard );
obj_from_char( shard );
sprintf(buf, "%s embeded a shard into their head", ch->name );
to_channel( buf, CHANNEL_SHARDMONITOR, "ShardMonitor", LEVEL_IMMORTAL );
extract_obj( shard );
return;
}
if ( !str_cmp( arg, "neck" ) )
{
send_to_char( "&PYou embed a shard into your neck.\n\r", ch );
act(AT_GREY,"&P$n embeds a shard into $s neck.", ch, NULL, NULL, TO_CANSEE);
ch->neck_shards++;
ch->hit -= ch->hit * 0.01;
separate_obj ( shard );
obj_from_char( shard );
sprintf(buf, "%s embeded a shard into their neck", ch->name );
to_channel( buf, CHANNEL_SHARDMONITOR, "ShardMonitor", LEVEL_IMMORTAL );
extract_obj( shard );
return;
}
if ( !str_cmp( arg, "foot" ) )
{
send_to_char( "&PYou embed a shard into your foot.\n\r", ch );
act(AT_GREY,"&P$n embeds a shard into $s foot.", ch, NULL, NULL, TO_CANSEE);
ch->feet_shards++;
ch->hit -= ch->hit * 0.01;
separate_obj ( shard );
obj_from_char( shard );
sprintf(buf, "%s embeded a shard into their foot", ch->name );
to_channel( buf, CHANNEL_SHARDMONITOR, "ShardMonitor", LEVEL_IMMORTAL );
extract_obj( shard );
return;
}
if ( !str_cmp( arg, "hand" ) )
{
send_to_char( "&PYou embed a shard into your hand.\n\r", ch );
act(AT_GREY,"&P$n embeds a shard into $s hand.", ch, NULL, NULL, TO_CANSEE);
ch->hand_shards++;
ch->hit -= ch->hit * 0.01;
separate_obj ( shard );
obj_from_char( shard );
sprintf(buf, "%s embeded a shard into their hand", ch->name );
to_channel( buf, CHANNEL_SHARDMONITOR, "ShardMonitor", LEVEL_IMMORTAL );
extract_obj( shard );
return;
}
if ( !str_cmp( arg, "torso" ) )
{
send_to_char( "&PYou embed a shard into your torso.\n\r", ch );
act(AT_GREY,"&P$n embeds a shard into $s torso.", ch, NULL, NULL, TO_CANSEE);
ch->torso_shards++;
ch->hit -= ch->hit * 0.01;
separate_obj ( shard );
obj_from_char( shard );
sprintf(buf, "%s embeded a shard into their torso", ch->name );
to_channel( buf, CHANNEL_SHARDMONITOR, "ShardMonitor", LEVEL_IMMORTAL );
extract_obj( shard );
return;
}
if ( !str_cmp( arg, "shoulder" ) )
{
send_to_char( "&PYou embed a shard into your shoulder.\n\r", ch );
act(AT_GREY,"&P$n embeds a shard into $s shoulder.", ch, NULL, NULL, TO_CANSEE);
ch->shoulder_shards++;
ch->hit -= ch->hit * 0.01;
separate_obj ( shard );
obj_from_char( shard );
sprintf(buf, "%s embeded a shard into their shoulder", ch->name );
to_channel( buf, CHANNEL_SHARDMONITOR, "ShardMonitor", LEVEL_IMMORTAL );
extract_obj( shard );
return;
}
else
{
send_to_char( "&wThat is not a body part!\n\r", ch );
return;
}
}
send_to_char( "&wYou don't have any Shikon Shards!\n\r", ch );
return;
}
(I'll probably redo this as a switch/case code)
And yes, I want to find a specific item on the player. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|