귀환장소 변경 소스 #1
2007.04.12 11:41
이번에 귀환장소 소스를 공개하게 됐네요 ^6
(이건 제가 쓰는 머드에서 사용중인것이므로 ^^ 자신의 머드에 맞게 고쳐쓰세요 ^^)
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->rom_num==16)
{ 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;
}
이렇게 한후 make 하시면 될껍니다.
현재 제 머드에서 사용중이니깐요 ^^
빼먹은게 있을 수도 있으니깐 버그가 있으면 연락주세요 ^^
아참 이 소스를 제작하게 아이디어를 주신 '프리드러시' 엑 감사드립니다.
(이건 제가 쓰는 머드에서 사용중인것이므로 ^^ 자신의 머드에 맞게 고쳐쓰세요 ^^)
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->rom_num==16)
{ 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;
}
이렇게 한후 make 하시면 될껍니다.
현재 제 머드에서 사용중이니깐요 ^^
빼먹은게 있을 수도 있으니깐 버그가 있으면 연락주세요 ^^
아참 이 소스를 제작하게 아이디어를 주신 '프리드러시' 엑 감사드립니다.
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
17 | 방설명 지우기 | 그리움 | 2007.04.12 | 252 |
16 | 그룹경험치 소스 | 그리움 | 2007.04.12 | 254 |
15 | 자동수련 소스 | 그리움 | 2007.04.12 | 234 |
14 | 귀환장소 변경소스 #2 | 그리움 | 2007.04.12 | 228 |
» | 귀환장소 변경 소스 #1 | 그리움 | 2007.04.12 | 238 |
12 | 출구모양 개량 소스 | 그리움 | 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 |