[기타]이 소스를 봐도 어떻게 하라는지 모르겠어서 부탁드립니다.
#include <구조.h>
#include <관리자.h>
inherit LIB_DAEMON;
#define DIR "/유저데이타/플레이어."
#define TRUE 1
mixed CMD(string str)
{
object ob;
string pl, dt, temp, stmp, *buf;
int i, len, itmp, itmp1, itmp2, itmp3;
if (sscanf(str, "%s %s", pl, dt) != 2)
return "입력형식이 잘못되었습니다.";
if (!ob = find_player(pl))
return "플레이어("+pl+")가 접속해있지 않습니다.";
temp = read_file(DIR+dt, 1, 1);
if (!temp || !sizeof(temp))
return "지정한 파일("+DIR+dt+")이 존재하지 않습니다.";
if (!len = file_length(DIR+dt))
return "지정한 화일("+DIR+dt+")을 읽는중 에러 발생";
for (i = 0; i < len; i++)
{
temp = read_file(DIR+dt, i, 1);
if (!temp || !sizeof(temp)) break;
if (sscanf(temp, "NAME %s,TOTAL", stmp) != 1) continue;
if (stmp != pl) continue;
// 총수련치 셋팅
sscanf(temp, ",TOTAL_10 %d,", itmp1);
sscanf(temp, ",TOTAL_1 %d,", itmp2);
sscanf(temp, ",TOTAL %d,", itmp3);
ob->setTotalExp((itmp1*1000000000)+(itmp2*100000000)+itmp3);
message("에러", "총수련치 셋팅 완료", creators());
// 현수련치 셋팅
sscanf(temp, ",REAL %d,", itmp);
ob->setExp(itmp);
message("에러", "현수련치 셋팅 완료", creators());
// 명성 셋팅
sscanf(temp, ",FAME %d,", itmp);
ob->setFame(itmp);
message("에러", "명성 셋팅 완료", creators());
// 소지금 셋팅
sscanf(temp, ",GOLD %d,", itmp);
ob->setGold(itmp);
message("에러", "소지금 셋팅 완료", creators());
// 독문무기 셋팅
sscanf(temp, ",WEAPON %d,", itmp);
ob->setWeaponLevel("독문", itmp);
message("에러", "독문무기 셋팅 완료", creators());
// 특성치 셋팅
sscanf(temp, ",HIM %d,", itmp);
ob->setStat("힘", itmp);
sscanf(temp, ",MIN %d,", itmp);
ob->setStat("민첩", itmp);
sscanf(temp, ",GI %d,", itmp);
ob->setStat("기골", itmp);
sscanf(temp, ",NAE %d,", itmp);
ob->setStat("내공", itmp);
sscanf(temp, ",JI %d,", itmp);
ob->setStat("지혜", itmp);
sscanf(temp, ",TOO %d,", itmp);
ob->setStat("투지", itmp);
message("에러", "특성치 셋팅 완료", creators());
// 칠보갑주 셋팅
sscanf(temp, ",CHILHIM %d,", itmp);
ob->setChilboStat("힘", itmp);
sscanf(temp, ",CHILMIN %d,", itmp);
ob->setChilboStat("민첩", itmp);
sscanf(temp, ",CHILGI %d,", itmp);
ob->setChilboStat("기골", itmp);
sscanf(temp, ",CHILNAE %d,", itmp);
ob->setChilboStat("내공", itmp);
sscanf(temp, ",CHILJI %d,", itmp);
ob->setChilboStat("지혜", itmp);
sscanf(temp, ",CHILTOO %d,", itmp);
ob->setChilboStat("투지", itmp);
sscanf(temp, ",CHILARMOR %d", itmp);
ob->setChilboStat("방어력", itmp);
message("에러", "칠보갑주 셋팅 완료", creators());
// 기술 셋팅
sscanf(temp, ",SKILL ([%s]),", stmp);
buf = explode(stmp, ",");
for (i = 0; i < sizeof(buf); i++)
{
if (sscanf(buf[i], "\"%s\":%d", stmp, itmp) != 2) continue;
ob->setSkillData(stmp, itmp);
}
message("에러", "기술 셋팅 완료", creators());
message("에러", "복구 완료", creators());
return 1;
}
message("에러", "지정된 유저데이터("+DIR+dt+")에 플레이어("+pl+") 데이터가 "
"존재하지 않습니다", creators());
return 1;
}
알려주시면 감사하겠습니다;; 이쪽은 잘 몰라서;
#include <관리자.h>
inherit LIB_DAEMON;
#define DIR "/유저데이타/플레이어."
#define TRUE 1
mixed CMD(string str)
{
object ob;
string pl, dt, temp, stmp, *buf;
int i, len, itmp, itmp1, itmp2, itmp3;
if (sscanf(str, "%s %s", pl, dt) != 2)
return "입력형식이 잘못되었습니다.";
if (!ob = find_player(pl))
return "플레이어("+pl+")가 접속해있지 않습니다.";
temp = read_file(DIR+dt, 1, 1);
if (!temp || !sizeof(temp))
return "지정한 파일("+DIR+dt+")이 존재하지 않습니다.";
if (!len = file_length(DIR+dt))
return "지정한 화일("+DIR+dt+")을 읽는중 에러 발생";
for (i = 0; i < len; i++)
{
temp = read_file(DIR+dt, i, 1);
if (!temp || !sizeof(temp)) break;
if (sscanf(temp, "NAME %s,TOTAL", stmp) != 1) continue;
if (stmp != pl) continue;
// 총수련치 셋팅
sscanf(temp, ",TOTAL_10 %d,", itmp1);
sscanf(temp, ",TOTAL_1 %d,", itmp2);
sscanf(temp, ",TOTAL %d,", itmp3);
ob->setTotalExp((itmp1*1000000000)+(itmp2*100000000)+itmp3);
message("에러", "총수련치 셋팅 완료", creators());
// 현수련치 셋팅
sscanf(temp, ",REAL %d,", itmp);
ob->setExp(itmp);
message("에러", "현수련치 셋팅 완료", creators());
// 명성 셋팅
sscanf(temp, ",FAME %d,", itmp);
ob->setFame(itmp);
message("에러", "명성 셋팅 완료", creators());
// 소지금 셋팅
sscanf(temp, ",GOLD %d,", itmp);
ob->setGold(itmp);
message("에러", "소지금 셋팅 완료", creators());
// 독문무기 셋팅
sscanf(temp, ",WEAPON %d,", itmp);
ob->setWeaponLevel("독문", itmp);
message("에러", "독문무기 셋팅 완료", creators());
// 특성치 셋팅
sscanf(temp, ",HIM %d,", itmp);
ob->setStat("힘", itmp);
sscanf(temp, ",MIN %d,", itmp);
ob->setStat("민첩", itmp);
sscanf(temp, ",GI %d,", itmp);
ob->setStat("기골", itmp);
sscanf(temp, ",NAE %d,", itmp);
ob->setStat("내공", itmp);
sscanf(temp, ",JI %d,", itmp);
ob->setStat("지혜", itmp);
sscanf(temp, ",TOO %d,", itmp);
ob->setStat("투지", itmp);
message("에러", "특성치 셋팅 완료", creators());
// 칠보갑주 셋팅
sscanf(temp, ",CHILHIM %d,", itmp);
ob->setChilboStat("힘", itmp);
sscanf(temp, ",CHILMIN %d,", itmp);
ob->setChilboStat("민첩", itmp);
sscanf(temp, ",CHILGI %d,", itmp);
ob->setChilboStat("기골", itmp);
sscanf(temp, ",CHILNAE %d,", itmp);
ob->setChilboStat("내공", itmp);
sscanf(temp, ",CHILJI %d,", itmp);
ob->setChilboStat("지혜", itmp);
sscanf(temp, ",CHILTOO %d,", itmp);
ob->setChilboStat("투지", itmp);
sscanf(temp, ",CHILARMOR %d", itmp);
ob->setChilboStat("방어력", itmp);
message("에러", "칠보갑주 셋팅 완료", creators());
// 기술 셋팅
sscanf(temp, ",SKILL ([%s]),", stmp);
buf = explode(stmp, ",");
for (i = 0; i < sizeof(buf); i++)
{
if (sscanf(buf[i], "\"%s\":%d", stmp, itmp) != 2) continue;
ob->setSkillData(stmp, itmp);
}
message("에러", "기술 셋팅 완료", creators());
message("에러", "복구 완료", creators());
return 1;
}
message("에러", "지정된 유저데이터("+DIR+dt+")에 플레이어("+pl+") 데이터가 "
"존재하지 않습니다", creators());
return 1;
}
알려주시면 감사하겠습니다;; 이쪽은 잘 몰라서;
1Comments
미르
2004.10.25(월) 오후 11:45:21
뭘하시려는건데요?? 소스에대한 해석??
코멘트를 삭제할 비밀번호를 입력하세요.
정회원 이상만 코멘트 쓰기가 가능합니다.
총 게시물 956개 / 검색된 게시물: 956개
글번호 | 제목 | 작성자 | 조회수 | 좋아요 | 싫어요 | 작성일 | |
---|---|---|---|---|---|---|---|
[기타]질문 답변 외 글은 자유 게시판에 올려 주세요... | 머드클럽 | 4406 | 0 | 0 | 2004-01-01 | ||
536 | [기타] 이 소스를 봐도 어떻게 하라는지 모르겠어서 부탁드립니다. [1] | 이승모 | 1808 | 0 | 0 | 2004-10-25 | |
535 | [기타] 윈도우에서 돌아가게 하려면..? | 머드포 | 1744 | 0 | 0 | 2004-10-25 | |
534 | [기타] 제3의눈 아이템과 몹 제작 문의 [2] | 강민 | 2041 | 0 | 0 | 2004-10-25 | |
533 | [기타] 안녕하세요- ㅅ-)/ [1] | 한경훈 | 1680 | 0 | 0 | 2004-10-25 | |
532 | [circle] 새롬데이터맨 사용시? [2] | 머드포 | 1915 | 0 | 0 | 2004-10-24 | |
531 | [hanlp] 무기에 안시가 들어가니까 [2] | 천무혼 | 1908 | 0 | 0 | 2004-10-24 | |
530 | [hanlp] 명령어 순서를 바꾸고싶은데.. [1] | 문기환 | 1683 | 0 | 0 | 2004-10-23 | |
529 | [기타] 새롬데이타맨 사용법을 모르겠어요. [1] | 세라핌 | 2276 | 0 | 0 | 2004-10-22 | |
528 | [hanlp] 저기.. 텔넷은 원래부터 컴터에 있는건가요? 다운? 글고 머드 주소 어디다가 써요?? [1] | 박형근 | 1894 | 0 | 0 | 2004-10-21 | |
527 | [circle] 써클 존제작 하실줄 아시는분~~ [2] | 주석 | 1785 | 0 | 0 | 2004-10-06 | |
526 | [기타] 자료실에 있는 무한대전1.4beta 에 대해서...? | 박민경 | 2017 | 0 | 0 | 2004-10-05 | |
525 | [기타] 제3의눈에 서열 삭제에 대해서.. [1] | 강민 | 1805 | 0 | 0 | 2004-10-03 | |
524 | [circle] 입력............ [9] | 주석 | 2184 | 0 | 0 | 2004-09-30 | |
523 | [circle] 자료실 미르 컴파일 [2] | 박찬영 | 2108 | 0 | 0 | 2004-09-29 | |
522 | [circle] #define ishan(ch) (((ch) & 0xE0) > 0x90) [4] | 박찬영 | 2586 | 0 | 0 | 2004-09-29 | |
521 | [hanlp] 전투가 안끝납니다 [4] | 천무혼 | 2225 | 0 | 0 | 2004-09-29 | |
520 | [기타] 단군의 땅 테스트 소스 | 심상용 | 2089 | 0 | 0 | 2004-09-27 | |
519 | [circle] 정의되지 않은 참조.. 왜이러죠. [10] | 박찬영 | 2103 | 0 | 0 | 2004-09-26 | |
518 | [기타] 꼭 계정이 있어야만, 본인이 만든 머드에 들어갈수 있나요? [2] | 인시모니카 | 1791 | 0 | 0 | 2004-09-26 | |
517 | [기타] 어제 처음 시작한 유저입니다 [6] | 김기태(1) | 1740 | 0 | 0 | 2004-09-26 |