原先的版本是無法判斷寵物轉生數
若你會自己Build Server
則參考以下內容
gmsv\include\version.h
添加宣告
#define _PET_FREETRANS
\gmsv\npc\npc_exchangeman.c
在以下函數添加
BOOL NPC_PetLvCheck(int meindex,int talker,char *buf,int mode)
{
char argstr1[NPC_UTIL_GETARGSTR_BUFSIZE];
char *argstr;
char buff2[16];
char buf3[8];
int petno;
int baseno;
int petlevel = 0;
int flg=0;
int mypetlevel = 0;
int i = 0;
int petindex;
char name[512];
int cnt = 0;
int loop;
#ifdef _PET_FREETRANS
int pettran=-1;
#endif
/*--隙爛今木凶矢永玄及瓜件田□ ID)毛潸 --*/
getStringFromIndexWithDelim( buf, "-", 2, buff2, sizeof( buff2));
if(strstr(buff2,"*") != NULL) {
getStringFromIndexWithDelim( buff2, "*", 1, buf3, sizeof( buf3));
petno = atoi( buf3);
getStringFromIndexWithDelim( buff2, "*", 2, buf3, sizeof( buf3));
loop = atoi( buf3);
}else{
petno = atoi( buff2);
loop = 1;
}
#ifdef _PET_FREETRANS
if(getStringFromIndexWithDelim( buf, "-", 3, buff2, sizeof( buff2)))
{
pettran = atoi( buff2);
}
#endif
/*--矢永玄 互釩中化中月井及民尼永弁--*/
for(i=0; i < CHAR_MAXPETHAVE ; i++) {
if(loop == cnt) return TRUE;
petindex = CHAR_getCharPet( talker, i);
if( petindex == -1 ) continue;
#ifdef _PET_FREETRANS
if(pettran != -1)
{
if(pettran!=CHAR_getInt( petindex, CHAR_TRANSMIGRATION))
continue;
}
#endif
/*--矢永玄及ID毛潸 仄化中仁--*/
baseno = CHAR_getInt( petindex, CHAR_PETID);
/* 矢永玄及ID午?蜇箕及乒□玉毛譬屯月 */
if( (baseno == petno) && (CHAR_getInt( petindex, CHAR_ENDEVENT)
== mode))
{
/*--伊矛伙毛民尼永弁允月--*/
mypetlevel = CHAR_getInt( petindex, CHAR_LV);
getStringFromIndexWithDelim( buf, "-", 1, buff2, sizeof( buff2));
if(strstr( buf, "<") != NULL) {
flg = 1;
getStringFromIndexWithDelim( buff2, "<", 2, buf3, sizeof(buf3));
}else if(strstr( buf, ">") != NULL) {
getStringFromIndexWithDelim( buff2, ">", 2, buf3, sizeof(buf3));
flg = 2;
}else if(strstr( buf, "=") != NULL) {
getStringFromIndexWithDelim( buff2, "=", 2, buf3, sizeof(buf3));
flg = 0;
}
petlevel = atoi( buf3);
if(NPC_EventBigSmallLastCheck( petlevel, mypetlevel, flg) == TRUE) {
/*--矢永玄及 蟆互澀爛今木化中凶日 蟆及民尼永弁 月--*/
if(CHAR_getWorkInt(talker,CHAR_WORKSHOPRELEVANTSEC)==1) {
char *usename;
/*--澀爛白央奶伙及 心 心--*/
if((argstr = NPC_Util_GetArgStr( meindex, argstr1, sizeof(argstr1))) == NULL) {
print("PetLevel:GetArgStrErr");
return FALSE;
}
usename = CHAR_getUseName( petindex);
NPC_Util_GetStrFromStrWithDelim( argstr, "Pet_Name",
name,sizeof( name));
if(strcmp( name, usename) == 0)
{
cnt++;
continue;
}
}else {
CHAR_setWorkInt( talker, CHAR_WORKSHOPRELEVANTSEC, 0);
cnt++;
continue;
}
}
}
}
if(loop == cnt) return TRUE;
if(i == CHAR_MAXPETHAVE) return FALSE;
return FALSE;
}
EX:
###有旗標、有認可1、有恐龍Lv55###
EventNo:-1
TYPE:MESSAGE
EVENT:ITEM=1&PET=55-331-0#這邊是轉生數
NomalWindowMsg:\n看來「邦洛洛克斯」成長的不錯。
EventEnd
[ 本帖最後由 mm905 於 2013-1-28 16:46 編輯 ]