머드클럽
머드게임이란?
게임은 어떤 환경에서?
본격적으로 게임해 볼까?
배너교환
머드강좌
일반 머드강좌
성천사님의 머드강좌
혼님의 머드강좌
방울꽃님의 머드강좌
리트님의 머드강좌
2Soo님의 머드강좌
내머드소개하기
접속가능머드
내머드소개하기
자료실
접속 프로그램
머드소스
머드 유틸리티
기타
커뮤니티
공지사항
등업신청
머드클럽에바란다
자유 게시판
질문 AND 답변
머드클럽 갤러리
구인구직
머드게임소개
사신전(死神戰)
사신전 소개
사신전 맵
사신전 명령어 모음집
천명(天命)
천명 소개
천명 맵
천명 명령어 모음집
마이페이지
로그인
회원가입
계정찾기
로그인
회원가입
계정찾기
텍스트머드클럽
검색
[mordor]Mordor 내장 에디터 1.0 (아이템, 몹)
보라메
2
3,190
0
0
2003-12-25 01:15:15
/* <br />Mordor 내장 에디터 1.0 (아이템, 몹) <br />-- 우르 <br />이 에디터 루틴은 한글화 된 무한대전의 에디터를 바탕으로 머드에 내장될 <br />수 있게 컨버젼 한 것이며 패치된 Mordor 4.61 에서 수정없이 컴파일 되며 <br />무한대전이나 Mordor 버젼의 경우 함수의 파라메터 정의와 안시관계 <br />함수를 삽입해 주십시오. <br />머드내에서 아이템과 몹을 수정하더라도 이미 방데이터에 심어진 몹과 아 <br />이템은 리프레쉬 되지 않습니다. 해결법은 머드를 리붓하거나 수동으로 <br />*청소 한후 *로드 시켜주십시오. <br />기타 이 소스에 대한 참고사항은 I.N.S BBS go IMPERIAL 로 가셔서 게시판 <br />을 읽어주세요. <br />이 소스는 원 에디터 루틴 이외에도 제 노력에 의해 수정된 부분이 있으므 <br />로 제 동의없이 상용머드에서 사용을 허락하지 않습니다. <br />이 글을 다른 곳에 게시할 시 위 설명을 누락시키지 마십시오. <br />-- 우르 <br />제 계정이 폭발(?)한 관계로 머드에 내장시킨 에디터 루틴이나 정리해서 <br />화일 그대로 올립니다. ㅠ.ㅠ 나중에 시간나면 방 에디터도 올리지요. <br />*/ <br /> <br />/* <br /> 추가 설명 <br />global.c 에 추가해 주셔야 겠져.. <br />{ "*내장에디터" 150, dm_editor } <br />숫자 부분은 잘 맞춰서 적어 주세요.. 겹치지 않게... <br /> -- 솔 -- <br />*/ <br /> <br />//mextern.h 에 추가 <br />extern void editor_main() ,gotoxy(), edit_monster(), <br />edit_obj_1(), edit_obj_2(), edit_obj_3(), <br />edit_obj_4(), edit_obj_5(), edit_obj_6(), <br />edit_mon_1(), edit_mon_2(), edit_mon_3(), <br />edit_mon_4(), edit_mon_5(), edit_mon_6(), <br />edit_mon_7(), edit_mon_8(), edit_mon_9(), <br />obj_screen(), mon_screen(); <br />extern int find_dm_index(), dm_editor(); <br />extern intload_obj_from_file(), save_obj_to_file(), <br />load_crt_from_file(), save_crt_to_file(), <br />load_rom_from_file(), save_rom_to_file(); <br /> <br />//command아무대나 추가 <br />void clearscreen(int fd ) <br />{ <br />if(fd > -1) <br />if(F_ISSET(Ply[fd].ply, PANSIC)) <br />print(fd, "\033[2J"); <br />} <br />void gotoxy(int fd, int x, int y ) <br />{ <br />if(fd > -1) <br />if(F_ISSET(Ply[fd].ply, PANSIC)) <br />print(fd, "%c[%d;%df", 27, x, y); <br />} <br /> <br />struct editor_stat { <br /> <br />int index; <br />int cnt; <br />struct object *edt_obj_ptr; <br />struct creature *edt_crt_ptr; <br />struct room *edt_rom_ptr; <br /> <br />} EDITOR_STAT[7]; <br /> <br />void editor_main(int fd, int param, char *str); <br />void edit_object(int fd, int param, char *str); <br />void edit_monster(int fd, int param, char *str); <br /> <br />void edit_obj_1(int fd, int param, char *str); <br />void edit_obj_2(int fd, int param, char *str); <br />void edit_obj_3(int fd, int param, char *str); <br />void edit_obj_4(int fd, int param, char *str); <br />void edit_obj_5(int fd, int param, char *str); <br />void edit_obj_6(int fd, int param, char *str); <br /> <br />void edit_mon_1(int fd, int param, char *str); <br />void edit_mon_2(int fd, int param, char *str); <br />void edit_mon_3(int fd, int param, char *str); <br />void edit_mon_4(int fd, int param, char *str); <br />void edit_mon_5(int fd, int param, char *str); <br />void edit_mon_6(int fd, int param, char *str); <br />void edit_mon_7(int fd, int param, char *str); <br />void edit_mon_8(int fd, int param, char *str); <br />void edit_mon_9(int fd, int param, char *str); <br /> <br />void obj_screen(int fd, int param); <br />void mon_screen(int fd, int param); <br />void rom_screen(int fd, int param); <br />int find_dm_index(creature *ply_ptr); <br /> <br />int find_dm_index(creature *ply_ptr) <br />{ <br />if(!strcmp(ply_ptr->name, DMNAME)) return 0; <br />else if (!strcmp(ply_ptr->name, DMNAME2)) return 1; <br />else if (!strcmp(ply_ptr->name, DMNAME3)) return 2; <br />else if (!strcmp(ply_ptr->name, DMNAME4)) return 3; <br />else if (!strcmp(ply_ptr->name, DMNAME5)) return 4; <br />else if (!strcmp(ply_ptr->name, DMNAME6)) return 5; <br />else if (!strcmp(ply_ptr->name, DMNAME7)) return 6; <br />else return(-1); <br />} <br /> <br />int dm_editor(creature *ply_ptr, cmd *cmnd) <br />{ <br />int fd, dm_index; <br /> <br />fd = ply_ptr->fd; <br /> <br />if(ply_ptr->class < DM) <br />return(PROMPT); <br /> <br />dm_index = find_dm_index(ply_ptr); <br /> <br />if(dm_index < 0) <br />return(PROMPT); <br /> <br />F_SET(ply_ptr,PANSIC); <br /> <br />print(fd, "안시모드를 설정합니다.\n"); <br /> <br />zero(&EDITOR_STAT[find_dm_index(ply_ptr)],sizeof(struct editor_stat)); <br /> <br />editor_main(fd,0,""); <br />return(DOPROMPT); <br />} <br /> <br />void editor_main(int fd, int param, char *str) <br />{ <br /> <br />switch(param) { <br />case 0: <br />clearscreen(fd); ANSI(fd, WHITE); <br />gotoxy(fd,10,30); print(fd,"1. 아이템 에디트"); <br />gotoxy(fd,11,30); print(fd,"2. 몹 에디트"); <br />gotoxy(fd,12,30); print(fd,"3. 방 에디트"); <br />gotoxy(fd,13,30); print(fd,"4. 사용자 에디트"); <br />ANSI(fd, RED); <br />gotoxy(fd,15,30); print(fd,"8. 머드 종료"); <br />gotoxy(fd,16,30); print(fd,"9. 에디터 종료"); <br />gotoxy(fd,18,30); ANSI(fd, WHITE); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"선택하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,editor_main,1); <br /> <br />case 1: <br />switch(low(str[0])) { <br />case '1': <br />clearscreen(fd); <br />gotoxy(fd,3,14); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"에디트 하실 아이템의 번호를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_object,1); <br /> <br />case '2': <br />clearscreen(fd); <br />gotoxy(fd,3,10); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"에디트 하실 몹의 번호를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_monster,1); <br /> <br />case '3': <br />gotoxy(fd,18,30); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"준비된 화면만 보시죠-_-: (제작중) [엔터]"); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,rom_screen,0); <br /> <br />case '4': <br />gotoxy(fd,18,30); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"아직 이 기능은 지원하지 않습니다. [엔터] "); <br />RETURN(fd,editor_main,0); <br /> <br />// edit_player(); <br /> <br />#ifndef WIN32 <br />case '5': <br />gotoxy(fd,18,30); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"아직 이 기능은 지원하지 않습니다. [엔터] "); <br />RETURN(fd,editor_main,0); <br /> <br />// check_player(); <br /> <br />#endif <br />case '8': <br />F_CLR(Ply[fd].ply, PREADI); <br />print(fd,"머드를 종료합니다.\n"); <br />save_all_ply(); <br />save_all_ply(); <br />resave_all_rom(1); <br />resave_all_rom(1); <br />update_shutdown(); <br />return; <br />case '9': <br />gotoxy(fd,17,30); <br />F_CLR(Ply[fd].ply, PREADI); <br />print(fd,"종료합니다.\n"); <br />RETURN(fd,command,1); <br />default: <br />gotoxy(fd,17,30); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"잘못 선택하셨습니다 [엔터] "); <br />RETURN(fd,editor_main,0); <br />} <br />} <br /> <br />RETURN(fd,editor_main,0); <br />} <br /> <br /> <br />void edit_object(int fd, int param, char *str) <br />{ <br />int num, j; <br />object *obj_ptr; <br />char flgstr[256]; <br /> <br />obj_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_obj_ptr; <br /> <br />switch(param) { <br /> <br />case 0: <br />obj_screen(fd,0); <br /> <br />gotoxy(fd,15,25); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"선택하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_object,2); <br /> <br />case 1: <br />num = atol(str); <br />if(num < 1) { <br />gotoxy(fd,3,14); <br />print(fd,"숫자를 정확히 입력하세요.\n"); <br />RETURN(fd, editor_main, 0); <br />} <br /> <br />EDITOR_STAT[find_dm_index(Ply[fd].ply)].index = num; <br />load_obj_from_file(num, &EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_obj_ptr); <br />obj_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_obj_ptr; <br /> <br />obj_screen(fd,0); <br /> <br />gotoxy(fd,15,25); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"선택하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_object,2); <br /> <br />case 2: <br />switch(low(str[0])) { <br />case '1': <br />obj_screen(fd,1); <br /> <br />gotoxy(fd,3,1); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_1,1); <br /> <br />case '2': <br />obj_screen(fd,2); <br /> <br />gotoxy(fd,3,3); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_2,1); <br /> <br />case '3': <br />obj_screen(fd,3); <br /> <br />gotoxy(fd,3,1); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_3,1); <br /> <br />case '4': <br />obj_screen(fd,4); <br /> <br />gotoxy(fd,2,8); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_4,1); <br /> <br />case '5': <br />obj_screen(fd,5); <br /> <br />gotoxy(fd,2,11); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_5,1); <br /> <br />case '6': <br />obj_screen(fd,6); <br />for(j=0;j<128;j++) <br />flgstr[j] = <br />(obj_ptr->flags[j/8] & 1<<(j%8)) ? '*':'.'; <br />flgstr[128] = 0; j = flgstr[70]; <br />flgstr[70] = 0; <br />gotoxy(fd,4,1); print(fd,"%s",flgstr); <br />flgstr[70] = j; <br />gotoxy(fd,9,1); print(fd,"%s",&flgstr[70]); <br />gotoxy(fd,11,10); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_6,1); <br /> <br />case '7': <br />zero(obj_ptr, sizeof(object)); <br /> <br />gotoxy(fd,15,25); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"초기화 되었습니다. [엔터]를 입력하세요: "); <br />RETURN(fd,edit_object,0); <br /> <br />case '8': <br /> <br />free(obj_ptr); <br />EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_obj_ptr = 0; <br />EDITOR_STAT[find_dm_index(Ply[fd].ply)].index = 0; <br />gotoxy(fd,15,25); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"저장하지 않았습니다. [엔터]를 입력하세요: "); <br />RETURN(fd,editor_main,0); <br /> <br />case '9': <br />num = EDITOR_STAT[find_dm_index(Ply[fd].ply)].index; <br />save_obj_to_file(num, obj_ptr); <br />free(obj_ptr); <br /> <br />EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_obj_ptr = 0; <br /> <br />EDITOR_STAT[find_dm_index(Ply[fd].ply)].index = 0; <br />flush_obj(); <br />gotoxy(fd,15,25); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"저장하였습니다. [엔터]를 입력하세요: "); <br />RETURN(fd,editor_main,0); <br /> <br />default: <br />gotoxy(fd,15,25); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"잘못 선택하셨습니다 [엔터] "); <br />RETURN(fd,edit_object,0); <br />} <br />} <br />} <br /> <br />void edit_obj_1(int fd, int param, char *str) <br />{ <br />object *obj_ptr; <br /> <br />obj_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_obj_ptr; <br /> <br />switch(param) { <br />case 1: <br />if(str[0]) <br />strcpy(obj_ptr->name, str); <br />obj_screen(fd,1); <br /> <br />gotoxy(fd,6,1); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_1,2); <br />/* description */ <br />case 2: <br />if(str[0]) <br />strcpy(obj_ptr->description, str); <br />obj_screen(fd,1); <br /> <br />gotoxy(fd,15,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "[엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd, edit_object, 0); <br />} <br />} <br /> <br /> <br />void edit_obj_2(int fd, int param, char *str) <br />{ <br />object *obj_ptr; <br /> <br />obj_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_obj_ptr; <br /> <br />switch(param) { <br />/* obj_ptr->key[1] */ <br />case 1: <br />if(str[0]) <br />strcpy(obj_ptr->key[0], str); <br />obj_screen(fd,2); <br /> <br />gotoxy(fd,3,29); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_2,2); <br /> <br />/* obj_ptr->key[2] */ <br />case 2: <br />if(str[0]) <br />strcpy(obj_ptr->key[1], str); <br />obj_screen(fd,2); <br /> <br />gotoxy(fd,3,56); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_2,3); <br /> <br />case 3: <br />if(str[0]) <br />strcpy(obj_ptr->key[2], str); <br />obj_screen(fd,2); <br /> <br />gotoxy(fd,15,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "[엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_object,0); <br />} <br />} <br /> <br /> <br />void edit_obj_3(int fd, int param, char *str) <br />{ <br />object *obj_ptr; <br /> <br />obj_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_obj_ptr; <br /> <br />switch(param) { <br /> <br />case 1: <br />if(str[0]) <br />strcpy(obj_ptr->use_output, str); <br />obj_screen(fd,3); <br /> <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"사용시 출력되는 글:"); <br />gotoxy(fd,3,1); print(fd,"%-s", obj_ptr->use_output); <br /> <br />gotoxy(fd,15,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "[엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_object,0); <br />} <br />} <br /> <br />void edit_obj_4(int fd, int param, char *str) <br />{ <br />object *obj_ptr; <br /> <br />obj_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_obj_ptr; <br /> <br />/* 가격/무게/빙의수치/임무 */ <br />switch(param) { <br />/* 무게 */ <br />case 1: <br />if(str[0]) <br />obj_ptr->value = atol(str); <br />obj_screen(fd,4); <br /> <br />gotoxy(fd,2,40); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_4,2); <br /> <br />/* 종류 */ <br />case 2: <br />if(str[0]) <br />obj_ptr->weight = atol(str); <br />obj_screen(fd,4); <br /> <br />gotoxy(fd,3,8); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_4,3); <br /> <br />/* 빙의수치 */ <br />case 3: <br />if(str[0]) <br />obj_ptr->type = atol(str); <br />obj_screen(fd,4); <br /> <br />gotoxy(fd,3,40); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_4,4); <br /> <br />/* 임무 */ <br />case 4: <br />if(str[0]) <br />obj_ptr->adjustment = atol(str); <br />obj_screen(fd,4); <br /> <br />gotoxy(fd,3,60); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_4,5); <br /> <br />case 5: <br />if(str[0]) <br />obj_ptr->questnum = atol(str); <br />obj_screen(fd,4); <br /> <br />gotoxy(fd,15,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "[엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_object,0); <br />} <br />} <br /> <br />void edit_obj_5(int fd, int param, char *str) <br />{ <br />object *obj_ptr; <br /> <br />obj_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_obj_ptr; <br /> <br />/* 사용횟수/데미지/방어력/입는 곳/매직/스폐셜 */ <br />switch(param) { <br />case 1: <br />if(str[0]) <br />obj_ptr->shotscur = atol(str); <br />obj_screen(fd,5); <br /> <br />gotoxy(fd,2,17); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_5,2); <br /> <br />case 2: <br />if(str[0]) <br />obj_ptr->shotsmax = atol(str); <br />obj_screen(fd,5); <br /> <br />gotoxy(fd,3,9); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_5,3); <br /> <br />case 3: <br />if(str[0]) <br />obj_ptr->ndice = atol(str); <br />obj_screen(fd,5); <br /> <br />gotoxy(fd,3,39); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_5,4); <br /> <br />case 4: <br />if(str[0]) <br />obj_ptr->sdice = atol(str); <br />obj_screen(fd,5); <br /> <br />gotoxy(fd,3,68); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_5,5); <br /> <br />case 5: <br />if(str[0]) <br />obj_ptr->pdice = atol(str); <br />obj_screen(fd,5); <br /> <br />gotoxy(fd,4,9); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_5,6); <br /> <br />case 6: <br />if(str[0]) <br />obj_ptr->armor = atol(str); <br />obj_screen(fd,5); <br /> <br />gotoxy(fd,4,39); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_5,7); <br /> <br />case 7: <br />if(str[0]) <br />obj_ptr->wearflag = atol(str); <br />obj_screen(fd,5); <br /> <br />gotoxy(fd,4,68); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_5,8); <br /> <br />case 8: <br />if(str[0]) <br />obj_ptr->magicpower = atol(str); <br />obj_screen(fd,5); <br /> <br />gotoxy(fd,5,39); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_5,9); <br /> <br />case 9: <br />if(str[0]) <br />obj_ptr->magicrealm = atol(str); <br />obj_screen(fd,5); <br /> <br />gotoxy(fd,5,68); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_5,10); <br /> <br />case 10: <br />if(str[0]) <br />obj_ptr->special = atol(str); <br />obj_screen(fd,5); <br /> <br />gotoxy(fd,15,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "[엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_object,0); <br />} <br />} <br /> <br />void edit_obj_6(int fd, int param, char *str) <br />{ <br />int j, num = 0; <br />char flgstr[256]; <br />object *obj_ptr; <br /> <br />obj_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_obj_ptr; <br /> <br />/* 플래그 설정 */ <br />switch(param) { <br /> <br />case 0: <br />obj_screen(fd,6); <br />for(j=0;j<128;j++) <br />flgstr[j] = <br />(obj_ptr->flags[j/8] & 1<<(j%8)) ? '*':'.'; <br />flgstr[128] = 0; j = flgstr[70]; <br />flgstr[70] = 0; <br />gotoxy(fd,4,1); print(fd,"%s",flgstr); <br />flgstr[70] = j; <br />gotoxy(fd,9,1); print(fd,"%s",&flgstr[70]); <br />gotoxy(fd,11,10); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_6,1); <br /> <br /> <br />case 1: <br />if(str[0] && (num = atol(str))) { <br />if(obj_ptr->flags[(num-1)/8] & 1<<((num-1)%8)) <br />obj_ptr->flags[(num-1)/8] &= ~(1<<((num-1)%8)); <br />else <br />obj_ptr->flags[(num-1)/8] |= 1<<((num-1)%8); <br />} <br />obj_screen(fd,6); <br />for(j=0;j<128;j++) <br />flgstr[j] = <br />(obj_ptr->flags[j/8] & 1<<(j%8)) ? '*':'.'; <br />flgstr[128] = 0; j = flgstr[70]; <br />flgstr[70] = 0; <br />gotoxy(fd,4,1); print(fd,"%s",flgstr); <br />flgstr[70] = j; <br />gotoxy(fd,9,1); print(fd,"%s",&flgstr[70]); <br />gotoxy(fd,11,10); <br /> <br />if(str[0] && !num) { <br />gotoxy(fd,12,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "종료합니다. [엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_object,0); <br />} <br /> <br />gotoxy(fd,7,9); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_obj_6,1); <br />} <br />} <br /> <br /> <br />void obj_screen(int fd, int param) <br />{ <br />object *obj_ptr; <br /> <br />obj_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_obj_ptr; <br /> <br />switch(param) { <br /> <br />case 0: <br />clearscreen(fd); <br />gotoxy(fd,2,20); print(fd,"아이템: %s", obj_ptr->name); <br />gotoxy(fd,4,25); print(fd," 1. 이름/설명"); <br />gotoxy(fd,5,25); print(fd," 2. 사용되는 단어"); <br />gotoxy(fd,6,25); print(fd," 3. 사용시 출력되는 글"); <br />gotoxy(fd,7,25);print(fd," 4. 가격/무게/종류/빙의수치/임무"); <br />gotoxy(fd,8,25); <br />print(fd," 5. 사용횟수/데미지/방어력/입는 곳/매직/스폐셜"); <br />gotoxy(fd,9,25); print(fd," 6. 플래그 설정"); <br />gotoxy(fd,10,25); print(fd," 7. 초기화"); <br />gotoxy(fd,11,25); print(fd," 8. 저장하지 않고 이전 메뉴로"); <br />gotoxy(fd,12,25); print(fd," 9. 저장하고 이전 메뉴로"); <br /> <br />return; <br /> <br />case 1: <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"아이템의 이름:"); <br />gotoxy(fd,3,1); print(fd,"%-s", obj_ptr->name); <br />gotoxy(fd,5,1); print(fd,"설명:"); <br />gotoxy(fd,6,1); print(fd,"%-s",obj_ptr->description); <br /> <br />return; <br /> <br />case 2: <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"단어:"); <br />gotoxy(fd,3,1); print(fd,"1:%-s", obj_ptr->key[0]); <br />gotoxy(fd,3,27); print(fd,"2:%-s", obj_ptr->key[1]); <br />gotoxy(fd,3,54); print(fd,"3:%-s", obj_ptr->key[2]); <br /> <br />return; <br /> <br />case 3: <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"사용시 출력되는 글:"); <br />gotoxy(fd,3,1); print(fd,"%-s", obj_ptr->use_output); <br /> <br />return; <br /> <br />case 4: <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd," 가격: %-8d", obj_ptr->value); <br />gotoxy(fd,2,30); print(fd,"무게 : %-5d",obj_ptr->weight); <br />gotoxy(fd,3,1); print(fd," 종류: %-3d", obj_ptr->type); <br />gotoxy(fd,3,30); print(fd,"빙의수치: %-3d", <br />obj_ptr->adjustment); <br />gotoxy(fd,3,54); print(fd,"임무: %-3d", obj_ptr->questnum); <br /> <br />return; <br /> <br />case 5: <br />clearscreen(fd); <br />gotoxy(fd,2,1); <br />print(fd,"사용횟수: %-5d/%-5d", obj_ptr->shotscur, obj_ptr->shotsmax); <br />gotoxy(fd,3,1); print(fd,"# 굴림: %-5d", obj_ptr->ndice); <br />gotoxy(fd,3,30); print(fd,"면체 : %-5d", obj_ptr->sdice); <br />gotoxy(fd,3,60); print(fd,"추가치: %-5d", obj_ptr->pdice); <br />gotoxy(fd,4,1); print(fd,"방어력: %-3d", obj_ptr->armor); <br />gotoxy(fd,4,30); print(fd,"입는 곳: %-3d", obj_ptr->wearflag); <br />gotoxy(fd,4,60); print(fd,"매직 : %-3d", obj_ptr->magicpower); <br />gotoxy(fd,5,30); print(fd,"속성 : %-1d", obj_ptr->magicrealm); <br />gotoxy(fd,5,60); print(fd,"스폐셜: %-3d", obj_ptr->special); <br /> <br />return; <br /> <br />case 6: <br />clearscreen(fd); <br />gotoxy(fd,2,10); print(fd,"1"); <br />gotoxy(fd,2,20); print(fd,"2"); <br />gotoxy(fd,2,30); print(fd,"3"); <br />gotoxy(fd,2,40); print(fd,"4"); <br />gotoxy(fd,2,50); print(fd,"5"); <br />gotoxy(fd,2,60); print(fd,"6"); <br />gotoxy(fd,2,70); print(fd,"7"); <br />gotoxy(fd,7,10); print(fd,"8"); <br />gotoxy(fd,7,20); print(fd,"9"); <br />gotoxy(fd,7,30); print(fd,"0"); <br />gotoxy(fd,7,40); print(fd,"1"); <br />gotoxy(fd,7,50); print(fd,"2"); <br />gotoxy(fd,6,30); print(fd,"1"); <br />gotoxy(fd,6,40); print(fd,"1"); <br />gotoxy(fd,6,50); print(fd,"1"); <br />gotoxy(fd,3,1); print(fd, <br />"1234567890123456789012345678901234567890123456789012345678901234567890"); <br />gotoxy(fd,8,1); <br />print(fd,"1234567890123456789012345678901234567890123456789012345678"); <br />gotoxy(fd,11,1); print(fd,"플랙 #: "); <br />gotoxy(fd,12,1); print(fd,"(0 to exit)"); <br />return; <br />} <br />} <br /> <br /> <br />void mon_screen(int fd, int param) <br />{ <br />creature *crt_ptr; <br /> <br />crt_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr; <br /> <br />clearscreen(fd); <br /> <br />switch(param) { <br />case 0: <br />clearscreen(fd); <br />gotoxy(fd,2,25); print(fd,"몹 이름: %s",crt_ptr->name); <br />gotoxy(fd,4,30); print(fd," 1. 몹 이름/행동/대화"); <br />gotoxy(fd,5,30); print(fd," 2. 몹의 이름 또는 단어"); <br />gotoxy(fd,6,30); print(fd," 3. 레벨/직업/성향/스테이터스"); <br />gotoxy(fd,7,30); print(fd," 4. HP/MP/방어력/thaco/num"); <br />gotoxy(fd,8,30); print(fd," 5. 경험치/돈/타격치/임무/스폐셜"); <br />gotoxy(fd,9,30); print(fd," 6. 쓸수 있는 주술 설정"); <br />gotoxy(fd,10,30); print(fd," 7. 플래그 설정"); <br />gotoxy(fd,11,30); print(fd," 8. 숙달된 정도(?) - 사용하지 않음"); <br />gotoxy(fd,12,30); print(fd," 9. 소지하고 있는 아이템"); <br />gotoxy(fd,13,30); print(fd,"10. 초기화"); <br />gotoxy(fd,14,30); print(fd,"11. 저장하지 않음"); <br />gotoxy(fd,15,30); print(fd,"12. 저장하고 이전 메뉴로"); <br /> <br />return; <br /> <br />case 1: <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"몹 이름:"); <br />gotoxy(fd,3,1); print(fd,"%s",crt_ptr->name); <br />gotoxy(fd,5,1); print(fd,"행동:"); <br />gotoxy(fd,6,1); print(fd,"%s",crt_ptr->description); <br />gotoxy(fd,8,1); print(fd,"%s", "대화:"); <br />gotoxy(fd,9,1); print(fd,"%s",crt_ptr->talk); <br /> <br />return; <br /> <br />case 2: /* keys */ <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"몹의 이름 또는 단어:"); <br />gotoxy(fd,3,1); print(fd,"1:%s", crt_ptr->key[0]); <br />gotoxy(fd,3,27); print(fd,"2:%s", crt_ptr->key[1]); <br />gotoxy(fd,3,54); print(fd,"3:%s", crt_ptr->key[2]); <br /> <br />return; <br /> <br />case 3: /* level/class/align/stats */ <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"레벨: %-3d", crt_ptr->level); <br />gotoxy(fd,2,20); print(fd,"직업: %-3d", crt_ptr->class); <br />gotoxy(fd,2,40); print(fd,"성향: %-5d", crt_ptr->alignment); <br />gotoxy(fd,3,1); print(fd," 힘 : %-2d", crt_ptr->strength); <br />gotoxy(fd,3,20); print(fd,"민첩: %-2d", crt_ptr->dexterity); <br />gotoxy(fd,3,40); print(fd,"맷집: %-2d", <br />crt_ptr->constitution); <br />gotoxy(fd,4,1); print(fd,"지능: %-2d", crt_ptr->intelligence); <br />gotoxy(fd,4,20); print(fd,"신앙심: %-2d", crt_ptr->piety); <br /> <br />return; <br /> <br />case 4: /* HP/MP/Armor/Thaco */ <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd," HP: %-5d/%-5d", <br />crt_ptr->hpcur, crt_ptr->hpmax); <br />gotoxy(fd,2,30); print(fd," MP: %-5d/%-5d", <br />crt_ptr->mpcur, crt_ptr->mpmax); <br />gotoxy(fd,3,1); print(fd,"방어력: %-3d", crt_ptr->armor); <br />gotoxy(fd,3,30); print(fd,"Thac0: %-3d", crt_ptr->thaco); <br />gotoxy(fd,4,1); print(fd," Num: %-3d", crt_ptr->numwander); <br /> <br />return; <br /> <br />case 5: /* exp/gold/dmg/quest */ <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd," 경험치: %ld", <br />crt_ptr->experience); <br />gotoxy(fd,2,29); print(fd,"돈 : %ld", crt_ptr->gold); <br />gotoxy(fd,3,1); print(fd," # 굴림: %-5d", crt_ptr->ndice); <br />gotoxy(fd,3,29); print(fd,"면체 : %-5d", crt_ptr->sdice); <br />gotoxy(fd,3,55); print(fd,"추가치: %-5d", crt_ptr->pdice); <br />gotoxy(fd,4,1); print(fd," 임무: %-3d", <br />crt_ptr->questnum); <br />gotoxy(fd,4,29); print(fd,"스폐셜: %-3d", crt_ptr->special); <br /> <br />return; <br /> <br />case 6: /* spells */ <br />clearscreen(fd); <br />gotoxy(fd,2,10); print(fd,"1"); <br />gotoxy(fd,2,20); print(fd,"2"); <br />gotoxy(fd,2,30); print(fd,"3"); <br />gotoxy(fd,2,40); print(fd,"4"); <br />gotoxy(fd,2,50); print(fd,"5"); <br />gotoxy(fd,2,60); print(fd,"6"); <br />gotoxy(fd,2,70); print(fd,"7"); <br />gotoxy(fd,7,10); print(fd,"8"); <br />gotoxy(fd,7,20); print(fd,"9"); <br />gotoxy(fd,7,30); print(fd,"0"); <br />gotoxy(fd,7,40); print(fd,"1"); <br />gotoxy(fd,7,50); print(fd,"2"); <br />gotoxy(fd,6,30); print(fd,"1"); <br />gotoxy(fd,6,40); print(fd,"1"); <br />gotoxy(fd,6,50); print(fd,"1"); <br />gotoxy(fd,3,1); print(fd, <br />"1234567890123456789012345678901234567890123456789012345678901234567890"); <br />gotoxy(fd,8,1); <br />print(fd,"1234567890123456789012345678901234567890123456789012345678"); <br />gotoxy(fd,11,1); print(fd,"마법 #: "); <br />gotoxy(fd,12,1); print(fd,"(0 to exit)"); <br /> <br />return; <br /> <br />case 7: /* flags */ <br />clearscreen(fd); <br />gotoxy(fd,2,10); print(fd,"1"); <br />gotoxy(fd,2,20); print(fd,"2"); <br />gotoxy(fd,2,30); print(fd,"3"); <br />gotoxy(fd,2,40); print(fd,"4"); <br />gotoxy(fd,2,50); print(fd,"5"); <br />gotoxy(fd,2,60); print(fd,"6"); <br />gotoxy(fd,2,70); print(fd,"7"); <br />gotoxy(fd,7,10); print(fd,"8"); <br />gotoxy(fd,7,20); print(fd,"9"); <br />gotoxy(fd,7,30); print(fd,"0"); <br />gotoxy(fd,7,40); print(fd,"1"); <br />gotoxy(fd,7,50); print(fd,"2"); <br />gotoxy(fd,6,30); print(fd,"1"); <br />gotoxy(fd,6,40); print(fd,"1"); <br />gotoxy(fd,6,50); print(fd,"1"); <br />gotoxy(fd,3,1); print(fd, <br />"1234567890123456789012345678901234567890123456789012345678901234567890"); <br />gotoxy(fd,8,1); <br />print(fd,"1234567890123456789012345678901234567890123456789012345678"); <br />gotoxy(fd,11,1); print(fd,"플랙 #: "); <br />gotoxy(fd,12,1); print(fd,"(0 to exit)"); <br />return; <br /> <br />case 8: <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"숙달정도(?)- 사용하지 않음:"); <br />gotoxy(fd,3,1); print(fd,"1:%ld", crt_ptr->proficiency[0]); <br />gotoxy(fd,3,27); print(fd,"2:%ld", crt_ptr->proficiency[1]); <br />gotoxy(fd,3,54); print(fd,"3:%ld", crt_ptr->proficiency[2]); <br />gotoxy(fd,4,1); print(fd,"4:%ld", crt_ptr->proficiency[3]); <br />gotoxy(fd,4,27); print(fd,"5:%ld", crt_ptr->proficiency[4]); <br /> <br />return; <br /> <br />case 9: /* carryables */ <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"소지하고 있는 아이템:"); <br />gotoxy(fd,3,1); print(fd,"1:%-5d",crt_ptr->carry[0]); <br />gotoxy(fd,3,17); print(fd,"2:%-5d",crt_ptr->carry[1]); <br />gotoxy(fd,3,33); print(fd,"3:%-5d",crt_ptr->carry[2]); <br />gotoxy(fd,3,49); print(fd,"4:%-5d",crt_ptr->carry[3]); <br />gotoxy(fd,3,65); print(fd,"5:%-5d",crt_ptr->carry[4]); <br />gotoxy(fd,4,1); print(fd,"6:%-5d",crt_ptr->carry[5]); <br />gotoxy(fd,4,17); print(fd,"7:%-5d",crt_ptr->carry[6]); <br />gotoxy(fd,4,33); print(fd,"8:%-5d",crt_ptr->carry[7]); <br />gotoxy(fd,4,49); print(fd,"9:%-5d",crt_ptr->carry[8]); <br />gotoxy(fd,4,64); print(fd,"10:%-5d",crt_ptr->carry[9]); <br /> <br />return; <br />} <br />} <br /> <br />void rom_screen(int fd, int param) <br />{ <br />room *rom_ptr; <br />int i, num, x; <br />rom_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_rom_ptr; <br /> <br />load_rom_from_file(num, &rom_ptr); <br />rom_ptr->rom_num = num; <br />if(!rom_ptr->established) <br />rom_ptr->established = time(0); <br /> <br />clearscreen(fd); <br />switch(param) { <br />case 0: <br />clearscreen(fd); <br />gotoxy(fd,2,25); print(fd," 방 번호와 이름: (%d) %s",num,rom_ptr->name); <br />gotoxy(fd,4,30); print(fd," 1. 방이름"); <br />gotoxy(fd,5,30); print(fd," 2. 짧은 설명 - 사용하지 않음"); <br />gotoxy(fd,6,30); print(fd," 3. 방설명"); <br />gotoxy(fd,7,30); print(fd," 4. 통과레벨/함정/통로/스폐셜"); <br />gotoxy(fd,8,30); print(fd," 5. 플래그 설정"); <br />gotoxy(fd,9,30); print(fd," 6. 랜덤 출현 몹 지정"); <br />gotoxy(fd,10,30); print(fd," 7. 계속 출현하는 몹 - 시간설정(초)"); <br />gotoxy(fd,11,30); print(fd," 8. 계속 생성되는 아이템"); <br />gotoxy(fd,12,30); print(fd," 9. 방의 통계 - 사용하지 않음"); <br />gotoxy(fd,13,30); print(fd,"10. 출구 에디트 (게임상이 편리)"); <br />gotoxy(fd,14,30); print(fd,"11. 삭제"); <br />gotoxy(fd,15,30); print(fd,"12. 저장하지 않음"); <br />gotoxy(fd,16,30); print(fd,"13. 저장하고 이전 메뉴로"); <br />gotoxy(fd,17,30); print(fd,"선택하세요: "); <br />RETURN(fd,editor_main,0); <br />//return; <br /> <br />case 1: /* 방이름 */ <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"방 이름:"); <br />gotoxy(fd,3,1); print(fd,"%s",rom_ptr->name); <br />return; <br /> <br />case 2: /* 짧은방설 */ <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"짧은 방 설명:"); <br />gotoxy(fd,3,1); print(fd,"%s",rom_ptr->short_desc); <br />gotoxy(fd,3,27); print("새 설명을 입력하세요:"); <br />return; <br /> <br />case 3: /* 방설명 */ <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"방 설명:"); <br />gotoxy(fd,2,20); print(fd,"%s",rom_ptr->long_desc); <br />gotoxy(fd,2,40); print(fd,"새 설명을 입력하세요:"); <br />return; <br /> <br />case 4: /* 통과레벨/함정/통로/스폐셜 */ <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"함정: %-3d", rom_ptr->trap); <br />gotoxy(fd,2,30); print(fd," 함정출구: %-5d", rom_ptr->trapexit); <br />gotoxy(fd,2,59); print(fd,"스폐셜: %-3d", rom_ptr->special); <br />gotoxy(fd,4,1); print(fd,"출력되는 통로:"); <br />gotoxy(fd,5,1); print(fd,"%s",rom_ptr->track); <br />gotoxy(fd,7,1); print(fd,"최저레벨: %-2d", rom_ptr->lolevel); <br />gotoxy(fd,8,1); print(fd,"최고레벨: %-2d", rom_ptr->hilevel); <br /> <br />return; <br /> <br />case 5: /* 플랙 */ <br />clearscreen(fd); <br />gotoxy(fd,2,10); print(fd,"1"); <br />gotoxy(fd,2,20); print(fd,"2"); <br />gotoxy(fd,2,30); print(fd,"3"); <br />gotoxy(fd,2,40); print(fd,"4"); <br />gotoxy(fd,2,50); print(fd,"5"); <br />gotoxy(fd,2,60); print(fd,"6"); <br />gotoxy(fd,2,70); print(fd,"7"); <br />gotoxy(fd,7,10); print(fd,"8"); <br />gotoxy(fd,7,20); print(fd,"9"); <br />gotoxy(fd,7,30); print(fd,"0"); <br />gotoxy(fd,7,40); print(fd,"1"); <br />gotoxy(fd,7,50); print(fd,"2"); <br />gotoxy(fd,6,30); print(fd,"1"); <br />gotoxy(fd,6,40); print(fd,"1"); <br />gotoxy(fd,6,50); print(fd,"1"); <br />gotoxy(fd,3,1); print(fd, <br />"1234567890123456789012345678901234567890123456789012345678901234567890"); <br />gotoxy(fd,8,1); <br />print(fd,"1234567890123456789012345678901234567890123456789012345678"); <br />gotoxy(fd,11,1); print(fd,"플랙 #: "); <br />gotoxy(fd,12,1); print(fd,"(0 to exit)"); <br />return; <br /> <br />case 6: /* 랜덤몹 */ <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"랜덤 출현 몹:"); <br />for(x=0; x<10; x++) { <br />gotoxy(fd,x+3,x==9 ? 2:3); <br />print(fd,fd,"%d:%-5d",x+1,rom_ptr->random[x]); <br />} <br />gotoxy(fd,14,2); print(fd,"Traffic: %-3d", rom_ptr->traffic); <br />return; <br /> <br />case 7: /* 리젠몹 */ <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"계속 출현하는 몹:"); <br />gotoxy(fd,4,10); print(fd,"출현시간"); <br />gotoxy(fd,4,20); print(fd,"사용안함"); <br />gotoxy(fd,4,30); print(fd,"몹 번호"); <br />for(x=0; x<10; x++) { <br />gotoxy(fd,x+5, 2); print(fd,"%2d:",x+1); <br />gotoxy(fd,x+5, 10); print(fd,"%lu",rom_ptr->perm_mon[x].interval); <br />gotoxy(fd,x+5, 20); print(fd,"%lu",rom_ptr->perm_mon[x].ltime); <br />gotoxy(fd,x+5, 30); print(fd,"%-5d",rom_ptr->perm_mon[x].misc); <br />} <br />gotoxy(fd,17,1); printf(fd,"Monster #:"); <br />return; <br /> <br />case 8: /* 리젠아템 */ <br />clearscreen(fd); <br />gotoxy(fd,2,1); print(fd,"계속 생성되는 아이템:"); <br />gotoxy(fd,4,10); print(fd,"생성시간"); <br />gotoxy(fd,4,20); print(fd,"사용안함"); <br />gotoxy(fd,4,30); print(fd,"아이템 번호"); <br />for(x=0; x<10; x++) { <br />gotoxy(fd,x+5, 2); print(fd,"%2d:",x+1); <br />gotoxy(fd,x+5, 10); print(fd,"%lu",rom_ptr->perm_obj[x].interval); <br />gotoxy(fd,x+5, 20); print(fd,"%lu",rom_ptr->perm_obj[x].ltime); <br />gotoxy(fd,x+5, 30); print(fd,"%-5d",rom_ptr->perm_obj[x].misc); <br />} <br />gotoxy(fd,17,1); printf(fd,"선택하세요 #:"); <br />return; <br /> <br />case 9: /* 왔다갔다 */ <br />gotoxy(fd,2,1); print(fd," 방문객: %lu", (unsigned long)rom_ptr->beenhere); <br />gotoxy(fd,3,1); print(fd,"Established: %lu", (unsigned long)rom_ptr->established); <br />return; <br />case 10: /* Exits */ <br />clearscreen(fd); <br />//edit_exits(rom_ptr); <br />return; <br />case 11: /* Clear */ <br />clearscreen(fd); <br />gotoxy(fd,1,1); <br />print(fd,"정말 삭제 하시겠습니까? "); <br />return; <br />case 12: /* abort */ <br />clearscreen(fd); <br />free_rom(rom_ptr); <br />return; <br />case 13: /* save */ <br />clearscreen(fd); <br />save_rom_to_file(num, rom_ptr); <br />free_rom(rom_ptr); <br />return; <br /> <br />} <br />} <br /> <br />void edit_monster(int fd, int param, char *str) <br />{ <br />int j, num, sw; <br />char flgstr[256]; <br />creature *crt_ptr; <br /> <br />crt_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr; <br /> <br />switch(param) { <br /> <br />case 0: <br />mon_screen(fd,0); <br /> <br />gotoxy(fd,18,30); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"선택하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_monster,2); <br /> <br />case 1: <br /> <br />num = atol(str); <br />if(num < 1) { <br />gotoxy(fd,3,10); <br />print(fd,"숫자를 정확히 입력하세요.\n"); <br />RETURN(fd, editor_main, 0); <br />} <br /> <br />EDITOR_STAT[find_dm_index(Ply[fd].ply)].index = num; <br />load_crt_from_file(num, &EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr); <br />crt_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr; <br />crt_ptr->type = 1; /* monster */ <br /> <br />mon_screen(fd,0); <br /> <br />gotoxy(fd,18,30); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"선택하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_monster,2); <br /> <br />case 2: <br />sw = atoi(str); <br /> <br />switch(sw) { <br />case 1: <br />mon_screen(fd,1); <br /> <br />gotoxy(fd,3,1); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_1,1); <br /> <br />case 2: <br />mon_screen(fd,2); <br /> <br />gotoxy(fd,3,3); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_2,1); <br /> <br />case 3: <br />mon_screen(fd,3); <br /> <br />gotoxy(fd,2,7); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_3,1); <br /> <br />case 4: <br />mon_screen(fd,4); <br /> <br />gotoxy(fd,2,9); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_4,1); <br /> <br />case 5: <br />mon_screen(fd,5); <br /> <br />gotoxy(fd,2,13); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_5,1); <br /> <br />case 6: <br />mon_screen(fd,6); <br /> <br />for(j=0;j<128;j++) <br />flgstr[j] = <br />(crt_ptr->spells[j/8] & 1<<(j%8)) ? '*':'.'; <br />flgstr[128] = 0; j = flgstr[70]; <br />flgstr[70] = 0; <br />gotoxy(fd,4,1); print(fd,"%s",flgstr); <br />flgstr[70] = j; <br />gotoxy(fd,9,1); print(fd,"%s",&flgstr[70]); <br />gotoxy(fd,11,10); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_6,1); <br /> <br />case 7: <br />mon_screen(fd,7); <br /> <br />for(j=0;j<128;j++) <br />flgstr[j] = <br />(crt_ptr->flags[j/8] & 1<<(j%8)) ? '*':'.'; <br />flgstr[128] = 0; j = flgstr[70]; <br />flgstr[70] = 0; <br />gotoxy(fd,4,1); print(fd,"%s",flgstr); <br />flgstr[70] = j; <br />gotoxy(fd,9,1); print(fd,"%s",&flgstr[70]); <br />gotoxy(fd,11,10); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_7,1); <br /> <br />case 8: <br />mon_screen(fd,8); <br />gotoxy(fd,12,3); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_8,1); <br /> <br />case 9: <br />mon_screen(fd,9); <br /> <br />gotoxy(fd,3,3); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_9,1); <br /> <br />case 10: <br />zero(crt_ptr, sizeof(creature)); <br /> <br />gotoxy(fd,18,30); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"초기화 되었습니다. [엔터]를 입력하세요: "); <br />RETURN(fd,edit_monster,0); <br /> <br />case 11: <br />free(crt_ptr); <br />EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr = 0; <br />EDITOR_STAT[find_dm_index(Ply[fd].ply)].index = 0; <br /> <br />gotoxy(fd,18,30); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"저장하지 않았습니다. [엔터]를 입력하세요: "); <br /> <br />RETURN(fd,editor_main,0); <br /> <br />case 12: <br />num = EDITOR_STAT[find_dm_index(Ply[fd].ply)].index; <br />save_crt_to_file(num, crt_ptr); <br />free(crt_ptr); <br /> <br />EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr = 0; <br /> <br />EDITOR_STAT[find_dm_index(Ply[fd].ply)].index = 0; <br />flush_crt(); <br /> <br />gotoxy(fd,18,30); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd,"저장하였습니다. [엔터]를 입력하세요: "); <br />RETURN(fd,editor_main,0); <br /> <br />default: <br />gotoxy(fd,18,30); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, <br />"잘못 선택하셨습니다. [엔터]를 입력하세요: "); <br />RETURN(fd,edit_monster,0); <br />} <br />} <br />} <br /> <br /> <br />void edit_mon_1(int fd, int param, char *str) <br />{ <br />creature *crt_ptr; <br /> <br />crt_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr; <br /> <br />switch(param) { <br />case 1: <br />if(str[0]) <br />strcpy(crt_ptr->name, str); <br /> <br />mon_screen(fd,1); <br /> <br />gotoxy(fd,6,1); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_1,2); <br /> <br />case 2: <br />if(str[0]) <br />strcpy(crt_ptr->description, str); <br /> <br />mon_screen(fd,1); <br /> <br />gotoxy(fd,9,1); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_1,3); <br /> <br />case 3: <br />if(str[0]) <br />strcpy(crt_ptr->talk, str); <br /> <br />mon_screen(fd,1); <br /> <br />gotoxy(fd,15,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "[엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd, edit_monster, 0); <br />} <br />} <br /> <br />void edit_mon_2(int fd, int param, char *str) <br />{ <br />creature *crt_ptr; <br /> <br />crt_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr; <br /> <br />switch(param) { <br />case 1: <br />if(str[0]) <br />strcpy(crt_ptr->key[0], str); <br /> <br />mon_screen(fd,2); <br /> <br />gotoxy(fd,3,29); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_2,2); <br /> <br />case 2: <br />if(str[0]) <br />strcpy(crt_ptr->key[1], str); <br /> <br />mon_screen(fd,2); <br /> <br />gotoxy(fd,3,56); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_2,3); <br /> <br />case 3: <br />if(str[0]) <br />strcpy(crt_ptr->key[2], str); <br /> <br />mon_screen(fd,2); <br /> <br />gotoxy(fd,15,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "[엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd, edit_monster, 0); <br />} <br />} <br /> <br />void edit_mon_3(int fd, int param, char *str) <br />{ <br />creature *crt_ptr; <br /> <br />crt_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr; <br /> <br />switch(param) { <br />case 1: <br />if(str[0]) <br />crt_ptr->level = atol(str); <br />mon_screen(fd,3); <br /> <br />gotoxy(fd,2,26); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_3,2); <br /> <br />case 2: <br />if(str[0]) <br />crt_ptr->class = atol(str); <br />mon_screen(fd,3); <br />gotoxy(fd,2,46); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_3,3); <br /> <br />case 3: <br />if(str[0]) <br />crt_ptr->alignment = atol(str); <br />mon_screen(fd,3); <br />gotoxy(fd,3,7); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_3,4); <br /> <br />case 4: <br />if(str[0]) <br />crt_ptr->strength = atol(str); <br />mon_screen(fd,3); <br />gotoxy(fd,3,26); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_3,5); <br /> <br />case 5: <br />if(str[0]) <br />crt_ptr->dexterity = atol(str); <br />mon_screen(fd,3); <br /> <br />gotoxy(fd,3,46); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_3,6); <br /> <br />case 6: <br />if(str[0]) <br />crt_ptr->constitution = atol(str); <br />mon_screen(fd,3); <br /> <br />gotoxy(fd,4,7); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_3,7); <br /> <br />case 7: <br />if(str[0]) <br />crt_ptr->intelligence = atol(str); <br />mon_screen(fd,3); <br /> <br />gotoxy(fd,4,28); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_3,8); <br /> <br />case 8: <br />if(str[0]) <br />crt_ptr->piety = atol(str); <br />mon_screen(fd,3); <br /> <br />gotoxy(fd,15,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "[엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd, edit_monster, 0); <br />} <br />} <br /> <br /> <br />void edit_mon_4(int fd, int param, char *str) <br />{ <br />creature *crt_ptr; <br /> <br />crt_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr; <br /> <br />switch(param) { <br />case 1: <br />if(str[0]) <br />crt_ptr->hpcur = atol(str); <br />mon_screen(fd,4); <br /> <br />gotoxy(fd,2,15); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_4,2); <br /> <br />case 2: <br />if(str[0]) <br />crt_ptr->hpmax = atol(str); <br />mon_screen(fd,4); <br /> <br />gotoxy(fd,2,37); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_4,3); <br /> <br />case 3: <br />if(str[0]) <br />crt_ptr->mpcur = atol(str); <br />mon_screen(fd,4); <br /> <br />gotoxy(fd,2,43); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_4,4); <br /> <br />case 4: <br />if(str[0]) <br />crt_ptr->mpmax = atol(str); <br />mon_screen(fd,4); <br /> <br />gotoxy(fd,3,9); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_4,5); <br /> <br />case 5: <br />if(str[0]) <br />crt_ptr->armor = atol(str); <br />mon_screen(fd,4); <br /> <br />gotoxy(fd,3,37); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_4,6); <br /> <br />case 6: <br />if(str[0]) <br />crt_ptr->thaco = atol(str); <br />mon_screen(fd,4); <br /> <br />gotoxy(fd,4,9); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_4,7); <br /> <br />case 7: <br />if(str[0]) <br />crt_ptr->numwander = atol(str); <br />mon_screen(fd,4); <br /> <br />gotoxy(fd,15,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "[엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd, edit_monster, 0); <br />} <br />} <br /> <br /> <br />void edit_mon_5(int fd, int param, char *str) <br />{ <br />creature *crt_ptr; <br /> <br />crt_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr; <br /> <br />switch(param) { <br />case 1: <br />if(str[0]) <br />crt_ptr->experience = atol(str); <br />mon_screen(fd,5); <br /> <br />gotoxy(fd,2,37); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_5,2); <br /> <br />case 2: <br />if(str[0]) <br />crt_ptr->gold = atol(str); <br />mon_screen(fd,5); <br /> <br />gotoxy(fd,3,13); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_5,3); <br /> <br />case 3: <br />if(str[0]) <br />crt_ptr->ndice = atol(str); <br />mon_screen(fd,5); <br /> <br />gotoxy(fd,3,37); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_5,4); <br /> <br />case 4: <br />if(str[0]) <br />crt_ptr->sdice = atol(str); <br />mon_screen(fd,5); <br /> <br />gotoxy(fd,3,63); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_5,5); <br /> <br />case 5: <br />if(str[0]) <br />crt_ptr->pdice = atol(str); <br />mon_screen(fd,5); <br /> <br />gotoxy(fd,4,13); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_5,6); <br /> <br />case 6: <br />if(str[0]) <br />crt_ptr->questnum = atol(str); <br />mon_screen(fd,5); <br /> <br />gotoxy(fd,4,37); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_5,7); <br /> <br />case 7: <br />if(str[0]) <br />crt_ptr->special = atol(str); <br />mon_screen(fd,5); <br /> <br />gotoxy(fd,15,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "[엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd, edit_monster, 0); <br />} <br />} <br /> <br /> <br />void edit_mon_6(int fd, int param, char *str) <br />{ <br />int num = 0, j; <br />creature *crt_ptr; <br />char flgstr[256]; <br /> <br />crt_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr; <br /> <br />switch(param) { <br />case 1: <br />if(str[0] && (num = atol(str))) { <br />if(crt_ptr->spells[(num-1)/8] & 1<<((num-1)%8)) <br />crt_ptr->spells[(num-1)/8] &= ~(1<<((num-1)%8)); <br />else <br />crt_ptr->spells[(num-1)/8] |= 1<<((num-1)%8); <br />} <br />mon_screen(fd,6); <br /> <br />for(j=0;j<128;j++) <br />flgstr[j] = (crt_ptr->spells[j/8] & 1<<(j%8)) ? '*':'.'; <br /> <br />flgstr[128] = 0; j = flgstr[128]; <br />flgstr[128] = 0; <br />gotoxy(fd,4,1); print(fd,"%s",flgstr); <br />flgstr[128] = j; <br />gotoxy(fd,9,1); print(fd,"%s",&flgstr[128]); <br /> <br />if(str[0] && !num) { <br />gotoxy(fd,12,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "종료합니다. [엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_monster,0); <br />} <br />gotoxy(fd,11,10); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_6,1); <br />} <br />} <br /> <br />void edit_mon_7(int fd, int param, char *str) <br />{ <br />int num = 0, j; <br />creature *crt_ptr; <br />char flgstr[256]; <br /> <br />crt_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr; <br /> <br />switch(param) { <br />case 1: <br />if(str[0] && (num = atol(str))) { <br />if(crt_ptr->flags[(num-1)/8] & 1<<((num-1)%8)) <br />crt_ptr->flags[(num-1)/8] &= ~(1<<((num-1)%8)); <br />else <br />crt_ptr->flags[(num-1)/8] |= 1<<((num-1)%8); <br />} <br />mon_screen(fd,7); <br /> <br />for(j=0;j<128;j++) <br />flgstr[j] = <br />(crt_ptr->flags[j/8] & 1<<(j%8)) ? '*':'.'; <br />flgstr[128] = 0; j = flgstr[70]; <br />flgstr[70] = 0; <br />gotoxy(fd,4,1); print(fd,"%s",flgstr); <br />flgstr[70] = j; <br />gotoxy(fd,9,1); print(fd,"%s",&flgstr[70]); <br />gotoxy(fd,11,10); <br /> <br />if(str[0] && !num) { <br />gotoxy(fd,12,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "종료합니다. [엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_monster,0); <br />} <br />gotoxy(fd,7,9); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_7,1); <br />} <br />} <br /> <br />void edit_mon_8(int fd, int param, char *str) <br />{ <br />creature *crt_ptr; <br /> <br />crt_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr; <br /> <br />switch(param) { <br /> <br /> <br />case 1: <br />if(str[0]) <br />crt_ptr->proficiency[0] = atol(str); <br />mon_screen(fd,8); <br /> <br />gotoxy(fd,3,29); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_8,2); <br /> <br />case 2: <br />if(str[0]) <br />crt_ptr->proficiency[1] = atol(str); <br />mon_screen(fd,8); <br /> <br />gotoxy(fd,3,56); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_8,3); <br /> <br />case 3: <br />if(str[0]) <br />crt_ptr->proficiency[2] = atol(str); <br />mon_screen(fd,8); <br /> <br />gotoxy(fd,4,3); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_8,4); <br /> <br />case 4: <br />if(str[0]) <br />crt_ptr->proficiency[3] = atol(str); <br />mon_screen(fd,8); <br /> <br />gotoxy(fd,4,29); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_8,5); <br /> <br />case 5: <br />if(str[0]) <br />crt_ptr->proficiency[4] = atol(str); <br />mon_screen(fd,8); <br /> <br />gotoxy(fd,15,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "[엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd, edit_monster, 0); <br />} <br />} <br /> <br />void edit_mon_9(int fd, int param, char *str) <br />{ <br />creature *crt_ptr; <br /> <br />crt_ptr = EDITOR_STAT[find_dm_index(Ply[fd].ply)].edt_crt_ptr; <br /> <br />switch(param) { <br />case 1: <br />if(str[0]) <br />crt_ptr->carry[0] = atol(str); <br />mon_screen(fd,9); <br /> <br />gotoxy(fd,3,19); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_9,2); <br /> <br />case 2: <br />if(str[0]) <br />crt_ptr->carry[1] = atol(str); <br />mon_screen(fd,9); <br /> <br />gotoxy(fd,3,35); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_9,3); <br /> <br />case 3: <br />if(str[0]) <br />crt_ptr->carry[2] = atol(str); <br />mon_screen(fd,9); <br /> <br />gotoxy(fd,3,51); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_9,4); <br /> <br />case 4: <br />if(str[0]) <br />crt_ptr->carry[3] = atol(str); <br />mon_screen(fd,9); <br /> <br />gotoxy(fd,3,67); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_9,5); <br /> <br />case 5: <br />if(str[0]) <br />crt_ptr->carry[4] = atol(str); <br />mon_screen(fd,9); <br /> <br />gotoxy(fd,4,3); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_9,6); <br /> <br />case 6: <br />if(str[0]) <br />crt_ptr->carry[5] = atol(str); <br />mon_screen(fd,9); <br /> <br />gotoxy(fd,4,19); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_9,7); <br /> <br />case 7: <br />if(str[0]) <br />crt_ptr->carry[6] = atol(str); <br />mon_screen(fd,9); <br /> <br />gotoxy(fd,4,35); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_9,8); <br /> <br />case 8: <br />if(str[0]) <br />crt_ptr->carry[7] = atol(str); <br />mon_screen(fd,9); <br /> <br />gotoxy(fd,4,51); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_9,9); <br /> <br />case 9: <br />if(str[0]) <br />crt_ptr->carry[8] = atol(str); <br />mon_screen(fd,9); <br /> <br />gotoxy(fd,4,67); <br />F_SET(Ply[fd].ply, PREADI); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd,edit_mon_9,10); <br /> <br />case 10: <br />if(str[0]) <br />crt_ptr->carry[9] = atol(str); <br />mon_screen(fd,9); <br /> <br />gotoxy(fd,15,1); <br />F_SET(Ply[fd].ply, PREADI); <br />print(fd, "[엔터]를 입력하세요: "); <br />output_buf(); <br />Ply[fd].io->intrpt &= ~1; <br />RETURN(fd, edit_monster, 0); <br />} <br />} <br />/* 아템 불러오기 */ <br />int load_obj_from_file(num, obj_ptr) <br />int num; <br />object **obj_ptr; <br />{ <br />int fd; <br />long n; <br />char file[80]; <br /> <br />*obj_ptr = (object *)malloc(sizeof(object)); <br />if(!*obj_ptr) <br />merror("load_from_file", FATAL); <br />zero(*obj_ptr, sizeof(object)); <br /> <br />sprintf(file, "%s/o%02d", OBJPATH, num/OFILESIZE); <br />fd = open(file, O_RDONLY | O_BINARY, 0); <br />if(fd < 0) <br />return(-1); <br />n = lseek(fd, (long)((num%OFILESIZE)*sizeof(object)), 0); <br />if(n < 0L) { <br />close(fd); <br />return(-1); <br />} <br />n = read(fd, *obj_ptr, sizeof(object)); <br />if(n < sizeof(object)) { <br />close(fd); <br />return(-1); <br />} <br />close(fd); <br /> <br />return(0); <br />} <br />/* 아템 저장 */ <br />int save_obj_to_file(num, obj_ptr) <br />int num; <br />object *obj_ptr; <br />{ <br />int fd; <br />long n; <br />char file[80]; <br /> <br />sprintf(file, "%s/o%02d", OBJPATH, num/OFILESIZE); <br />fd = open(file, O_RDWR | O_BINARY, 0); <br />if(fd < 0) { <br />fd = open(file, O_RDWR | O_CREAT, ACC); <br />if(fd < 0) <br />return(-1); <br />} <br />n = lseek(fd, (long)((num%OFILESIZE)*sizeof(object)), 0); <br />if(n < 0L) { <br />close(fd); <br />return(-1); <br />} <br />n = write(fd, obj_ptr, sizeof(object)); <br />if(n < sizeof(object)) { <br />close(fd); <br />return(-1); <br />} <br />close(fd); <br /> <br />return(0); <br />} <br />/* 몹 로드 */ <br />int load_crt_from_file(num, crt_ptr) <br />int num; <br />creature **crt_ptr; <br />{ <br />int fd; <br />long n; <br />char file[80]; <br /> <br />*crt_ptr = (creature *)malloc(sizeof(creature)); <br />if(!*crt_ptr) <br />merror("load_from_file", FATAL); <br />zero(*crt_ptr, sizeof(creature)); <br /> <br />sprintf(file, "%s/m%02d", MONPATH, num/MFILESIZE); <br />fd = open(file, O_RDONLY | O_BINARY, 0); <br />if(fd < 0) <br />return(-1); <br />n = lseek(fd, (long)((num%MFILESIZE)*sizeof(creature)), 0); <br />if(n < 0L) { <br />close(fd); <br />return(-1); <br />} <br />n = read(fd, *crt_ptr, sizeof(creature)); <br />if(n < sizeof(creature)) { <br />close(fd); <br />return(-1); <br />} <br />close(fd); <br /> <br />return(0); <br />} <br />/* 몹 저장 */ <br />int save_crt_to_file(num, crt_ptr) <br />int num; <br />creature *crt_ptr; <br />{ <br />int fd; <br />long n; <br />char file[80]; <br /> <br />sprintf(file, "%s/m%02d", MONPATH, num/MFILESIZE); <br />fd = open(file, O_RDWR | O_BINARY, 0); <br />if(fd < 0) { <br />fd = open(file, O_RDWR | O_CREAT, ACC); <br />if(fd < 0) <br />return(-1); <br />} <br />n = lseek(fd, (long)((num%MFILESIZE)*sizeof(creature)), 0); <br />if(n < 0L) { <br />close(fd); <br />return(-1); <br />} <br />n = write(fd, crt_ptr, sizeof(creature)); <br />if(n < sizeof(creature)) { <br />close(fd); <br />return(-1); <br />} <br />close(fd); <br /> <br />return(0); <br />} <br />/* 방 로드 (만들예정대비) */ <br />int load_rom_from_file(num, rom_ptr) <br />int num; <br />room **rom_ptr; <br />{ <br />int fd; <br />long n; <br />char file[80]; <br /> <br />*rom_ptr = (room *)malloc(sizeof(room)); <br />if(!*rom_ptr) <br />merror("load_from_file", FATAL); <br />zero(*rom_ptr, sizeof(room)); <br /> <br />sprintf(file, "%s/r%02d/r%05d", ROOMPATH, num/1000, num); <br />fd = open(file, O_RDONLY | O_BINARY, 0); <br />if(fd < 0) <br />return(-1); <br />n = read_rom(fd, *rom_ptr); <br />if(n < 0) { <br />close(fd); <br />return(-1); <br />} <br />close(fd); <br /> <br />return(0); <br />} <br />/* 방저장 (만들예정대비) */ <br />int save_rom_to_file(num, rom_ptr) <br />int num; <br />room *rom_ptr; <br />{ <br />int fd; <br />long n; <br />char file[80]; <br /> <br />sprintf(file, "%s/r%02d/r%05d", ROOMPATH, num/1000, num); <br />unlink(file); <br />fd = open(file, O_RDWR | O_CREAT, ACC); <br />if(fd < 0) <br />return(-1); <br /> <br />n = write_rom(fd, rom_ptr); <br />if(n < 0) { <br />close(fd); <br />return(-1); <br />} <br />close(fd); <br /> <br />return(0); <br />} <br /> <br />
0
0
새글
답변
수정
삭제
최신목록
전체목록
낚시소스
내장 에디터 입니다..
2
Comments
백매화
2004.01.01(목) 오후 04:35:30
답변
내가 -_-수정한거넹 아~ 옛날이여
머드클럽
2004.01.01(목) 오후 05:04:03
답변
매화님 꼭 연락 주세요..
코멘트를 삭제할 비밀번호를 입력하세요.
비밀번호:
댓글에 답하기
입력
닫기
정회원 이상만 코멘트 쓰기가 가능합니다.
총 게시물 107개 / 검색된 게시물: 107개
누구든지 머드 강의를 올리수 있는 곳입니다...^^
[circle]
자동출구 화살표로 출력하기 소스
0
2880
0
0
CutyStar☆
2004-01-29
[hanlp]
쿼리에 대한 아주 초보적인 내용!!;;
4
3274
0
0
탈퇴
2004-01-22
[mordor]
Vtmode 를 통해서만 접속 가능하게 하기...
1
2857
0
0
방울꽃
2004-01-16
[circle]
써클머드로 머드 게임 만들기:세번째 이야기
3
4407
0
0
새천사
2004-01-16
[circle]
써클계열 머드 VTMODE BBS를 통해서만 접속 가능하도록 하는 소스
3
2903
0
0
주석
2004-01-16
[circle]
써클머드 README 파일 : 허접번역(?)
1
3837
0
0
새천사
2004-01-11
[circle]
써클 머드로 머드 게임 만들기:두번째이야기
6
4863
0
0
새천사
2004-01-08
[hanlp]
HanLP 도움말
0
5193
0
0
임종호
2004-01-07
[hanlp]
HanLP 에서의 한글 관련 함수 가이드
0
4350
0
0
Xerxes
2004-01-06
[circle]
써클 머드로 머드 게임 만들기:첫번째이야기
8
7975
0
0
새천사
2004-01-03
[mordor]
개척소스
0
2902
0
0
보라메
2003-12-27
[mordor]
그룹경치소스
0
2941
0
0
보라메
2003-12-27
[mordor]
기증소스
0
2768
0
0
보라메
2003-12-27
[mordor]
낚시소스
0
3031
0
0
보라메
2003-12-26
[mordor]
Mordor 내장 에디터 1.0 (아이템, 몹)
2
3191
0
0
보라메
2003-12-25
[mordor]
내장 에디터 입니다..
0
2848
0
0
보라메
2003-12-25
[mordor]
도배방지 소스
0
2924
0
0
보라메
2003-12-25
[mordor]
몹심기 소스
0
3004
0
0
머드사랑
2003-12-25
[mordor]
패거리등급조절
0
2738
0
0
머드사랑
2003-12-22
[mordor]
순위쏘스
0
2728
0
0
머드사랑
2003-12-18
이전
1
2
3
4
5
6
다음
검색
글쓰기
최신목록
전체목록
시작일
종료일
분류별 검색
전체보기
기타
circle
hanlp
mordor
소스분석
흑염
천무혼
검색어
이름
제목
내용
검색
닫기
로그인
회원가입
계정찾기
개인정보처리방침
이용약관
PC화면
Copyright (c) 텍스트머드클럽. All rights reserved.
쪽지를 전송하고 있습니다. 잠시 기다려주세요.
쪽지보내기
받는이(ID/닉네임)
닉네임으로 입력
내용
쪽지가 도착하였습니다.
쪽지함
쪽지 내용을 읽어오고 있습니다. 잠시 기다려주세요.
--