어디
2007.04.12 11:37
※ 어디 소스
어디라고 치면 사용자의 위치가 나타난다.
※ 사용방법
1. OBJECT.C에 카피한다.
2. MEXTERN.H 로 이동해서 OBJECT.C 으로 간다.
int <-- whowhere();<--이렇게 적는다.
3. GLOBAL.C로 이동해서 { "어디", 101, "whowhere" }, <--이렇게 적는다.
4. make
/*************************************************/
/* whowhere (어디) */
/*************************************************/
int whowhere(ply_ptr, cmnd)
creature *ply_ptr;
cmd *cmnd;
{
creature *crt_ptr;
room *rom_ptr;
long t;
int fd, i;
char str[15];
fd = ply_ptr->fd;
if( cmnd->num == 1){
print(fd, "\n ※현재 사용자 위치※\n");
for(i=0; i if(!Ply[i].ply) continue;
if(Ply[i].ply->fd < 0) continue;
if(F_ISSET(Ply[i].ply, PDMINV) && Ply[i].ply->class == DM)
continue;
print(fd, "\n%-10s - %s", Ply[i].ply->name,
Ply[i].ply->parent_rom->name);
}
}
else {
lowercize(cmnd->str[1], 1);
crt_ptr = find_who(cmnd->str[1]);
if(!crt_ptr || ply_ptr->class <=DM && F_ISSET(crt_ptr, PDMINV)) {
print(fd, "%S%j 접속중이 아닙니다.", cmnd->str[1],"0");
return(0);
}
print(fd, "\n%-10s - %s", crt_ptr->name,
crt_ptr->parent_rom->name);
return(0);
}
return(0);
}
어디라고 치면 사용자의 위치가 나타난다.
※ 사용방법
1. OBJECT.C에 카피한다.
2. MEXTERN.H 로 이동해서 OBJECT.C 으로 간다.
int <-- whowhere();<--이렇게 적는다.
3. GLOBAL.C로 이동해서 { "어디", 101, "whowhere" }, <--이렇게 적는다.
4. make
/*************************************************/
/* whowhere (어디) */
/*************************************************/
int whowhere(ply_ptr, cmnd)
creature *ply_ptr;
cmd *cmnd;
{
creature *crt_ptr;
room *rom_ptr;
long t;
int fd, i;
char str[15];
fd = ply_ptr->fd;
if( cmnd->num == 1){
print(fd, "\n ※현재 사용자 위치※\n");
for(i=0; i if(!Ply[i].ply) continue;
if(Ply[i].ply->fd < 0) continue;
if(F_ISSET(Ply[i].ply, PDMINV) && Ply[i].ply->class == DM)
continue;
print(fd, "\n%-10s - %s", Ply[i].ply->name,
Ply[i].ply->parent_rom->name);
}
}
else {
lowercize(cmnd->str[1], 1);
crt_ptr = find_who(cmnd->str[1]);
if(!crt_ptr || ply_ptr->class <=DM && F_ISSET(crt_ptr, PDMINV)) {
print(fd, "%S%j 접속중이 아닙니다.", cmnd->str[1],"0");
return(0);
}
print(fd, "\n%-10s - %s", crt_ptr->name,
crt_ptr->parent_rom->name);
return(0);
}
return(0);
}
댓글 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 |
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 |
» | 어디 | 그리움 | 2007.04.12 | 252 |