1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
void show_monsters(Player *p,int room)
{
int i,m,p;
int c = 0;
int monsters[NMRMMN];
for(i=0; i < MAX_MONSTERS; i++)
{
if((monster[i].active==1) && (monster[i].loc==room))
{
monsters[c++] = i;
}
}
if(c)
{
sendplayer(p,BRRED,"\r\nThere is ");
for(i=0; i < c; i++)
{
m = monster[monsters[i]].number
p = monster[m].prefix;
if((monsters[i] < MAX_MONSTERS) &&
(monsters[(i+1)] < MAX_MONSTERS) &&
(i<(NMRMMN-1)))
{
if(i == 0) sendplayer(p,BRRED," %s %s",pfx[p],monster[m].name);
else sendplayer(p,BRRED,", %s %s",pfx[p].name,monster[m].name);
}
else
{
if(i == 0) sendplayer(p,BRRED," %s %s",pfx[p],monster[m].name);
else sendplayer(p,BRRED,", and %s %s",pfx[p].monster[m].name);
}
}
sendplayer(p,BRRED," here.");
sendplayer(p,WHITE,"\r\n");
}
}
|