Everytime I try to change the greeting.are file when I go to save it says going to save as a text-only file all formatting will be lost so i don't save it I'm using word pad because files to big for note pad is there a text editor i can use that won't do this
Greeting
Posted by Straud on Thu 05 Jul 2001 08:55 PM — 6 posts, 24,390 views.
You *want* to save it as text-only, so that is OK to do that.
You could use another text editor that handles large files, for example UltraEdit (www.ultraedit.com).
Also, you can edit the help area file in the Area Editor, available from this web site.
You could use another text editor that handles large files, for example UltraEdit (www.ultraedit.com).
Also, you can edit the help area file in the Area Editor, available from this web site.
okay now I went to change the greeting and saved it but when I logged back on the title I typed in defaulted to font size 10 when I saved it at size 36
MUDs are a text-only medium. There is no provision for sending down 36-point greetings. If you want big headings you can use the "ASCII Art" feature built into MUSHclient. That does headings like this:
___ ___ ___
/\__\ ___ /\ \ /\__\
/::| | /\ \ /::\ \ /:/ /
/:|:| | \:\ \ /:/\:\ \ /:/__/
/:/|:| |__ /::\__\ /:/ \:\ \ /::\__\____
/:/ |:| /\__\ __/:/\/__/ /:/__/ \:\__\ /:/\:::::\__\
\/__|:|/:/ / /\/:/ / \:\ \ \/__/ \/_|:|~~|~
|:/:/ / \::/__/ \:\ \ |:| |
|::/ / \:\__\ \:\ \ |:| |
/:/ / \/__/ \:\__\ |:| |
\/__/ \/__/ \|__|
Ok, this is more of a compiling the server question, but since this subject is already here...
I'm trying to set up the greeting to be displayed as a .ans file, in the same way that the title is displayed after you're already logged in. I know this question is vague, but.... how would I go about doing that? Everything I've tried has crashed the mud anytime I try to connect to it. For example, here is my attempt (if this is irrelevant to you, go ahead and ignore it; I have no idea if I'm even close, but I need to change this before I can release my backup!):
in mud.h....
void show_greeting args( ( DESCRIPTOR_DATA *d ) );
....
void send_ansi_greeting args( ( CHAR_DATA *ch ) );
....
#define ANSIGREETING_FILE SYSTEM_DIR "mudgreeting.ans"
in comm.c....
LINK( dnew, first_descriptor, last_descriptor, next, prev );
/*
* Send the greeting.
*/
{
/* extern char * help_greeting;
if ( help_greeting[0] == '.' )
write_to_buffer( dnew, help_greeting+1, 0 );
else
write_to_buffer( dnew, help_greeting , 0 ); */
show_greeting(dnew); /* New and improved ANSI greeting for everyone! :) --Kris */
}
....
void show_greeting( DESCRIPTOR_DATA *d )
{
CHAR_DATA *ch = (d->original ? d->original : d->character);
send_ansi_greeting(ch);
}
in act_comm.c....
void send_ansi_greeting( CHAR_DATA *ch )
{
FILE *rpfile;
int num=0;
char BUFF[MAX_STRING_LENGTH*2];
if ((rpfile = fopen(ANSIGREETING_FILE,"r")) !=NULL) {
while ((BUFF[num]=fgetc(rpfile)) != EOF)
num++;
fclose(rpfile);
BUFF[num] = 0;
write_to_buffer(ch->desc,BUFF,num);
}
}
I thought I covered everything here. What have I missed? Is the DESCRIPTOR DATA for dnew not compatible or something? Please give me some guidance on this, and thanks for all your help =)
I'm trying to set up the greeting to be displayed as a .ans file, in the same way that the title is displayed after you're already logged in. I know this question is vague, but.... how would I go about doing that? Everything I've tried has crashed the mud anytime I try to connect to it. For example, here is my attempt (if this is irrelevant to you, go ahead and ignore it; I have no idea if I'm even close, but I need to change this before I can release my backup!):
in mud.h....
void show_greeting args( ( DESCRIPTOR_DATA *d ) );
....
void send_ansi_greeting args( ( CHAR_DATA *ch ) );
....
#define ANSIGREETING_FILE SYSTEM_DIR "mudgreeting.ans"
in comm.c....
LINK( dnew, first_descriptor, last_descriptor, next, prev );
/*
* Send the greeting.
*/
{
/* extern char * help_greeting;
if ( help_greeting[0] == '.' )
write_to_buffer( dnew, help_greeting+1, 0 );
else
write_to_buffer( dnew, help_greeting , 0 ); */
show_greeting(dnew); /* New and improved ANSI greeting for everyone! :) --Kris */
}
....
void show_greeting( DESCRIPTOR_DATA *d )
{
CHAR_DATA *ch = (d->original ? d->original : d->character);
send_ansi_greeting(ch);
}
in act_comm.c....
void send_ansi_greeting( CHAR_DATA *ch )
{
FILE *rpfile;
int num=0;
char BUFF[MAX_STRING_LENGTH*2];
if ((rpfile = fopen(ANSIGREETING_FILE,"r")) !=NULL) {
while ((BUFF[num]=fgetc(rpfile)) != EOF)
num++;
fclose(rpfile);
BUFF[num] = 0;
write_to_buffer(ch->desc,BUFF,num);
}
}
I thought I covered everything here. What have I missed? Is the DESCRIPTOR DATA for dnew not compatible or something? Please give me some guidance on this, and thanks for all your help =)
Your major problem here is that just after connecting you have a descriptor but not a character. You have tried to get the descriptor from the character, but it doesn't exist yet. In any case, that seems very roundabout. Why not just do this?
You also have a potential problem if the file contents are longer than MAX_STRING_LENGTH * 2, so you should test for that, as I have done in the extra code in bold.
void show_greeting( DESCRIPTOR_DATA *d )
{
FILE *rpfile;
int num=0;
char BUFF[MAX_STRING_LENGTH*2];
if ((rpfile = fopen(ANSIGREETING_FILE,"r")) !=NULL) {
while ((BUFF[num]=fgetc(rpfile)) != EOF &&
num < (MAX_STRING_LENGTH*2 - 1))
num++;
fclose(rpfile);
BUFF[num] = 0;
write_to_buffer(d,BUFF,num);
}
}
You also have a potential problem if the file contents are longer than MAX_STRING_LENGTH * 2, so you should test for that, as I have done in the extra code in bold.