/**************************************************************************** * Eldhamud Codebase V2.2 * * ------------------------------------------------------------------------ * * EldhaMUD code (C) 2003-2008 by Robert Powell (Tommi) * * ------------------------------------------------------------------------ */ #include <stdio.h> #include <string.h> #include <time.h> #include "./Headers/mud.h" char *tattoo_bit_name( int tattoo_flags ) { static char buf[512]; buf[0] = STRING_NULL; if( ( tattoo_flags & TATTOO_BULL ) == TATTOO_BULL ) strcat( buf, " A raging bull on your right arm. \n\r" ); if( ( tattoo_flags & TATTOO_PANTHER ) == TATTOO_PANTHER ) strcat( buf, " A sleek black panther on your left arm. \n\r" ); if( ( tattoo_flags & TATTOO_WOLF ) == TATTOO_WOLF ) strcat( buf, " A wolf stalking it's prey on your right leg. \n\r" ); if( ( tattoo_flags & TATTOO_BEAR ) == TATTOO_BEAR ) strcat( buf, " A giant sleeping bear on your left leg. \n\r" ); if( ( tattoo_flags & TATTOO_RABBIT ) == TATTOO_RABBIT ) strcat( buf, " A little white rabbit on your ankle. \n\r" ); if( ( tattoo_flags & TATTOO_DRAGON ) == TATTOO_DRAGON ) strcat( buf, " A great flying flaming dragon on your chest.\n\r" ); if( ( tattoo_flags & TATTOO_MOON ) == TATTOO_MOON ) strcat( buf, " A crescent moon across your back. \n\r" ); return ( buf[0] != STRING_NULL ) ? buf + 1 : "none"; } /*---------------------------------------------------------------------------------------------*/ void do_tattoo( CHAR_DATA * ch, char *argument ) { CHAR_DATA *mob; char arg[MAX_INPUT_LENGTH]; char buf[MAX_STRING_LENGTH]; int cost; /* * check for artist */ for( mob = ch->in_room->first_person; mob; mob = mob->next_in_room ) { if( IS_NPC( mob ) && xIS_SET( mob->act, ACT_IS_TATTOOARTIST ) ) break; } /* * if there are none , display the characters tattoos */ if( mob == NULL ) { sprintf( buf, "&C+----------------- Magical Tattoos -----------------------+&W\n\r %s\n\r", tattoo_bit_name( ch->tattoo ) ); send_to_char( buf, ch ); return; } one_argument( argument, arg ); /* * if there are a surgeon, give a list */ if( arg[0] == STRING_NULL ) { /* * display price list */ act( AT_CYAN, "&z&C$N says 'I have these parts in stock:'", ch, NULL, mob, TO_CHAR ); send_to_char( " &z&W+---Tattoos---+ +--------Cost-------- \n\r", ch ); send_to_char( " &CRaging_Bull &Y350,000 &CGold\n\r", ch ); send_to_char( " &CSleek_Panther &Y350,000 &CGold\n\r", ch ); send_to_char( " &CStalking_Wolf &Y350,000 &CGold\n\r", ch ); send_to_char( " &CSleeping_Bear &Y450,000 &CGold\n\r", ch ); send_to_char( " &CRabbit &Y150,000 &CGold\n\r", ch ); send_to_char( " &CFlying_Dragon &Y1,000,000 &CGold\n\r", ch ); send_to_char( " &CRising_Moon &Y750,000 &CGold\n\r", ch ); send_to_char( " &CType &Wtattoo &B<&Wtype&B>&C to buy one, or help tattoo to get more info.\n\r", ch ); return; } /* * Lets see what the character wants to have */ /* Raging Bull*/ if( !str_prefix( arg, "raging_bull" ) ) { cost = 350000; if( cost > ( ch->gold ) ) { act( AT_CYAN, "$N says 'I'm sorry but please return to me when you have more gold.'", ch, NULL, mob, TO_CHAR ); return; } if( IS_SET( ch->tattoo, TATTOO_BULL ) ) { send_to_char( "You already have that tattoo.\n\r", ch ); return; } SET_BIT( ch->tattoo, TATTOO_BULL ); ch->perm_str += 3; ch->perm_con += 3; } /* Sleek Panther*/ else if( !str_prefix( arg, "sleek_panther" ) ) { cost = 350000; if( cost > ( ch->gold ) ) { act( AT_CYAN, "$N says 'I'm sorry but please return to me when you have more gold.'", ch, NULL, mob, TO_CHAR ); return; } if( IS_SET( ch->tattoo, TATTOO_PANTHER ) ) { send_to_char( "You already have that tattoo.\n\r", ch ); return; } SET_BIT( ch->tattoo, TATTOO_PANTHER ); xSET_BIT( ch->affected_by, AFF_HIDE ); ch->perm_dex += 2; ch->armor -= 10; } /* Stalking Wolf*/ else if( !str_prefix( arg, "stalking_wolf" ) ) { cost = 350000; if( cost > ( ch->gold ) ) { act( AT_CYAN, "$N says 'I'm sorry but please return to me when you have more gold.'", ch, NULL, mob, TO_CHAR ); return; } if( IS_SET( ch->tattoo, TATTOO_WOLF ) ) { send_to_char( "You already have that tattoo.\n\r", ch ); return; } SET_BIT( ch->tattoo, TATTOO_WOLF ); xSET_BIT( ch->affected_by, AFF_SNEAK ); ch->perm_dex += 2; ch->armor -= 10; } /* Sleeping Bear*/ else if( !str_prefix( arg, "sleeping_bear" ) ) { cost = 450000; if( cost > ( ch->gold ) ) { act( AT_CYAN, "$N says 'I'm sorry but please return to me when you have more gold.'", ch, NULL, mob, TO_CHAR ); return; } if( IS_SET( ch->tattoo, TATTOO_BEAR ) ) { send_to_char( "You already have that tattoo.\n\r", ch ); return; } SET_BIT( ch->tattoo, TATTOO_BEAR ); SET_BIT( ch->immune, RIS_SLEEP ); SET_BIT( ch->resistant, RIS_NONMAGIC ); ch->perm_str += 2; ch->perm_con += 4; ch->damroll += 20; } /* Rabbit*/ else if( !str_prefix( arg, "Rabbit" ) ) { cost = 150000; if( cost > ( ch->gold ) ) { act( AT_CYAN, "$N says 'I'm sorry but please return to me when you have more gold.'", ch, NULL, mob, TO_CHAR ); return; } if( IS_SET( ch->tattoo, TATTOO_RABBIT ) ) { send_to_char( "You already have that tattoo.\n\r", ch ); return; } SET_BIT( ch->tattoo, TATTOO_RABBIT ); ch->max_move += 50; ch->perm_dex += 2; ch->armor -= 10; } /* Flying Dragon*/ else if( !str_prefix( arg, "Flying_Dragon" ) ) { cost = 1000000; if( cost > ( ch->gold ) ) { act( AT_CYAN, "$N says 'I'm sorry but please return to me when you have more gold.'", ch, NULL, mob, TO_CHAR ); return; } if( IS_SET( ch->tattoo, TATTOO_DRAGON ) ) { send_to_char( "You already have that tattoo.\n\r", ch ); return; } SET_BIT( ch->tattoo, TATTOO_DRAGON ); ch->max_hit += 100; ch->hitroll += 25; ch->damroll += 25; ch->armor -= 50; ch->perm_str += 2; ch->perm_dex += 2; ch->perm_con += 2; ch->perm_int += 2; ch->perm_wis += 2; ch->perm_cha += 2; ch->perm_lck += 2; xSET_BIT( ch->affected_by, AFF_FLYING ); SET_BIT( ch->resistant, RIS_MAGIC ); } /* Rising Moon */ else if( !str_prefix( arg, "Rising_Moon" ) ) { cost = 750000; if( cost > ( ch->gold ) ) { act( AT_CYAN, "$N says 'I'm sorry but please return to me when you have more gold.'", ch, NULL, mob, TO_CHAR ); return; } if( IS_SET( ch->tattoo, TATTOO_MOON ) ) { send_to_char( "You already have that tattoo.\n\r", ch ); return; } SET_BIT( ch->tattoo, TATTOO_MOON ); xSET_BIT( ch->affected_by, AFF_TRUESIGHT ); SET_BIT( ch->resistant, RIS_DRAIN ); ch->max_mana += 200; ch->perm_int += 2; } else { act( AT_CYAN, "$N says 'Type 'tattoo' for a list of tattoos.'", ch, NULL, mob, TO_CHAR ); return; } WAIT_STATE( ch, PULSE_VIOLENCE ); ch->gold -= cost; act( AT_CYAN, "$n says 'There we go, all finished'.", mob, NULL, NULL, TO_ROOM ); }