|
不知道商業端都怎麼寫的
這裡提供我寫的0.0
item_event.c加入
#ifdef _SuperMan //yang ADD 極品人道具
void ITEM_SuperMan( int charaindex, int toindex, int haveitemindex)
{
int itemindex = CHAR_getItemIndex( charaindex, haveitemindex);
if(!ITEM_CHECKINDEX(itemindex)) return;
char *itemarg = ITEM_getChar( itemindex, ITEM_ARGUMENT);
char trans[12],levels[12],points[12];
getStringFromIndexWithDelim( itemarg, "|", 1, trans, sizeof(trans));
getStringFromIndexWithDelim( itemarg, "|", 2, levels, sizeof(levels));
getStringFromIndexWithDelim( itemarg, "|", 3, points, sizeof(points));
//以下清空腳色能力
CHAR_setInt(charaindex,CHAR_VITAL,0);
CHAR_setInt(charaindex,CHAR_STR,0);
CHAR_setInt(charaindex,CHAR_TOUGH,0);
CHAR_setInt(charaindex,CHAR_DEX,0);
CHAR_setInt(charaindex,CHAR_SKILLUPPOINT,0);
//以下設置極品人
CHAR_setInt(charaindex,CHAR_TRANSMIGRATION,atoi(trans)); //轉數
CHAR_setInt(charaindex,CHAR_LV,atoi(levels)); //等級
CHAR_setInt(charaindex,CHAR_SKILLUPPOINT,atoi(points)); //升級點數
CHAR_setInt(charaindex,CHAR_TRANSEQUATION,131071); //歷史記錄 防重調點數(數值我不會算隨便打的)
NPC_EventSetFlg(charaindex, 63); //鎖英雄的祝福
NPC_EventSetFlg(charaindex, 136);//鎖淚之石
CHAR_DelItem( charaindex, haveitemindex);
CHAR_talkToCli( charaindex, -1, "恭喜你成為極品人了,祝福石頭任務已鎖住,請重新登入!", CHAR_COLORYELLOW);
}
#endif
其餘檔案item_event.h function.c function.h
請參考其他道具加入
|
|