/* Equipment commands by Tracker */ #if defined(macintosh) #include <types.h> #else #include <sys/types.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "merc.h" #include "player.h" void do_classcreate( CHAR_DATA *ch, char *argument ) { OBJ_INDEX_DATA *pObjIndex; OBJ_DATA *obj; char arg[MAX_INPUT_LENGTH]; char buf[MAX_STRING_LENGTH]; char buf2[MAX_STRING_LENGTH]; char ooga[MAX_STRING_LENGTH]; char ooga2[MAX_STRING_LENGTH]; char ooga3[MAX_STRING_LENGTH]; int vnum = 0; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if (IS_CLASS(ch, CLASS_DEMON) || (IS_CLASS(ch, CLASS_DROW) || (IS_CLASS(ch, CLASS_HIGHLANDER)))) { send_to_char("Huh?\n\r",ch); return; } if (IS_NPC(ch)) { send_to_char("Huh?\n\r",ch); return; } if (arg[0] == '\0') { send_to_char("Please specify what kind of equipment you want to create.\n\r", ch ); send_to_char("Cloak, Boots, Leggings, Sleeves, Belt\n\rHood, Mask, Bracer, Ring, Amulet\n\rVest, Gloves, Long, Short.\n\r",ch); return; } if (!str_cmp(arg, "cloak" )) { vnum = 30435; sprintf(ooga,"Cloak"); } else if (!str_cmp(arg, "boots" )) { vnum = 30428; sprintf(ooga,"Boots"); } else if (!str_cmp(arg, "leggings")) { vnum = 30429; sprintf(ooga,"Leggings"); } else if (!str_cmp(arg, "sleeves" )) { vnum = 30431; sprintf(ooga,"Sleeves"); } else if (!str_cmp(arg, "belt" )) { vnum = 30432; sprintf(ooga,"Belt"); } else if (!str_cmp(arg, "hood" )) { vnum = 30436; sprintf(ooga,"Hood"); } else if (!str_cmp(arg, "mask" )) { vnum = 30434; sprintf(ooga,"Mask"); } else if (!str_cmp(arg, "bracer" )) { vnum = 30433; sprintf(ooga,"Bracer"); } else if (!str_cmp(arg, "ring" )) { vnum = 30425; sprintf(ooga,"Ring"); } else if (!str_cmp(arg, "amulet" )) { vnum = 30426; sprintf(ooga,"Amulet"); } else if (!str_cmp(arg, "vest" )) { vnum = 30427; sprintf(ooga,"Vest"); } else if (!str_cmp(arg, "gloves" )) { vnum = 30430; sprintf(ooga,"Gloves"); } else if (!str_cmp(arg, "long" )) { vnum = 32220; sprintf(ooga,"LongSword"); } else if (!str_cmp(arg, "short" )) { vnum = 32221; sprintf(ooga,"ShortSword"); } else { send_to_char("That is an invalid type.\n\r", ch ); return; } if ( ch->practice < 100) { send_to_char("It costs 100 primal to create equipment.\n\r",ch); return; } if ( vnum == 0 || (pObjIndex = get_obj_index( vnum )) == NULL) { send_to_char("Missing object, please inform Tracker.\n\r",ch); return; } ch->practice -= 100; obj = create_object(pObjIndex, 50); obj_to_char(obj, ch); act("$p appears in your hands.",ch,obj,NULL,TO_CHAR); act("$p appears in $n's hands.",ch,obj,NULL,TO_ROOM); if (IS_CLASS(ch, CLASS_WEREWOLF)) { sprintf(ooga2,"{D[{yWereWolf{D]{w wolfkin"); sprintf(ooga2,"wolfkin"); } else if (IS_CLASS(ch, CLASS_NINJA)) { sprintf(ooga2,"{D[{mNinja{D]{w assassin's"); sprintf(ooga3,"ninja assassin"); } else if (IS_CLASS(ch, CLASS_ANGEL)) { sprintf(ooga2,"{D[{WAngel{D]{w angelic"); sprintf(ooga3,"angelic angel"); } else if (IS_CLASS(ch, CLASS_VAMPIRE)) { sprintf(ooga2,"{D[{rVampire{D]{w vampiric"); sprintf(ooga3,"vampiric vampire"); } else if (IS_CLASS(ch, CLASS_PRIEST)) { sprintf(ooga2,"{D[{WPriest{D]{w holy"); sprintf(ooga3,"priest holy"); } else if (IS_CLASS(ch, CLASS_RANGER)) { sprintf(ooga2,"{D[{GRanger{D]{w nature's"); sprintf(ooga3,"nature ranger"); } else if( IS_CLASS( ch, CLASS_MAGE ) ) { char * col; char * title; switch ( PC(ch,powers[MPOWER_RUNE0]) ) { default: col = "#c"; break; case PURPLE_MAGIC: col = "#p"; break; case RED_MAGIC: col = "#r"; break; case BLUE_MAGIC: col = "#b"; break; case GREEN_MAGIC: col = "#g"; break; case YELLOW_MAGIC: col = "#Y";break; } switch( ch->level ) { default: title = "Chaos"; break; case LEVEL_APPRENTICE: title = "Apprentice"; break; case LEVEL_MAGE: title = "Magistra"; break; case LEVEL_ARCHMAGE: title = "Mythical Master"; break; } sprintf( ooga2, "{D[%s%s{D]{w Mystical", col, title ); sprintf( ooga3, "%s mage mystical", title ); } else { sprintf(ooga2,"{D[#.ClassLess{D]{w classless"); sprintf(ooga3,"classless"); } sprintf(buf,"%s %s",ooga2,ooga); sprintf(buf2,"%s %s",ooga3,ooga); free_string( obj->short_descr ); obj->short_descr = str_dup( buf ); free_string( obj->name ); obj->name = str_dup( buf2 ); send_to_char("You bend and shape the object to fit your class.\n\r",ch); return; } void do_vampcreate( CHAR_DATA *ch, char *argument ) { OBJ_INDEX_DATA *pObjIndex; OBJ_DATA *obj; char arg[MAX_INPUT_LENGTH]; int vnum = 0; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_VAMPIRE)) { send_to_char("Huh?\n\r",ch); return; } if (arg[0] == '\0') { send_to_char("Please specify what kind of equipment you want to create.\n\r", ch ); send_to_char("Ring, Cape, Armor, Helm, Pants,\n\rBoots, Gauntlets, Bracer, Sleeves, Belt,\n\rMask, Gloves, Cloak.",ch); return; } if (!str_cmp(arg, "ring" )) vnum = 32222; else if (!str_cmp(arg, "cape" )) vnum = 32223; else if (!str_cmp(arg, "armor" )) vnum = 32224; else if (!str_cmp(arg, "helm" )) vnum = 32225; else if (!str_cmp(arg, "pants" )) vnum = 32226; else if (!str_cmp(arg, "boots" )) vnum = 32227; else if (!str_cmp(arg, "gauntlets")) vnum = 32228; else if (!str_cmp(arg, "bracer" )) vnum = 32229; else if (!str_cmp(arg, "sleeves" )) vnum = 32230; else if (!str_cmp(arg, "belt" )) vnum = 32231; else if (!str_cmp(arg, "mask" )) vnum = 32232; else if (!str_cmp(arg, "gloves" )) vnum = 32233; else if (!str_cmp(arg, "cloak" )) vnum = 32234; else { send_to_char("That is an invalid type.\n\r", ch ); return; } if ( ch->practice < 100) { send_to_char("It costs 100 primal to create equipment.\n\r",ch); return; } if ( vnum == 0 || (pObjIndex = get_obj_index( vnum )) == NULL) { send_to_char("Missing object, please inform Tracker.\n\r",ch); return; } ch->practice -= 100; obj = create_object(pObjIndex, 50); obj_to_char(obj, ch); act("$p appears in your hands.",ch,obj,NULL,TO_CHAR); act("$p appears in $n's hands.",ch,obj,NULL,TO_ROOM); return; } void do_ninjacreate( CHAR_DATA *ch, char *argument ) { OBJ_INDEX_DATA *pObjIndex; OBJ_DATA *obj; char arg[MAX_INPUT_LENGTH]; int vnum = 0; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_NINJA)) { send_to_char("Huh?\n\r",ch); return; } if (arg[0] == '\0') { send_to_char("Please specify what kind of equipment you want to create.\n\r", ch ); send_to_char("Cloak, Boots, Leggings, Sleeves, Belt\n\rHood, Mask, Bracer, Ring, Amulet\n\rVest, Gloves.",ch); return; } if (!str_cmp(arg, "cloak" )) vnum = 30435; else if (!str_cmp(arg, "boots" )) vnum = 30428; else if (!str_cmp(arg, "leggings")) vnum = 30429; else if (!str_cmp(arg, "sleeves" )) vnum = 30431; else if (!str_cmp(arg, "belt" )) vnum = 30432; else if (!str_cmp(arg, "hood" )) vnum = 30436; else if (!str_cmp(arg, "mask" )) vnum = 30434; else if (!str_cmp(arg, "bracer" )) vnum = 30433; else if (!str_cmp(arg, "ring" )) vnum = 30425; else if (!str_cmp(arg, "amulet" )) vnum = 30426; else if (!str_cmp(arg, "vest" )) vnum = 30427; else if (!str_cmp(arg, "gloves" )) vnum = 30430; else { send_to_char("That is an invalid type.\n\r", ch ); return; } if ( ch->practice < 100) { send_to_char("It costs 100 primal to create equipment.\n\r",ch); return; } if ( vnum == 0 || (pObjIndex = get_obj_index( vnum )) == NULL) { send_to_char("Missing object, please inform Tracker.\n\r",ch); return; } ch->practice -= 100; obj = create_object(pObjIndex, 50); SET_BIT(obj->spectype, SITEM_NINJA); obj_to_char(obj, ch); act("$p appears in your hands.",ch,obj,NULL,TO_CHAR); act("$p appears in $n's hands.",ch,obj,NULL,TO_ROOM); return; } void do_magecreate( CHAR_DATA *ch, char *argument ) { OBJ_INDEX_DATA *pObjIndex; OBJ_DATA *obj; char arg[MAX_INPUT_LENGTH]; int vnum = 0; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_MAGE)) { send_to_char("Huh?\n\r",ch); return; } if (arg[0] == '\0') { send_to_char("Please specify what kind of equipment you want to create.\n\r", ch ); send_to_char("Ring, Amulet, Plate, Helm, Leggings\n\rBoots, Gauntlets, Armplates, Cloak, Bracer\n\rGirth, Cape.",ch); return; } if (!str_cmp(arg, "ring" )) vnum = 30412; else if (!str_cmp(arg, "amulet" )) vnum = 30413; else if (!str_cmp(arg, "plate" )) vnum = 30414; else if (!str_cmp(arg, "helm" )) vnum = 30415; else if (!str_cmp(arg, "leggings" )) vnum = 30416; else if (!str_cmp(arg, "boots" )) vnum = 30417; else if (!str_cmp(arg, "gauntlets")) vnum = 30418; else if (!str_cmp(arg, "armplates")) vnum = 30419; else if (!str_cmp(arg, "cloak" )) vnum = 30420; else if (!str_cmp(arg, "bracer" )) vnum = 30421; else if (!str_cmp(arg, "mask" )) vnum = 30422; else if (!str_cmp(arg, "girth" )) vnum = 30423; else if (!str_cmp(arg, "cape" )) vnum = 30452; else { send_to_char("That is an invalid type.\n\r", ch ); return; } if ( ch->practice < 100) { send_to_char("It costs 100 primal to create equipment.\n\r",ch); return; } if ( vnum == 0 || (pObjIndex = get_obj_index( vnum )) == NULL) { send_to_char("Missing object, please inform Tracker.\n\r",ch); return; } ch->practice -= 100; obj = create_object(pObjIndex, 50); obj_to_char(obj, ch); act("$p appears in your hands.",ch,obj,NULL,TO_CHAR); act("$p appears in $n's hands.",ch,obj,NULL,TO_ROOM); return; }