출구모양 개량 소스
2007.04.12 11:41
아래 소스는 김준식님이 올리신 것입니다...
───────────────────────────────────────
/* 무한대전 출구 개량형....
*
* 현재 운영중인 무한대전 또는 "무한대전 소스를 수정한 머드" 들 중에서
* 상업적으로 사용되는 곳을 제외하면 누구나 이소스를 사용할수 있습니다.
*
* 그냥 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);
}
}
/* 생략 */
───────────────────────────────────────
/* 무한대전 출구 개량형....
*
* 현재 운영중인 무한대전 또는 "무한대전 소스를 수정한 머드" 들 중에서
* 상업적으로 사용되는 곳을 제외하면 누구나 이소스를 사용할수 있습니다.
*
* 그냥 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);
}
}
/* 생략 */
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
17 | 자기 아파트 방설명은 자기가 #2 | 그리움 | 2007.04.12 | 182 |
16 | 암호 *****로 보이게 하기 | 그리움 | 2007.04.12 | 181 |
15 | 경매 소스 | 그리움 | 2007.04.12 | 180 |
14 | 지도 기능 | 그리움 | 2007.04.12 | 178 |
13 | 개량형 우체국 | 그리움 | 2007.04.12 | 177 |
12 | 안시 사용하기 | 그리움 | 2007.04.12 | 175 |
11 | 순위 소스 | 그리움 | 2007.04.12 | 174 |
10 | 글자색, 배경색 15색 사용하기 | 그리움 | 2007.04.12 | 173 |
9 | 몹과 자신을 "비교" | 그리움 | 2007.04.12 | 171 |
8 | 게시판 검색 기능 추가하기 | 그리움 | 2007.04.12 | 170 |
7 | 방설명 안시 넣기 | 그리움 | 2007.04.12 | 168 |
6 | 접속화면을 멋있게 | 그리움 | 2007.04.12 | 165 |
5 | 패거리 전쟁시 적과 아군 구분 | 그리움 | 2007.04.12 | 165 |
4 | 패거리 상점 만들기 | 그리움 | 2007.04.12 | 163 |
3 | Ctrl+Enter 패치하기 | 그리움 | 2007.04.12 | 161 |
2 | 패거리 전쟁 승패 기록 | 그리움 | 2007.04.12 | 160 |
1 | 패거리 직위 내리기 | 그리움 | 2007.04.12 | 156 |