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
➜ Programming
➜ General
➜ Creating A Monster Index
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Daniel Spain
(15 posts) Bio
|
| Date
| Tue 22 May 2012 12:19 AM (UTC) Amended on Tue 22 May 2012 12:20 AM (UTC) by Daniel Spain
|
| Message
| hello all, in my game i have been listing monsters like so:
There is a dragon, a dragon, and a minotaur here.
to do this i use the following code:
void shwmon(int room)
{
int i,mn[10],m,c=0;
for(i = 0 ; i < NMON ; i++)
{
if((arnmar.active) && (arnmar.loc==room))
{
mn[c++] = arnmar.id;
}
}
if(c)
{
sendplayer(p,BRRED,"\r\nThere is ");
for(i = 0 ; i < c ; i++)
{
m = mn;
if((mon < NMON) && (mon[i+1] < NMON) && (i<(NMRMMN-1)))
{
if(!i) sendplayer(p,BRRED," %s %s",
prefix[monsters[m].prefix],
monsters[m].name);
else
sendplayer(p,BRRED,", %s %s",
prefix[monsters[m].prefix],
monsters[m].name);
}
else
{
if(!i) sendplayer(p,BRRED," %s %s",
prefix[monsters[m].prefix],
monsters[m].name);
else
sendplayer(p,BRRED,", and %s %s",
prefix[monsters[m].prefix],
monsters[m].name);
}
}
sendplayer(p,BREED," here.");
sendplayer(p,WHITE,"\r\n");
}
}
what i want to accomplish next is to index em differently
so it would come out:
There are two dragons, and a minotaur here.
i been trying it so many different ways and i keep coming up emptyhanded, any help would be appreciated.
the problem i am having is how to store em.
| | 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.
7,799 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top