Source GameServer:
[ChaosBox.h] -> add (green lines)

[ChaosBox.cpp]
1st, Find [CChaosBox::CGChaosMixRecv]and add this case:
Code:
case CHAOS_MIX_WING5:
this->Wing4Mix(lpObj);
break;
2nd, add this new function
Code:
void CChaosBox::Wing4Mix(LPOBJ lpObj)
{
int ChaosPack30 = 0;
int CreationPack30 = 0;
int SoulPack30 = 0;
int BlessPack30 = 0;
int GarudaFlameCount = 0;
int GarudaFeatherCount = 0;
int GoldenSentencesCount = 0;
int GreatSpiritStoneCount = 0;
int ItemMoney = 0;
for(int n=0;n < CHAOS_BOX_SIZE;n++)
{
if(lpObj->ChaosBox[n].IsItem() == 0)
{
continue;
}
if(lpObj->ChaosBox[n].m_Index == GET_ITEM(12,141) && lpObj->ChaosBox[n].m_Level == 2)
{
ChaosPack30++;
}
else if(lpObj->ChaosBox[n].m_Index == GET_ITEM(12,137) && lpObj->ChaosBox[n].m_Level == 2)
{
CreationPack30++;
}
else if(lpObj->ChaosBox[n].m_Index == GET_ITEM(12,31) && lpObj->ChaosBox[n].m_Level == 2)
{
SoulPack30++;
}
else if(lpObj->ChaosBox[n].m_Index == GET_ITEM(12,30) && lpObj->ChaosBox[n].m_Level == 2)
{
BlessPack30++;
}
else if(lpObj->ChaosBox[n].m_Index == GET_ITEM(13,166))
{
GarudaFlameCount++;
}
else if(lpObj->ChaosBox[n].m_Index == GET_ITEM(13,165))
{
GarudaFeatherCount++;
}
else if(lpObj->ChaosBox[n].m_Index == GET_ITEM(13,167))
{
GoldenSentencesCount++;
}
else if(lpObj->ChaosBox[n].m_Index == GET_ITEM(13,170))
{
GreatSpiritStoneCount++;
ItemMoney += lpObj->ChaosBox[n].m_BuyMoney;
}
}
if(ChaosPack30 != 1 || CreationPack30 != 1 || SoulPack30 != 1 || BlessPack30 != 1 || GarudaFlameCount != 1 || GarudaFeatherCount != 1 || GoldenSentencesCount != 1 || GreatSpiritStoneCount != 1)
{
this->GCChaosMixSend(lpObj->Index,7,0);
return;
}
if(gServerInfo.m_Wing4MixRate[lpObj->AccountLevel] == -1)
{
lpObj->ChaosSuccessRate = (ItemMoney/2000000) + 1;
}
else
{
lpObj->ChaosSuccessRate = gServerInfo.m_Wing4MixRate[lpObj->AccountLevel];
}
if(this->GetTalismanOfLuckRate(lpObj,&lpObj->ChaosSuccessRate) == 0)
{
this->GCChaosMixSend(lpObj->Index,240,0);
return;
}
if(gServerInfo.m_Wing4MixRate[lpObj->AccountLevel] == -1)
{
lpObj->ChaosSuccessRate = ((lpObj->ChaosSuccessRate>40)?40:lpObj->ChaosSuccessRate);
}
else
{
lpObj->ChaosSuccessRate = ((lpObj->ChaosSuccessRate>100)?100:lpObj->ChaosSuccessRate);
}
lpObj->ChaosMoney = lpObj->ChaosSuccessRate*300000;
int TaxMoney = (lpObj->ChaosMoney*gCastleSiegeSync.GetTaxRateChaos(lpObj->Index))/100;
lpObj->ChaosMoney += TaxMoney;
if(lpObj->Money < ((DWORD)lpObj->ChaosMoney))
{
this->GCChaosMixSend(lpObj->Index,2,0);
return;
}
lpObj->Money -= lpObj->ChaosMoney;
GCMoneySend(lpObj->Index,lpObj->Money);
gCastleSiegeSync.AddTributeMoney(TaxMoney);
if((GetLargeRand()%100) < lpObj->ChaosSuccessRate)
{
WORD ItemIndex = 0;
BYTE ItemOption1 = 0;
BYTE ItemOption2 = 0;
BYTE ItemOption3 = 0;
BYTE ItemNewOption = 0;
CRandomManager RandomManager;
RandomManager.AddElement(GET_ITEM(12,156),1); // DW
RandomManager.AddElement(GET_ITEM(12,157),1); // DK
RandomManager.AddElement(GET_ITEM(12,158),1); // ELF
RandomManager.AddElement(GET_ITEM(12,159),1); // MG
RandomManager.AddElement(GET_ITEM(12,160),1); // DL
if (gServerInfo.m_DisableWingMixSU != 1)
{
RandomManager.AddElement(GET_ITEM(12,161),1); // SU
}
#if(GAMESERVER_UPDATE>=601)
if (gServerInfo.m_DisableWingMixRF != 1)
{
RandomManager.AddElement(GET_ITEM(12,162),1); // RG
}
#endif
RandomManager.GetRandomElement(&ItemIndex);
// gItemOptionRate.GetItemOption1(6,&ItemOption1);
gItemOptionRate.GetItemOption2(6,&ItemOption2);
gItemOptionRate.GetItemOption3(6,&ItemOption3);
gItemOptionRate.GetItemOption4(6,&ItemNewOption);
gItemOptionRate.MakeNewOption(ItemIndex,ItemNewOption,&ItemNewOption);
GDCreateItemSend(lpObj->Index,0xFF,0,0,ItemIndex,0,0,0,ItemOption2,ItemOption3,-1,(ItemNewOption + (16 * (GetLargeRand() % 3))),0,0,0,0,0xFF,0);
gLog.Output(LOG_CHAOS_MIX,"[Wing4Mix][Success][%s][%s] - (ChaosSuccessRate: %d, ChaosMoney: %d)",lpObj->Account,lpObj->Name,lpObj->ChaosSuccessRate,lpObj->ChaosMoney);
}
else
{
this->ChaosBoxInit(lpObj);
this->GCChaosBoxSend(lpObj,0);
this->GCChaosMixSend(lpObj->Index,0,0);
gLog.Output(LOG_CHAOS_MIX,"[Wing4Mix][Failure][%s][%s] - (ChaosSuccessRate: %d, ChaosMoney: %d)",lpObj->Account,lpObj->Name,lpObj->ChaosSuccessRate,lpObj->ChaosMoney);
}
}
[Item.cpp] -> Fix Option (Jewel of Life level > 1) Wing 4 doesn't work
find [if (gCustomWing.CheckCustomWingByItem(this->m_Index) != 0)]
fix (green lines):

[ServerInfo.h] -> add
Code:
int m_DisableWing4MixSU;
int m_DisableWing4MixRF;
[ServerInfo.cpp] -> search [CServerInfo::ReadCommonInfo] -> add
Code:
this->m_DisableWing4MixSU = GetPrivateProfileInt(section,"DisableWing4MixSU",0,path);
this->m_DisableWing4MixRF = GetPrivateProfileInt(section,"DisableWing4MixRF",0,path);
Server Side:
[GameServerInfo - Chaosmix.dat] -> add
Code:
;==================================================
; Wing4 Mix Settings
;==================================================
Wing4MixRate_AL0 = 90
Wing4MixRate_AL1 = 90
Wing4MixRate_AL2 = 90
Wing4MixRate_AL3 = 90
[GameServerInfo - Common.dat] -> add
Code:
;==================================================
; Disable Wings 4 Class Mix
;==================================================
DisableWing4MixSU = 0
DisableWing4MixRF = 0
[Data\Item\ItemOption.txt] -> Random option when mix ChaosBox -> add
Code:
1 84 5 6300 6306 * 1 1 * //W4
2 85 1 6300 6306 * 1 1 * //W4
2 80 4 6300 6306 * 1 1 16 //W4
2 83 4 6300 6306 * 1 1 32 //W4
3 102 5 6300 6306 * 1 1 1 //W4
4 109 5 6300 6306 * 1 1 2 //W4
5 110 5 6300 6306 * 1 1 4 //W4
6 111 5 6300 6306 * 1 1 8 //W4
[Data\Custom\CustomWing.txt] -> Fix Option Ignore Defense doesn't work on Wing 4 -> Replace
Code:
7 6300 30 145 2 55 2 80 4 85 1 83 4 110 5 111 5 109 5 102 5 0 "Wing401"
8 6301 30 145 2 55 2 80 4 85 1 83 4 110 5 111 5 109 5 102 5 0 "Wing402"
9 6302 30 145 2 55 2 80 4 85 1 83 4 110 5 111 5 109 5 102 5 0 "Wing403"
10 6303 30 145 2 55 2 80 4 85 1 83 4 110 5 111 5 109 5 102 5 0 "Wing404"
11 6304 30 145 2 55 2 80 4 85 1 83 4 110 5 111 5 109 5 102 5 1 "Wing405"
12 6305 30 145 2 55 2 80 4 85 1 83 4 110 5 111 5 109 5 102 5 0 "Wing406"
13 6306 30 145 2 55 2 80 4 85 1 83 4 110 5 111 5 109 5 102 5 1 "Wing407"
Client Side:
[MAIN_INFO\Items\CustomWing.txt] -> Replace -> Encrypt and paste to Client Local Folder
Code:
7 6300 30 145 2 55 2 80 4 85 1 83 4 110 5 111 5 109 5 108 5 0 "Wing401"
8 6301 30 145 2 55 2 80 4 85 1 83 4 110 5 111 5 109 5 108 5 0 "Wing402"
9 6302 30 145 2 55 2 80 4 85 1 83 4 110 5 111 5 109 5 108 5 0 "Wing403"
10 6303 30 145 2 55 2 80 4 85 1 83 4 110 5 111 5 109 5 108 5 0 "Wing404"
11 6304 30 145 2 55 2 80 4 85 1 83 4 110 5 111 5 109 5 108 5 1 "Wing405"
12 6305 30 145 2 55 2 80 4 85 1 83 4 110 5 111 5 109 5 108 5 0 "Wing406"
13 6306 30 145 2 55 2 80 4 85 1 83 4 110 5 111 5 109 5 108 5 1 "Wing407"
[Mix.bmd] use MagicHand to open file -> Find ID 81 in Chaos Machine Combinations -> Follow my settings

[Text_eng.bmd] -> add ChaosBox name for mixing wing 4
Code:
3468 "Create WING 4"
[ItemTooltip_eng.bmd] -> Fix display wrong % bonus -> Find these lines and change them follow my settings
Code:
12 156 "Elysium's Wings" 4 1 0 0 1 -1 3 0 26 0 33 0 25 0 8 0 9 0 10 0 484 3 -1 0 -1 0 -1 0 -1 0
12 157 "Flame God's Wings" 4 1 0 0 1 -1 3 0 26 0 33 0 25 0 8 0 9 0 10 0 484 3 -1 0 -1 0 -1 0 -1 0
12 158 "Celestial Body's Wings" 4 1 0 0 1 -1 3 0 26 0 33 0 25 0 8 0 9 0 10 0 484 3 -1 0 -1 0 -1 0 -1 0
12 159 "Annihilation's Wings" 4 1 0 0 1 -1 3 0 26 0 33 0 25 0 8 0 9 0 10 0 484 3 -1 0 -1 0 -1 0 -1 0
12 160 "Dominator's Cloak" 4 1 0 0 1 -1 3 0 26 0 33 0 25 0 8 0 9 0 10 0 484 3 -1 0 -1 0 -1 0 -1 0
12 161 "Other World's Wings" 4 1 0 0 1 -1 3 0 26 0 33 0 25 0 8 0 9 0 10 0 484 3 -1 0 -1 0 -1 0 -1 0
12 162 "Judgment's Cloak" 4 1 0 0 1 -1 3 0 26 0 33 0 25 0 8 0 9 0 10 0 484 3 -1 0 -1 0 -1 0 -1 0
Result:
_ Wing 4 which have 45%/45% increased dmg/decreased dmg at + 0 and 75%/75% at + 15, all option works well.
_ Can mixing Wing 4 in ChaosBox at rate 90%.