Jump to content

Sanchez

Premium
  • Posts

    576
  • Joined

  • Days Won

    43
  • Feedback

    0%

Everything posted by Sanchez

  1. TPacketGCGuild sends the GUILD_SUBHEADER_GC_WAR and the size of the TPacketGCGuildWar. TPacketGCGuildWar contains the ID of the guild, ID of the opponent guild, the state (request, war start, etc...) and the type of the war. If the user receive a request, it contains GUILD_WAR_RECV_DECLARE as state.
  2. Same here, I watched The Interview in the night.
  3. Are you really can't find a file in a folder? Use the top right search bar in Windows.
  4. Sure it is, what kind of question is this? Exe build by Code blocks is almost 57 times larger than the same code build by Visual studio
  5. You trying to append a string to an int which is not allowed. str(float(PetProcentExp[:PetProcentExp.find('.')+3])) + "%"
  6. [Hidden Content] Or just split it: test = "3.78889564646" float(test[:test.find('.')+3])
  7. Much cleaner then adding all of this to an already existing file.
  8. Here it is with text file if someone still interested: item_block.cpp: #include "stdafx.h" #include "item_block.h" #include <fstream> #include <sstream> CItemBlock::CItemBlock(void) { } CItemBlock::~CItemBlock(void) { } void CItemBlock::Process(void) { std::string strMapIndex; std::string strItemVnums; std::ifstream File("blocked_items.txt"); if (!File.is_open()) return; if (!m_map_BlockedItems.empty()) m_map_BlockedItems.clear(); while (!File.eof()) { File >> strMapIndex >> strItemVnums; std::string strItemVnum; std::istringstream Vnums(strItemVnums); while (std::getline(Vnums, strItemVnum, ',')) { AddItem(strtoul(strMapIndex.c_str(), NULL, 10), strtoul(strItemVnum.c_str(), NULL, 10)); } } File.close(); } void CItemBlock::AddItem(const long lMapIndex, const DWORD dwVnum) { if (lMapIndex < 0 || dwVnum < 0) return; m_map_BlockedItems.insert(std::make_pair(lMapIndex, dwVnum)); } void CItemBlock::RemoveItem(const long lMapIndex, const DWORD dwVnum) { if (lMapIndex < 0 || dwVnum < 0) return; for (BLOCKED_ITEMS::const_iterator it = m_map_BlockedItems.begin(); it != m_map_BlockedItems.end() { if (it->first == lMapIndex && it->second == dwVnum) it = m_map_BlockedItems.erase(it); else ++it; } } bool CItemBlock::CanUseItem(const long lMapIndex, const DWORD dwVnum) const { for (BLOCKED_ITEMS::const_iterator it = m_map_BlockedItems.begin(); it != m_map_BlockedItems.end() { if (it->first == lMapIndex && it->second == dwVnum) return false; } return true; } item_block.h: #ifndef __ITEM_BLOCK #define __ITEM_BLOCK class CItemBlock : public singleton<CItemBlock> { public: CItemBlock(); ~CItemBlock(); void Process(void); bool CanUseItem(const long lMapIndex, const DWORD dwVnum) const; void AddItem(const long lMapIndex, const DWORD dwVnum); void RemoveItem(const long lMapIndex, const DWORD dwVnum); private: typedef std::multimap<long, DWORD> BLOCKED_ITEMS; BLOCKED_ITEMS m_map_BlockedItems; }; #endif /* __ITEM_BLOCK */ - Item can be removed runtime by using the RemoveItem(map_index, item_vnum) function. - Item can be added runtime by using the AddItem(map_index, item_vnum) function - To load or reload the txt file use the Process() function Example of the TXT file: 50 120229,252391 51 10000,20000 52 43232
  9. It looks you have a Ramnit virus which affect every executable and dll file.
  10. Change the type of the target item to ITEM_RING (33).
  11. I don't know what "costum_pack" is, but you can't unpack the official type 4 protected files with the normal extractors. Take a look this topic for more informations.
  12. No, you shouldn't do anything in the SDK. Just search for "CTOA" in root, locale, uiscript and remove them from everywhere.
  13. Remove the CTOA usings from root, uiscript, locale. Easily do the opposite of this.
  14. You can do it easily, I just don't get the point of it. Call this in your binary: PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "GetTest", Py_BuildValue("()")); Make a "GetTest" function in game.py: def GetTest(self): net.SetTest(constInfo.Test)Add the receiver function to your binary: object* netSetTest(PyObject* poSelf, PyObject* poArgs) { char* szTest; if (!PyTuple_GetString(poArgs, 0, &szTest)) return Py_BuildException(); // Do something with szTest return Py_BuildNone(); } I'm sure there is a better way to solve your problem, so please explain what you want to do.
  15. I don't see any error there. What happens when you're trying to login?
  16. After this: if (iExtraLen < 0) { sys_err("invalid packet length (len %d size %u buffer %u)", iExtraLen, pinfo->wSize, uiBytes); ch->GetDesc()->SetPhase(PHASE_CLOSE); return -1; }
  17. It allows to write just 3 private messages per second.
  18. Write your own: bool PyTuple_GetLongLong(PyObject* poArgs, int pos, long long* ret) { if (pos >= PyTuple_Size(poArgs)) return false; PyObject * poItem = PyTuple_GetItem(poArgs, pos); if (!poItem) return false; *ret = PyLong_AsLongLong(poItem); return true; }
×
×
  • 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.