Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Multi Title
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Johny
USA (16 posts) Bio
|
Date
| Wed 02 Mar 2005 01:01 AM (UTC) |
Message
| Now, since I fixed my last title problem, I feel I still must upgrade this by working out more greetings. Only problem is I don't know how to work out a way to make a random title. I run a Windows XP. |
Johny the Homicidal Maniac
...More like...
Johny the Idiodical Maniac
Heh
Owner of Some Future Mud That Isn't Open to Public | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #1 on Wed 02 Mar 2005 01:09 AM (UTC) |
Message
| What do you mean random title? Random titles for players? When? How random? Or the mud opening/greeting? |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Johny
USA (16 posts) Bio
|
Date
| Reply #2 on Wed 02 Mar 2005 04:56 AM (UTC) |
Message
| The opening |
Johny the Homicidal Maniac
...More like...
Johny the Idiodical Maniac
Heh
Owner of Some Future Mud That Isn't Open to Public | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #3 on Wed 02 Mar 2005 05:14 AM (UTC) |
Message
| The most straightforward way to do this is to generate a random number, append it to a string buffer e.g. GREETING_, and create help files for GREETING_1, ..._2, ..._3 and so forth. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Johny
USA (16 posts) Bio
|
Date
| Reply #4 on Thu 03 Mar 2005 09:50 PM (UTC) |
Message
| So, all I must do is Type GREETING_2 for my next greeting? |
Johny the Homicidal Maniac
...More like...
Johny the Idiodical Maniac
Heh
Owner of Some Future Mud That Isn't Open to Public | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #5 on Fri 04 Mar 2005 01:17 AM (UTC) |
Message
| No, that's not "all" you have to do... you have to do the rest of the things I said too. :-) |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Asean Novari
USA (82 posts) Bio
|
Date
| Reply #6 on Fri 04 Mar 2005 02:15 AM (UTC) |
Message
| Here is the code to put multiple ANSI Greeting screens into your startup.. Hope this is what you needed
In mud.h
--------
Where the #define is for #define ANSITITLE_FILE SYSTEM_DIR "mudtitle.ans"
replace that with .....
#define ANSITITLE_FILE SYSTEM_DIR "mudtitle1.ans"
#define ANSITITLE1_FILE SYSTEM_DIR "mudtitle2.ans"
#define ANSITITLE2_FILE SYSTEM_DIR "mudtitle3.ans"
#define ANSITITLE3_FILE SYSTEM_DIR "mudtitle4.ans"
#define ANSITITLE4_FILE SYSTEM_DIR "mudtitle5.ans"
#define ANSITITLE5_FILE SYSTEM_DIR "mudtitle6.ans"
In act_comm.c
-------------
Right below the line that reads ....
char BUFF[MAX_STRING_LENGTH*2];
add ...
int random;
char pbuf[MAX_INPUT_LENGTH];
random = number_range(0, 5);
switch(random)
{
case 0:
strcpy(pbuf,ANSITITLE_FILE);
break;
case 1:
strcpy(pbuf,ANSITITLE1_FILE);
break;
case 2:
strcpy(pbuf,ANSITITLE2_FILE);
break;
case 3:
strcpy(pbuf,ANSITITLE3_FILE);
break;
case 4:
strcpy(pbuf,ANSITITLE4_FILE);
break;
case 5:
default:
strcpy(pbuf,ANSITITLE5_FILE);
break;
}
and replace the line that reads ....
if ((rpfile = fopen(ANSITITLE_FILE,"r")) !=NULL) {
with ....
if ((rpfile = fopen(pbuf,"r")) !=NULL) {
The last thing to do is create your ansi files in the /dist/system
directory, they should be ....
mudtitle1.ans mudtitle2.ans mudtitle3.ans
mudtitle4.ans mudtitle5.ans mudtitle6.ans
|
| Top |
|
Posted by
| Gatewaysysop2
USA (146 posts) Bio
|
Date
| Reply #7 on Thu 17 Mar 2005 04:33 PM (UTC) Amended on Thu 17 Mar 2005 04:36 PM (UTC) by Gatewaysysop2
|
Message
| It would probably be common courtesy to mention the author's name and website if you're going to C&P their whole snippet in your own post.
For the curious, the above is LrdElder's "Multiansi" snippet, taken from:
http://www.geocities.com/SiliconValley/Mouse/6754/Multians.txt
|
"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence | Top |
|
Posted by
| Asean Novari
USA (82 posts) Bio
|
Date
| Reply #8 on Sat 19 Mar 2005 11:52 PM (UTC) |
Message
| Actually the snippet file that i have is exactly that text
only.. nothing else .. and it was gotten off a site with tons
of snippets that had no license listed.. I am sorry for being
unaware that the snippet was any sort of licensing.
|
| Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #9 on Sun 20 Mar 2005 04:13 AM (UTC) |
Message
| What was the site? Perhaps it had snippets I have yet to see. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | 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.
27,618 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top