***************************************************************** * * * From: Arthur Sheffield * * Rising Moon * * or * * * * Disclaimer: * * Remember to back up your code before * * you apply anything. I am not responsible * * for your mud eating your hard drive and * * spiting it out at you. These code snippits * * are just little things that I have done * * to Rising Moon that seem to work very nicely. * * Feel free to use them or laugh at me as you * * are deleting them. As for credit, if you * * feel the need to memtion me, so be it, but * * its not really nessary. NOR asked that you do. * * * * One other note: Some things sent in are just modifications, * * not written by me, just modifidy by me. Others, my be * * written by me. Still no credits are nessary. * * * ***************************************************************** 03/18/01 Subject: adding page_string command to the do_where command. Only two things need to be done to add this in, First: Find this function --> void print_object_location( Delete this void. Second: And this should be right under that void, Delete the void perform_immort_where function and put this void perform_immort_command in its place. Then recompile the code, and thats it, you should have page breaks for the where command. void perform_immort_where(struct char_data * ch, char *arg) { /* added page breaks --AS 3.15.01 */ register struct char_data *i; register struct obj_data * obj; struct descriptor_data *d; int num = 0, found = 0; *buf2 = '\0'; if (!*arg) { strcat(buf2, "Players\r\n-------\r\n"); for (d = descriptor_list; d; d = d->next) if (!d->connected) { i = (d->original ? d->original : d->character); if (i && CAN_SEE(ch, i) && (i->in_room != NOWHERE)) { if (d->original) sprintf(buf, "%-20s - [%5d] %s (in %s)\r\n", GET_NAME(i), world[d->character->in_room].number, world[d->character->in_room].name, GET_NAME(d->character)); else sprintf(buf, "%-20s - [%5d] %s\r\n", GET_NAME(i), world[i->in_room].number, world[i->in_room].name); strcat(buf2, buf); } } } else { for (i = character_list; i; i = i->next) if (CAN_SEE(ch, i) && i->in_room != NOWHERE && isname(arg, i->player.name)) { found = 1; sprintf(buf, "M%3d. %-25s - [%5d] %s\r\n", ++num, GET_NAME(i), world[i->in_room].number, world[i->in_room].name); strcat(buf2, buf); } for (num = 0, obj = object_list; obj; obj = obj->next) if (CAN_SEE_OBJ(ch, obj) && isname(arg, obj->name) && (!obj->carried_by || CAN_SEE(ch, obj->carried_by))) { found = 1; sprintf(buf, "O%3d. %-25s - ", ++num, obj->short_description); if (obj->in_room > NOWHERE) { sprintf(buf + strlen(buf), "[%5d] %s\n\r", world[obj->in_room].number, world[obj->in_room].name); strcat(buf2, buf); } else if (obj->carried_by) { sprintf(buf + strlen(buf), "carried by %s\n\r In room - [%5d] %s\n\r", PERS(obj->carried_by, ch), world[obj->carried_by->in_room].number, world[obj->carried_by->in_room].name); strcat(buf2, buf); } else if (obj->worn_by) { sprintf(buf + strlen(buf), "worn by %s\n\r In room - [%5d] %s\n\r", PERS(obj->worn_by, ch), world[obj->worn_by->in_room].number, world[obj->worn_by->in_room].name); strcat(buf2, buf); } else if (obj->in_obj) { sprintf(buf + strlen(buf), "inside %s\n\r In room - [%5d] %s\n\r", obj->in_obj->short_description, world[obj->in_obj->in_room].number, world[obj->in_obj->in_room].name); strcat(buf2, buf); } else { sprintf(buf + strlen(buf), "in an unknown location\n\r"); strcat(buf2, buf); } } if (!found) strcat(buf2, "Couldn't find any such thing.\r\n"); } page_string(ch->desc, buf2, TRUE); }