자동 이벤트
2007.04.12 11:44
/**********************************************************************/
/* update_game */
/**********************************************************************/
/* This function handles all the updates that occur while players are */
/* typing. */
void update_game(){
long t;
t = time(0);
if (t == last_update) return;
last_update = t;
if (t - last_user_update >= 20) update_users(t);
if (t - last_random_update >= Random_update_interval) update_random(t);
if (t != last_active_update) update_active(t);
if (t - last_monster_update >= 3000) /* 몹이 떨어지는데 걸리는 시간 추가*/
update_monster(t);
/************************************************************************/
/* update_active */
/************************************************************************/
void update_monster(t)
long t;
{
int rtn, rom_num;
room *new_rom=NULL;
creature *crt_ptr=NULL;
int tmp=0;
last_monster_update = t;
for (tmp; tmp < 10; tmp++) {
do {
rom_num = mrand(8000, 8300); /* 아래의 몹이 8000~8300 방에 생김 */
rtn = load_rom(rom_num, &new_rom);
if (rtn > -1 && F_ISSET(new_rom, RNOTEL)) rtn = -1;
} while(rtn < 0);
if (strlen(new_rom->name) < 2) return;
load_crt(mrand(599, 599), &crt_ptr); /* 599~599 몹이 선택 */
add_crt_rom(crt_ptr, new_rom);
}
broadcast("\n!!!!!%s가 %s에 나타났습니다.!!",crt_ptr->name,new_rom->name);
}
자료 출처 ; http://my.netian.com/~GGOLTO6/
홈지기 "그륨"
/* update_game */
/**********************************************************************/
/* This function handles all the updates that occur while players are */
/* typing. */
void update_game(){
long t;
t = time(0);
if (t == last_update) return;
last_update = t;
if (t - last_user_update >= 20) update_users(t);
if (t - last_random_update >= Random_update_interval) update_random(t);
if (t != last_active_update) update_active(t);
if (t - last_monster_update >= 3000) /* 몹이 떨어지는데 걸리는 시간 추가*/
update_monster(t);
/************************************************************************/
/* update_active */
/************************************************************************/
void update_monster(t)
long t;
{
int rtn, rom_num;
room *new_rom=NULL;
creature *crt_ptr=NULL;
int tmp=0;
last_monster_update = t;
for (tmp; tmp < 10; tmp++) {
do {
rom_num = mrand(8000, 8300); /* 아래의 몹이 8000~8300 방에 생김 */
rtn = load_rom(rom_num, &new_rom);
if (rtn > -1 && F_ISSET(new_rom, RNOTEL)) rtn = -1;
} while(rtn < 0);
if (strlen(new_rom->name) < 2) return;
load_crt(mrand(599, 599), &crt_ptr); /* 599~599 몹이 선택 */
add_crt_rom(crt_ptr, new_rom);
}
broadcast("\n!!!!!%s가 %s에 나타났습니다.!!",crt_ptr->name,new_rom->name);
}
자료 출처 ; http://my.netian.com/~GGOLTO6/
홈지기 "그륨"
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
77 | *괴물이름 방폭 버그 수정 | 그리움 | 2007.04.12 | 533 |
76 | 연타기능 - 직업별 연타 | 그리움 | 2007.04.12 | 479 |
75 | 게시판 버그 해결 방법. | 그리움 | 2007.04.12 | 470 |
74 | 연타기능 - 연타수 자동 | 그리움 | 2007.04.12 | 447 |
73 | 무한대전 방 데이터 Convert | 그리움 | 2007.11.23 | 422 |
72 | 주민등록번호 검사 소스 | 그리움 | 2007.04.12 | 420 |
71 | 몹 소환하여 소환몹이 대신 싸우게 하기 | 그리움 | 2007.11.23 | 398 |
70 | 물건, 몹의 번호 찾아내기. | 그리움 | 2007.07.04 | 392 |
69 | 감옥/퇴소 | 그리움 | 2007.04.12 | 338 |
68 | 개척 소스 | 그리움 | 2007.04.12 | 302 |
67 | 머드에서 몹 심기 | 그리움 | 2007.04.12 | 287 |
66 | 온라인 리붓 | 그리움 | 2007.04.12 | 287 |
65 | 방전체 공격루틴 #2 | 그리움 | 2007.04.12 | 287 |
64 | 이동하는 몹 | 그리움 | 2007.04.12 | 283 |
63 | 프롬프트 그래프화 #2 | 그리움 | 2007.04.12 | 280 |
62 | 낚시 | 그리움 | 2007.04.12 | 280 |
61 | 운영자명령 "보고" | 그리움 | 2007.04.12 | 280 |
60 | Mordor에 있는 몹 소환 소스 | 그리움 | 2007.04.12 | 277 |
59 | 프롬프트 그래프화 | 그리움 | 2007.04.12 | 271 |
58 | 귀환장소 수정판 | 그리움 | 2007.04.12 | 263 |