Gammon Forum
Entire forum
SMAUG
Running the server
Greeting
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Straud
(62 posts) bio
|
Date
| Thu 05 Jul 2001 08:55 PM (UTC) |
Message
| 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 | top |
|
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #1 on Thu 05 Jul 2001 10:35 PM (UTC) |
Message
| 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. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Straud
(62 posts) bio
|
Date
| Reply #2 on Thu 05 Jul 2001 11:06 PM (UTC) |
Message
| 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 | top |
|
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #3 on Sat 07 Jul 2001 02:03 AM (UTC) |
Message
| 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:
___ ___ ___
/\__\ ___ /\ \ /\__\
/::| | /\ \ /::\ \ /:/ /
/:|:| | \:\ \ /:/\:\ \ /:/__/
/:/|:| |__ /::\__\ /:/ \:\ \ /::\__\____
/:/ |:| /\__\ __/:/\/__/ /:/__/ \:\__\ /:/\:::::\__\
\/__|:|/:/ / /\/:/ / \:\ \ \/__/ \/_|:|~~|~
|:/:/ / \::/__/ \:\ \ |:| |
|::/ / \:\__\ \:\ \ |:| |
/:/ / \/__/ \:\__\ |:| |
\/__/ \/__/ \|__|
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Kris
USA (198 posts) bio
|
Date
| Reply #4 on Fri 13 Jul 2001 10:51 PM (UTC) |
Message
| 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 =) | top |
|
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #5 on Sat 14 Jul 2001 12:46 AM (UTC) |
Message
| 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?
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.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
16,691 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.