PeaceMaker 121 Posted August 9, 2015 Share Posted August 9, 2015 Hello , does anyone know how to disable parties ( groups) in a map ? i have no idea if it could be written in a quest so that's why i wrote c++ xD sorry for bothering but really need help thanks Link to comment Share on other sites More sharing options...
PeaceMaker 121 Posted August 10, 2015 Author Share Posted August 10, 2015 anyone ? Link to comment Share on other sites More sharing options...
Denis 1474 Posted August 10, 2015 Share Posted August 10, 2015 It's untested but it should work Find this function: void CInputMain::PartyInvite(LPCHARACTER ch, const char * c_pData) { if (ch->GetArena()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("대련장에서 사용하실 수 없습니다.")); return; } TPacketCGPartyInvite * p = (TPacketCGPartyInvite*) c_pData; LPCHARACTER pInvitee = CHARACTER_MANAGER::instance().Find(p->vid); if (!pInvitee || !ch->GetDesc() || !pInvitee->GetDesc()) { sys_err("PARTY Cannot find invited character"); return; } } And add this line to it: ch->GetMapIndex() == 41 ? ch->ChatPacket(CHAT_TYPE_INFO,"WRONG MAP INDEX") : ch->PartyInvite(pInvitee); // 41 = map index of the blocked map So it should look something like this: void CInputMain::PartyInvite(LPCHARACTER ch, const char * c_pData) { if (ch->GetArena()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("대련장에서 사용하실 수 없습니다.")); return; } TPacketCGPartyInvite * p = (TPacketCGPartyInvite*) c_pData; LPCHARACTER pInvitee = CHARACTER_MANAGER::instance().Find(p->vid); if (!pInvitee || !ch->GetDesc() || !pInvitee->GetDesc()) { sys_err("PARTY Cannot find invited character"); return; } ch->GetMapIndex() == 41 ? ch->ChatPacket(CHAT_TYPE_INFO,"WRONG MAP INDEX") : ch->PartyInvite(pInvitee); } Link to comment Share on other sites More sharing options...
PeaceMaker 121 Posted August 10, 2015 Author Share Posted August 10, 2015 Thanks ill be testing it in few minutes Link to comment Share on other sites More sharing options...
PeaceMaker 121 Posted August 10, 2015 Author Share Posted August 10, 2015 (edited) not working xD they say this https://metin2.download/picture/56Ys0Obya7K0kmzHo0CKRokUaWje2R95/.png but the invite still send and can be accepted ! Edited August 31, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Denis 1474 Posted August 10, 2015 Share Posted August 10, 2015 Try this: void CInputMain::PartyInvite(LPCHARACTER ch, const char * c_pData) { if (ch->GetArena()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("????? ???? ? ????.")); return; } TPacketCGPartyInvite * p = (TPacketCGPartyInvite*) c_pData; LPCHARACTER pInvitee = CHARACTER_MANAGER::instance().Find(p->vid); if (!pInvitee || !ch->GetDesc() || !pInvitee->GetDesc()) { sys_err("PARTY Cannot find invited character"); return; } if(ch->GetMapIndex() == 41) { ch->ChatPacket(CHAT_TYPE_INFO,"WRONG MAP INDEX"); return; } else { ch->PartyInvite(pInvitee); } } 1 Link to comment Share on other sites More sharing options...
Krixius 13 Posted August 10, 2015 Share Posted August 10, 2015 (edited) void CInputMain::PartyInvite(LPCHARACTER ch, const char * c_pData) { if (ch->GetArena()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("대련장에서 사용하실 수 없습니다.")); return; } TPacketCGPartyInvite * p = (TPacketCGPartyInvite*) c_pData; LPCHARACTER pInvitee = CHARACTER_MANAGER::instance().Find(p->vid); if (!pInvitee || !ch->GetDesc() || !pInvitee->GetDesc()) { sys_err("PARTY Cannot find invited character"); return; } if (ch->GetMapIndex() == 41 || ch->GetMapIndex() == indexofothermap) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NO_PARTY_IN_THIS_MAP")); return; } //ch->GetMapIndex() == 41 ? ch->ChatPacket(CHAT_TYPE_INFO,"WRONG MAP INDEX") : ch->PartyInvite(pInvitee); } Ups, Denis post this faster than me @_@ Edited August 10, 2015 by akroma 1 Link to comment Share on other sites More sharing options...
PeaceMaker 121 Posted August 10, 2015 Author Share Posted August 10, 2015 It works thank for the help, but i have 1 more problem xD if someone made a party from the same channel but different map the party willl stay on the blocked map any way to block that too please ? tyyy Link to comment Share on other sites More sharing options...
PeaceMaker 121 Posted August 11, 2015 Author Share Posted August 11, 2015 (edited) this one for Invite: ch->PartyInvite(pInvitee); but i don't know which is for leave help me please nvm fixed with client side Edited August 11, 2015 by PeaceMaker Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now