Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/12/18 in all areas

  1. Hi, everyone. Most people know when you are trying to connect the server with a lot of people, the server can not respond to you or something might go wrong. This example is same for warp too. Webzen did something about this too and I'd like to share it with you. What are exactly are we doing? If the client can not connect to the server, the client will wait one second to connect the server again. Open NetStream.cpp. Find Connect function and replace with this bool CNetworkStream::Connect(const CNetworkAddress& c_rkNetAddr, int limitSec) { Clear(); m_addr = c_rkNetAddr; m_sock = socket(AF_INET, SOCK_STREAM, 0); if (m_sock == INVALID_SOCKET) { Clear(); OnConnectFailure(); return false; } DWORD arg = 1; ioctlsocket(m_sock, FIONBIO, &arg); // Non-blocking mode if (connect(m_sock, reinterpret_cast<PSOCKADDR>(&m_addr), m_addr.GetSize()) == SOCKET_ERROR) { int error = WSAGetLastError(); // If something went wrong, the client will wait one second to connect the server again. // Of course, it will clear and setting up everything again. if (error != WSAEWOULDBLOCK) { Sleep(1000); Clear(); m_sock = socket(AF_INET, SOCK_STREAM, 0); if (m_sock == INVALID_SOCKET) { Clear(); OnConnectFailure(); return false; } ioctlsocket(m_sock, FIONBIO, &arg); if (connect(m_sock, reinterpret_cast<PSOCKADDR>(&m_addr), m_addr.GetSize()) == SOCKET_ERROR) { Tracen("error != WSAEWOULDBLOCK"); Clear(); OnConnectFailure(); return false; } } } m_connectLimitTime = time(NULL) + limitSec; return true; } Best Regards Ken
    1 point
  2. M2 Download Center Download Here ( Internal ) Hello ! I share a lot of work, a month and a week to correct the armor brilliance from level 0 to 70! Download : HERE ! Give me your opinion about this ! And sorry for my bad english I'm French
    1 point
  3. Hi, everyone today I would like to share a fix which Webzen has made with you. The fix is about the target position. Ymir is not checking if the target is on horse or not. It would be useful for range attacks. Find this: D3DXVECTOR3 CActorInstance::OnGetFlyTargetPosition() { D3DXVECTOR3 v3Center; if (m_fRadius<=0) { BuildBoundingSphere(); v3Center = m_v3Center; } else { v3Center = m_v3Center; } D3DXVec3TransformCoord(&v3Center, &v3Center, &GetTransform()); return v3Center; } Replace with this: D3DXVECTOR3 CActorInstance::OnGetFlyTargetPosition() { D3DXVECTOR3 v3Center; if (m_fRadius <= 0) BuildBoundingSphere(); v3Center = m_v3Center; D3DXVec3TransformCoord(&v3Center, &v3Center, &GetTransform()); if (__IsMountingHorse()) v3Center.z += 110.0f; return v3Center; } Best Regards Ken
    1 point
  4. void CGuild::AddComment(LPCHARACTER ch, const std::string &str) { int player_id = ch->GetPlayerID(); if (str.length() > GUILD_COMMENT_MAX_LEN) { return; } char text[GUILD_COMMENT_MAX_LEN * 2 + 1]; DBManager::Instance().EscapeString(text, sizeof(text), str.c_str(), str.length()); DBManager::Instance().FuncAfterQuery( [this, player_id] {this->RefreshCommentForce(player_id); }, "INSERT INTO guild_comment(guild_id, name, notice, content, time) VALUES(%u, '%s', %d, '%s', NOW())", m_data.guild_id, ch->GetName(), (str[0] == '!') ? 1 : 0, text); } Use std::function instead of any_function
    1 point
  5. ********** The bug is fixed. Well, if you want fix this "Phantom Unknown packet error" You need to disable "F?CKING _IMPROVED_PACKET_ENCRYPTION_ " :3 then, you will fix buffer overflow ? Thank you all those who gave answers.
    1 point
  6. Old but gold, thank you for publishing. ?
    1 point
  7. It isn't that great, but maybe will help someone: quest teleportation_ring begin state start begin when 70007.use begin say_title(item_name(70007)) say("") say("Alege unde vrei sã te teleportezi:") say("") local option = select("Teritorile comune", "Teritorile regatului", "Teritorile inamice", "Închide") if option == 4 then return elseif option == 1 then say_size(350, 380) say_title(item_name(70007)) local map = pc.get_map_index() local level = pc.get_level() local empire = pc.get_empire() local cost = math.floor(pc.get_level()*1000) if map == 181 or map == 182 or map == 183 then cost = 0 end if level < 10 then say("Hm... Cu nivelul actual,eºti încã[ENTER]prea slab pentru cãlãtorie în timp ºi spatiu.[ENTER]Vino înapoi atunci când sunteþi mai mari decât[ENTER]level 10. ") return end say("În cazul în care vrei sã fi teleportat? ") say_reward(string.format("Aceasta va costa %s Yang. ", cost)) say("") local guild_map_names = {"Jungrang", "Waryong", "Imha"} local guild_map_name = guild_map_names[empire] local sub_set = 0 if level < 30 then sub_set = select(guild_map_name, "Valea Seungryong(Lv.30)", "Deºertul Yongbi(Lv.35)", "Muntele Sohan(Lv.45)", "Închide") if sub_set == 5 then return end elseif level >= 30 and level < 45 then sub_set = select(guild_map_name, "Valea Seungryong(Lv.30)", "Deºertul Yongbi(Lv.35)", "Muntele Sohan(Lv.45)", "Temniþa pãianjenilor(Lv.50)", "Închide") if sub_set == 6 then return end elseif level >= 45 and level < 60 then sub_set = select(guild_map_name, "Valea Seungryong(Lv.30)", "Deºertul Yongbi(Lv.35)", "Muntele Sohan(Lv.45)", "Temniþa pãianjenilor(Lv.50)", "Turnul Demonilor(Lv.40)", "Închide") if sub_set == 7 then return end elseif level >= 60 and level < 70 then sub_set = select(guild_map_name, "Valea Seungryong(Lv.30)", "Deºertul Yongbi(Lv.35)", "Muntele Sohan(Lv.45)", "Temniþa pãianjenilor(Lv.50)", "Turnul Demonilor(Lv.40)", "Doyyumhwan(Lv.55)", "Pãdurea stafiilor(Lv.60)", "Închide") if sub_set == 9 then return end elseif level >= 70 and level < 75 then sub_set = select(guild_map_name, "Valea Seungryong(Lv.30)", "Deºertul Yongbi(Lv.35)", "Muntele Sohan(Lv.45)", "Temniþa pãianjenilor(Lv.50)", "Turnul Demonilor(Lv.40)", "Doyyumhwan(Lv.55)", "Pãdurea stafiilor(Lv.60)", "Tãrâmul Giganþilor(Lv.70)", "Pãdurea Roºie(Lv.70)", "Închide") if sub_set == 11 then return end elseif level >= 75 then sub_set = select(guild_map_name, "Valea Seungryong(Lv.30)", "Deºertul Yongbi(Lv.35)", "Muntele Sohan(Lv.45)", "Temniþa pãianjenilor(Lv.50)", "Turnul Demonilor(Lv.40)", "Doyyumhwan(Lv.55)", "Pãdurea stafiilor(Lv.60)", "Tãrâmul Giganþilor(Lv.70)", "Pãdurea Roºie(Lv.70)", "Grota Exilului(Lv.75)", "Închide") if sub_set == 12 then return end end if pc.get_gold() < cost then say_title(item_name(70007)) say("") say("Nu ai suficient yang.") say("") return end if pc.can_warp() == false then say("") say("Nu te poþi teleporta acum.") say("") return end pc.change_gold(-cost) local warplist = { {{135600, 4300}, {179500, 1000}, {271800, 13000},}, {{402100, 673900}, {270400, 739900}, {321300, 808000},}, {{217800, 627200}, {221900, 502700}, {344000, 502500},}, {{434200, 290600}, {375200, 174900}, {491800, 173600},}, {{60000, 496200}, {60000, 496200}, {60000, 496200},}, {{590500, 110500}, {590500, 110500}, {590500, 110500},}, {{599400, 756300}, {597800, 622200}, {730700, 689800},}, {{288400, 5800}, {288400, 5800}, {288400, 5800},}, {{828400, 763500}, {828400, 763500}, {828400, 763500},}, {{1119900, 70800}, {1119900, 70800}, {1119900, 70800},}, {{284300, 810000}, {284300, 810000}, {284300, 810000},}, } say_title(item_name(70007)) say("") say("Imediat vei fi teleportat...") say("") wait() pc.warp(warplist[sub_set][empire][1], warplist[sub_set][empire][2]) elseif option == 2 then local empire = pc.get_empire() local cost = math.floor(pc.get_level()*500) say_title(item_name(70007)) say("") say("În cazul în care vrei sã fi teleportat? ") say("") say_reward(string.format("Aceasta va costa %s Yang. ", cost)) say("") local sub_set2 = 3 if empire == 1 then sub_set2 = select("Satul Yongan", "Satul Yayang", "Biologul regatului", "Închide") elseif empire == 2 then sub_set2 = select("Satul Joan", "Satul Bokjung", "Biologul regatului", "Închide") elseif empire == 3 then sub_set2 = select("Satul Pyungmoo", "Satul Bakra", "Biologul regatului", "Închide") end if sub_set2 != 4 then if pc.can_warp() == false then say("") say("Nu te poþi teleporta acum.") say("") return end if pc.get_gold() < cost then say_title(item_name(70007)) say("") say("Nu ai suficient yang.") say("") return elseif sub_set2 == 1 then pc.changegold(-cost) say_title(item_name(70007)) say("") say("Imediat vei fi teleportat...") say("") wait() if empire == 1 then pc.warp(474300, 954800) elseif empire == 2 then pc.warp(63800, 166400) elseif empire == 3 then pc.warp(959900, 269200) end elseif sub_set2 == 2 then pc.changegold(-cost) say_title(item_name(70007)) say("") say("Imediat vei fi teleportat...") say("") wait() if empire == 1 then pc.warp(353100, 882900) elseif empire == 2 then pc.warp(145500, 240000) elseif empire == 3 then pc.warp(863900, 246000) end elseif sub_set2 == 3 then pc.changegold(-cost) say_title(item_name(70007)) say("") say("Imediat vei fi teleportat...") say("") wait() if empire == 1 then pc.warp(498500, 957000) elseif empire == 2 then pc.warp(89300, 182300) elseif empire == 3 then pc.warp(951100, 233400) end end end elseif option == 3 then local empire = pc.get_empire() local cost = math.floor(pc.get_level()*2000) say_title(item_name(70007)) say("") say("În cazul în care vrei sã fi teleportat? ") say("") say_reward(string.format("Aceasta va costa %s Yang. ", cost)) say("") if pc.get_empire() == 1 then sub_set = select("Satul Joan", "Satul Pyungmoo", "Închide") elseif pc.get_empire() == 2 then sub_set = select("Satul Yongan", "Satul Pyungmoo", "Închide") elseif pc.get_empire() == 3 then sub_set = select("Satul Yongan", "Satul Joan", "Închide") end if sub_set == 3 then return elseif sub_set == 1 then say_title(item_name(70007)) say("") if pc.get_gold() < cost then say("Nu ai suficient yang.") say("") return end if pc.can_warp() == false then say("") say("Nu te poþi teleporta acum.") say("") return end say("Imediat vei fi teleportat...") say("") wait() pc.change_gold(-cost) if pc.get_empire() == 1 then pc.warp(63800, 166400) elseif pc.get_empire() == 2 then pc.warp(474300, 954800) elseif pc.get_empire() == 3 then pc.warp(474300, 954800) end elseif sub_set == 2 then say_title(item_name(70007)) say("") if pc.get_gold() < cost then say("Nu ai suficient yang.") say("") return end if pc.can_warp() == false then say("") say("Nu te poþi teleporta acum.") say("") return end say("Imediat vei fi teleportat...") say("") wait() pc.change_gold(-cost) if pc.get_empire() == 1 then pc.warp(959900, 269200) elseif pc.get_empire() == 2 then pc.warp(959900, 269200) elseif pc.get_empire() == 3 then pc.warp(63800, 166400) end end end end end end
    1 point
  8. M2 Download Center Download Here ( Internal ) Always this stone bridge in shinsoo annoyed me, this is his amendment Download: [Hidden Content]
    1 point
  9. Ok so this might sound weird. As you know C++1z (17) is out there for a while now and I decided to convert a source code from C++14 to C++1z. The reason is that I am using libs directly from the system and Crypto++ 7 can be used only in C++1z. But when I'm building the game, I'm getting this error: guild.cpp:630:39: error: no member named 'bind1st' in namespace 'std' DBManager::instance().FuncQuery(std::bind1st(std::mem_fun(&CGuil... ~~~~~^ guild.cpp:630:52: error: no member named 'mem_fun' in namespace 'std' DBManager::instance().FuncQuery(std::bind1st(std::mem_fun(&CGuil... ~~~~~^ guild.cpp:635:39: error: no member named 'bind1st' in namespace 'std' DBManager::instance().FuncQuery(std::bind1st(std::mem_fun(&CGuil... ~~~~~^ guild.cpp:635:52: error: no member named 'mem_fun' in namespace 'std' DBManager::instance().FuncQuery(std::bind1st(std::mem_fun(&CGuil... ~~~~~^ guild.cpp:638:39: error: no member named 'bind1st' in namespace 'std' DBManager::instance().FuncQuery(std::bind1st(std::mem_fun(&CGuil... ~~~~~^ guild.cpp:638:52: error: no member named 'mem_fun' in namespace 'std' DBManager::instance().FuncQuery(std::bind1st(std::mem_fun(&CGuil... ~~~~~^ guild.cpp:768:39: error: no member named 'bind1st' in namespace 'std' DBManager::instance().FuncQuery(std::bind1st(std::mem_fun(&CGuil... ~~~~~^ guild.cpp:768:52: error: no member named 'mem_fun' in namespace 'std' DBManager::instance().FuncQuery(std::bind1st(std::mem_fun(&CGuil... ~~~~~^ guild.cpp:1023:54: error: no member named 'bind1st' in namespace 'std' DBManager::instance().FuncAfterQuery(void_bind(std::bind1st(std:... ~~~~~^ guild.cpp:1023:67: error: no member named 'mem_fun' in namespace 'std' DBManager::instance().FuncAfterQuery(void_bind(std::bind1st(std::mem_fun... ~~~~~^ guild.cpp:1235:62: error: no member named 'bind1st' in namespace 'std' for_each(m_memberOnline.begin(), m_memberOnline.end(), std::bind... ~~~~~^ guild.cpp:1235:75: error: no member named 'mem_fun_ref' in namespace 'std' ...m_memberOnline.end(), std::bind1st(std::mem_fun_ref(&CGuild::SendSkillIn... ~~~~~^ guild.cpp:1494:64: error: no member named 'bind1st' in namespace 'std' ...for_each(m_memberOnline.begin(), m_memberOnline.end(), std::bind1st(std:... ~~~~~^ guild.cpp:1494:77: error: no member named 'mem_fun_ref' in namespace 'std' ...m_memberOnline.end(), std::bind1st(std::mem_fun_ref(&CGuild::SendSkillIn... ~~~~~^ guild.cpp:1525:67: error: no member named 'bind1st' in namespace 'std' ...for_each(m_memberOnline.begin(), m_memberOnline.end(), std::bind1st(std:... ~~~~~^ guild.cpp:1525:80: error: no member named 'mem_fun' in namespace 'std' ...m_memberOnline.end(), std::bind1st(std::mem_fun(&CGuild::SendGuildInfoPa... ~~~~~^ 16 errors generated. I did some research and found out that not only bind1st (renamed to bind) and mem_fun (renamed to mem_fn) are deprecated, but mem_fun_ref is completely gone from this revision. So I'm here now asking the community. Is there an alternative to this code? How can it be achieved? What needs to be changed? If it helps, here is guild.cpp: Any post is deeply appreciated.
    0 points
  10. v zivote se nic nenaucis, kdyz tady budes porad spamovat s dotazama co nekdy zkusit zapojit mozek
    0 points
×
×
  • 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.