Jump to content

DrTurk

Inactive Member
  • Posts

    220
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by DrTurk

  1. its not used, maybe they changed that after the source got leaked
  2. new? that type of attacks in this scene arent new at all, just not many have known about it. the attack is just flooding the sockets, so that no one can connect to the server, there are methods to fix this, but its not easy.
  3. void CHARACTER::PointChange SetHP(GetHP() + amount); val = GetHP(); BroadcastTargetPacket(); to SetHP(GetHP() + amount); val = GetHP(); if (GetHP() < 0) { SetHP(0); val = 0; } BroadcastTargetPacket();
  4. normal in marty files, you could debug it via visual studio. this bug doesnt appear in base leaked source
  5. in germany they dont warn you, they knock on your door and take all your stuff
  6. its better to run the server with visual studio, better for debugging.
  7. no/wrong folder in the mob_proto wrong data folder for the mount no accumulation in the msa
  8. I just want to block it when your not the owner of the item, only hovering on the item will be very hard when the shoutbox is really active, but thanks anyway
  9. Does someone know how to block copying posted hyperlinks from items?
  10. With your changes -> 430MB Without your changes -> 775MB thats impressiv
  11. You can remove alot of dead code, i removed all of it years ago. It takes time
  12. If you talking about that -> char g_nation_name[4][32] = { "", "½Å¼ö±¹", "õÁ¶±¹", "Áø³ë±¹", }; I removed castle/monarch etc. on my source so i didnt had to translate that, but the same is for priv_empire function. I send Sonitex my way how i have done this, but i think its better i keep that for me. I dont have alot knowledge about coding, so I dont really know if it works with alot of players. My way is a very dirty solution for the problem
  13. ye better, the thing that i did was without checking if the string is empty also created something for whisper because of duel: pkVictim->LocaleWhisperPacket(WHISPER_TYPE_SYSTEM , pkChr, 503, "%s challenged you to a battle!", pkChr->GetName()); but the ugliest part that i did was for the priv_empire, no one wants to see what i did there
  14. Ye didnt fix this yet, i'll fix that as soon as i have time for that. ok just edit this in client src: bool CPythonNetworkStream::RecvLocaleChatPacket() { TPacketGCLocaleChat kChat; if (!Recv(sizeof(kChat), &kChat)) return false; std::string localeString = ""; bool bSuccess = LocaleStringManager::Instance().FillLocaleString(kChat.format, localeString); if (!bSuccess) return false; if (CHAT_TYPE_NOTICE == kChat.type) { PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_SetTipMessage", Py_BuildValue("(s)", localeString.c_str())); } else if (CHAT_TYPE_BIG_NOTICE == kChat.type) { PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_SetBigMessage", Py_BuildValue("(s)", localeString.c_str())); } if (!localeString.empty()) CPythonChat::Instance().AppendChat(kChat.type, localeString.c_str()); return true; }
  15. Just create another function like that: void SendNoticeMapLocal(DWORD dwIndex, const char* c_pszBuf, int nMapIndex, bool bBigFont, ...) { BYTE type = 0; const DESC_MANAGER::DESC_SET& c_ref_set = DESC_MANAGER::instance().GetClientSet(); if (!c_pszBuf) return; DESC_MANAGER::DESC_SET::const_iterator it = c_ref_set.begin(); while (it != c_ref_set.end()) { LPDESC d = *(it++); if (d->GetCharacter()) { if (d->GetCharacter()->GetMapIndex() != nMapIndex) continue; bool isNotice = false; if (c_pszBuf == "%s") { char chatbuf[CHAT_MAX_LEN + 1]; va_list args; va_start(args, c_pszBuf); vsnprintf(chatbuf, sizeof(chatbuf), c_pszBuf, args); va_end(args); strlcpy(chatbuf, c_pszBuf, sizeof(chatbuf)); isNotice = true; } TEMP_BUFFER buf; if (bBigFont == true) { type = CHAT_TYPE_BIG_NOTICE; } else { type = CHAT_TYPE_NOTICE; } TPacketGCLocaleChat packet; packet.header = HEADER_GC_LOCALE_CHAT; packet.size = sizeof(TPacketGCLocaleChat); packet.type = type; packet.format = dwIndex; va_list args; va_start(args, bBigFont); FindFormatSpecifiers(c_pszBuf, args, &packet.size, &buf); va_end(args); d->Packet(&packet, sizeof(packet)); if (buf.size()) d->Packet(buf.read_peek(), buf.size()); } } } then you can use it like that: void WeddingMap::SetEnded(DWORD dwMapIndex) { if (m_pEndEvent) { sys_err("WeddingMap::SetEnded - ALREADY EndEvent(m_pEndEvent=%x)", get_pointer(m_pEndEvent)); return; } wedding_map_info* info = AllocEventInfo<wedding_map_info>(); info->pWeddingMap = this; m_pEndEvent = event_create(wedding_end_event, info, PASSES_PER_SEC(5)); SendNoticeMapLocal(889, " ", dwMapIndex, true); SendNoticeMapLocal(447, " ", dwMapIndex, true);
  16. tested on windows with only map1 blue -> with changed functions: 100,6MB without changed functions: 114MB nice release, thanks
  17. as i said i had this problem even before i modifyed the dead function, but only when you one shot someone with a poison skill. i can redo my dead function modify and it will also bug when killed with one shot which has 100% poison rate
  18. Isnt that a normal m2 problem with bleed/poison/fire when you one shot someone with it? I fixxed this before i did this change. Just add if (ch->IsDead()) { ch->RemovePoison(); } like that: EVENTFUNC(poison_event) { TPoisonEventInfo * info = dynamic_cast<TPoisonEventInfo *>( event->info ); if ( info == NULL ) { sys_err( "poison_event> <Factor> Null pointer" ); return 0; } LPCHARACTER ch = info->ch; if (ch == NULL) { return 0; } LPCHARACTER pkAttacker = CHARACTER_MANAGER::instance().FindByPID(info->attacker_pid); if (ch->IsDead()) { ch->RemovePoison(); } int dam = ch->GetMaxHP() * GetPoisonDamageRate(ch) / 1000; if (test_server) ch->ChatPacket(CHAT_TYPE_NOTICE, "Poison Damage %d", dam); if (ch->Damage(pkAttacker, dam, DAMAGE_TYPE_POISON)) { ch->m_pkPoisonEvent = NULL; return 0; } --info->count; if (info->count) return PASSES_PER_SEC(3); else { ch->m_pkPoisonEvent = NULL; return 0; } } same thing with fire: EVENTFUNC(fire_event) { TFireEventInfo * info = dynamic_cast<TFireEventInfo *>( event->info ); if ( info == NULL ) { sys_err( "fire_event> <Factor> Null pointer" ); return 0; } LPCHARACTER ch = info->ch; if (ch == NULL) { return 0; } LPCHARACTER pkAttacker = CHARACTER_MANAGER::instance().FindByPID(info->attacker_pid); if (ch->IsDead()) { ch->RemoveFire(); } int dam = info->amount; if (test_server) ch->ChatPacket(CHAT_TYPE_NOTICE, "Fire Damage %d", dam); if (ch->Damage(pkAttacker, dam, DAMAGE_TYPE_FIRE)) { ch->m_pkFireEvent = NULL; return 0; } --info->count; if (info->count) return PASSES_PER_SEC(3); else { ch->m_pkFireEvent = NULL; return 0; } }
  19. Had two servers with that change, didnt experienced any bugs
  20. char.cpp --> remove that: m_dwKillerPID = 0; char.h --> remove that: DWORD m_dwKillerPID; char_battle.cpp --> remove/change that: if (!pkKiller && m_dwKillerPID) pkKiller = CHARACTER_MANAGER::instance().FindByPID(m_dwKillerPID); m_dwKillerPID = 0; change that: if (GetHP() <= 0) { Stun(); if (pAttacker && !pAttacker->IsNPC()) m_dwKillerPID = pAttacker->GetPlayerID(); else m_dwKillerPID = 0; } to this: if (GetHP() <= 0) { Dead(pAttacker); }
  21. Change this: if (iSizeBuffer > 0) { TEMP_BUFFER tempbuf; LPBUFFER lpBufferDecrypt = tempbuf.getptr(); buffer_adjust_size(lpBufferDecrypt, iSizeBuffer); int iSizeAfter = TEA_Decrypt((DWORD*)buffer_write_peek(lpBufferDecrypt), (DWORD*)buffer_read_peek(m_lpInputBuffer), GetDecryptionKey(), to this: if (iSizeBuffer > 0) { LPBUFFER lpBufferDecrypt = buffer_new(iSizeBuffer); int iSizeAfter = TEA_Decrypt((DWORD*)buffer_write_peek(lpBufferDecrypt), (DWORD*)buffer_read_peek(m_lpInputBuffer), GetDecryptionKey(), iSizeBuffer);
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.