-
Posts
726 -
Joined
-
Last visited
-
Days Won
44 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Everything posted by Ken
-
I don't say this mine. You should be read something as carefull. Kind Regards Ken
-
print("use %s input_file output_file" % sys.argv[0]); Kind Regards Ken
-
import sys def rc4_crypt(data, key): S = list(range(256)) j = 0 out = [] for i in range(256): j = (j + S[i] + ord( key[i % len(key)] )) % 256 S[i] , S[j] = S[j] , S[i] i = j = 0 for char in data: i = ( i + 1 ) % 256 j = ( j + S[i] ) % 256 S[i] , S[j] = S[j] , S[i] out.append(chr(ord(char) ^ S[(S[i] + S[j]) % 256])) return ''.join(out) def dump_file(src, dst): src_file = open(src, 'rb') src_file.seek(16) file_content = src_file.read() src_file.close() if ord(file_content[0]) != 0x9F or ord(file_content[1]) != 0x54: print("Error: Not a valid Phase module") return decrypted_pe = rc4_crypt(file_content, "Phase") dst_file = open(dst, 'wb') dst_file.write(decrypted_pe) dst_file.close() if len(sys.argv) < 3: print("use %s input_file output_file" % sys.argv[0]); else: dump_file(sys.argv[1], sys.argv[2]) Description : Kind Regards Ken
-
int pet_is_mine(lua_State * L) { LPCHARACTER ch = CQuestManager::Instance().GetCurrentCharacterPtr(); LPCHARACTER npc = CQuestManager::Instance().GetCurrentNPCCharacterPtr(); CPetSystem * pPetSystem = ch->GetPetSystem(); if (!pPetSystem) { lua_pushboolean(L, false); return 0; } CPetActor * pPetActor = pPetSystem->GetByVID(npc->GetVID()); if (!pPetActor) { lua_pushboolean(L, false); return 0; } LPCHARACTER pet = pPetActor->GetCharacter(); if (!pet) { lua_pushboolean(L, false); return 0; } lua_pushboolean(L, pet->GetVID() == npc->GetVID()); return 1; } Kind Regards Ken
-
[c++] mob_drop_item.txt Reload Ingame
Ken replied to Risan's topic in Community Support - Questions & Answers
You're welcome. Kind Regards Ken -
[c++] mob_drop_item.txt Reload Ingame
Ken replied to Risan's topic in Community Support - Questions & Answers
You should destroy everything about mob_drop_item.txt.. your case ; case 'm': const int FILE_NAME_LEN = 256; char szMOBDropItemFileName[FILE_NAME_LEN]; snprintf(szMOBDropItemFileName, sizeof(szMOBDropItemFileName), "%s/mob_drop_item.txt", LocaleService_GetBasePath().c_str()); ITEM_MANAGER::Instance().DestroyMobDropItem(); if (!ITEM_MANAGER::Instance().ReadMonsterDropItemGroup(szMOBDropItemFileName)) { ch->ChatPacket(CHAT_TYPE_INFO, "Can not reload mob_drop_item.txt"); return; } ch->ChatPacket(CHAT_TYPE_INFO, "Reloaded mob_drop_item.txt!"); Edit 1: When you are kill game file, all tables will be reset. Because you are killed them. The method is work like that. Kind Regards Ken -
Extra information ; When your program is run via gdb and system give crash, gdb is stopped and show the line.. Kind Regards Ken
-
And one question. If this port is access to internet, why you are not try it by yourself?
-
It's localhost. more information about localhost Kind Regards Ken
-
[Problem] Gm Protection - Itens / Invitations
Ken replied to FuiObrigado's topic in Community Support - Questions & Answers
You should look codes via ida pro. I don't see this in r40k game files. Kind Regards ken -
Source with wolfman and all fixed?
Ken replied to iRETEMAG's topic in Community Support - Questions & Answers
I don't know other people about this but i am selling wolfman files & fixed files too. This is only my point at the moment. It's not need to discuss about this. Thanks Kind Regards Ken -
I think it was strange question. DB must open 15000 port for other channels and game99. This is not bug or something. Kind Regards Ken
-
I like to use smart pointers. That's better and clearly for me. #Edit 1 I added last query in function for check Thanks for comment. Kind Regards Ken
-
void CHARACTER::SetTitle(const char * c_szRankName) { if (!*c_szRankName) return; sys_log(0, "CHARACTER::SetTitle %s", c_szRankName); std::auto_ptr<SQLMsg> pMsg(DBManager::Instance().DirectQuery("UPDATE player.player SET title = '%s' WHERE id = %u",c_szRankName,GetPlayerID())); if (pMsg->Get()->uiAffectedRows == 0 || pMsg->Get()->uiAffectedRows == (uint32_t)-1) { sys_err("We can't update this[%s] player's title!",GetName()); return; } } struct colorTable { float r; float g; float b; float a; } ColorTable; typedef TR1_NS::unordered_map<std::string, colorTable> TitleRankColor; TitleRankColor m_map_titleRankColor; How to insert ? colorTable myTable = {}; myTable.r = 0.0f / 255.0f; myTable.g = 255.0f / 255.0f; myTable.b = 255.0f / 255.0f; myTable.a = 1.0f; m_map_titleRankColor.insert(TitleRankColor::value_type("FirstRank",myTable)); bool CHARACTER::IsPublicRank(const char * c_szName); { if (!*c_szName) return false; TitleRankColor::iterator it = m_map_titleRankColor.find(c_szName); if (it == m_map_titleRankColor.end()) return false; return true; } Check if rank is exist in map or not. Command from client ; ACMD (do_new_title_system) { if (!ch) return; char arg1[256]; one_argument(argument, arg1, sizeof(arg1)); if(!*arg1) { ch->ChatPacket(CHAT_TYPE_INFO, "usage new_title_system <rankname>"); return; } if (!ch->IsPublicRank(arg1)) { ch->ChatPacket(CHAT_TYPE_INFO, "This rank is not find!"); return; } ch->SetTitle(arg1); } Rest of them is easy.. #Edit 2 System is checking your query. If it's update or not. Added command. Added class. You must put these things in public like this ; class CMetin2Dev : public singleton<CMetin2Dev> { public: CMetin2Dev(); virtual ~CMetin2Dev(); struct colorTable { float r; float g; float b; float a; } ColorTable; typedef TR1_NS::unordered_map<std::string, colorTable> TitleRankColor; TitleRankColor m_map_titleRankColor; void SetTitle(const char * c_szName) bool IsPublicRank(const char * c_szName); } If you are put these things in private, your map will destroy from your file again and again Kind Regards Ken
-
[PROBLEM]Game Options After Teleport
Ken replied to Runah's topic in Community Support - Questions & Answers
When your character is warp to another map, system is re-loading everything again. you are probably find that in input_login.cpp Kind Regards Ken -
fix Proper 4th Inventory CExchange::CheckSpace function
Ken replied to Metin2 Dev's topic in Bug Fixes
Everyone is understand cbaran's function is not provide anything to you. I am only see one variable is defined in cpp file and any function or condition is not call this. Actually one thing is too strange (Everyone thank to him) Mostly people understand these codes doing nothing Btw thanks for share to us. Kind Regards Ken -
db novaline - start problem
Ken replied to Morphe's topic in Community Support - Questions & Answers
Why you are not look at your syserr file? Kind Regards Ken -
whats wrong with my granny version?
Ken replied to Seven's topic in Community Support - Questions & Answers
Granny is say target gr2 file is not a granny file. This may related via granny version. Metin2 is still use granny old version. World Of Metin2 is use granny 2.9 Kind Regards Ken -
You can send command to server via some function. I think he is mean Web-API functions for metin2. try to put return 0. (Developer..) Kind Regards Ken
-
These packs already decrypted and released on elitepvpers. But thanks for share us. @MrLibya ; You don't understand InyaProduction. InyaProduction is asking part of c++ (if you don't load item_scale.txt, system is not work correctly) Missing ; There is no part of c++ There is no part of python You should be open yourself eyes Kind Regards Ken
-
pkg install python
-
Good job. Kind Regards Ken
-
compile been game How to open?
Ken replied to MANYAK's topic in Community Support - Questions & Answers
Can you give support on this issue? [Hidden Content] -
compile been game How to open?
Ken replied to MANYAK's topic in Community Support - Questions & Answers
You can't decrypt compiled game file. You can see pseudocode codes via IDA Pro. Kind Regards Ken -
This is feature is not exist for europe anymore. Metin2 is only check your account name and your name. Kind Regards Ken