Jump to content

Ken

Inactive Member
  • Posts

    726
  • Joined

  • Last visited

  • Days Won

    44
  • Feedback

    0%

Everything posted by Ken

  1. This is clearly unsecure code! What happens if the result of ch->GetInventoryItem(bCell) == nullptr? If that is the case, then you can't execute it like a pointer! Between those two lines you'd add: if(nullptr == item) return; Note that this also already exists in another form: if(!item) return; But it's just too late. You'd have those lines right after you initialize the item variable. Also.. Why are you using malloc when we're in c++? You'd change: char * yeni = (char*) malloc(1+ strlen(item_id) + strlen(engel)); to: char* yeni = new char(1 + strlen(item_id) + strlen(engel)); Also don't forget to run free() (c) or delete[] (c++) on dynamically allocated variables. In your case: free(yeni); Ooor when you use the c++ method: delete[] yeni; But you'd also forget the char chaos if we have strings here. std::string yeni = str(item_id); yeni.copy(engel); That'll also do and you won't have to deal with free() or delete[]. So. What should you do? I suggest you to first move the check if your item pointer is a nullptr above your code so your program doesn't crash. Then you'd fix up the mess with your dynamic allocated memory with your char*. Otherwise you'll soon have memory corruption if you don't free the memory or use strings. After that, please check if the error still persists ​i tried this nullptr but i cant compile game nullptr not declaredi changed nullptr to NULL is it right? and i'll use this code : if(item->GetType() == ITEM_WEAPON || item->GetType() == ITEM_ARMOR || item->GetType() == ITEM_BELT ) { DWORD item_idd = item->GetID(); char item_id[1000]; sprintf(item_id, "%d", item_idd); const char * engel = ".Engel"; // char * yeni = (char *) malloc(1 + strlen(item_id)+ strlen(engel) ); char* yeni = new char(1 + strlen(item_id) + strlen(engel)); strcpy(yeni, item_id); strcat(yeni, engel); if(item_idd != NULL and yeni != "\n" and item_id != "\n") { if (int(quest::CQuestManager::instance().GetEventFlag(yeni)) == 1) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("item_engel")); delete[] yeni; return; } } } ​What the? I wanted to leave programming language right now. Please don't code those things. if (item->GetType() == ITEM_WEAPON || item->GetType() == ITEM_ARMOR || item->GetType() == ITEM_BELT) { char szEventFlag[30]; snprintf(szEventFlag, sizeof(szEventFlag), "%lu.Engel", item->GetID()); if (*szEventFlag) { if (quest::CQuestManager::instance().GetEventFlag(szEventFlag)) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("item_engel")); return; } } } Kind Regards Ken
  2. ​I found for english and german. I need to other languages thanks for comment.
  3. Everything is ok but why are you try to call functions from external? It was a little bit strange. What ever thanks for share. // Edit I don't like part of serverside. I wait good things from ymir/webzen games. That's my function for this. void CInputMain::Hack(LPCHARACTER ch, const char * c_pData) { TPacketCGHack * p = (TPacketCGHack *)c_pData; if (ch && ch->GetDesc()) { sys_log(0, "HACK REPORT SENT BY %s", ch->GetName()); LogManager::instance().HackLog(p->szBuf, ch); } } Kind Regards Ken
  4. New stuff is contain speak. I would like to do this for all language if i can find. ​ ​Thanks i will re-name my topic again. If you can send me example, can be good for me. Thanks for reply
  5. I need to a woman's voice for my new stuff. English [+] Arabic [-] German [+] Italian [-] Spanish [-] French [-]
  6. PythonUtils.cpp If you are say something like i am programmer etc. you must already know those things. Of course i don't blame you about this. Some people may forget something sometime. Kind Regards Ken
  7. Last two packets can be wrong too. You must check packet struct size and packet id too. If system can't verify that packet from server, system will give error too. Kind Regards Ken
  8. Check the packet struct size and packet id too for server/client. If the system can't receive packet size exactly, system will give the error and it will be last two packets too. Sometime those packets can be wrong too. #TryHelpSomeone Kind Regards Ken
  9. Ken

    Just hi

    Yes some mmorpg is fun ^^ If you don't have any friend for play that mmorpg, that's not funny ​ ​One day i will try for someone
  10. Everyone recognize me with ellie name on this forum. Someone thought me like a girl Of course i am not. I only liked her behavious that's all. Soo, i am 19 years old I like to code something all time because c++ is like my life style. I don't like to play mmorpgs or some games. I prefer to develop these things all time. I found many friends on this forum. I would like to thank metin2dev community for create this forum. If i believe your sincerity, i can do everything for you
  11. 17 + 1 Of course i only making joke. You are good friend for me and i glad to read those things about you too
  12. Nothing is impossible. Don't forget this guys I can do what you want if you still want this. Kind Regards Ken
  13. Line:123 in pet_system.lua file:write("..PetName.."n1n0n") file:write(..PetName.."n1n0n") Kind Regards Ken
  14. It's already public current exploits on internet. P2P Exploit P2P Exploit fix ; I don't remember exactly all bugs. If you want to protect yourself server, you must look at all topics. Kind Regards Ken
  15. chr.RaceToSex(net.GetMainActorRace()) Python is always care something all time. Thanks for information. Kind Regards Ken
  16. Python form ; import playerSettingModule import net def IsFemale(raceIndex): if (playerSettingModule.RACE_WARRIOR_W == raceIndex or playerSettingModule.RACE_ASSASSIN_W == raceIndex or playerSettingModule.RACE_SURA_W == raceIndex or player.SettingModule.RACE_SHAMAN_W == raceIndex): return True else: return False def IsMale(raceIndex): if (playerSettingModule.RACE_WARRIOR_M == raceIndex or playerSettingModule.RACE_ASSASSIN_M == raceIndex or playerSettingModule.RACE_SURA_M == raceIndex or player.SettingModule.RACE_SHAMAN_M == raceIndex or playerSettingModule.RACE_WOLFMAN_M == raceIndex): return True else: return False ## Use race = net.GetMainActorRace() print(IsMale(race)) Kind Regards Ken
  17. I edited your some functions. Meanwhile congrulations int console_sys_err(lua_State * L) { if (!lua_isstring(L, 1)) return 1; const char * reason = lua_tostring(L, 1); sys_err(reason); return 0; } int console_sys_log(lua_State * L) { if (!lua_isnumber(L, 1) || !lua_isstring(L, 2)) return 1; BYTE bLevel = lua_tonumber(L, 1); if (bLevel >= 0 && bLevel <= 3) { const char * reason = lua_tostring(L, 2); sys_log(bLevel, reason); return 0; } return 1; } int console_file_backup(lua_State * L) { if (!lua_isstring(L, 1) || !lua_isstring(L, 2)) return 1; char szCommand[512]; snprintf(szCommand, sizeof(szCommand), "tar -u -a -f %s %s", lua_tostring(L, 2), lua_tostring(L, 1)); system(szCommand); return 0; } Kind Regards Ken
  18. Probably db can't read unknown things. Like Cataclismo said. Read your syserr you will find the error. Kind Regards Ken
  19. I guess system is use MINMAX for this. You can do /setsk 1 500. (Maximum will be 40) I didn't understand why is the people like do these things Kind Regards Ken
  20. Are you using this function in quest or are you calling this function from questlib.lua? questlib.lua ; local pc = pc or {} function pc.chat(text) print(text) end quest : quest test begin state start begin function chat(text) syschat(text) end when 9001.chat."Test me" begin setskin(NOWINDOW) test.chat("Mrlibya") end end end - How can you check your function is work or not? It's too simple. You can put breakpoint. So you can do like that ; function get_attr_armor_table() if (attr_wizerd.attr_armor_info != nil) then chat("attr_wizerd.attr_armor_info is not nil.") return attr_wizerd.attr_armor_info else chat("attr_wizerd.attr_armor_info is nil.") return 0 end return 0 end Kind Regards Ken
  21. mhh is leave ymir entartaiment. I don't know new programmer names. You may right about this. Because old ymir is better than new one. Also you can't find ymir entertainment company in korea. Ymir & Webzen Games. Metin2 is try to develop itself again. They are update some packs sometime. New programmer is use 3ds max 2009. I guess old ymir is use 3ds max 2005. I don't remember as exactly. Everything may change but this is not mean update everything. Everyone is thinking metin2 going to sh*t. @Night is said something about this too. And I am only see one thing. That's gameforge is try all ways for earn more money from the players. Kind Regards Ken
  22. As FakedMan said. Many private server is read py files as c files from binary. That's mean you can't decrypt but this is not mean you can't copy some codes from that binary It was complicated but hopefully you are understand me very well I can open a tag about this. #ThereIsNoImpossible Kind Regards Ken
  23. NTP It will be good for you and your freebsd too. You may not set your second sometime I know that pain Kind Regards Ken
×
×
  • 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.