Legend 187 Posted November 17, 2014 Share Posted November 17, 2014 Hello devs. I recently noticed that the green and purple potions doesn't send any effect so I decided to add one. File: char_item.cpp So let's begin, first of all find these two cases: case APPLY_MOV_SPEED: case APPLY_ATT_SPEED: and under of each of them add this: EffectPacket(SE_DXUP_PURPLE); //purple potion EffectPacket(SE_SPEEDUP_GREEN); //green potion After you do that search for this(this variable exists two times so you need to do this step two times): AddAffect(AFFECT_NOG_ABILITY, POINT_MOV_SPEED, moveSpeedPer, AFF_MOV_SPEED_POTION, time, 0, true, true); and under that add this: EffectPacket(SE_DXUP_PURPLE); Kind Regards Legend 1 15 Link to comment Share on other sites More sharing options...
Honorable Member martysama0134 7198 Posted November 18, 2014 Honorable Member Share Posted November 18, 2014 In the client, everything is already set to let the green/purple effects work. You just need to add the relative effectpacket via game. ^ via game 3 2 Check out my GitHub Link to comment Share on other sites More sharing options...
Premium Galet 514 Posted November 18, 2014 Premium Share Posted November 18, 2014 Thanks ! Link to comment Share on other sites More sharing options...
Premium MrLibya 557 Posted November 25, 2014 Premium Share Posted November 25, 2014 Thx , But Where You Add IT ? In Any File's ? If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Morphe 160 Posted November 25, 2014 Share Posted November 25, 2014 Thx , But Where You Add IT ? In Any File's ? char_item.cpp 1 Link to comment Share on other sites More sharing options...
whoyou55 1 Posted January 2, 2015 Share Posted January 2, 2015 I added, but not work. 1 Link to comment Share on other sites More sharing options...
Damixxx0101 6 Posted January 14, 2015 Share Posted January 14, 2015 OMG why u no give name file .... where i must add this please help ; / Link to comment Share on other sites More sharing options...
Aemon 7 Posted January 14, 2015 Share Posted January 14, 2015 It can do on 34k ? Link to comment Share on other sites More sharing options...
Premium Necro 80 Posted January 14, 2015 Premium Share Posted January 14, 2015 It can do on 34k ? i think that isnt possiblle because of source code which 34k hasnt. Link to comment Share on other sites More sharing options...
Damixxx0101 6 Posted February 4, 2015 Share Posted February 4, 2015 switch (item->GetValue(0)) { case APPLY_MOV_SPEED: AddAffect(affect_type, apply_type, apply_value, AFF_MOV_SPEED_POTION, apply_duration, 0, true, true); EffectPacket(SE_DXUP_PURPLE); //purple potion break; case APPLY_ATT_SPEED: AddAffect(affect_type, apply_type, apply_value, AFF_ATT_SPEED_POTION, apply_duration, 0, true, true); EffectPacket(SE_SPEEDUP_GREEN); //green potion break; long time = item->GetValue(0); long moveSpeedPer = item->GetValue(1); long attPer = item->GetValue(2); long expPer = item->GetValue(3); AddAffect(AFFECT_NOG_ABILITY, POINT_MOV_SPEED, moveSpeedPer, AFF_MOV_SPEED_POTION, time, 0, true, true); EffectPacket(SE_DXUP_PURPLE); AddAffect(AFFECT_NOG_ABILITY, POINT_MALL_ATTBONUS, attPer, AFF_NONE, time, 0, true, true); AddAffect(AFFECT_NOG_ABILITY, POINT_MALL_EXPBONUS, expPer, AFF_NONE, time, 0, true, true); item->SetCount(item->GetCount() - 1); what wrong ? Link to comment Share on other sites More sharing options...
Despero 131 Posted February 13, 2015 Share Posted February 13, 2015 (edited) Work fine ! Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Legend 187 Posted February 14, 2015 Author Share Posted February 14, 2015 OMG why u no give name file .... where i must add this please help ; / File: char_item.cpp Kind Regards Legend Link to comment Share on other sites More sharing options...
Premium Galet 514 Posted February 14, 2015 Premium Share Posted February 14, 2015 Same for the Penetration effect, no ? Link to comment Share on other sites More sharing options...
Fliegex3 29 Posted February 15, 2015 Share Posted February 15, 2015 Dont work for me. Link to comment Share on other sites More sharing options...
Despero 131 Posted February 15, 2015 Share Posted February 15, 2015 Dont work for me. Send me your char_item.cpp Link to comment Share on other sites More sharing options...
thespeedy 20 Posted August 28, 2015 Share Posted August 28, 2015 dont work Link to comment Share on other sites More sharing options...
TheSLZ 106 Posted August 28, 2015 Share Posted August 28, 2015 (edited) It works. But i didn't find it twice: AddAffect(AFFECT_NOG_ABILITY, POINT_MOV_SPEED, moveSpeedPer, AFF_MOV_SPEED_POTION, time, 0, true, true); But works, thanks Edited August 28, 2015 by TheSLZ Link to comment Share on other sites More sharing options...
thespeedy 20 Posted September 2, 2015 Share Posted September 2, 2015 dont work -.- Link to comment Share on other sites More sharing options...
Honorable Member .plechito' 7770 Posted September 2, 2015 Honorable Member Share Posted September 2, 2015 It does Link to comment Share on other sites More sharing options...
thespeedy 20 Posted September 2, 2015 Share Posted September 2, 2015 (edited) AddAffect(AFFECT_NOG_ABILITY, POINT_MOV_SPEED, moveSpeedPer, AFF_MOV_SPEED_POTION, time, 0, true, true); EffectPacket(SE_DXUP_PURPLE); AddAffect(AFFECT_NOG_ABILITY, POINT_MALL_ATTBONUS, attPer, AFF_NONE, time, 0, true, true); EffectPacket(SE_SPEEDUP_GREEN); AddAffect(AFFECT_NOG_ABILITY, POINT_MALL_EXPBONUS, expPer, AFF_NONE, time, 0, true, true); ok? Edited September 2, 2015 by thespeedy Link to comment Share on other sites More sharing options...
WhiteWorld 31 Posted September 3, 2015 Share Posted September 3, 2015 so I have residential and work 3x case APPLY_MOV_SPEED: case APPLY_ATT_SPEED: 1, case APPLY_MOV_SPEED: AddAffect(AFFECT_UNIQUE_ABILITY, POINT_MOV_SPEED, item->GetValue(2), AFF_MOV_SPEED_POTION, item->GetValue(1), 0, true, true); EffectPacket(SE_DXUP_PURPLE); //purple potion break; case APPLY_ATT_SPEED: AddAffect(AFFECT_UNIQUE_ABILITY, POINT_ATT_SPEED, item->GetValue(2), AFF_ATT_SPEED_POTION, item->GetValue(1), 0, true, true); EffectPacket(SE_SPEEDUP_GREEN); //green potion break; 2, case APPLY_MOV_SPEED: AddAffect(affect_type, apply_type, apply_value, AFF_MOV_SPEED_POTION, apply_duration, 0, true, true); EffectPacket(SE_DXUP_PURPLE); //purple potion break; case APPLY_ATT_SPEED: AddAffect(affect_type, apply_type, apply_value, AFF_ATT_SPEED_POTION, apply_duration, 0, true, true); EffectPacket(SE_SPEEDUP_GREEN); //green potion break; 3, case APPLY_MOV_SPEED: AddAffect(AFFECT_MOV_SPEED, POINT_MOV_SPEED, item->GetValue(2), AFF_MOV_SPEED_POTION, item->GetValue(1), 0, true); EffectPacket(SE_DXUP_PURPLE); //purple potion break; case APPLY_ATT_SPEED: AddAffect(AFFECT_ATT_SPEED, POINT_ATT_SPEED, item->GetValue(2), AFF_ATT_SPEED_POTION, item->GetValue(1), 0, true); EffectPacket(SE_SPEEDUP_GREEN); //green potion break; and 1x AddAffect(AFFECT_NOG_ABILITY, POINT_MOV_SPEED, moveSpeedPer, AFF_MOV_SPEED_POTION, time, 0, true, true); AddAffect(AFFECT_NOG_ABILITY, POINT_MOV_SPEED, moveSpeedPer, AFF_MOV_SPEED_POTION, time, 0, true, true); EffectPacket(SE_DXUP_PURPLE); //purple potion AddAffect(AFFECT_NOG_ABILITY, POINT_MALL_ATTBONUS, attPer, AFF_NONE, time, 0, true, true); AddAffect(AFFECT_NOG_ABILITY, POINT_MALL_EXPBONUS, expPer, AFF_NONE, time, 0, true, true); it works, thank you 2 Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19736 Posted May 20, 2017 Honorable Member Share Posted May 20, 2017 Here is a little fix to disable the double potion sounds (green & purple): UI\PythonItem.cpp -> DWORD CPythonItem::__GetUseSoundType(const CItemData& c_rkItemData) Search the case of the ability_up and replace it with this: case CItemData::USE_ABILITY_UP: { if ((c_rkItemData.GetIndex() == 27053 || c_rkItemData.GetIndex() == 27054) || (c_rkItemData.GetIndex() >= 27100 && c_rkItemData.GetIndex() <= 27105) || (c_rkItemData.GetIndex() >= 27110 && c_rkItemData.GetIndex() <= 27115)) return USESOUND_NONE; else return USESOUND_POTION; } break; This is an exception to block the playusesound when you are using an item from inventory: netSendItemUsePacket -> CPythonNetworkStream::SendItemUsePacket -> __PlayInventoryItemUseSound Because of the SpecificEffectPacket plays the sound of the potions as well. 6 Link to comment Share on other sites More sharing options...
Honorable Member martysama0134 7198 Posted January 29, 2023 Honorable Member Share Posted January 29, 2023 (edited) Someone linked me this old topic, and I figured out I never noticed those sounds played twice. This is my fix: (PythonNetworkStreamPhaseGameItem.cpp) There's no need to play those sounds. Alternatively (based on penger's but via apply check): (but it's not of my taste) (PythonItem.cpp) case CItemData::USE_ABILITY_UP: if (c_rkItemData.GetValue(0) == CItemData::APPLY_MOV_SPEED || c_rkItemData.GetValue(0) == CItemData::APPLY_ATT_SPEED) return USESOUND_NONE; return USESOUND_POTION; Edited January 29, 2023 by Metin2 Dev Core X - External 2 Internal 1 1 1 Check out my GitHub Link to comment Share on other sites More sharing options...
Recommended Posts