출구모양 개량 소스

2007.04.12 11:41

그리움 조회 수:201 추천:63

아래 소스는 김준식님이 올리신 것입니다...

───────────────────────────────────────
/* 무한대전 출구 개량형....
*
* 현재 운영중인 무한대전 또는 "무한대전 소스를 수정한 머드" 들 중에서
* 상업적으로 사용되는 곳을 제외하면 누구나 이소스를 사용할수 있습니다.
*
* 그냥 room.c 화일에서 display_rom 부분만 수정을 해주시면 됩니다.
* 출구부분까지 삭제하신뒤.... 밑에 있는것을 써넣으시면 됩니다.
*
* Muhan. 1998년 10월 11일
*/

/********************************************************************/
/* Display_rom */
/********************************************************************/


void display_rom(ply_ptr, rom_ptr)
creature*ply_ptr;
room*rom_ptr;
{

xtag *xp;
ctag *cp;
otag *op;
creature *crt_ptr;
int len, i;
char str[2048];
int fd, n=0, m, t, light = 0;
char exit_grp[3][10]={ " " ," ? "," ",};
char grp[2][4]={"▷","◁"};
char gcp[2][4]={"∵","▽"};


char gdp[2][4]={"∴","△"};
int n2;

fd = ply_ptr->fd;

print(fd, "\n");

t = Time%24L;

if(F_ISSET(ply_ptr, PBLIND) || F_ISSET(rom_ptr, RDARKR) ||
(F_ISSET(rom_ptr, RDARKN) && (t<6 || t>20))) {

if(!has_light(ply_ptr)) {
cp = rom_ptr->first_ply;


while(cp) {

if(has_light(cp->crt)) {
light = 1;
break;
}

cp = cp->next_tag;
}

if(ply_ptr->race == ELF || ply_ptr->race == DWARF ||
ply_ptr->class >= CARETAKER)
light = 1;
}

else
light = 1;

if(!light || F_ISSET(ply_ptr, PBLIND)) {

if(F_ISSET(ply_ptr, PBLIND))
print(fd, "당신은 눈이 멀어 아무것도 볼 수 없습니다.\n");
print(fd, "너무 어두워서 볼 수가 없습니다.\n");
return;
}
}

if(!F_ISSET(ply_ptr, PNORNM)) {
ANSI(fd, CYAN);
print(fd, "== %s ==\n\n", rom_ptr->name);


ANSI(fd, WHITE);
}

if(!F_ISSET(ply_ptr, PNOSDS) && rom_ptr->short_desc)
print(fd, "%s\n", rom_ptr->short_desc);

if(!F_ISSET(ply_ptr, PNOLDS) && rom_ptr->long_desc)
print(fd, "%s\n", rom_ptr->long_desc);

if(!F_ISSET(ply_ptr, PNOEXT)) {
n=0;
str[0] = 0;
strcat(str, "[ 출구 : ");
xp = rom_ptr->first_ext;



while(xp) {

if(!F_ISSET(xp->ext, XSECRT) && !F_ISSET(xp->ext, XNOSEE) &&
(F_ISSET(ply_ptr, PDINVI) ? 1 : !F_ISSET(xp->ext, XINVIS))) {
strcat(str, xp->ext->name);
strcat(str, ", ");
n++;

}

xp = xp->next_tag;
}

if(!n)
strcat(str, "없음 ]");


else {
str[strlen(str)-2] = 0;
strcat(str, " ]");
}

print(fd, "%s\n", str);
}

else {
n=n2=0;
str[0] = 0;
xp = rom_ptr->first_ext;
while(xp) {


if(!F_ISSET(xp->ext, XSECRT) && !F_ISSET(xp->ext, XNOSEE) &&
(F_ISSET(ply_ptr, PDINVI) ? 1 : !F_ISSET(xp->ext, XINVIS))) {

if(!strcmp(xp->ext->name,"동"))
strcpy(grp[0], "▶");

else
if(!strcmp(xp->ext->name,"서"))
strcpy(grp[1], "◀");

else
if(!strcmp(xp->ext->name,"남"))
strcpy(gcp[1], "▼");

else


if(!strcmp(xp->ext->name,"북"))
strcpy(gdp[1], "▲");

else
if(!strcmp(xp->ext->name,"위"))
strcpy(gdp[0], "위");

else
if(!strcmp(xp->ext->name,"밑"))
strcpy(gcp[0], "밑");

else {
strcat(str, xp->ext->name);
strcat(str, ", ");
n++;

}

n2++;
}

xp = xp->next_tag;
}

if(!n2) {
ANSI(fd, WHITE);
print(fd, "∴△∴\n");
print(fd, "◁●▷");
ANSI(fd, WHITE);
print(fd, " 갈수 있는 방향은");
print(fd, " * 출구없음 * ");
print(fd, "입니다.\n");
print(fd, "∵▽∵\n");
ANSI(fd, WHITE);
}

else {
ANSI(fd, CYAN);
strcpy(exit_grp[0], "∴");
strcat(exit_grp[0], gdp[1]);
strcat(exit_grp[0], "");
strcat(exit_grp[0], gdp[0]);
print(fd, "%s\n", exit_grp[0]);
strcpy(exit_grp[1], grp[1]);
strcat(exit_grp[1], "●");
strcat(exit_grp[1], grp[0]);

print(fd, "%s", exit_grp[1]);

if(n!=0) {
str[strlen(str)-2] = 0;
ANSI(fd, WHITE);
print(fd, "[ 출구 :");
ANSI(fd, CYAN);
print(fd, " %s ",str);
ANSI(fd, WHITE);
print(fd, "]");
}

else
ANSI(fd, CYAN);
print(fd, "\n");

ANSI(fd, CYAN);
strcpy(exit_grp[2], "∵");
strcat(exit_grp[2], gcp[1]);
strcat(exit_grp[2], "");
strcat(exit_grp[2], gcp[0]);
print(fd, "%s\n", exit_grp[2]);
ANSI(fd, WHITE);
}
}

/* 생략 */


XE Login