From: "Duston S. Horacek" <duston@psn.net> Hello, I recently converted EOS's Wrlist function to work with my modified Rom24b4 mud, I converted it to a stock rom24 patch file... All I really did was change a few things around, and took out the mprogram list function witch didnt want to work with rom for wrlist.... So I didnt really write it, just converted it to work with rom, and even that was a breeze..... I did put it in a patch file though, as they are very sweet.... So as far as credits goes I claim nothing other than having made it work with my code, then patching it for others.... If your interested here it is. Actually a quick thought It does include some color designators for lopes colour code 1.2 just a few {r things here and there..... Ok the code does the folowing if you as an imm type wrlist o m or r then lowervnum then higher vnum ( id suggest under 150 vnums ) it list the room object or mobs by vnum then name followed by resets if the room function was done heres an example wrlist m 3000 3001 3000 wizard 3001 baker wrlist o 3000 3001 3000 barrel beer 3001 bottle beer wrlist r 3000 3001 3001 The Temple of Midgaard Resets: M = mobile, R = room, O = object, P = pet, S = shopkeeper No. Loads Description Location Vnum Mx Mn Description ==== ======== ============= =================== ======== ===== =========== [ 1] M[ 3011] Hassan in room R[ 3001] 1- 1 The Temple of M [ 2] O[ 3005] Hassan's scim wielded M[ 3011] Hassan My builders like this function, as it makes finding resets mobs, and objects easy in a specific set of vnums.... By using the room function, you can keep a better track of empty vnum slots for rooms obj, and mobs.... Thanks Sokol -----------------------[Cut Here for Patch]--------------------------- diff -ur /home/sokol/OSRC/Rom24/src/act_wiz.c /home/sokol/OSRC/Rom24/srctst/act_wiz.c --- /home/sokol/OSRC/Rom24/src/act_wiz.c Thu Jul 18 07:43:26 1996 +++ /home/sokol/OSRC/Rom24/srctst/act_wiz.c Wed Apr 1 23:21:51 1998 @@ -40,6 +40,7 @@ #include "tables.h" #include "lookup.h" + /* command procedures needed */ DECLARE_DO_FUN(do_rstat ); DECLARE_DO_FUN(do_mstat ); @@ -73,7 +74,7 @@ { if (IS_SET(ch->wiznet,WIZ_ON)) { - send_to_char("Signing off of Wiznet.\n\r",ch); + send_to_char("{WSigning off of Wiznet.\n\r{x",ch); REMOVE_BIT(ch->wiznet,WIZ_ON); } else @@ -4340,6 +4341,100 @@ return; } +/* ADDED BY SOKOL */ +void do_wrlist( CHAR_DATA *ch, char *argument ) +{ + ROOM_INDEX_DATA *room; + ROOM_INDEX_DATA *in_room; + MOB_INDEX_DATA *mob; + OBJ_INDEX_DATA *obj; + char arg[MAX_STRING_LENGTH]; + char arg1[MAX_STRING_LENGTH]; + char arg2[MAX_STRING_LENGTH]; + int uvnum; + int lvnum; + int MR = 60000; + int type = -1; + + argument = one_argument( argument, arg ); + argument = one_argument( argument, arg1 ); + argument = one_argument( argument, arg2 ); + uvnum = ( is_number( arg2 ) ) ? atoi( arg2 ) : 0; + lvnum = ( is_number( arg1 ) ) ? atoi( arg1 ) : 0; + + if ( !str_cmp( arg, "o" ) ) + type = 2; + if ( !str_cmp( arg, "m" ) ) + type = 1; + if ( !str_cmp( arg, "r" ) ) + type = 0; + if ( !str_cmp( arg, "p" ) ) + type = 3; + + if ( ( uvnum - lvnum ) > 200 ) + { + send_to_char( "{WThat range is too large.\n\r{x", ch ); + return; + } + + if ( ( ( uvnum == 0 ) && ( lvnum == 0 ) ) || ( arg[0] == '\0' ) + || ( type == -1 ) ) + { + send_to_char( "{MSyntax: wrlist [type] [lvnum] [uvnum]\n\r{x", ch ); + return; + } + + if ( uvnum > MR || uvnum < 1 || lvnum > MR || lvnum < 1 || lvnum > uvnum ) + { + send_to_char( "{WInvalid level(s).\n\r{x", ch ); + return; + } + + in_room = ch->in_room; + if ( type == 0 ) + { + char_from_room( ch ); + } + for ( MR = lvnum; MR <= uvnum; MR++ ) + { + if ( type == 0 ) + { + if ( ( room = get_room_index( MR ) ) ) + { + sprintf( log_buf, "{R%-5d {w%-20s\n\r", room->vnum, room->name ); + send_to_char( log_buf, ch ); + char_to_room( ch, room ); + do_resets( ch, "" ); + char_from_room( ch ); + } + } + if ( type == 2 ) + { + if ( ( obj = get_obj_index( MR ) ) ) + { + sprintf( log_buf, "{R%-5d {w%-20s\n\r", obj->vnum, obj->name ); + send_to_char( log_buf, ch ); + } + } + if ( type == 1 ) + { + if ( ( mob = get_mob_index( MR ) ) ) + { + sprintf( log_buf, "{R%-5d {w%-20s\n\r", mob->vnum, mob->player_name ); + send_to_char( log_buf, ch ); + } + } + if ( type == 3 ) + { + if ( ( mob = get_mob_index( MR ) ) ) + { + } + } + } + if ( type == 0 ) + char_to_room( ch, in_room ); + return; + } void do_holylight( CHAR_DATA *ch, char *argument ) Only in /home/sokol/OSRC/Rom24/srctst: act_wiz.c.orig diff -ur /home/sokol/OSRC/Rom24/src/interp.c /home/sokol/OSRC/Rom24/srctst/interp.c --- /home/sokol/OSRC/Rom24/src/interp.c Thu Jul 18 07:44:10 1996 +++ /home/sokol/OSRC/Rom24/srctst/interp.c Wed Apr 1 23:21:51 1998 @@ -340,6 +340,7 @@ { "string", do_string, POS_DEAD, L5, LOG_ALWAYS, 1 }, { "switch", do_switch, POS_DEAD, L6, LOG_ALWAYS, 1 }, { "wizinvis", do_invis, POS_DEAD, IM, LOG_NORMAL, 1 }, + { "wrlist", do_wrlist, POS_DEAD, L4, LOG_NORMAL, 1 }, { "vnum", do_vnum, POS_DEAD, L4, LOG_NORMAL, 1 }, { "zecho", do_zecho, POS_DEAD, L4, LOG_ALWAYS, 1 }, Only in /home/sokol/OSRC/Rom24/srctst: interp.c.orig diff -ur /home/sokol/OSRC/Rom24/src/interp.h /home/sokol/OSRC/Rom24/srctst/interp.h --- /home/sokol/OSRC/Rom24/src/interp.h Thu Jul 18 07:44:49 1996 +++ /home/sokol/OSRC/Rom24/srctst/interp.h Wed Apr 1 23:23:39 1998 @@ -292,3 +292,6 @@ DECLARE_DO_FUN( do_yell ); DECLARE_DO_FUN( do_zap ); DECLARE_DO_FUN( do_zecho ); + +/* Wrlist from EOS converted to Rom by Sokol */ +DECLARE_DO_FUN( do_wrlist ); Only in /home/sokol/OSRC/Rom24/srctst: interp.h.orig Only in /home/sokol/OSRC/Rom24/srctst: interp.h.rej Only in /home/sokol/OSRC/Rom24/srctst: wrlist.patch