출구모양 개량 소스

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);
}
}

/* 생략 */
번호 제목 글쓴이 날짜 조회 수
57 도배방지 그리움 2007.04.12 222
56 그룹경험치 소스 그리움 2007.04.12 220
55 패거리전쟁중 "휴전" 그리움 2007.04.12 220
54 직업 추가하기 그리움 2007.04.12 218
53 자동으로 돈줍기 소스 그리움 2007.04.12 213
52 경매는 이렇게 그리움 2007.04.12 213
51 어디 그리움 2007.04.12 211
50 무한에서 안시 넣는 방법 그리움 2007.04.12 210
49 방설명 지우기 그리움 2007.04.12 209
48 특수 아이템 만들기 그리움 2007.04.12 209
47 복권 소스 그리움 2007.04.12 207
46 혼자 말하는 몹 그리움 2007.04.12 206
45 자동 이벤트 그리움 2007.04.12 204
44 낮과 밤이 되면 어둡고 환하게 그리움 2007.04.12 203
43 귀환장소 변경 소스 #1 그리움 2007.04.12 202
42 개량형 우체국 그리움 2007.04.12 202
41 주문추가 소스 그리움 2007.04.12 201
» 출구모양 개량 소스 그리움 2007.04.12 201
39 자동수련 소스 그리움 2007.04.12 201
38 잡담 안시 사용하기 그리움 2007.04.12 200


XE Login