Jump to content

Sanchez

Premium
  • Posts

    576
  • Joined

  • Days Won

    43
  • Feedback

    0%

Everything posted by Sanchez

  1. Use MD5: import hashlib def Something(self, plainText): return hashlib.md5(plainText).hexdigest() Or if you want to decrypt it too, just use base64. It's basic, but probably enough.
  2. Great idea, but this won't be a cleaner way? int party_spouse_in_party(lua_State* L) { // Get the current character const LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); // Something went wrong, character does not exist if (!ch) { lua_pushboolean(L, false); return 1; } // I'm not in party if (!ch->GetParty()) { lua_pushboolean(L, false); return 1; } // Get my marriage partner const LPCHARACTER tch = ch->GetMarryPartner(); // I don't have marriage partner if (!tch) { lua_pushboolean(L, false); return 1; } // My spouse is not in party if (!tch->GetParty()) { lua_pushboolean(L, false); return 1; } // We are not on the same map if (tch->GetMapIndex() != ch->GetMapIndex()) { lua_pushboolean(L, false); return 1; } // We are not in the same party if (!ch->GetParty()->IsMember(tch->GetPlayerID())) { lua_pushboolean(L, false); return 1; } lua_pushboolean(L, true); return 1; }
  3. Sure It's possible. // Get the current character LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); // Something wen't wrong, character does not exist if (!ch) { // Push back -1 to the quest, which means there was an error lua_pushnumber(L, -1); return 1; } // Character don't have desc if (!ch->GetDesc()) { // Push back -1 to the quest, which means there was an error lua_pushnumber(L, -1); return 1; } // Execute the query std::auto_ptr<SQLMsg> msg(DBManager::instance().DirectQuery("SELECT something FROM account.account WHERE id = %lu", ch->GetDesc()->GetAccountTable().id)); // Something was wrong with the query if (msg->Get()->uiNumRows <= 0 || msg->uiSQLErrno != 0) { // Push back -1 to the quest, which means there was an error lua_pushnumber(L, -1); return 1; } // Create a new lua table lua_newtable(L); // Row will contains the current line of data MYSQL_ROW row; // Lua indexing starts from 1, so the first index of the array should be 1 int idx = 1; // value contains the data of current field int value = 0; // While we have available data while ((row = mysql_fetch_row(msg->Get()->pSQLResult))) { if (!row[0]) continue; // Push the index to the table lua_pushnumber(L, idx); // Convert the data of the field to number str_to_number(value, row[0]); // Push the data to the table lua_pushnumber(L, value); // We are pushing back a one dimensional array, so set the index of the table to -3 lua_settable(L, -3); // Add +1 to the index idx++; } return 1;
  4. 1. Navigate to externcryptopp and open cryptest.sln 2. Set the target toolset of the projects to v120, if it's not that by default 3. Rebuild the solution in Debug & Release mode, because you need both.
  5. I watched Whiplash in the night and it was great.
  6. Yes, because you just copied everything to game.py without replacing the spaces with tabs. Search for "mds" and insert the correct tabs.
  7. You have syntax errors everywhere, in python you have to use [TAB] instead of [sPACE]
  8. I moved your topic to the correct section: Metin2 -> Services -> Searching
  9. I recommend you to choose between these: [Hidden Content]
  10. There are no backdoors in these branches, but if you purchase a VIP membership you'll be able to access to a non-public section where you can find the currently known exploits with fixes. It's not that expensive, so if you're going to make a server I highly recommend you to purchase it.
  11. You're looking for the TextTail in PythonTextTail.cpp, just duplicate the already exist guild, align or the character name tails.
  12. Nobody will able to solve your problem without more informations, but why don't you debug it?
  13. g_start_position contains the positions: DWORD g_start_position[4][2] = { { 0, 0 }, { 469300, 964200 }, // Red { 55700, 157900 }, // Yellow { 969600, 278400 } // Blue };
  14. It looks one or more of your libs has been compiled with an another version of compiler, rebuild all them, including crypto++ with the same version.
  15. void RemoveAffectInMap(const long lMapIndex, const DWORD dwAffect) { if (lMapIndex) { const DESC_MANAGER::DESC_SET & c_ref_set = DESC_MANAGER::instance().GetClientSet(); std::for_each(c_ref_set.begin(), c_ref_set.end(), aff_remove_func(lMapIndex, dwAffect)); } } struct aff_remove_func { const long m_lMapIndex; const DWORD m_dwAffect; aff_remove_func(const long lMapIndex, const DWORD dwAffect) : m_lMapIndex(lMapIndex), m_dwAffect(dwAffect) { } void operator () (LPDESC d) { if (!d) return; LPCHARACTER ch; if (!(ch = d->GetCharacter())) return; if (ch->GetMapIndex() == m_lMapIndex && ch->FindAffect(dwAffect)) ch->RemoveAffect(dwAffect); } };
  16. As first argument you have to pass the type of the window.
×
×
  • 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.