출구모양 개량 소스
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 | 방설명 지우기 | 그리움 | 2007.04.12 | 252 |
16 | 그룹경험치 소스 | 그리움 | 2007.04.12 | 254 |
15 | 자동수련 소스 | 그리움 | 2007.04.12 | 234 |
14 | 귀환장소 변경소스 #2 | 그리움 | 2007.04.12 | 228 |
13 | 귀환장소 변경 소스 #1 | 그리움 | 2007.04.12 | 238 |
» | 출구모양 개량 소스 | 그리움 | 2007.04.12 | 247 |
11 | 자기 아파트 자기가 방설명 넣기 | 그리움 | 2007.04.12 | 233 |
10 | 혼자 말하는 몹 | 그리움 | 2007.04.12 | 239 |
9 | 패거리 레벨 조정 소스 | 그리움 | 2007.04.12 | 234 |
8 | 방 전체공격 소스 | 그리움 | 2007.04.12 | 234 |
7 | 주문추가 소스 | 그리움 | 2007.04.12 | 234 |
6 | 패거리창고 소스 | 그리움 | 2007.04.12 | 229 |
5 | 자동으로 돈줍기 소스 | 그리움 | 2007.04.12 | 252 |
4 | 복권 소스 | 그리움 | 2007.04.12 | 238 |
3 | 무한에서 안시 넣는 방법 | 그리움 | 2007.04.12 | 243 |
2 | 배경색 바꾸기 | 그리움 | 2007.04.12 | 234 |
1 | 어디 | 그리움 | 2007.04.12 | 252 |