어디
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 | 자기 아파트 방설명은 자기가 #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 |