diff -i smaug14/src/build.c smaug18/src/build.c 8c8 < * Tricops and Fireblade | * --- > * Tricops, Fireblade, Edmond, Conran | * 30a31,34 > extern ROOM_INDEX_DATA *room_index_hash[MAX_KEY_HASH]; > > void add_member args( ( CHAR_DATA * ch, char *clanname ) ); > void remove_member args( ( char *clanname, char *membername ) ); 62,63c66,67 < "dark", "death", "nomob", "indoors", "lawful", "neutral", "chaotic", < "nomagic", "tunnel", "private", "safe", "solitary", "petshop", "norecall", --- > "dark", "death", "nomob", "indoors", "house", "neutral", "chaotic", > "nomagic", "nolocate", "private", "safe", "solitary", "petshop", "norecall", 66c70,73 < "nosupplicate", "arena", "nomissile", "r4", "r5", "prototype", "dnd" --- > "nosupplicate", "arena", "nomissile", "auction", "nohover", "prototype", > "dnd", "_track_", "light", "nolog", "color", "nowhere", "noyell", "noquit", > "notrack", "nosuppcorpse", "nosupprecall", > "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" 75c82,84 < "nolocate", "groundrot", "lootable" --- > "nolocate", "groundrot", "lootable", "permanent", "multi_invoke", > "deathdrop", "skinned", "nofill", "blackened", "noscavenge", > "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" 80c89,90 < "lightning_blade" --- > "lightning_blade", > "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" 98,101c108,111 < "nopkill", "freekill", "noteleport", "spelllimit", "r4", "r5", "r6", "r7", "r8", < "r9", "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", < "r18", "r19", "r20", "r21", "r22", "r23", "r24", < "r25", "r26", "r27", "r28", "r29", "r30", "r31" --- > "nopkill", "freekill", "noteleport", "spelllimit", "silence", "nosummon", > "scrap", "hidden", "nowhere", "newbie", "nohover", "nologout", "noportalin", > "noportalout", "noastral", "nomagic", "r16", "r17", "r18", "r19", "r20", "r21", "r22", > "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31" 112,113c122,124 < "fuel", "_empty1", "_empty2", "missileweapon", "projectile", "quiver", "shovel", < "salve", "cook", "keyring", "odor", "chance" --- > "fuel", "puddle", "abacus", "missileweapon", "projectile", "quiver", "shovel", > "salve", "cook", "keyring", "odor", "chance", "piece", "housekey", "journal", > "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" 124c135 < "grip", "scribe", "brew", "wearspell", "removespell", "mentalstate", "emotion", --- > "grip", "scribe", "brew", "wearspell", "removespell", "emotion", "mentalstate", 127c138,139 < "roomlight", "televnum", "teledelay" --- > "roomlight", "televnum", "teledelay", > "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" 137c149 < "venomshield" --- > "venomshield", "grapple", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" 141c153 < "npc", "sentinel", "scavenger", "r1", "r2", "aggressive", "stayarea", --- > "npc", "sentinel", "scavenger", "nolocate", "r2", "aggressive", "stayarea", 145c157,159 < "pacifist", "noattack", "annoying", "statshield", "prototype", "r14" --- > "pacifist", "noattack", "annoying", "statshield", "prototype", "nosummon", > "nosteal", "r2", "infested", "free2", "blocking", "is_clone", "is_dreamform", > "is_spiritform", "is_projection", "stopscript", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" 152,153c166,168 < "nstart", "dnd", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", < "r19", "r20", "r21", "r22", "r23", "r24", "r25" --- > "nstart", "dnd", "idle", "nobio", "nodesc", "beckon", "noexp", "nobeckon", > "hints", "nohttp", "freekill", "r20", "r21", "r22", "r23", "r24", "r25", "r1", "r2", "r3", "r4", "r5", "r6", "r7", > "r8", "r9", "r10" 161c176,178 < "flee", "autogold", "automap", "afk", "invisprompt" --- > "flee", "autogold", "automap", "afk", "invisprompt", "roomvis", "nofollow", > "landed", "blocking", "is_clone", "is_dreamform", "is_spiritform", > "is_projection", "cloak", "compass", "nohomepage", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" 166,168c183,185 < "unlock", "north", "south", "east", "r1", "west", "up", "down", "examine", < "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", < "r14", "r15" --- > "unlock", "north", "south", "east", "west", "up", "down", "examine", > "northeast", "northwest", "southeast", "southwest", "r6", "r7", "r8", > "r9", "r10", "r11", "r12", "r13", "r14", "r15" 172,174c189,192 < "possessed", "polymorphed", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", < "r9", "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19", < "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30" --- > "possessed", "polymorphed", "watch", "retired", "noabort", "r4", "r5", "r6", "r7", > "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", > "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", > "r30" 204c222 < "r1", "r2" --- > "shell", "r2", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" 212c230,231 < "flamestrike", "harm", "fireball", "colorspray", "weaken", "r1" --- > "flamestrike", "harm", "fireball", "colorspray", "weaken", "spiralblast", > "pounce", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" 220c239,240 < "r8", "r9", "r10", "r11", "r12", "acidmist", "venomshield" --- > "r8", "r9", "r10", "r11", "r12", "acidmist", "venomshield", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", > "r10" 240c260,262 < "speechiw", "pull", "push", "sleep", "rest", "leave", "script", "use" --- > "speechiw", "pull", "push", "sleep", "rest", "leave", "script", "use", > "load", "login", "void", "tell", "imminfo", "greetinfight", "move", > "command", "sell", "emote", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" 287c309 < sh_int vnum = room->vnum; --- > int vnum = room->vnum; 294c316 < if ( !IS_SET( room->room_flags, ROOM_PROTOTYPE ) ) --- > if ( !xIS_SET( room->room_flags, ROOM_PROTOTYPE ) ) 313c335 < sh_int vnum = obj->pIndexData->vnum; --- > int vnum = obj->pIndexData->vnum; 339c361 < sh_int vnum = obj->vnum; --- > int vnum = obj->vnum; 366c388 < sh_int vnum; --- > int vnum; 406c428 < sh_int vnum = mob->vnum; --- > int vnum = mob->vnum; 876a899,994 > void do_assist( CHAR_DATA * ch, char *argument ) > { > char arg[MAX_INPUT_LENGTH]; > ROOM_INDEX_DATA *location, *in_room; > CHAR_DATA *fch, *fch_next, *victim; > > one_argument( argument, arg ); > location = find_location( ch, arg ); > > if ( IS_NPC( ch ) ) > return; > > if ( !ch->pcdata->council ) > { > ch_printf( ch, "Huh?\n\r" ); > return; > } > > if ( str_cmp( ch->pcdata->council->name, "Newbie Council" ) ) > { > ch_printf( ch, "Huh?\n\r" ); > return; > } > > set_char_color( AT_ACTION, ch ); > > if ( arg[0] == '\0' ) > { > ch_printf( ch, "Who do you wish to assist?\n\r" ); > return; > } > > if ( is_number( arg ) ) > { > ch_printf( ch, "No such character.\n\r" ); > return; > } > > if ( ( victim = get_char_world( ch, arg ) ) ) > { > if ( ( !IS_SET( ch->in_room->area->flags, AFLAG_NEWBIE ) > && ch->in_room != get_room_index( ch->pcdata->clan ? > ch->pcdata->clan->recall : ROOM_VNUM_TEMPLE ) ) > || !IS_SET( victim->in_room->area->flags, AFLAG_NEWBIE ) ) > { > send_to_char( "Assist location criteria not met.\n\r", ch ); > return; > } > if ( !IS_NPC( victim ) && IS_SET( victim->pcdata->flags, PCFLAG_DND ) ) > { > ch_printf( ch, "You cannot travel to this target.\n\r" ); > ch_printf( victim, "Your DND flag just foiled an assist command from %s.\n\r", ch->name ); > return; > } > if ( xIS_SET( victim->in_room->room_flags, ROOM_PRIVATE ) ) > { > send_to_char( "That target is currently private.\n\r", ch ); > return; > } > in_room = ch->in_room; > if ( ch->fighting ) > stop_fighting( ch, TRUE ); > act( AT_ACTION, "$n lifts into the air and is gone.", ch, NULL, NULL, TO_ROOM ); > char_from_room( ch ); > char_to_room( ch, location ); > act( AT_ACTION, "$n appears and floats toward you.", ch, NULL, NULL, TO_ROOM ); > do_look( ch, "auto" ); > if ( ch->in_room == in_room ) > return; > for ( fch = in_room->first_person; fch; fch = fch_next ) > { > fch_next = fch->next_in_room; > if ( NOT_AUTHED( fch ) && ch->in_room->area != fch->in_room->area ) > continue; > if ( fch->level > 1 && !str_cmp( ch->in_room->area->filename, "SGate.are" ) ) > continue; > if ( fch->master == ch && !IS_NPC( fch ) ) > { > in_room = fch->in_room; > if ( fch->fighting ) > stop_fighting( fch, TRUE ); > act( AT_ACTION, "A magical force pulls you along...", fch, NULL, NULL, TO_CHAR ); > act( AT_ACTION, "An unseen force pulls $n along behind...", fch, NULL, NULL, TO_ROOM ); > char_from_room( fch ); > char_to_room( fch, location ); > act( AT_ACTION, "$n is pulled along behind...", fch, NULL, NULL, TO_NOTVICT ); > do_look( fch, "auto" ); > } > } > return; > } > send_to_char( "No such character.\n\r", ch ); > return; > } > > 883c1001 < sh_int vnum; --- > int vnum; 896,897c1014,1015 < pager_printf( ch, "Sorry. %s does not wish to be disturbed.\n\r", fch->name ); < pager_printf( fch, "Your DND flag just foiled %s's goto command.\n\r", ch->name ); --- > ch_printf( ch, "Sorry. %s does not wish to be disturbed.\n\r", fch->name ); > ch_printf( fch, "Your DND flag just foiled %s's goto command.\n\r", ch->name ); 942,943c1060,1061 < pager_printf( ch, "That room is \"do not disturb\" right now.\n\r" ); < pager_printf( victim, "Your DND flag just foiled %s's goto command.\n\r", ch->name ); --- > ch_printf( ch, "That room is \"do not disturb\" right now.\n\r" ); > ch_printf( victim, "Your DND flag just foiled %s's goto command.\n\r", ch->name ); 1147a1266,1267 > send_to_char( " stance_name(ie tiger, etc..) (see MOBSTANCE)\n\r", ch ); > send_to_char( " stance\n\r", ch ); 1561c1681 < if ( value < 1 || value > 32700 ) --- > if ( value < 1 || value > 500000 ) 1563c1683 < send_to_char( "Hp range is 1 to 32,700 hit points.\n\r", ch ); --- > send_to_char( "Hp range is 1 to 500,000 hit points.\n\r", ch ); 1737a1858,1875 > if ( !str_cmp( arg2, "honour" ) ) > { > if ( IS_NPC( victim ) ) > { > send_to_char( "Not on NPC's.\n\r", ch ); > return; > } > > if ( value < 0 ) > { > send_to_char( "Honour cannot be less than 0.\n\r", ch ); > return; > } > > victim->pcdata->honour = value; > return; > } > 1920a2059 > remove_member( victim->pcdata->clan_name, victim->name ); 1936a2076,2077 > if ( victim->pcdata->clan != NULL ) > remove_member( victim->pcdata->clan_name, victim->name ); 1942a2084 > add_member( victim, victim->pcdata->clan_name ); 2577c2719 < if ( value < 0 || value > 32767 ) --- > if ( value < 0 || value > 100000 ) 2579c2721 < send_to_char( "Number of hitpoint dice range is 0 to 30000.\n\r", ch ); --- > send_to_char( "Number of hitpoint dice range is 0 to 100,000.\n\r", ch ); 2597c2739 < if ( value < 0 || value > 32767 ) --- > if ( value < 0 || value > 100000 ) 2599c2741 < send_to_char( "Hitpoint dice size range is 0 to 30000.\n\r", ch ); --- > send_to_char( "Hitpoint dice size range is 0 to 100,000.\n\r", ch ); 2617c2759 < if ( value < 0 || value > 32767 ) --- > if ( value < 0 || value > 500000 ) 2619c2761 < send_to_char( "Hitpoint bonus range is 0 to 30000.\n\r", ch ); --- > send_to_char( "Hitpoint bonus range is 0 to 500,000.\n\r", ch ); 2646a2789,2808 > if ( !str_cmp( arg2, "stance" ) ) > { > if ( !IS_NPC( victim ) ) > { > send_to_char( "Mobiles only.\n\r", ch ); > return; > } > if ( !can_mmodify( ch, victim ) ) > return; > value = get_stance_number( arg3 ); > if ( value < 0 || value >= MAX_STANCE ) > { > send_to_char( "Unknown stance.\n\r", ch ); > do_help( ch, "STANCENAMES" ); > return; > } > victim->pIndexData->stances[0] = value; > send_to_char( "Done.\n\r", ch ); > return; > } 2750a2913 > remove_member( victim->pcdata->clan_name, victim->name ); 2807c2970 < | LANG_OGRE | LANG_ORCISH | LANG_TROLLISH | LANG_GOBLIN | LANG_HALFLING; --- > | LANG_OGRE | LANG_ORCISH | LANG_TROLLISH | LANG_GOBLIN | LANG_HALFLING | LANG_GNOME; 2867a3031,3070 > { /* Stance names must be at the end but before t > * he substate */ > int temp_num = -1; > > if ( ( temp_num = get_stance_number( arg2 ) ) > 0 ) > { > if ( IS_NPC( victim ) ) > { > if ( !can_mmodify( ch, victim ) ) > return; > if ( value < 0 || value > MAX_MOB_STANCE ) > { > ch_printf( ch, "Stance value is from 0 to %d\n", MAX_MOB_STANCE ); > return; > } > victim->pIndexData->stances[temp_num] = value; > send_to_char( "Done.\n\r", ch ); > return; > } > else > /* > * PC char > */ > { > if ( get_trust( ch ) < LEVEL_LESSER ) > { > send_to_char( "You can only modify a mobile's immunities.\n\r", ch ); > return; > } > if ( value < 0 || value > MAX_PC_STANCE ) > { > ch_printf( ch, "Stance value is from 0 to %d\n", MAX_PC_STANCE ); > return; > } > ch->pcdata->stances[temp_num] = value; > send_to_char( "Done.\n\r", ch ); > return; > } > } /* End of If statement */ > } /* End of blocked off statement */ 3175,3234d3377 < if ( !str_cmp( arg2, "ed" ) ) < { < if ( !arg3 || arg3[0] == '\0' ) < { < send_to_char( "Syntax: oset <object> ed <keywords>\n\r", ch ); < return; < } < CHECK_SUBRESTRICTED( ch ); < if ( obj->timer ) < { < send_to_char < ( "It's not safe to edit an extra description on an object with a timer.\n\rTurn it off first.\n\r", < ch ); < return; < } < if ( obj->item_type == ITEM_PAPER && get_trust( ch ) < LEVEL_IMPLEMENTOR ) < { < send_to_char( "You can not add an extra description to a note paper at the moment.\n\r", ch ); < return; < } < if ( IS_OBJ_STAT( obj, ITEM_PROTOTYPE ) ) < ed = SetOExtraProto( obj->pIndexData, arg3 ); < else < ed = SetOExtra( obj, arg3 ); < if ( ch->substate == SUB_REPEATCMD ) < ch->tempnum = SUB_REPEATCMD; < else < ch->tempnum = SUB_NONE; < if ( lockobj ) < ch->spare_ptr = obj; < else < ch->spare_ptr = NULL; < ch->substate = SUB_OBJ_EXTRA; < ch->dest_buf = ed; < start_editing( ch, ed->description ); < return; < } < < if ( !str_cmp( arg2, "rmed" ) ) < { < if ( !arg3 || arg3[0] == '\0' ) < { < send_to_char( "Syntax: oset <object> rmed <keywords>\n\r", ch ); < return; < } < if ( IS_OBJ_STAT( obj, ITEM_PROTOTYPE ) ) < { < if ( DelOExtraProto( obj->pIndexData, arg3 ) ) < send_to_char( "Deleted.\n\r", ch ); < else < send_to_char( "Not found.\n\r", ch ); < return; < } < if ( DelOExtra( obj, arg3 ) ) < send_to_char( "Deleted.\n\r", ch ); < else < send_to_char( "Not found.\n\r", ch ); < return; < } < 3387a3531,3534 > > if ( IS_OBJ_STAT( obj, ITEM_PROTOTYPE ) ) > obj->pIndexData->level = value; > 3443,3444d3589 < if ( !can_omodify( ch, obj ) ) < return; 3470,3471d3614 < if ( !can_omodify( ch, obj ) ) < return; 3540,3541d3682 < if ( !can_omodify( ch, obj ) ) < return; 3592a3734,3792 > if ( !str_cmp( arg2, "ed" ) ) > { > if ( !arg3 || arg3[0] == '\0' ) > { > send_to_char( "Syntax: oset <object> ed <keywords>\n\r", ch ); > return; > } > CHECK_SUBRESTRICTED( ch ); > if ( obj->timer ) > { > send_to_char > ( "It's not safe to edit an extra description on an object with a timer.\n\rTurn it off first.\n\r", > ch ); > return; > } > if ( obj->item_type == ITEM_PAPER ) > { > send_to_char( "You can not add an extra description to a note paper at the moment.\n\r", ch ); > return; > } > if ( IS_OBJ_STAT( obj, ITEM_PROTOTYPE ) ) > ed = SetOExtraProto( obj->pIndexData, arg3 ); > else > ed = SetOExtra( obj, arg3 ); > if ( ch->substate == SUB_REPEATCMD ) > ch->tempnum = SUB_REPEATCMD; > else > ch->tempnum = SUB_NONE; > if ( lockobj ) > ch->spare_ptr = obj; > else > ch->spare_ptr = NULL; > ch->substate = SUB_OBJ_EXTRA; > ch->dest_buf = ed; > start_editing( ch, ed->description ); > return; > } > > if ( !str_cmp( arg2, "rmed" ) ) > { > if ( !arg3 || arg3[0] == '\0' ) > { > send_to_char( "Syntax: oset <object> rmed <keywords>\n\r", ch ); > return; > } > if ( IS_OBJ_STAT( obj, ITEM_PROTOTYPE ) ) > { > if ( DelOExtraProto( obj->pIndexData, arg3 ) ) > send_to_char( "Deleted.\n\r", ch ); > else > send_to_char( "Not found.\n\r", ch ); > return; > } > if ( DelOExtra( obj, arg3 ) ) > send_to_char( "Deleted.\n\r", ch ); > else > send_to_char( "Not found.\n\r", ch ); > return; > } 3598,3599d3797 < if ( !can_omodify( ch, obj ) ) < return; 3611,3612d3808 < if ( !can_omodify( ch, obj ) ) < return; 3620,3621d3815 < if ( !can_omodify( ch, obj ) ) < return; 3628,3629d3821 < if ( !can_omodify( ch, obj ) ) < return; 3637,3638d3828 < if ( !can_omodify( ch, obj ) ) < return; 3648,3649d3837 < if ( !can_omodify( ch, obj ) ) < return; 3659,3660d3846 < if ( !can_omodify( ch, obj ) ) < return; 3752a3939,3953 > case ITEM_TRAP: > if ( !str_cmp( arg2, "trapflags" ) ) > { > while ( argument[0] != '\0' ) > { > argument = one_argument( argument, arg3 ); > tmp = get_trapflag( arg3 ); > if ( tmp >= 0 || tmp < 32 ) > TOGGLE_BIT( value, 1 << tmp ); > else > send_to_char( "Oset: TRAP: bad flag\n\r", ch ); > } > tmp = 3; > } > break; 3788a3990,3993 > /* rdig command by Dracones */ > void do_rdig( CHAR_DATA * ch, char *argument ) > { > char arg[MAX_INPUT_LENGTH]; 3790,3791c3995,4315 < /* < * Obsolete Merc room editing routine --- > char buf[MAX_STRING_LENGTH]; > ROOM_INDEX_DATA *location, *ch_location; > AREA_DATA *pArea; > int vnum, edir; > char tmpcmd[MAX_INPUT_LENGTH]; > EXIT_DATA *xit; > > > set_char_color( AT_PLAIN, ch ); > > if ( IS_NPC( ch ) ) > return; > > if ( !ch->pcdata->area ) > { > send_to_char( "You have no area file with which to work.\n\r", ch ); > return; > } > > ch_location = ch->in_room; > > argument = one_argument( argument, arg ); > > if ( !arg || arg[0] == '\0' ) > { > send_to_char( "Dig out a new room or dig into an existing room.\n\r", ch ); > send_to_char( "Usage: rdig <dir>\n\r", ch ); > return; > } > > edir = get_dir( arg ); > > xit = get_exit( ch_location, edir ); > > if ( !xit ) > { > > pArea = ch->pcdata->area; > > vnum = pArea->low_r_vnum; > > while ( vnum <= pArea->hi_r_vnum && get_room_index( vnum ) != NULL ) > { > vnum++; > } > > if ( vnum > pArea->hi_r_vnum ) > { > send_to_char( "No empty upper rooms could be found.\r\n", ch ); > return; > } > > sprintf( buf, "Digging out room %d to the %s.\r\n", vnum, arg ); > send_to_char( buf, ch ); > > location = make_room( vnum ); > if ( !location ) > { > bug( "rdig: make_room failed", 0 ); > return; > } > location->area = ch->pcdata->area; > > sprintf( tmpcmd, "bexit %s %d", arg, vnum ); > do_redit( ch, tmpcmd ); > > } > else > { > > vnum = xit->vnum; > location = get_room_index( vnum ); > sprintf( buf, "Digging into room %d to the %s.\r\n", vnum, arg ); > send_to_char( buf, ch ); > > } > > location->name = ch_location->name; > location->description = ch_location->description; > location->sector_type = ch_location->sector_type; > location->room_flags = ch_location->room_flags; > > /* > * Below here you may add anything else you wish to be > * copied into the rdug rooms. > */ > > /* > * Move while rdigging -- Dracones > */ > sprintf( buf, "%d", vnum ); > do_goto( ch, buf ); > > return; > } > > /* rgrid command by Dracones */ > > void do_rgrid( CHAR_DATA * ch, char *argument ) > { > char arg[MAX_INPUT_LENGTH]; > char arg2[MAX_INPUT_LENGTH]; > char arg3[MAX_INPUT_LENGTH]; > > EXIT_DATA *xit; > char buf[MAX_STRING_LENGTH]; > ROOM_INDEX_DATA *location, *ch_location, *tmp; > AREA_DATA *pArea; > int vnum, maxnum, x, y, z; > int room_count; > int room_hold[MAX_RGRID_ROOMS]; > > > > if ( IS_NPC( ch ) ) > return set_char_color( AT_PLAIN, ch ); > > ch_location = ch->in_room; > pArea = ch->pcdata->area; > > > argument = one_argument( argument, arg ); > argument = one_argument( argument, arg2 ); > argument = one_argument( argument, arg3 ); > > if ( !arg || arg[0] == '\0' ) > { > send_to_char( "Create a block of rooms.\n\r", ch ); > send_to_char( "Usage: rgrid <x> <y> <z>\n\r", ch ); > return; > } > x = atoi( arg ); > y = atoi( arg2 ); > z = atoi( arg3 ); > > if ( x < 1 || y < 1 ) > { > > send_to_char( "You must specify an x and y of at least 1.\r\n", ch ); > return; > } > if ( z < 1 ) > z = 1; > > maxnum = x * y * z; > > sprintf( buf, "Attempting to create a block of %d rooms, %d x %d x %d.\r\n", maxnum, x, y, z ); > send_to_char( buf, ch ); > > if ( maxnum > MAX_RGRID_ROOMS ) > { > > sprintf( buf, "The maximum number of rooms this mud can create at once is %d.\r\n", MAX_RGRID_ROOMS ); > send_to_char( buf, ch ); > send_to_char( "Please try to create a smaller block of rooms.\r\n", ch ); > return; > } > > room_count = 0; > send_to_char( "Checking for available rooms...\r\n", ch ); > > if ( pArea->low_r_vnum + maxnum > pArea->hi_r_vnum ) > { > > send_to_char( "You don't even have that many rooms assigned to you.\r\n", ch ); > return; > } > > > for ( vnum = pArea->low_r_vnum; vnum <= pArea->hi_r_vnum; vnum++ ) > { > > if ( get_room_index( vnum ) == NULL ) > room_count++; > > if ( room_count >= maxnum ) > break; > } > > > > if ( room_count < maxnum ) > { > send_to_char( "There aren't enough free rooms in your assigned range!\r\n", ch ); > return; > } > > send_to_char( "Enough free rooms were found, creating the rooms...\r\n", ch ); > > room_count = 0; > vnum = pArea->low_r_vnum; > > while ( room_count < maxnum ) > { > > if ( get_room_index( vnum ) == NULL ) > { > > room_hold[room_count++] = vnum; > > location = make_room( vnum ); > if ( !location ) > { > bug( "rgrid: make_room failed", 0 ); > return; > } > > location->area = ch->pcdata->area; > > location->name = ch_location->name; > location->description = ch_location->description; > location->sector_type = ch_location->sector_type; > location->room_flags = ch_location->room_flags; > > } > vnum++; > } > > send_to_char( "Rooms created, linking the exits...\r\n", ch ); > > for ( room_count = 1; room_count <= maxnum; room_count++ ) > { > > vnum = room_hold[room_count - 1]; > > // Check to see if we can make N exits > if ( room_count % x ) > { > > location = get_room_index( vnum ); > tmp = get_room_index( room_hold[room_count] ); > > xit = make_exit( location, tmp, 0 ); > xit->keyword = STRALLOC( "" ); > xit->description = STRALLOC( "" ); > xit->key = -1; > xit->exit_info = 0; > > } > > // Check to see if we can make S exits > if ( ( room_count - 1 ) % x ) > { > > location = get_room_index( vnum ); > tmp = get_room_index( room_hold[room_count - 2] ); > > xit = make_exit( location, tmp, 2 ); > xit->keyword = STRALLOC( "" ); > xit->description = STRALLOC( "" ); > xit->key = -1; > xit->exit_info = 0; > > } > > > // Check to see if we can make E exits > if ( ( room_count - 1 ) % ( x * y ) < x * y - x ) > { > > location = get_room_index( vnum ); > tmp = get_room_index( room_hold[room_count + x - 1] ); > > xit = make_exit( location, tmp, 1 ); > xit->keyword = STRALLOC( "" ); > xit->description = STRALLOC( "" ); > xit->key = -1; > xit->exit_info = 0; > > } > > // Check to see if we can make W exits > if ( ( room_count - 1 ) % ( x * y ) >= x ) > { > > location = get_room_index( vnum ); > tmp = get_room_index( room_hold[room_count - x - 1] ); > > xit = make_exit( location, tmp, 3 ); > xit->keyword = STRALLOC( "" ); > xit->description = STRALLOC( "" ); > xit->key = -1; > xit->exit_info = 0; > > } > > // Check to see if we can make D exits > if ( room_count > x * y ) > { > > location = get_room_index( vnum ); > tmp = get_room_index( room_hold[room_count - x * y - 1] ); > > xit = make_exit( location, tmp, 5 ); > xit->keyword = STRALLOC( "" ); > xit->description = STRALLOC( "" ); > xit->key = -1; > xit->exit_info = 0; > > } > > // Check to see if we can make U exits > if ( room_count <= maxnum - ( x * y ) ) > { > > location = get_room_index( vnum ); > tmp = get_room_index( room_hold[room_count + x * y - 1] ); > > xit = make_exit( location, tmp, 4 ); > xit->keyword = STRALLOC( "" ); > xit->description = STRALLOC( "" ); > xit->key = -1; > xit->exit_info = 0; > } > } > return; > } > > > /* > * Obsolete Merc room editing routine 3840c4364 < if ( IS_SET( location->room_flags, ROOM_PROTOTYPE ) ) --- > if ( xIS_SET( location->room_flags, ROOM_PROTOTYPE ) ) 3844c4368 < location->room_flags = value; --- > xTOGGLE_BIT( location->room_flags, value ); 3846c4370 < SET_BIT( location->room_flags, ROOM_PROTOTYPE ); --- > xSET_BIT( location->room_flags, ROOM_PROTOTYPE ); 3849a4374 > 4100a4626,4688 > void do_rloop( CHAR_DATA * ch, char *argument ) > { > char arg1[MAX_INPUT_LENGTH]; > char arg2[MAX_INPUT_LENGTH]; > ROOM_INDEX_DATA *location; > ROOM_INDEX_DATA *original; > AREA_DATA *pArea; > int Start, End, vnum; > > set_char_color( AT_IMMORT, ch ); > > argument = one_argument( argument, arg1 ); > argument = one_argument( argument, arg2 ); > > if ( arg1[0] == '\0' || arg2[0] == '\0' || argument[0] == '\0' ) > { > send_to_char( "Syntax: rloop <start> <end> redit <arguments>\n\r", ch ); > return; > } > > Start = atoi( arg1 ); > End = atoi( arg2 ); > if ( Start < 1 || End < Start || Start > End || Start == End ) > { > send_to_char( "Invalid range.\n\r", ch ); > return; > } > > if ( !ch->pcdata || !( pArea = ch->pcdata->area ) ) > { > send_to_char( "You must have an assigned area to rloop in.\n\r", ch ); > return; > } > > if ( Start < pArea->low_r_vnum || Start > pArea->hi_r_vnum || End < pArea->low_r_vnum || End > pArea->hi_r_vnum ) > { > send_to_char( "You can only rloop within your assigned area.\n\r", ch ); > return; > } > > if ( strncmp( argument, "redit ", 6 ) ) > { > send_to_char( "Rloop is restricted to redit commands only.\n\r", ch ); > send_to_char( "Syntax: rloop <start> <end> redit <arguments>\n\r", ch ); > return; > } > > original = ch->in_room; > for ( vnum = Start; vnum <= End; vnum++ ) > { > if ( ( location = get_room_index( vnum ) ) == NULL ) > continue; > char_from_room( ch ); > char_to_room( ch, location ); > interpret( ch, argument ); > } > > char_from_room( ch ); > char_to_room( ch, original ); > send_to_char( "Done.\n\r", ch ); > return; > } > 4268a4857,4862 > if ( !str_cmp( arg, "maxweight" ) ) > { > location->max_weight = atoi( argument ); > return; > } > 4456c5050 < if ( value < 0 || value > 31 ) --- > if ( value < 0 || value > MAX_ROOM_FLAG ) 4463c5057 < TOGGLE_BIT( location->room_flags, 1 << value ); --- > xTOGGLE_BIT( location->room_flags, value ); 4709c5303 < if ( evnum < 1 || evnum > 32766 ) --- > if ( evnum < 1 || evnum > 1073741824 ) 4902c5496 < if ( evnum < 1 || evnum > 32766 ) --- > if ( evnum < 1 || evnum > 1073741824 ) 5245c5839 < if ( vnum < 1 || vnum > 32767 ) --- > if ( vnum < 1 || vnum > 1073741824 ) 5321c5915 < if ( vnum < 1 || vnum > 32767 ) --- > if ( vnum < 1 || vnum > 1073741824 ) 5488,5493c6082,6149 < if ( !str_cmp( cmd + 1, "i" ) ) < { < if ( edit->numlines >= max_buf_lines ) < send_to_char( "Buffer is full.\n\r> ", ch ); < else < { --- > > /* > * added format command - shogar > */ > /* > * This has been redone to be more efficient, and to make format > * start at beginning of buffer, not whatever line you happened > * to be on, at the time. > */ > > if ( !str_cmp( cmd + 1, "f" ) ) > { > char temp_buf[MAX_STRING_LENGTH + max_buf_lines]; > int x, ep, old_p, end_mark; > int p = 0; > > for ( x = 0; x < edit->numlines; x++ ) > { > strcpy( temp_buf + p, edit->line[x] ); > p += strlen( edit->line[x] ); > temp_buf[p] = ' '; > p++; > } > > temp_buf[p] = '\0'; > end_mark = p; > p = 75; > old_p = 0; > edit->on_line = 0; > edit->numlines = 0; > > while ( old_p < end_mark ) > { > while ( temp_buf[p] != ' ' && p > old_p ) > p--; > > if ( p == old_p ) > p += 75; > > if ( p > end_mark ) > p = end_mark; > > ep = 0; > for ( x = old_p; x < p; x++ ) > { > edit->line[edit->on_line][ep] = temp_buf[x]; > ep++; > } > edit->line[edit->on_line][ep] = '\0'; > > edit->on_line++; > edit->numlines++; > > old_p = p + 1; > p += 75; > > } > > send_to_char( "OK.\n\r> ", ch ); > return; > } > > if ( !str_cmp( cmd + 1, "i" ) ) > { > if ( edit->numlines >= max_buf_lines ) > send_to_char( "Buffer is full.\n\r> ", ch ); > else > { 5629c6285 < if ( edit->numlines > max_buf_lines ) --- > if ( edit->numlines >= max_buf_lines ) 5769,5770c6425,6428 < if ( get_trust( ch ) >= LEVEL_SUB_IMPLEM < || ( is_name( buf, ch->pcdata->bestowments ) && get_trust( ch ) >= sysdata.level_modify_proto ) ) --- > if ( get_trust( ch ) >= LEVEL_GREATER > || ( is_name( buf, ch->pcdata->bestowments ) > && get_trust( ch ) >= sysdata.level_modify_proto ) > || ( ch->pcdata->council && is_name( buf, ch->pcdata->council->powers ) ) ) 5784,5785c6442,6445 < || is_name( tmp->filename, ch->pcdata->bestowments ) || < ( ch->pcdata->council && is_name( "aassign", ch->pcdata->council->powers ) ) ) --- > || is_name( tmp->filename, ch->pcdata->bestowments ) > || ( ch->pcdata->council > && ( is_name( buf, ch->pcdata->council->powers ) > || is_name( "aassign", ch->pcdata->council->powers ) ) ) ) 5945a6606 > bool vcomplexmob; 5963a6625 > fprintf( fpout, "#CREDITS %s~\n\n", tarea->credits ); 5968,5969d6629 < if ( AREA_VERSION_WRITE > 1 ) < fprintf( fpout, "#SPELLLIMIT %d\n", tarea->spelllimit ); 6014a6675,6687 > { /* Check to see if the mob has a stance setup */ > int temp; > > vcomplexmob = FALSE; > for ( temp = 0; temp < MAX_STANCE; temp++ ) > if ( pMobIndex->stances[temp] != 0 ) > { > vcomplexmob = TRUE; > break; > } > if ( vcomplexmob == TRUE ) /* Need to save both right now SHADDAI */ > complexmob = TRUE; /* Or things will get fucked up */ > } 6021,6023c6694,6698 < fprintf( fpout, "%s %d %c\n", print_bitvector( &pMobIndex->affected_by ), < pMobIndex->alignment, complexmob ? 'C' : 'S' ); < --- > fprintf( fpout, "%s %d ", print_bitvector( &pMobIndex->affected_by ), pMobIndex->alignment ); > if ( vcomplexmob ) > fprintf( fpout, "V\n" ); > else > fprintf( fpout, "%c\n", complexmob ? 'C' : 'S' ); 6052a6728,6735 > if ( vcomplexmob ) /* Mob has stances SHADDAI */ > { > int temp; > > for ( temp = 0; temp < MAX_STANCE; temp++ ) > fprintf( fpout, "%d ", pMobIndex->stances[temp] ); > fprintf( fpout, "\n" ); /* Put Newline in */ > } 6080,6082c6763,6772 < if ( pObjIndex->layers ) < fprintf( fpout, "%d %s %d %d\n", pObjIndex->item_type, < print_bitvector( &pObjIndex->extra_flags ), pObjIndex->wear_flags, pObjIndex->layers ); --- > if ( pObjIndex->layers || ( ( AREA_VERSION_WRITE > 1 ) && pObjIndex->level ) ) > { > if ( AREA_VERSION_WRITE > 1 ) > fprintf( fpout, "%d %s %d %d %d\n", pObjIndex->item_type, > print_bitvector( &pObjIndex->extra_flags ), > pObjIndex->wear_flags, pObjIndex->layers, pObjIndex->level ); > else > fprintf( fpout, "%d %s %d %d\n", pObjIndex->item_type, > print_bitvector( &pObjIndex->extra_flags ), pObjIndex->wear_flags, pObjIndex->layers ); > } 6098a6789 > { 6102a6794 > } 6103a6796 > { 6107a6801 > } 6108a6803 > { 6112a6808 > } 6116a6813 > { 6120a6818 > } 6123a6822 > { 6127a6827 > } 6128a6829 > { 6132a6834 > } 6210c6912 < REMOVE_BIT( room->room_flags, ROOM_PROTOTYPE ); --- > xREMOVE_BIT( room->room_flags, ROOM_PROTOTYPE ); 6232,6234c6934,6936 < if ( ( room->tele_delay > 0 && room->tele_vnum > 0 ) || room->tunnel > 0 ) < fprintf( fpout, "0 %d %d %d %d %d\n", room->room_flags, < room->sector_type, room->tele_delay, room->tele_vnum, room->tunnel ); --- > if ( ( room->tele_delay > 0 && room->tele_vnum > 0 ) || room->tunnel > 0 || room->max_weight > 0 ) > fprintf( fpout, "0 %s %d %d %d %d %d\n", print_bitvector( &room->room_flags ), > room->sector_type, room->tele_delay, room->tele_vnum, room->tunnel, room->max_weight ); 6236c6938 < fprintf( fpout, "0 %d %d\n", room->room_flags, room->sector_type ); --- > fprintf( fpout, "0 %s %d\n", print_bitvector( &room->room_flags ), room->sector_type ); 6239c6941,6944 < if ( IS_SET( xit->exit_info, EX_PORTAL ) ) /* don't fold portals */ --- > /* > * don't fold portals or passages > */ > if ( IS_SET( xit->exit_info, EX_PORTAL ) || IS_SET( xit->exit_info, EX_PASSAGE ) ) 6241c6946 < fprintf( fpout, "D%d\n", xit->vdir ); --- > fprintf( fpout, "D%d\n", xit->orig_door ); 6731c7436 < else if ( val1 < 1 || val1 > 32767 ) --- > else if ( val1 < 1 || val1 > 1073741824 ) 6977,6980c7682,7686 < ch_printf_color( ch, "\n\r&wName: &W%s\n\r&wFilename: &W%-20s &wPrototype: &W%s\n\r&wAuthor: &W%s\n\r", < tarea->name, tarea->filename, proto ? "yes" : "no", tarea->author ); < ch_printf_color( ch, "&wAge: &W%-3d &wCurrent number of players: &W%-3d &wMax players: &W%d\n\r", < tarea->age, tarea->nplayer, tarea->max_players ); --- > ch_printf_color( ch, > "\n\r&wName: &W%s\n\r&wFilename: &W%-20s &wPrototype: &W%s\n\r&wAuthor: &W%-20s &wCredits: &W%s\n\r", > tarea->name, tarea->filename, proto ? "yes" : "no", tarea->author, tarea->credits ); > ch_printf_color( ch, "&wAge: &W%-3d &wCurrent number of players: &W%-3d &wMax players: &W%d\n\r", tarea->age, > tarea->nplayer, tarea->max_players ); 7060a7767,7776 > if ( !str_cmp( arg2, "credits" ) ) > { > if ( tarea->credits ); > STRFREE( tarea->credits ); > tarea->credits = str_dup( argument ); > send_to_char( "Done.\n\r", ch ); > return; > } > > 7494a8211 > send_to_char( " greetinfight\n\r", ch ); 7544c8261 < send_to_char( "That mobile has no mob programs.\n\r", ch ); --- > ch_printf( ch, "No programs on mobile: %s - #%d\n\r", victim->name, victim->pIndexData->vnum ); 7591c8308 < send_to_char( "That mobile has no mob programs.\n\r", ch ); --- > ch_printf( ch, "No programs on mobile: %s - #%d\n\r", victim->name, victim->pIndexData->vnum ); 7634c8351 < send_to_char( "That mobile has no mob programs.\n\r", ch ); --- > ch_printf( ch, "No programs on mobile: %s - #%d\n\r", victim->name, victim->pIndexData->vnum ); 7694c8411 < send_to_char( "That mobile has no mob programs.\n\r", ch ); --- > ch_printf( ch, "No programs on mobile: %s - #%d\n\r", victim->name, victim->pIndexData->vnum ); 7859c8576 < send_to_char( "That object has no obj programs.\n\r", ch ); --- > send_to_char( "That object has no mob programs.\n\r", ch ); 7861a8579,8602 > > if ( value < 1 ) > { > if ( strcmp( "full", arg3 ) ) > { > for ( mprg = mprog; mprg; mprg = mprg->next ) > { > ch_printf( ch, "%d>%s %s\n\r", ++cnt, mprog_type_to_name( mprg->type ), mprg->arglist ); > } > > return; > } > else > { > for ( mprg = mprog; mprg; mprg = mprg->next ) > { > ch_printf( ch, "%d>%s %s\n\r%s\n\r", > ++cnt, mprog_type_to_name( mprg->type ), mprg->arglist, mprg->comlist ); > } > > return; > } > } > 7863,7864c8604,8615 < ch_printf( ch, "%d>%s %s\n\r%s\n\r", < ++cnt, mprog_type_to_name( mprg->type ), mprg->arglist, mprg->comlist ); --- > { > if ( ++cnt == value ) > { > ch_printf( ch, "%d>%s %s\n\r%s\n\r", > cnt, mprog_type_to_name( mprg->type ), mprg->arglist, mprg->comlist ); > break; > } > } > > if ( !mprg ) > send_to_char( "Program not found.\n\r", ch ); > 7867a8619,8636 > > /* if ( !str_cmp( arg2, "list" ) ) > { > cnt = 0; > if ( !mprog ) > { > send_to_char( "That object has no obj programs.\n\r", ch ); > return; > } > for ( mprg = mprog; mprg; mprg = mprg->next ) > ch_printf( ch, "%d>%s %s\n\r%s\n\r", > ++cnt, > mprog_type_to_name( mprg->type ), > mprg->arglist, > mprg->comlist ); > return; > } > */ 8138c8907 < send_to_char( "This room has no room programs.\n\r", ch ); --- > send_to_char( "That object has no mob programs.\n\r", ch ); 8140a8910,8933 > > if ( value < 1 ) > { > if ( strcmp( "full", arg2 ) ) > { > for ( mprg = mprog; mprg; mprg = mprg->next ) > { > ch_printf( ch, "%d>%s %s\n\r", ++cnt, mprog_type_to_name( mprg->type ), mprg->arglist ); > } > > return; > } > else > { > for ( mprg = mprog; mprg; mprg = mprg->next ) > { > ch_printf( ch, "%d>%s %s\n\r%s\n\r", > ++cnt, mprog_type_to_name( mprg->type ), mprg->arglist, mprg->comlist ); > } > > return; > } > } > 8142,8143c8935,8946 < ch_printf( ch, "%d>%s %s\n\r%s\n\r", < ++cnt, mprog_type_to_name( mprg->type ), mprg->arglist, mprg->comlist ); --- > { > if ( ++cnt == value ) > { > ch_printf( ch, "%d>%s %s\n\r%s\n\r", > cnt, mprog_type_to_name( mprg->type ), mprg->arglist, mprg->comlist ); > break; > } > } > > if ( !mprg ) > send_to_char( "Program not found.\n\r", ch ); > 8146a8950,8967 > > /* if ( !str_cmp( arg1, "list" ) ) > { > cnt = 0; > if ( !mprog ) > { > send_to_char( "This room has no room programs.\n\r", ch ); > return; > } > for ( mprg = mprog; mprg; mprg = mprg->next ) > ch_printf( ch, "%d>%s %s\n\r%s\n\r", > ++cnt, > mprog_type_to_name( mprg->type ), > mprg->arglist, > mprg->comlist ); > return; > } > */ 8326,8330d9146 < /* < * Temporarily disable this command. < */ < /* return;*/ < 8349,8350c9165 < if ( get_trust( ch ) < sysdata.level_modify_proto < && ( location->vnum < ch->pcdata->r_range_lo || location->vnum > ch->pcdata->r_range_hi ) ) --- > if ( !can_rmodify( ch, location ) ) 8352c9167 < send_to_char( "That room is not in your assigned range.\n\r", ch ); --- > send_to_char( "You can't delete this room.\n\r", ch ); 8388,8392d9202 < /* < * Temporarily disable this command. < */ < /* return;*/ < 8402c9212,9223 < if ( !( obj = get_obj_index( atoi( arg ) ) ) ) --- > /* > if (!(obj = get_obj_index(atoi(arg)))) > { > if (!(temp = get_obj_here(ch, arg))) > { > send_to_char( "No such object.\n\r", ch ); > return; > } > obj = temp->pIndexData; > } > */ > if ( !( temp = get_obj_here( ch, arg ) ) ) 8404,8409c9225,9226 < if ( !( temp = get_obj_here( ch, arg ) ) ) < { < send_to_char( "No such object.\n\r", ch ); < return; < } < obj = temp->pIndexData; --- > send_to_char( "No such object.\n\r", ch ); > return; 8410a9228,9230 > else > obj = temp->pIndexData; > 8415,8416c9235 < if ( get_trust( ch ) < sysdata.level_modify_proto < && ( obj->vnum < ch->pcdata->o_range_lo || obj->vnum > ch->pcdata->o_range_hi ) ) --- > if ( !can_omodify( ch, temp ) ) 8418c9237 < send_to_char( "That object is not in your assigned range.\n\r", ch ); --- > send_to_char( "You can't delete this object.\n\r", ch ); 8445d9263 < /* return;*/ 8466,8468d9283 < /* < * Does the player have the right to delete this room? < */ 8476a9292,9302 > * Does the player have the right to delete this room?/ > * if ( !can_mmodify(ch, temp ) ) > * { > * send_to_char( "You can't delete that mob.\n\r", ch ); > * return; > * } > * This is the part that crashed us in checking can_mmodify on > * IS_NPC(mob) > */ > > /* 8488,8491c9314,9317 < /* < * Mobile and Object Program Copying < * Last modified Feb. 24 1999 < * Mystaric --- > /* > * Mobile and Object program copy commands > * Last modiied: March 1, 1999 > * Mystaric 8493d9318 < 8724a9550 > send_to_char( " greetinfight\n\r", ch ); 8872a9699,9708 > void do_rpcopy( CHAR_DATA * ch, char *argument ) > { > char sroom[MAX_INPUT_LENGTH]; > char prog[MAX_INPUT_LENGTH]; > char num[MAX_INPUT_LENGTH]; > char droom[MAX_INPUT_LENGTH]; > ROOM_INDEX_DATA *source = NULL, *destination = NULL; > MPROG_DATA *source_rprog = NULL, *dest_rprog = NULL, *source_rprg = NULL, *dest_rprg = NULL; > int value = -1, mptype = -1, cnt = 0; > bool COPY = FALSE; 8873a9710,9853 > set_char_color( AT_PLAIN, ch ); > > if ( IS_NPC( ch ) ) > { > send_to_char( "Mob's can't rpcopy\n\r", ch ); > return; > } > > if ( !ch->desc ) > { > send_to_char( "You have no descriptor\n\r", ch ); > return; > } > > smash_tilde( argument ); > argument = one_argument( argument, sroom ); > argument = one_argument( argument, prog ); > > if ( !is_number( sroom ) || prog[0] == '\0' ) > { > send_to_char( "Syntax: rpcopy <source rvnum> <program> [number] <destination rvnum>\n\r", ch ); > send_to_char( " rpcopy <source rvnum> all <destination rvnum>\n\r", ch ); > send_to_char( " rpcopy <source rvnum> all <destination rvnum> <program>\n\r", ch ); > send_to_char( "\n\r", ch ); > send_to_char( "Program being one of:\n\r", ch ); > send_to_char( " act speech rand fight hitprcnt greet allgreet\n\r", ch ); > send_to_char( " entry give bribe death time hour script\n\r", ch ); > return; > } > > if ( !strcmp( prog, "all" ) ) > { > argument = one_argument( argument, droom ); > argument = one_argument( argument, prog ); > mptype = get_mpflag( prog ); > COPY = TRUE; > } > else > { > argument = one_argument( argument, num ); > argument = one_argument( argument, droom ); > value = atoi( num ); > } > > if ( ( source = get_room_index( atoi( sroom ) ) ) == NULL ) > { > send_to_char( "Source room does not exist.\n\r", ch ); > return; > } > > if ( !is_number( droom ) || ( destination = get_room_index( atoi( droom ) ) ) == NULL ) > { > send_to_char( "Destination room does not exist.\n\r", ch ); > return; > } > > if ( source == destination ) > { > send_to_char( "Source and destination rooms cannot be the same\n\r", ch ); > return; > } > > if ( !can_rmodify( ch, destination ) ) > { > send_to_char( "You cannot modify destination room.\n\r", ch ); > return; > } > > source_rprog = source->mudprogs; > dest_rprog = destination->mudprogs; > > set_char_color( AT_GREEN, ch ); > > if ( !source_rprog ) > { > send_to_char( "Source room has no programs.\n\r", ch ); > return; > } > > if ( COPY ) > { > for ( source_rprg = source_rprog; source_rprg; source_rprg = source_rprg->next ) > { > if ( mptype == source_rprg->type || mptype == -1 ) > { > if ( dest_rprog != NULL ) > for ( ; dest_rprog->next; dest_rprog = dest_rprog->next ); > CREATE( dest_rprg, MPROG_DATA, 1 ); > > if ( dest_rprog ) > dest_rprog->next = dest_rprg; > else > { > destination->mudprogs = dest_rprg; > dest_rprog = dest_rprg; > } > mpcopy( source_rprg, dest_rprg ); > xSET_BIT( destination->progtypes, dest_rprg->type ); > cnt++; > } > } > > if ( cnt == 0 ) > { > ch_printf( ch, "No such program in source room\n\r" ); > return; > } > ch_printf( ch, "%d programs successfully copied from %s to %s.\n\r", cnt, sroom, droom ); > return; > } > > if ( value < 1 ) > { > send_to_char( "No such program in source room.\n\r", ch ); > return; > } > > mptype = get_mpflag( prog ); > > for ( source_rprg = source_rprog; source_rprg; source_rprg = source_rprg->next ) > { > if ( ++cnt == value && source_rprg->type == mptype ) > { > if ( dest_rprog != NULL ) > for ( ; dest_rprog->next; dest_rprog = dest_rprog->next ); > CREATE( dest_rprg, MPROG_DATA, 1 ); > if ( dest_rprog ) > dest_rprog->next = dest_rprg; > else > destination->mudprogs = dest_rprg; > mpcopy( source_rprg, dest_rprg ); > xSET_BIT( destination->progtypes, dest_rprg->type ); > ch_printf( ch, "%s program %d from %s successfully copied to %s.\n\r", prog, value, sroom, droom ); > return; > } > } > > if ( !source_rprg ) > { > send_to_char( "No such program in source room.\n\r", ch ); > return; > } > do_rpcopy( ch, "" ); > } 9138a10119,10330 > > > void do_findexit( CHAR_DATA * ch, char *argument ) > { > ROOM_INDEX_DATA *room; > EXIT_DATA *pexit; > int exvnum, cou, h_range, l_range; > char arg1[MAX_INPUT_LENGTH]; > char arg2[MAX_INPUT_LENGTH]; > char arg3[MAX_INPUT_LENGTH]; > AREA_DATA *tarea; > > static char *dir_text[] = { "n", "e", "s", "w", "u", "d", "ne", "nw", "se", "sw", "?" }; > > set_pager_color( AT_PLAIN, ch ); > > if ( IS_NPC( ch ) || get_trust( ch ) < LEVEL_CREATOR || !ch->pcdata > || ( !ch->pcdata->area && get_trust( ch ) < LEVEL_GREATER ) ) > { > send_to_char_color( "&YYou don't have an assigned area.\n\r", ch ); > return; > } > > tarea = ch->pcdata->area; > argument = one_argument( argument, arg1 ); > argument = one_argument( argument, arg2 ); > argument = one_argument( argument, arg3 ); > > if ( arg1[0] != '\0' && !is_number( arg1 ) ) > return; > > if ( ( arg2[0] != '\0' ) && ( str_cmp( arg2, "mud" ) && !is_number( arg2 ) ) ) > return; > else if ( arg3[0] != '\0' && !is_number( arg3 ) ) > return; > > exvnum = atoi( arg1 ); > if ( !str_cmp( arg2, "mud" ) && get_trust( ch ) >= LEVEL_GREATER ) > { > l_range = 1; > h_range = MAX_VNUM; > } > else > { > if ( tarea ) > { > if ( arg2[0] == '\0' ) > l_range = tarea->low_r_vnum; > else > l_range = atoi( arg2 ); > > if ( arg3[0] == '\0' ) > h_range = tarea->hi_r_vnum; > else > h_range = atoi( arg3 ); > > if ( ( l_range < tarea->low_r_vnum || h_range > tarea->hi_r_vnum ) && get_trust( ch ) < LEVEL_GREATER ) > { > send_to_char_color( "&YThat is out of your vnum range.\n\r", ch ); > return; > } > } > else > { > l_range = ( is_number( arg2 ) ? atoi( arg2 ) : 1 ); > h_range = ( is_number( arg3 ) ? atoi( arg3 ) : 1 ); > } > } > > for ( cou = 0; cou < MAX_KEY_HASH; cou++ ) > { > if ( room_index_hash[cou] ) > for ( room = room_index_hash[cou]; room; room = room->next ) > { > if ( room->vnum >= l_range && room->vnum <= h_range && room->first_exit ) > { > for ( pexit = room->first_exit; pexit; pexit = pexit->next ) > { > if ( pexit->to_room->vnum == exvnum ) > pager_printf( ch, "%5d) Direction: %-2s. Key: %d Flags: %d Keywords: %s.\n\r", > room->vnum, > dir_text[pexit->vdir], > pexit->key, pexit->exit_info, pexit->keyword[0] != '\0' ? pexit->keyword : "(none)" ); > } > } > } > } > return; > } > > void do_alinks( CHAR_DATA * ch, char *argument ) > { > static char *dirs[] = { "n", "e", "s", "w", "u", "d", "ne", "nw", "se", "sw", "--" }; > char buf[MAX_INPUT_LENGTH]; > AREA_DATA *area; > ROOM_INDEX_DATA *room; > EXIT_DATA *exit; > int cou, dnum, acount = 0; > EXT_BV fmask; > EXT_BV dummy; > bool all; > bool detail; > bool efound; > bool rfound; > bool reverse = FALSE; > > argument = one_argument( argument, buf ); > if ( buf[0] == '\0' ) > { > send_to_char( "Please see the related helpfile.\r\n", ch ); > return; > } > all = !str_cmp( buf, "all" ); > detail = 0; > if ( *argument != '\0' ) > { > if ( !str_prefix( argument, "detailed" ) ) > detail = 1; > else if ( !str_prefix( argument, "names" ) ) > detail = 2; > else if ( !str_prefix( argument, "reverse" ) ) > { > reverse = TRUE; > detail = 2; > } > } > xCLEAR_BITS( fmask ); > xSET_BIT( fmask, ROOM_NO_MOB ); > xSET_BIT( fmask, ROOM_PRIVATE ); > xSET_BIT( fmask, ROOM_SOLITARY ); > xSET_BIT( fmask, ROOM_NOFLOOR ); > xSET_BIT( fmask, ROOM_NOMISSILE ); > xSET_BIT( fmask, ROOM_DND ); > xSET_BIT( fmask, ROOM_PROTOTYPE ); > for ( area = first_area_name; area; area = area->next_sort_name ) > { > rfound = FALSE; > if ( IS_SET( area->status, AREA_DELETED ) ) > continue; > if ( !all && str_cmp( area->filename, buf ) ) > continue; > acount++; > > for ( cou = 0; cou < MAX_KEY_HASH; cou++ ) > for ( room = room_index_hash[cou]; room; room = room->next ) > { > efound = FALSE; > for ( exit = room->first_exit; exit; exit = exit->next ) > if ( ( room->area == area > && exit->to_room > && exit->to_room->area != area ) > || ( reverse && room->area != area && exit->to_room && exit->to_room->area == area ) ) > { > if ( !efound ) > { /* print the room's data */ > if ( !rfound ) > ch_printf( ch, "%s - %s\r\n\r\n", area->filename, area->name ); > ch_printf( ch, " %d - %s", room->vnum, room->name ); > if ( xHAS_BITS( room->room_flags, fmask ) ) > { > int i; > > for ( i = 0; i < XBI; i++ ) > dummy.bits[i] = room->room_flags.bits[i] & fmask.bits[i]; > ch_printf( ch, " - %s", ext_flag_string( &dummy, r_flags ) ); > } > send_to_char( "\r\n", ch ); > } > dnum = UMIN( exit->vdir, 10 ); > if ( detail == 0 ) > ch_printf( ch, "%s%s:%d%s%s%s", > efound ? " " : " ", > dirs[dnum], > exit->vnum, > xIS_EMPTY( exit->to_room->progtypes ) ? "" : "p", > exit->key <= 0 ? "" : "k", exit->exit_info ? "f" : "" ); > else if ( detail == 1 ) > { > ch_printf( ch, " %-2s:%d%s %s", > dirs[dnum], > exit->vnum, > xIS_EMPTY( exit->to_room->progtypes ) ? "" : "p", exit->to_room->area->name ); > if ( exit->exit_info ) > ch_printf( ch, " - %s", flag_string( exit->exit_info, ex_flags ) ); > if ( exit->key > 0 ) > ch_printf( ch, " key:%d", exit->key ); > send_to_char( "\r\n", ch ); > } > else > ch_printf( ch, " %-2s:%d%s%s%s %s - %s\r\n", > dirs[dnum], > exit->vnum, > xIS_EMPTY( exit->to_room->progtypes ) ? "" : "p", > exit->key <= 0 ? "" : "k", > exit->exit_info ? "f" : "", exit->to_room->area->name, exit->to_room->name ); > efound = TRUE; > } > if ( efound ) > { > if ( detail == 0 ) > send_to_char( "\r\n", ch ); > rfound = TRUE; > } > } > if ( rfound ) > send_to_char( "\r\n", ch ); > } > if ( acount ) > ch_printf( ch, "Processed %d area(s).\r\n", acount ); > else > send_to_char( "No areas found with the supplied name.\r\n", ch ); > }