Jump to content

ridetpro

Banned
  • Posts

    106
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Everything posted by ridetpro

  1. Try to paste the ConvertPackFilename intro the EterPack.cpp namespace. It should works
  2. // Open EterPack folder //Find inline.h // And paste this std::string ConvertPackFilename(const std::string& name) { std::string ret; std::transform(name.begin(), name.end(), std::back_inserter(ret), [](char ch) { if (ch == '\\') return '/'; else return (char)tolower(ch); }); return ret; } I apologize for so many replies, I wrote these codes a long time ago. So I forgot all the code dependencies.
  3. // PythonNetworkStreamModule.cpp PyObject* netSendVersionPacket(PyObject* poSelf, PyObject* poArgs) { CPythonNetworkStream &rkNetStream = CPythonNetworkStream::Instance(); rkNetStream.SendClientVersionPacket(); return Py_BuildNone(); } // static PyMethodDef s_methods[] = { "SendVersionPacket", netSendVersionPacket, METH_VARARGS }, This function have no argument, it will just send the version from this function. bool CPythonNetworkStream::SendClientVersionPacket() // this line strncpy(kVersionPacket.timestamp, 1111111, sizeof(kVersionPacket.timestamp) - 1); // 111111 IS THE CLIENT VERSION Do you want a function in python Like this ? net.SendClientVersionPacket(123456)
  4. // Intro pc_mount function from questlua_pc.cpp // Under LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); // Add int CalcLastMoveSec = (get_dword_time() - ch->GetLastMountTime()) / 1000 + 0.5; if (CalcLastMoveSec < 1) // Replace 1 with seconds number. { return 0; } Do same for unmount function intro questlua_pc
  5. Enumeration must be identical in client / server / SQL/ dump_proto Example of a wrong enumeration OF source. enum Server : std::uint8_t { POINT_WOLFMAN, // OK POINT_WARRIOR, // OK } enum Client : std::uint8_t { POINT_WARRIOR, // WRONG POINT_WOLFMAN, // WRONG } Example of a correct enumeration. enum Server : std::uint8_t { POINT_WOLFMAN, // OK POINT_WARRIOR, // OK } enum client : std::uint8_t { POINT_WOLFMAN, // OK POINT_WARRIOR, // OK } Read more about how enum works here. [Hidden Content] Most likely, I think you fucked the dump_proto enumerations. Example of wrong dump_proto enumeration. //Dump_proto int get_Item_ApplyType_Value(string inputString) { string arApplyType[] = { "APPLY_WOLFMAN", // ok "APPLY_BLEEDING", // ok }; int retInt = -1; // ProtoReader.cpp int get_Item_ApplyType_Value(std::string inputString) { std::string arApplyType[] = { "APPLY_BLEEDING", // wrong "APPLY_WOLFMAN", // wrong }; int retInt = -1; Check also the SQL enumeration order, from item_attr
  6. //Add this at top of the EterPack.cpp namespace bfs = boost::filesystem; namespace { bool is_ymir(const bfs::path& p) { auto it = p.begin(); if (it == p.end() || *it != "d:") return false; ++it; if (it == p.end()) return false; if (*it == "/" || *it == "\\") ++it; if (it == p.end() || *it != "ymir work") return false; return true; } }; //Intro bool CEterPack::Put //Add bfs::path packpath = ConvertPackFilename(filename); if (!is_ymir(packpath) && !packpath.is_relative()) return false;
  7. case HEADER_CG_CLIENT_VERSION: Version(d->GetCharacter(), c_pData); break; default: sys_err("login phase does not handle this packet! header %d", bHeader); d->SetPhase(PHASE_CLOSE); return (0); } return (iExtraLen); } Create a new case, below. Identifies the 66th packet and add an empty case.
  8. Python developers no longer support python2.7 Most likely, this is a bug that will never be solved because it no longer creates patches for bug fixes. [Hidden Content] [Hidden Content]
  9. Please make a GIF/Video to show how your problem manifest.
  10. char szQuery[QUERY_MAX_LEN]; snprintf(szQuery, sizeof(szQuery), "SELECT infernus FROM player.player WHERE name='%s'", GetName()); std::unique_ptr<SQLMsg> pSelectMsg(DBManager::instance().DirectQuery(szQuery); SQLResult* pRes = pSelectMsg->Get(); if (pRes->uiNumRows > 0) { MYSQL_ROW row = mysql_fetch_row(pRes->pSQLResult); DWORD GetVal = 0; str_to_number(GetVal, row[0]); ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Total count is %d"), GetVal); } It should work now.
  11. std::unique_ptr<SQLMsg> pSelectMsg(DBManager::instance().DirectQuery("SELECT infernus FROM player.player WHERE name='%s'", GetName()); BYTE count = pSelectMsg->Get()->uiNumRows; if (count >= 3) ChatPacket(CHAT_TYPE_INFO,"Total count is %d", count);
  12. Is not that normal? When an item with type ITEM_RING reaches 0, it automatically unequip. If you want a good answer, ask a good question.
  13. // item.cpp // void CItem::StartUniqueExpireEvent() // Under bool CItem::IsItemUsedTime() { return m_pkRealTimeExpireEvent != nullptr; } // item.h // void StartRealTimeExpireEvent(); // Under bool IsItemUsedTime(); case ITEM_RING: { if (item->IsItemUsedTime() and item->IsEquipped()) { UnequipItem(item); } } break; Not tested
  14. So if you have an equipped item that has a time limit, do you want that item to automatically unequip when time reaches 0?
×
×
  • 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.