steffan95 Posted January 14, 2017 at 05:57 AM Share Posted January 14, 2017 at 05:57 AM Hi, i saw on a friend that selling this system at 25 EUR. Here you have free at all. Installation: Source Server Move in src/game/ 1. Open input.h and search : extern void SendShout(const char * szText, BYTE bEmpire); Add after: #ifdef __CHAT_TYPE_SHOUT_TRADE__ extern void SendShoutTrade(const char * szText, BYTE bEmpire); #endif Search: void Shout(const char * c_pData); and add after: #ifdef __CHAT_TYPE_SHOUT_TRADE__ void ShoutTrade(const char * c_pData); #endif 2. Open input_main.cpp and search: if (pinfo->type == CHAT_TYPE_SHOUT) Add after: #ifdef __CHAT_TYPE_SHOUT_TRADE__ if (pinfo->type == CHAT_TYPE_SHOUT_TRADE) { if (ch->GetLevel() < g_iShoutLimitLevel) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("외치기는 레벨 %d 이상만 사용 가능 합니다."), g_iShoutLimitLevel); return (iExtraLen); } if (thecore_heart->pulse - (int) ch->GetLastShoutPulse() < passes_per_sec * 60) return (iExtraLen); ch->SetLastShoutPulse(thecore_heart->pulse); TPacketGGShout p; p.bHeader = HEADER_GG_TRADE; p.bEmpire = ch->GetEmpire(); strlcpy(p.szText, chatbuf, sizeof(p.szText)); P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGShout)); SendShoutTrade(chatbuf, ch->GetEmpire()); return (iExtraLen); } #endif 3. Open input_p2p.cpp and search: struct FuncShout Add after: #ifdef __CHAT_TYPE_SHOUT_TRADE__ struct FuncShoutTrade { const char * m_str; BYTE m_bEmpire; FuncShoutTrade(const char * str, BYTE bEmpire) : m_str(str), m_bEmpire(bEmpire) { } void operator () (LPDESC d) { if (!d->GetCharacter() || (d->GetCharacter()->GetGMLevel() == GM_PLAYER && d->GetEmpire() != m_bEmpire)) return; d->GetCharacter()->ChatPacket(CHAT_TYPE_SHOUT_TRADE, "%s", m_str); } }; #endif Search: void CInputP2P::Shout(const char * c_pData) And add after: #ifdef __CHAT_TYPE_SHOUT_TRADE__ void SendShoutTrade(const char * szText, BYTE bEmpire) { const DESC_MANAGER::DESC_SET & c_ref_set = DESC_MANAGER::instance().GetClientSet(); std::for_each(c_ref_set.begin(), c_ref_set.end(), FuncShoutTrade(szText, bEmpire)); } void CInputP2P::ShoutTrade(const char * c_pData) { TPacketGGShout * p = (TPacketGGShout *) c_pData; SendShoutTrade(p->szText, p->bEmpire); } #endif 4. Open packet.h and search: HEADER_GG_CHECK_AWAKENESS = 29, Add after: #ifdef __CHAT_TYPE_SHOUT_TRADE__ HEADER_GG_TRADE = 31, #endif Move in src/common/ 5. Open length.h and search: CHAT_TYPE_MAX_NUM Add before: #ifdef __CHAT_TYPE_SHOUT_TRADE__ CHAT_TYPE_SHOUT_TRADE, #endif 6. Open service.h and add #define __CHAT_TYPE_SHOUT_TRADE__ Source Binary Move src/UserInterface/ 1. Open Locale_inc.h and add : #define ENABLE_CHAT_TYPE_SHOUT_TRADE 2. Open Packet.h and search: CHAT_TYPE_MAX_NUM, Add before: #ifdef ENABLE_CHAT_TYPE_SHOUT_TRADE CHAT_TYPE_SHOUT_TRADE, #endif 3. Open PythonApplicationModule.cpp and search: #ifdef ENABLE_COSTUME_SYSTEM Add after: #ifdef ENABLE_CHAT_TYPE_SHOUT_TRADE PyModule_AddIntConstant(poModule, "ENABLE_CHAT_TYPE_SHOUT_TRADE", 1); #else PyModule_AddIntConstant(poModule, "ENABLE_CHAT_TYPE_SHOUT_TRADE", 0); #endif 4. Open PythonChat.cpp and search: m_akD3DXClrChat[CHAT_TYPE_SHOUT] = D3DXCOLOR(0.658f, 1.0f, 0.835f, 1.0f); Add after: #ifdef ENABLE_CHAT_TYPE_SHOUT_TRADE m_akD3DXClrChat[CHAT_TYPE_SHOUT_TRADE] = D3DXCOLOR(0xFF9966); #endif 5. Open PythonChatModule.cpp and search: PyModule_AddIntConstant(poModule, "CHAT_TYPE_SHOUT", CHAT_TYPE_SHOUT); Add after: #ifdef ENABLE_CHAT_TYPE_SHOUT_TRADE PyModule_AddIntConstant(poModule, "CHAT_TYPE_SHOUT_TRADE", CHAT_TYPE_SHOUT_TRADE); #endif 6. Open PythonNetworkStreamPhaseGame.cpp and search: case CHAT_TYPE_SHOUT Add after: #ifdef ENABLE_CHAT_TYPE_SHOUT_TRADE case CHAT_TYPE_SHOUT_TRADE: #endif Search: else if (CHAT_TYPE_SHOUT == kChat.type) And replace function with this: #ifdef ENABLE_CHAT_TYPE_SHOUT_TRADE else if (CHAT_TYPE_SHOUT == kChat.type || CHAT_TYPE_SHOUT_TRADE == kChat.type) #else else if (CHAT_TYPE_SHOUT == kChat.type) #endif Client 1. Decrypt locale_ro/en/tr/etc and open locale_game.txt Add the finish : CHAT_SHOUT_TRADE_LIMIT You can only call every 60 seconds. 2. Decrypt root and open uichat.py Search for at class ChatLine: def __init__(self): Add after: if app.ENABLE_SEND_TARGET_INFO: self.CHAT_MODE_NAME.update({chatm2g.CHAT_TYPE_SHOUT_TRADE : "Trade"}) Search: elif chatm2g.CHAT_TYPE_SHOUT == self.GetChatMode(): self.SetChatMode(chatm2g.CHAT_TYPE_TALKING) self.SetText("") And replace it to: if app.ENABLE_SEND_TARGET_INFO: elif chatm2g.CHAT_TYPE_SHOUT == self.GetChatMode(): self.SetChatMode(chatm2g.CHAT_TYPE_SHOUT_TRADE) self.SetText("$") elif chatm2g.CHAT_TYPE_SHOUT_TRADE == self.GetChatMode(): self.SetChatMode(chatm2g.CHAT_TYPE_TALKING) self.SetText("") Search: elif chatm2g.CHAT_TYPE_SHOUT == self.GetChatMode(): self.SetText("!") self.SetEndPosition() Add after: if app.ENABLE_SEND_TARGET_INFO: elif chatm2g.CHAT_TYPE_SHOUT_TRADE == self.GetChatMode(): self.SetText("$") self.SetEndPosition() Search: elif '!' == text[0]: self.__SendShoutChatPacket(text) Add after: if app.ENABLE_SEND_TARGET_INFO: elif '$' == text[0]: self.__SendShoutTradeChatPacket(text) Search for at class ChatLogWindow: def __init__(self): Add after: if app.ENABLE_SEND_TARGET_INFO: if "Trade" not in self.CHAT_MODE_NAME: self.CHAT_MODE_NAME.update("Trade") self.CHAT_MODE_INDEX.update(chatm2g.CHAT_TYPE_SHOUT_TRADE) Search: def __SendShoutChatPacket(self, text): And add after: def __SendShoutTradeChatPacket(self, text): if 1 == len(text): self.RunCloseEvent() return if app.GetTime() < self.lastShoutTime + 60: chatm2g.AppendChat(chatm2g.CHAT_TYPE_INFO, localeInfo.CHAT_SHOUT_TRADE_LIMIT) self.__ResetChat() return self.__SendChatPacket(text[1:], chatm2g.CHAT_TYPE_SHOUT_TRADE) self.__ResetChat() self.lastShoutTime = app.GetTime() Source: Jus4tMetin, special post for TierriLopes and all of there. Please not re-post anywhere! Screen: Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now