contact 머드클럽 문의하기 카카오톡
즐겨찾기 추가plus 머드클럽이 새롭게 오픈하였습니다!
sub image
[Mordor][Mordor] 비교 기능을 갖춰보자...
member photo 방울꽃 0 3,790 0 2004-01-01 13:42:20
/*      무한대전 *비교* 
 * 
 *      현재운영중인 무한대전 또는 "무한대전 소스를 수정한 머드"들 중에서 
 *      상업적으로 사용되는 곳을 제외하면, 누구나 이소스를 사용할수 있습니다. 
 * 
 *      설명: 몹과 사용자간의 데이타를 비교하여... 
 *            > , < , = 으로 표시를 함... 
 *            설명을 제대로 못드리겠네여... 그냥 추가하시면 알게됨.. 
 *      추가방법: mextern.h 에서 아무곳에나 
 *                int bi_go();   라고 써주시궁... 
 *                밑에 써져있는 본문을 아무곳에나 추가... 
 *                global.c 화일에서 명령어를 추가해주시면 됩니다. 
 *      나머지는 각 무한대전에 알맞게 수정하셔서 쓰시면 됩니다. 
 * 
 *      1999년 10월 18일          By 방울꽃. 
 */ 

/*
 * 이 기능은 당시 디아블로라는 머드를 보고...
 * 한번 만들어봐야겠다라는 충돌을 갖고 만든 기능입니다.
 * 소스가 참 허접하다는 쿨럭
 *
 *
 */


/************************************************************************/ 
/* 비교 By 방울꽃 */ 
/************************************************************************/ 

int bi_go(ply_ptr, cmnd) 
creature *ply_ptr; 
cmd *cmnd; 
{ 

creature *crt_ptr = NULL; 
room *rom_ptr = NULL; 
ctag *cp = NULL; 
int fd, i = 0; 
float           st = 0; 
char c = '?'; 
int a, b; 
char str[64], strs[64]; 
long ndi = 0, sdi = 0, pdi = 0, smtot = 0, latot = 0; 
long        atotal = 0, btotal = 0; 

fd = ply_ptr->fd; 
rom_ptr = ply_ptr->parent_rom; 

if(F_ISSET(ply_ptr, PBLIND)) { 
print(fd, "아무것도 보이지 않습니다!\n"); 
return; 
} 

if(crt_ptr==NULL) { 

if(cmnd->num < 2) { 
print(fd, "누구의 상태를 보시겠습니까?\n"); 
return; 
} 

crt_ptr = find_crt(ply_ptr, rom_ptr->first_mon, cmnd->str[1], cmnd->val[1]); 
} 

if(crt_ptr==NULL) { 
print(fd, "그런것은 여기에 없습니다.\n"); 
return; 
} 

print(fd, "\r\n"); 
print(fd, "이름: %-15s    %s\r\n", ply_ptr->name, crt_ptr->name); 

a = ply_ptr->level; 
b = crt_ptr->level; 
if (a > b) 
c = '>'; 

if (a < b) 
c = '<'; 

if (a == b) 
c = '='; 

print(fd, "레벨: %-15d %c  %d\r\n", a, c, b); 

a = ply_ptr->hpmax; 
b = crt_ptr->hpmax; 
if (a > b) 
c = '>'; 

if (a < b) 
c = '<'; 

if (a == b) 
c = '='; 

sprintf(str, "%d/%d", ply_ptr->hpcur, ply_ptr->hpmax); 
sprintf(strs, "%d/%d", crt_ptr->hpcur, crt_ptr->hpmax); 
print(fd, "체력: %-15s %c  %s\r\n", str, c, strs); 

a = ply_ptr->mpmax; 
b = crt_ptr->mpmax; 
if (a > b) 
c = '>'; 

if (a < b) 
c = '<'; 

if (a == b) 
c = '='; 

sprintf(str, "%d/%d", ply_ptr->mpcur, ply_ptr->mpmax); 
sprintf(strs, "%d/%d", crt_ptr->mpcur, crt_ptr->mpmax); 
print(fd, "마력: %-15s %c  %s\r\n", str, c, strs); 

/* 
여기부터는 이동력입니다. 
   이동력을 추가하신분들은 구냥 변수를 수정하시구... 
   이동력 추가안한 곳에서는 삭제하시면 됩니다. 
   */ 

   /* 시작 */   
a = ply_ptr->mvmax; 
b = crt_ptr->mvmax; 
if (a > b) 
c = '>'; 

if (a < b) 
c = '<'; 

if (a == b) 
c = '='; 

sprintf(str, "%d/%d", ply_ptr->mvcur, ply_ptr->mvmax); 
sprintf(strs, "%d/%d", crt_ptr->mvcur, crt_ptr->mvmax); 
print(fd, "이동: %-15s %c  %s\r\n", str, c, strs); 
   /* 종료 */ 

       ndi = ply_ptr->ndice; 
       sdi = ply_ptr->sdice; 
       pdi = ply_ptr->pdice; 

       smtot = ndi + pdi; 
       latot = ndi * sdi + pdi; 
atotal = latot - smtot; 

a = atotal; 
sprintf(str, "%d ~ %d", smtot, latot); 

       ndi = crt_ptr->ndice; 
       sdi = crt_ptr->sdice; 
       pdi = crt_ptr->pdice; 

       smtot = ndi + pdi; 
       latot = ndi * sdi + pdi; 
btotal = latot - smtot; 

b = btotal; 
sprintf(strs, "%d ~ %d", smtot, latot); 

if (a > b) 
c = '>'; 

if (a < b) 
c = '<'; 

if (a == b) 
c = '='; 

print(fd, "타격: %-15s %c  %s\r\n", str, c, strs); 

a = ply_ptr->armor; 
b = crt_ptr->armor; 

if (a > b) 
c = '>'; 

if (a < b) 
c = '<'; 

if (a == b) 
c = '='; 

print(fd, "방어: %-15d %c  %d", 
(100-ply_ptr->armor), c, (100-crt_ptr->armor)); 

return(0); 
} 
0
0Comments
-표시할 내용이 없습니다.-
코멘트를 삭제할 비밀번호를 입력하세요.
비밀번호:
정회원 이상만 코멘트 쓰기가 가능합니다.
총 게시물 11개 / 검색된 게시물: 11개
글번호   제목 작성자 조회수 싫어요 작성일
  [Mordor]안녕하세요 방울꽃이 인사드립니다.[17] 방울꽃 4072 0 0 2004-01-01
11 [Mordor] MYSQL 연동하기 #2 [1] 방울꽃 8515 0 0 2006-01-20
10 [Mordor] MYSQL 연동하기 #1 방울꽃 7792 0 0 2006-01-20
9 [Mordor] [Mordor] 멀티 제한두기... 방울꽃 8020 0 0 2004-09-04
8 [Mordor] [Mordor] Log Time 바꾸기... 방울꽃 7381 0 0 2004-01-09
7 [Mordor] [Mordor] 출구부분의 개량... 방울꽃 3954 0 0 2004-01-01
6 [Mordor] [Mordor] 비교 기능을 갖춰보자... 방울꽃 3791 0 0 2004-01-01
5 [Mordor] [Mordor] 프롬프트를 바궈보자... 방울꽃 3922 0 0 2004-01-01
4 [Mordor] [Mordor] Login 부분을 바꿔보자... 방울꽃 4440 0 0 2004-01-01
3 [Mordor] [Mordor] Mordor 6.66 한글화 #2 방울꽃 4396 0 0 2004-02-27
2 [Mordor] [Mordor] Mordor 6.66 한글화 #1 방울꽃 15028 0 0 2004-01-10
1 [Mordor] [Mordor] Mordor의 기원... 방울꽃 5480 0 0 2004-01-02

1

쪽지를 전송하고 있습니다. 잠시 기다려주세요.
쪽지보내기
받는이(ID/닉네임)
내용
쪽지가 도착하였습니다.
쪽지 내용을 읽어오고 있습니다. 잠시 기다려주세요.
--