프롬프트 그래프화 #2
2007.04.12 13:08
자료출처 : GAMEBBS (telent gamebbs.co.kr)
───────────────────────────────────────
제 목 : [소스] 프롬프트의 그래픽화. 찬성 : 0 반대 : 0
올린이 : memoless (박종진 ) 읽음 : 18 날짜 : 2000/06/01 06:19
------------------------------------------------------------------------------
/**************************************************************
염관호(ohhye)님 부탁으로 올립니다..
편의에 의해서 안시프린트(printa 등)를 사용하지 않고
바로 안시코드로 작성되었습니다.
기존 소스에 완전히 교체하여 사용하시면 됩니다.
이때 ^[[는 vi편집기에서 ctrl+v를 누르신후 Esc를 누르신 후
[를 덧붙여 주시면 됩니다.
(컨트롤+v -> Esc -> [ ..... 앞의 ^[ 한 문자입니다.)
이 소스코드의 소유권은 현재 mud.jcity.net 5000 의
연대무한에 있으며.. 상업적으로 절대로 사용할 수 없습니다.
다.인.
**************************************************************/
/************************************************************/
/* ply_prompt */
/************************************************************/
/* This function returns
the prompt that the player should be seeing */
/* code by DAiN..!! */
char *ply_prompt(ply_ptr)
creature *ply_ptr;
{
static char prompt[256]; /* [40]에서 256으로 확장 */
int fd;
int i, pmax;
char pmt[2][100];
char idx_pmt[12][8] = {"^[[=7F[","^[[=9F>",">","^[[=13F>",
">","^[[=12F>",">","^[[=14F>",">","^[[=15F>",">","^[[=7F]"};
fd = ply_ptr->fd;
if(fd < 0 || F_ISSET(ply_ptr, PSPYON) || F_ISSET(ply_ptr, PREADI))
prompt[0] = 0;
else if(F_ISSET(ply_ptr, PPROMP)) {
strcpy(pmt[0],idx_pmt[0]);
pmax=ply_ptr->hpmax;
for(i=1;i<11;i++) {
if(10*ply_ptr->hpcur >= pmax*i) strcat(pmt[0],idx_pmt[i]);
else strcat(pmt[0]," ");
}
strcat(pmt[0],idx_pmt[11]);
strcat(pmt[0],"^[[0m");
strcpy(pmt[1],idx_pmt[0]);
pmax=ply_ptr->mpmax;
for(i=1;i<11;i++) {
if(10*ply_ptr->mpcur >= pmax*i) strcat(pmt[1],idx_pmt[i]);
else strcat(pmt[1]," ");
}
strcat(pmt[1],idx_pmt[11]);
strcat(pmt[1],"^[[0m");
sprintf(prompt, "\n\n^[[=15FHP :%d %12s ^[[=15FMP :%d
%12s ^[[=7F: ",ply_ptr->hpcur,pmt[0],ply_ptr->mpcur,pmt[1]);
}
else {
strcpy(prompt, "\n\n: ");
}
return prompt;
}
홈지기 "그륨"
───────────────────────────────────────
제 목 : [소스] 프롬프트의 그래픽화. 찬성 : 0 반대 : 0
올린이 : memoless (박종진 ) 읽음 : 18 날짜 : 2000/06/01 06:19
------------------------------------------------------------------------------
/**************************************************************
염관호(ohhye)님 부탁으로 올립니다..
편의에 의해서 안시프린트(printa 등)를 사용하지 않고
바로 안시코드로 작성되었습니다.
기존 소스에 완전히 교체하여 사용하시면 됩니다.
이때 ^[[는 vi편집기에서 ctrl+v를 누르신후 Esc를 누르신 후
[를 덧붙여 주시면 됩니다.
(컨트롤+v -> Esc -> [ ..... 앞의 ^[ 한 문자입니다.)
이 소스코드의 소유권은 현재 mud.jcity.net 5000 의
연대무한에 있으며.. 상업적으로 절대로 사용할 수 없습니다.
다.인.
**************************************************************/
/************************************************************/
/* ply_prompt */
/************************************************************/
/* This function returns
the prompt that the player should be seeing */
/* code by DAiN..!! */
char *ply_prompt(ply_ptr)
creature *ply_ptr;
{
static char prompt[256]; /* [40]에서 256으로 확장 */
int fd;
int i, pmax;
char pmt[2][100];
char idx_pmt[12][8] = {"^[[=7F[","^[[=9F>",">","^[[=13F>",
">","^[[=12F>",">","^[[=14F>",">","^[[=15F>",">","^[[=7F]"};
fd = ply_ptr->fd;
if(fd < 0 || F_ISSET(ply_ptr, PSPYON) || F_ISSET(ply_ptr, PREADI))
prompt[0] = 0;
else if(F_ISSET(ply_ptr, PPROMP)) {
strcpy(pmt[0],idx_pmt[0]);
pmax=ply_ptr->hpmax;
for(i=1;i<11;i++) {
if(10*ply_ptr->hpcur >= pmax*i) strcat(pmt[0],idx_pmt[i]);
else strcat(pmt[0]," ");
}
strcat(pmt[0],idx_pmt[11]);
strcat(pmt[0],"^[[0m");
strcpy(pmt[1],idx_pmt[0]);
pmax=ply_ptr->mpmax;
for(i=1;i<11;i++) {
if(10*ply_ptr->mpcur >= pmax*i) strcat(pmt[1],idx_pmt[i]);
else strcat(pmt[1]," ");
}
strcat(pmt[1],idx_pmt[11]);
strcat(pmt[1],"^[[0m");
sprintf(prompt, "\n\n^[[=15FHP :%d %12s ^[[=15FMP :%d
%12s ^[[=7F: ",ply_ptr->hpcur,pmt[0],ply_ptr->mpcur,pmt[1]);
}
else {
strcpy(prompt, "\n\n: ");
}
return prompt;
}
홈지기 "그륨"
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
77 | 무한대전 방 데이터 Convert | 그리움 | 2007.11.23 | 491 |
76 | 몹 소환하여 소환몹이 대신 싸우게 하기 | 그리움 | 2007.11.23 | 27430 |
75 | 물건, 몹의 번호 찾아내기. | 그리움 | 2007.07.04 | 456 |
74 | *괴물이름 방폭 버그 수정 | 그리움 | 2007.04.12 | 585 |
73 | 게시판 버그 해결 방법. | 그리움 | 2007.04.12 | 528 |
72 | 연타기능 - 연타수 자동 | 그리움 | 2007.04.12 | 501 |
71 | 연타기능 - 직업별 연타 | 그리움 | 2007.04.12 | 534 |
70 | 감옥/퇴소 | 그리움 | 2007.04.12 | 390 |
69 | 운영자명령 "보고" | 그리움 | 2007.04.12 | 327 |
68 | 낚시 | 그리움 | 2007.04.12 | 338 |
67 | 방전체 공격루틴 #2 | 그리움 | 2007.04.12 | 332 |
66 | 온라인 리붓 | 그리움 | 2007.04.12 | 342 |
65 | Mordor에 있는 몹 소환 소스 | 그리움 | 2007.04.12 | 332 |
64 | 귀환장소 수정판 | 그리움 | 2007.04.12 | 313 |
» | 프롬프트 그래프화 #2 | 그리움 | 2007.04.12 | 340 |
62 | 주민등록번호 검사 소스 | 그리움 | 2007.04.12 | 476 |
61 | 프롬프트 그래프화 | 그리움 | 2007.04.12 | 315 |
60 | 이동하는 몹 | 그리움 | 2007.04.12 | 334 |
59 | 머드에서 몹 심기 | 그리움 | 2007.04.12 | 344 |
58 | 개척 소스 | 그리움 | 2007.04.12 | 354 |