프롬프트 그래프화

2007.04.12 13:07

그리움 조회 수:271 추천:62

자료출처 GAME BBS (Telnet gamebbs.co.kr)

INS ─────────────────────────────────────
ADMIN13 Mordor Mud Study (1240 / 145) 1/17
───────────────────────────────────────
제 목 : [소스] 프롬프트의 그래프화 찬성 : 0 반대 : 0
올린이 : muhan (김준식 ) 읽음 : 98 날짜 : 1999/11/25 13:04
------------------------------------------------------------------------------
/* 무한대전 *프롬프트 그래프화*
*
* 현재운영중인 무한대전 또는 "무한대전 소스를 수정한 머드"들 중에서
* 상업적으로 사용되는 곳을 제외하면, 누구나 이소스를 사용할수 있습니다.
*
* 설명: 프롬프트의 그래프화...
* 퍼센트로 출력 가능화...
*
* 추가방법: command1.c 화일 부분에 있는
* command 부분을 수정하시면 됩니다.
*
*
* 나머지는 각 무한대전에 알맞게 수정하셔서 쓰시면 됩니다.
*
* 1999년 11월 25일 By Muhan.
*/

/**********************************************************************/
/* command */
/**********************************************************************/

void command(fd, param, str)
int fd;
int param;
char *str;
{

cmd cmnd;
int n;
unsigned char ch;
int i;
char buf[256];
double st = 0; /* 추가 */
int tes = 0, plus = 0; /* 추가 */

       /* 생 략 */

       else
       if(n == PROMPT) {

       if(F_ISSET(Ply[fd].ply, PPROMP)) {

       if(Ply[fd].ply->hpcur > 0)
       st = (float)(Ply[fd].ply->hpcur) / Ply[fd].ply->hpmax;

       else
       st = 0;

       st=st*10;

       tes=st;

       if(Ply[fd].ply->hpcur > 0)
       plus = (float)(Ply[fd].ply->hpcur) / Ply[fd].ply->hpmax * 100;

       else
       plus = 0;

       printa(fd, "\r\n{흰HP} {노%7d} {흰%3d}%% ", Ply[fd].ply->hpcur, plus);

       switch(tes) {
       case 0:
       printa(fd, "}[}}}}}}}}}}}}}}}}}}}}}} ]}");
       break;

       case 1:
       printa(fd, "}[}{빨>}}}}}}}}}}}}}}}}}}}} ]}");
       break;

       case 2:
       printa(fd, "}[}{빨>}{빨>}}}}}}}}}}}}}}}}} ]}");
       break;

       case 3:
       printa(fd, "}[}{빨>}{빨>}{노>}}}}}}}}}}}}}}} ]}");
       break;

       case 4:
       printa(fd, "}[}{빨>}{빨>}{노>}{노>}}}}}}}}}}}}} ]}");
       break;

       case 5:
       printa(fd, "}[}{빨>}{빨>}{노>}{노>}{노>}}}}}}}}}}} ]}");
       break;

       case 6:
       printa(fd, "}[}{빨>}{빨>}{노>}{노>}{노>}{녹>}}}}}}}}} ]}");
       break;

       case 7:
       printa(fd, "}[}{빨>}{빨>{노>}{노>}{노>}{녹>}{녹>}}}}}}} ]}");
       break;

       case 8:
       printa(fd, "}[}{빨>}{빨>}{노>{노>}{노>}{녹>{녹>}{녹>}}}}} ]}");
       break;

       case 9:
       printa(fd, "}[}{빨>}{빨>}{노>}{노>}{노>}{녹>}{녹>}{녹>}{하>} ]}");
       break;

       case 10:
       printa(fd, "}[}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}]}");
       break;

       default:
       printa(fd, "}[}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}]}");
       }

       if(Ply[fd].ply->mpcur > 0)
       st = (float)(Ply[fd].ply->mpcur) / Ply[fd].ply->mpmax;

       else
       st = 0;

       st=st*10;
       tes=st;

       if(Ply[fd].ply->mpcur > 0)
       plus = (float)(Ply[fd].ply->mpcur) / Ply[fd].ply->mpmax * 100;

       else
       plus = 0;

       printa(fd, "\r\n{흰MP} {노%7d} {흰%3d}%% ", Ply[fd].ply->mpcur, plus);

       switch(tes) {
       case 0:
       printa(fd, "}[}}}}}}}}}}}}}}}}}}}}}} ]}");
       break;

       case 1:
       printa(fd, "}[}{빨>}}}}}}}}}}}}}}}}}}}} ]}");
       break;

       case 2:
       printa(fd, "}[}{빨>}{빨>}}}}}}}}}}}}}}}}} ]}");
       break;

       case 3:
       printa(fd, "}[}{빨>}{빨>}{노>}}}}}}}}}}}}}}} ]}");
       break;

       case 4:
       printa(fd, "}[}{빨>}{빨>}{노>}{노>}}}}}}}}}}}}} ]}");
       break;

       case 5:
       printa(fd, "}[}{빨>}{빨>}{노>}{노>}{노>}}}}}}}}}}} ]}");
       break;

       case 6:
       printa(fd, "}[}{빨>}{빨>}{노>}{노>}{노>}{녹>}}}}}}}}} ]}");
       break;

       case 7:
       printa(fd, "}[}{빨>}{빨>{노>}{노>}{노>}{녹>}{녹>}}}}}}} ]}");
       break;

       case 8:
       printa(fd, "}[}{빨>}{빨>}{노>{노>}{노>}{녹>{녹>}{녹>}}}}} ]}");
       break;

       case 9:
       printa(fd, "}[}{빨>}{빨>}{노>}{노>}{노>}{녹>}{녹>}{녹>}{하>} ]}");
       break;

       case 10:
       printa(fd, "}[}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}]}");
       break;

       default:
       printa(fd, "}[}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}{흰>}]}");
       }
       }

       else {
       strcpy(str, ": ");
       }

       write(fd, str, strlen(str));

       if(Spy[fd] > -1)
       write(Spy[fd], str, strlen(str));
       }

       if(n != DOPROMPT) {
       RETURN(fd, command, 1);
       }

       else
       return;
       }
}

홈지기 "그륨"


XE Login