Kết quả 1 đến 1 của 1
-
03-11-18, 12:46 PM #1
- Ngày tham gia
- May 2011
- Bài viết
- 1
- Thanks
- 1
- Thanked 0 Times in 0 Posts
Hỏi cách cho item mix wing 2.5 vào đc chaosbox
Chaobox của E đã thêm đc ntn k bik đúng chưa. đã Build đc nhưng chỉ còn công thức trong file mix e chưa hiểu về nó lắm. bác hd e chút đc k.
BOOL Wing25ChaosMix(LPOBJ lpObj) { lpObj->ChaosLock = TRUE;
int WingCount = 0;
int ItemCount = 0;
int ChaosGemCount = 0;
int JewelOfCreationCount = 0;
int Wing25TypeItemCount = 0;
int iChaosMoney = 0;
int iWingChaosMoney = 0;
BYTE WingTypeResult = 0;
for (int n = 0; n < CHAOS_BOX_SIZE; n++) {
if (lpObj->pChaosBox[n].IsItem() == TRUE) {
if ((lpObj->pChaosBox[n].m_Type >= ITEMGET(12, 3) &&
lpObj->pChaosBox[n].m_Type <= ITEMGET(12, 6))) { // Second Wings
WingCount++;
iWingChaosMoney = lpObj->pChaosBox[n].m_BuyMoney;
}
else if (lpObj->pChaosBox[n].m_Type == ITEMGET(13, 30)) { // Dark Lord Cape
WingCount++;
iWingChaosMoney = lpObj->pChaosBox[n].m_BuyMoney;
}
else if (lpObj->pChaosBox[n].m_Type == ITEMGET(12, 49)) { // Wing of Rage Fighter
WingCount++;
iWingChaosMoney = lpObj->pChaosBox[n].m_BuyMoney;
}
else if (lpObj->pChaosBox[n].m_Type == ITEMGET(12, 42)) { // Summoner Wings [Wing of Despair]
WingCount++;
iWingChaosMoney = lpObj->pChaosBox[n].m_BuyMoney;
}
else if (lpObj->pChaosBox[n].m_Type == ITEMGET(12, 15)) { // Chaos
ChaosGemCount++;
}
else if (lpObj->pChaosBox[n].m_Type == ITEMGET(14, 22)) { // Jewel of Creation
JewelOfCreationCount++;
}
else if (lpObj->pChaosBox[n].m_Type == ITEMGET(14, 176)) { // Wing 2.5 Part
WingTypeResult = 1;
Wing25TypeItemCount++;
}
else if (lpObj->pChaosBox[n].m_Type == ITEMGET(14, 177)) { // Wing 2.5 Part
WingTypeResult = 2;
Wing25TypeItemCount++;
}
else if (lpObj->pChaosBox[n].m_Type == ITEMGET(14, 178)) { // Wing 2.5 Part
WingTypeResult = 3;
Wing25TypeItemCount++;
}
else if (lpObj->pChaosBox[n].m_Type == ITEMGET(14, 179)) { // Wing 2.5 Part
WingTypeResult = 4;
Wing25TypeItemCount++;
}
}
}
PMSG_CHAOSMIXRESULT pMsg;
PHeadSetB((LPBYTE)&pMsg.h, 0x86, sizeof(PMSG_CHAOSMIXRESULT));
pMsg.Result = CB_ERROR;
if (WingCount != 1 || JewelOfCreationCount != 1 || ChaosGemCount != 1 || Wing25TypeItemCount != 1) {
lpObj->ChaosLock = FALSE;
pMsg.Result = CB_INCORRECT_MIX_ITEMS;
DataSend(lpObj->m_Index, (BYTE *)&pMsg, pMsg.h.size);
return FALSE;
}
int nChaosNeedMoney = 3000000;
int iChaosTaxMoney = (int)((__int64)nChaosNeedMoney * (__int64)g_CastleSiegeSync.GetTaxRateChaos(lpObj->m_Index) / (__int64)100);
if (iChaosTaxMoney < 0) { iChaosTaxMoney = 0; }
nChaosNeedMoney += iChaosTaxMoney;
if (nChaosNeedMoney < 0) {
nChaosNeedMoney = 0;
}
if (lpObj->Money < nChaosNeedMoney) {
pMsg.Result = CB_NOT_ENOUGH_ZEN;
DataSend(lpObj->m_Index, (BYTE *)&pMsg, pMsg.h.size);
lpObj->ChaosLock = FALSE;
return TRUE;
}
lpObj->ChaosSuccessRate = ((DWORD)((DWORD)iWingChaosMoney / (DWORD)4000000)) & 255;
if (iChaosMoney > 0) {
lpObj->ChaosSuccessRate = (lpObj->ChaosSuccessRate + (iChaosMoney / 2800000)) & 255;
}
if (iChaosMoney < 0) {
lpObj->ChaosSuccessRate = (lpObj->ChaosSuccessRate + (-1 * iChaosMoney / 2800000)) & 255;
}
LogChaosItem(lpObj, "WingMix,2.5");
CHAOS_LOG.Output("[WingMix 2.5] Chaos Mix Start");
if (WingCount == 1) {
if (lpObj->ChaosSuccessRate > ReadConfig.Wing25MaxPercent) {
lpObj->ChaosSuccessRate = ReadConfig.Wing25MaxPercent;
}
if (lpObj->ChaosSuccessRate < ReadConfig.Wing25MinPercent) {
lpObj->ChaosSuccessRate = ReadConfig.Wing25MinPercent;
}
}
if (ReadConfig.IsVipExtraMixPercent == 1 && lpObj->Vip == 1) {
if (lpObj->ChaosSuccessRate + ReadConfig.VipExtraMixPercent < 100) {
lpObj->ChaosSuccessRate += ReadConfig.VipExtraMixPercent;
}
else {
lpObj->ChaosSuccessRate = 100;
}
CHAOS_LOG.Output(
"[CBMix][%s][%s] VIP Extra Percent brings mix up to: %d",
lpObj->AccountID, lpObj->Name,
lpObj->ChaosSuccessRate
char sbuff[1024] = { 0 };
wsprintf(sbuff, "[VIP] Extra %d percent added!", ReadConfig.VipExtraMixPercent);
GCServerMsgStringSend(sbuff, lpObj->m_Index, 1);
}
if (lpObj->ChaosSuccessRate > 100) {
lpObj->ChaosSuccessRate = 100;
}
lpObj->Money -= nChaosNeedMoney;
g_CastleSiegeSync.AddTributeMoney(iChaosTaxMoney);
GCMoneySend(lpObj->m_Index, lpObj->Money);
int SuccessRateRandom = 0;
SuccessRateRandom = (rand() % 100);
if (SuccessRateRandom < lpObj->ChaosSuccessRate) {
int iWingLevel = 0;
int iItemType = 0;
int iItemSubType = 0;
if (WingTypeResult == 1) {
iItemType = 12;
iItemSubType = 246;
}
else if (WingTypeResult == 2) {
iItemType = 12;
iItemSubType = 247;
}
else if (WingTypeResult == 3) {
iItemType = 12;
iItemSubType = 248;
}
else if (WingTypeResult == 4) {
iItemType = 12;
iItemSubType = 249;
}
int iWingNum = ITEMGET(iItemType, iItemSubType);
int iOption1 = 0;
int iOption2 = 0;
int iOption3 = 0;
//Luck
if (ReadConfig.Wing25LuckPercent > (rand() % 100)) {
iOption1 = 1;
}
//Z28 Options
if (ReadConfig.Wing25Z28Percent > (rand() % 100)) {
int z28Percent = ReadConfig.Wing25Z28Percent * 100;
iOption2 = rand() % (z28Percent + 1);
iOption2 = iOption2 / 100;
}
if (ReadConfig.Wing25Z28Percent == 0) {
int iRandomValue = rand() % 100;
int iRandomValue2 = rand() % 3;
switch (iRandomValue2) {
case 0:
if (iRandomValue < 4) {
iOption2 = 3; // +12
}
break;
case 1:
if (iRandomValue < 10) {
iOption2 = 2; // +8
}
break;
case 2:
if (iRandomValue < 20) {
iOption2 = 1; // +4;
}
break;
}
}
//Exc Options
if ((rand() % 100) < ReadConfig.Wing25ExcOptionProbability) {
iOption3 = BoxExcOptions(ReadConfig.Wing25MaxExcOption);
}
::ItemSerialCreateSend(lpObj->m_Index, -1, 0, 0, iWingNum, iWingLevel, 0, 0, iOption1, iOption2, -1, iOption3, 0);
CHAOS_LOG.Output("[WingMix 2.5] [%s][%s] CBMix Success %d/%d Money : %d-%d (%d,%d)",
lpObj->AccountID, lpObj->Name,
lpObj->ChaosSuccessRate, SuccessRateRandom,
lpObj->Money, nChaosNeedMoney,
iChaosMoney, iWingChaosMoney);
::gObjInventoryCommit(lpObj->m_Index);
MuItemShop.EarnGoblinPointsCBMix(lpObj->m_Index, lpObj->ChaosSuccessRate, 0);
lpObj->ChaosLock = FALSE;
return TRUE;
}
else {
for (int n = 0; n < CHAOS_BOX_SIZE; n++) {
lpObj->pChaosBox[n].Clear();
}
GCUserChaosBoxSend(lpObj, 0);
DataSend(lpObj->m_Index, (BYTE *)&pMsg, pMsg.h.size);
CHAOS_LOG.Output("[WingMix 2.5] [%s][%s] CBMix Fail %d/%d Money : %d-%d (%d,%d)",
lpObj->AccountID, lpObj->Name,
lpObj->ChaosSuccessRate, SuccessRateRandom,
lpObj->Money, nChaosNeedMoney,
iChaosMoney, iWingChaosMoney);
::gObjInventoryCommit(lpObj->m_Index);
MuItemShop.EarnGoblinPointsCBMix(lpObj->m_Index, lpObj->ChaosSuccessRate, 1);
lpObj->ChaosLock = FALSE;
return FALSE;
}
}
CHAOS_MIX_WING_25 = 56,BOOL Wing25ChaosMix(LPOBJ lpObj);
BYTE Wing25MinPercent; BYTE Wing25MaxPercent;
BYTE Wing25LuckPercent;
BYTE Wing25Z28Percent;
BYTE Wing25Z28Max;
BYTE Wing25ExcOptionProbability;
BYTE Wing25MaxExcOption;Khách viếng thăm hãy cùng chipvip05 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
Các Chủ đề tương tự
-
[MU] Fix ChaosBox Wing2.5
Bởi tinhuynh300495 trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 0Bài viết cuối: 17-08-17, 10:18 PM -
[MU] Xin cách fix lỗi đeo wing 2.5 wing4 wing 5 wing ss8 wing.... 30wing move icarus
Bởi gacondihoc trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 4Bài viết cuối: 24-09-15, 04:27 PM -
[MU] Share Server SCF 11.70.24 Hỗ Trợ Wing 2.5 - Wing 4 ĐÃ FIX 100% BUG MOVE MẤT WING
Bởi Temmo trong diễn đàn ReleasesTrả lời: 426Bài viết cuối: 09-12-14, 06:40 AM -
[MU] GS - GSCS Hỗ Trợ Wing 2.5 -Wing3.5 - Wing 4 - Wing 5-Wing 6 - Wing SS8
Bởi Yahoo.com trong diễn đàn ReleasesTrả lời: 16Bài viết cuối: 29-08-14, 09:52 AM -
[MU] Cần Server Season 6.5 (gs.52) , Hỗ trợ Wing 4, Wing 2.5, Wing 5, Wing Season8,
Bởi trantrjnh trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 8Bài viết cuối: 16-08-14, 07:46 AM