ridetpro
-
Posts
106 -
Joined
-
Last visited
-
Days Won
1 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by ridetpro
-
-
Acum 13 minute, bumxd a spus:
// 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.
- 1
-
// 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)
-
On 7/17/2018 at 4:56 PM, bumxd said:
#include <boost/filesystem.hpp>
-
// 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
-
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. https://en.cppreference.com/w/cpp/language/enum
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
- 2
-
//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;
-
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.
- 1
- 1
-
Acum 38 minute, bumxd a spus:
Hello, after last update packets windows 10, the function python is os.listdir don't work, give error what can't find directory.. but on other version windows all perfect works. So for which function can change os.listdir?
P.s I want does white list all files from client, and check files in client folder, if have file which don't have in white list then delete this file. And without function os.listdir I don't know how does this.. have anybody idea?
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.https://www.saltycrane.com/blog/2010/04/options-listing-files-directory-python/
- 1
-
Acum 58 minute, Fazer a spus:
where i will seach it?
Inside the quest.
-
Please make a GIF/Video to show how your problem manifest.
-
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.
- 2
-
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);
- 2
-
1 oră în urmă, Tallywa a spus:
!now i cant equip because i unequip automatic
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.
-
// 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
-
So if you have an equipped item that has a time limit, do you want that item to automatically unequip when time reaches 0?
fix
in Community Support - Questions & Answers
Posted · Edited by Metin2 Dev
Core X - External 2 Internal
Try to paste the ConvertPackFilename intro the EterPack.cpp namespace. It should works