귀환장소 설정
2007.04.12 13:02
INS에 있는 내용을 가져온 것입니다.
----------------------------------------------------------------
1. global.c 에 '귀환장소'명령어를 추가한다.
2. mtype.h 에 PRTACI , PRTNOW , PRTPAS 추가한다.
3. 밑의 소스 추가 ^^ (현재 귀환장소가 디폴트값)
/***********************************************************************/
/* 귀환장소 설정 */
/***********************************************************************/
/* Make by 젤가디스 */
int return_place(ply_ptr,cmnd)
creature *ply_ptr;
cmd *cmnd;
{
room *rom_ptr;
char *str[20];
int fd;
fd = ply_ptr->fd;
rom_ptr = ply_ptr->parent_rom;
if(cmnd->num < 2){
ANSI(fd,CYAN);
print(fd,"어디로 귀환하시려구요?\n");
print(fd,"- 형식 : 귀환희망장소 귀환장소 -\n");
ANSI(fd,WHITE);
return(0);
}
if(!strcmp(cmnd->str[1],"과거")){
F_SET(ply_ptr,PRTACI);
F_CRL(ply_ptr,PRTNOW);
F_CRL(ply_ptr,PRTPAS);
print(fd,"과거로 귀환합니다.\n");
return 0;
}
else if(!strcmp(cmnd->str[1],"현대")){
F_SET(ply_ptr,PRTNOW);
F_CRL(ply_ptr,PRTACI);
F_CRL(ply_ptr,PRTPAS);
print(fd,"현대로 귀환합니다.\n");
return 0;
} else if(!strcmp(cmnd->str[1],"미래")){
F_SET(ply_ptr,PRTPAS);
F_CRL(ply_ptr,PRTACI);
F_CRL(ply_ptr,PRTNOW);
print(fd,"미래로 귀환합니다.\n");
return 0;
}
else{
print(fd,"그런 귀환장소는 없습니다.\n");
print(fd,"현대로 귀환합니다.\n");
F_CRL(ply_ptr,PRTPAS);
F_CRL(ply_ptr,PRTACI);
F_SET(ply_ptr,PRTNOW);
return 0; }
}
5. COMMAND1.C 부분의 귀환장소 수정
int return_square(ply_ptr,cmnd)
creature *ply_ptr;
cmd *cmnd;
{
room *rom_ply;
int fd;
ctag *cp;
rom_ply=ply_ptr->parent_rom;
fd=ply_ptr->fd;
if(ply_is_attacking(ply_ptr,cmnd)) {
print(fd,"당신은 싸우고 있는 중입니다!!");
return 0;
}
/*if(rom_ply->rom_num==1001) {
print(fd,"당신은 이미 광장에 와 있습니다!");
return 0;
}*/
if(F_ISSET(ply_ptr,PRTNOW) && rom_ply->rom_num==1001)
{ print(fd,"당신은 이미 광장에 와 있습니다!\n");
return 0; }
else if(F_ISSET(ply_ptr,PRTACI) && rom_ply->rom_num==7)
{ print(fd,"당신은 이미 광장에 와 있습니다!\n");
return 0; } else if(F_ISSET(ply_ptr,PRTPAS) && rom_ply->ro
{ print(fd,"당신은 이미 광장에 와 있습니다!\n");
return 0; }
if(ply_ptr->following) {
cp = ply_ptr->following->first_fol;
}
else {
cp = ply_ptr->first_fol;
}
if(cp){
print(fd,"먼저 그룹에서 나오세요.");
return(0);
} if(ply_ptr->level>20 && ply_ptr->class print(fd, "당신이 귀환하려하자 흑암의 세력이 당신의 도력을 뺏습니다.\n");
ply_ptr->mpcur = 0;
}
print(fd, "당신이 \"귀환!\"이라고 외치자 이상한 힘에 의해 어딘가로 빨려들어갑니
다.");
if(!F_ISSET(ply_ptr,PDMINV))
broadcast_rom(fd,ply_ptr->rom_num,"\n%m님이 갑자기 사라집니다!",ply_ptr);
del_ply_rom(ply_ptr,rom_ply); if(!F_ISSET(ply_ptr,PFRTUN)){
if(F_ISSET(ply_ptr,PRTNOW))
/*현대 광장으로 귀환*/
load_rom(1001,&rom_ply);
/*과거 광장으로 귀환*/
else if(F_ISSET(ply_ptr,PRTACI))
load_rom(7,&rom_ply);
/*미래 광장으로 귀환*/
else if(F_ISSET(ply_ptr,PRTPAS))
load_rom(16,&rom_ply); }
else
load_rom(3300 + ply_ptr->daily[DL_EXPND].max, &rom_ply);
add_ply_rom(ply_ptr,rom_ply);
if(!F_ISSET(ply_ptr,PDMINV))
broadcast_rom(fd,ply_ptr->rom_num, "\n%m님이 갑자기 자욱한 연기와 함께 나타났습
니다!",ply_ptr);
return 0;
}
홈지기 "그륨"
----------------------------------------------------------------
1. global.c 에 '귀환장소'명령어를 추가한다.
2. mtype.h 에 PRTACI , PRTNOW , PRTPAS 추가한다.
3. 밑의 소스 추가 ^^ (현재 귀환장소가 디폴트값)
/***********************************************************************/
/* 귀환장소 설정 */
/***********************************************************************/
/* Make by 젤가디스 */
int return_place(ply_ptr,cmnd)
creature *ply_ptr;
cmd *cmnd;
{
room *rom_ptr;
char *str[20];
int fd;
fd = ply_ptr->fd;
rom_ptr = ply_ptr->parent_rom;
if(cmnd->num < 2){
ANSI(fd,CYAN);
print(fd,"어디로 귀환하시려구요?\n");
print(fd,"- 형식 : 귀환희망장소 귀환장소 -\n");
ANSI(fd,WHITE);
return(0);
}
if(!strcmp(cmnd->str[1],"과거")){
F_SET(ply_ptr,PRTACI);
F_CRL(ply_ptr,PRTNOW);
F_CRL(ply_ptr,PRTPAS);
print(fd,"과거로 귀환합니다.\n");
return 0;
}
else if(!strcmp(cmnd->str[1],"현대")){
F_SET(ply_ptr,PRTNOW);
F_CRL(ply_ptr,PRTACI);
F_CRL(ply_ptr,PRTPAS);
print(fd,"현대로 귀환합니다.\n");
return 0;
} else if(!strcmp(cmnd->str[1],"미래")){
F_SET(ply_ptr,PRTPAS);
F_CRL(ply_ptr,PRTACI);
F_CRL(ply_ptr,PRTNOW);
print(fd,"미래로 귀환합니다.\n");
return 0;
}
else{
print(fd,"그런 귀환장소는 없습니다.\n");
print(fd,"현대로 귀환합니다.\n");
F_CRL(ply_ptr,PRTPAS);
F_CRL(ply_ptr,PRTACI);
F_SET(ply_ptr,PRTNOW);
return 0; }
}
5. COMMAND1.C 부분의 귀환장소 수정
int return_square(ply_ptr,cmnd)
creature *ply_ptr;
cmd *cmnd;
{
room *rom_ply;
int fd;
ctag *cp;
rom_ply=ply_ptr->parent_rom;
fd=ply_ptr->fd;
if(ply_is_attacking(ply_ptr,cmnd)) {
print(fd,"당신은 싸우고 있는 중입니다!!");
return 0;
}
/*if(rom_ply->rom_num==1001) {
print(fd,"당신은 이미 광장에 와 있습니다!");
return 0;
}*/
if(F_ISSET(ply_ptr,PRTNOW) && rom_ply->rom_num==1001)
{ print(fd,"당신은 이미 광장에 와 있습니다!\n");
return 0; }
else if(F_ISSET(ply_ptr,PRTACI) && rom_ply->rom_num==7)
{ print(fd,"당신은 이미 광장에 와 있습니다!\n");
return 0; } else if(F_ISSET(ply_ptr,PRTPAS) && rom_ply->ro
{ print(fd,"당신은 이미 광장에 와 있습니다!\n");
return 0; }
if(ply_ptr->following) {
cp = ply_ptr->following->first_fol;
}
else {
cp = ply_ptr->first_fol;
}
if(cp){
print(fd,"먼저 그룹에서 나오세요.");
return(0);
} if(ply_ptr->level>20 && ply_ptr->class print(fd, "당신이 귀환하려하자 흑암의 세력이 당신의 도력을 뺏습니다.\n");
ply_ptr->mpcur = 0;
}
print(fd, "당신이 \"귀환!\"이라고 외치자 이상한 힘에 의해 어딘가로 빨려들어갑니
다.");
if(!F_ISSET(ply_ptr,PDMINV))
broadcast_rom(fd,ply_ptr->rom_num,"\n%m님이 갑자기 사라집니다!",ply_ptr);
del_ply_rom(ply_ptr,rom_ply); if(!F_ISSET(ply_ptr,PFRTUN)){
if(F_ISSET(ply_ptr,PRTNOW))
/*현대 광장으로 귀환*/
load_rom(1001,&rom_ply);
/*과거 광장으로 귀환*/
else if(F_ISSET(ply_ptr,PRTACI))
load_rom(7,&rom_ply);
/*미래 광장으로 귀환*/
else if(F_ISSET(ply_ptr,PRTPAS))
load_rom(16,&rom_ply); }
else
load_rom(3300 + ply_ptr->daily[DL_EXPND].max, &rom_ply);
add_ply_rom(ply_ptr,rom_ply);
if(!F_ISSET(ply_ptr,PDMINV))
broadcast_rom(fd,ply_ptr->rom_num, "\n%m님이 갑자기 자욱한 연기와 함께 나타났습
니다!",ply_ptr);
return 0;
}
홈지기 "그륨"
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
57 | 이동력 추가하기 | 그리움 | 2007.04.12 | 188 |
» | 귀환장소 설정 | 그리움 | 2007.04.12 | 190 |
55 | 안시 문자열로 인한 공백 #2 | 그리움 | 2007.04.12 | 191 |
54 | 배경색 바꾸기 | 그리움 | 2007.04.12 | 192 |
53 | 안시 문자열로 인한 공백 | 그리움 | 2007.04.12 | 193 |
52 | 패거리창고 소스 | 그리움 | 2007.04.12 | 194 |
51 | 패거리 레벨 조정 소스 | 그리움 | 2007.04.12 | 195 |
50 | 자기 아파트 자기가 방설명 넣기 | 그리움 | 2007.04.12 | 195 |
49 | 지도 소스 #2 | 그리움 | 2007.04.12 | 195 |
48 | 방 전체공격 소스 | 그리움 | 2007.04.12 | 197 |
47 | 자동으로 돈줍기 #2 | 그리움 | 2007.04.12 | 197 |
46 | 귀환장소 변경소스 #2 | 그리움 | 2007.04.12 | 198 |
45 | 베팅소스 | 그리움 | 2007.04.12 | 198 |
44 | 직업 추가하기 #2 | 그리움 | 2007.04.12 | 199 |
43 | 이도류 | 그리움 | 2007.04.12 | 199 |
42 | 기술추가 | 그리움 | 2007.04.12 | 199 |
41 | 잡담 안시 사용하기 | 그리움 | 2007.04.12 | 200 |
40 | 레벨을 32767까지 가능하게 | 그리움 | 2007.04.12 | 200 |
39 | 주문추가 소스 | 그리움 | 2007.04.12 | 201 |
38 | 출구모양 개량 소스 | 그리움 | 2007.04.12 | 201 |