Jump to content

Yiv

Member
  • Posts

    160
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Yiv

  1. As a quest function this release is not really necessary. You can do this using the quest functions provided by the core by default. function checkItem(index, count) local partyMemberPids = table.pack(party.get_member_pids()) local invalid = false for _, pid in ipairs(partyMemberPids) do q.begin_other_pc_block(pid) if pc.count_item(index) < count then invalid = true end q.end_other_pc_block() if invalid then break end end return not invalid end function removeItem(index, count) local partyMemberPids = table.pack(party.get_member_pids()) for _, pid in ipairs(partyMemberPids) do q.begin_other_pc_block(pid) pc.remove_item(index, count) q.end_other_pc_block() end end By the way: The code optimization during compile time should know wether it's needed that the value returned by the operator is needed or not. If not the optimization should be aware of that and optimize the code in a way that both ways behave the same and therefore have no performance difference. Otherwise if it's needed, you're right of course and the pre-increment operator is better talking of performance but if you need it you won't have another way anyway and this does not matter. Regards
  2. Just try it. It may work without any changes. If not, then report it here and we'll see. Regards
  3. Both solutions should work fine. I think the solution posted by Socialized using the returned iterator by the erase method should be better. I at least would change my code posted above to this: void CQuestManager::CancelServerTimers(DWORD arg) { for (auto it = m_mapServerTimer.begin(); it != m_mapServerTimer.end(); /**/) { if (it->first.second != arg) { ++it; } else { auto event = it->second; event_cancel(&event); it = m_mapServerTimer.erase(it); } } } Regards
  4. Try to replace the CQuestManager::CancelServerTimers method in questmanager.cpp with this one: void CQuestManager::CancelServerTimers(DWORD arg) { for (auto it = m_mapServerTimer.begin(); it != m_mapServerTimer.end(); /**/) { if (it->first.second != arg) { ++it; } else { auto event = it->second; event_cancel(&event); m_mapServerTimer.erase(it++); } } } Regards
  5. He said that, because you say, it's simple but if you say that, you should be able to do that
  6. Hello LeNnT, I told you, that I wrote to ChuckNorris, and he deactivated your topic until the conflict of stealing parts of my code and selling as yours is solved. You can place your statement for this in a private message to me and Chuck. By the way, the system we're talking about is now released on elitepvpers by me: http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/3994360-rls-markierung-neu-gedroppter-items.html#post33936069 Regards
  7. ​Why did you add the new map LevelByVnum and not just implemented the CPythonNonPlayer::GetMobLevel(DWORD dwVnum) like this: BYTE CPythonNonPlayer::GetMobLevel(DWORD dwVnum) { const CPythonNonPlayer::TMobTable * c_pTable = GetTable(dwVnum); if (!c_pTable) return 0; return c_pTable->bLevel; } Regards
  8. There's no quest function for that, you'd have to make your own, something like this: // Syntax: npc.move(map_index, local x, local y) int npc_move(lua_State* L) { if (!lua_isnumber(L, 1) || !lua_isnumber(L, 2) || !lua_isnumber(L, 3)) { lua_pushboolean(L, FALSE); return 1; } LPCHARACTER pkNPC = CQuestManager::instance().GetCurrentNPCCharacterPtr(); if (!pkNPC) { lua_pushboolean(L, FALSE); return 1; } long lMapIndex = lua_tonumber(L, 1); long lX = lua_tonumber(L, 2); long lY = lua_tonumber(L, 3); LPSECTREE_MAP pkSectreeMap = SECTREE_MANAGER::instance().GetMap(lMapIndex); if (!pkSectreeMap) return 0; if (pkNPC->Goto(pkSectreeMap->m_setting.iBaseX + lX, pkSectreeMap->m_setting.iBaseY + lY)) { pkNPC->SendMovePacket(FUNC_WAIT, 0, 0, 0, 0); lua_pushboolean(L, TRUE); } else { lua_pushboolean(L, FALSE); } return 1; } IT'S UNTESTED! Regards
  9. What's about using PaymentWall in Germany? You have problems because of taxes? Can you register as a private person without any VAT-no.?
  10. Dear community, since some days we're noticing that our database core is crashing from time to time. The last relevant messages in syslog are these: Apr 8 11:59:33.728741 :: ITEM_AWARD: load id 0 login vnum 1966080000 count 6553600 socket 0 Apr 8 11:59:33.728788 :: SIGNAL: SIGSEGV Somebody knows where the problem is? Btw.: I checked player.item_award but there's no item with such a vnum... Regards
  11. Dear community, as I found out that there's an error in player.item_award (or not directly in it but the function of it) I wanted to ask if someone already fixed it? The error works as following: - Itemshop writes the item into player.item_award with a socket2 value (e.g. 300 for a unique item as 5 hours using time) - Player takes item but the socket2 is not written into player.item so the item doesn't have a use time (0 minutes) - Item purges If nobody fixed it maybe someone could fix it? Regards
  12. Dear community, from one day to an other (I didn't changed something related to that ) I receive a multiple definition error of functions/variables defined in the main.cpp. I don't know why :S OBJDIR/test.o: In function `ContinueOnFatalError()': /eos_src/game/src/test.cpp:66: multiple definition of `ContinueOnFatalError()' OBJDIR/main.o:/eos_src/game/src/main.cpp:159: first defined here OBJDIR/test.o: In function `ShutdownOnFatalError()': /eos_src/game/src/test.cpp:70: multiple definition of `ShutdownOnFatalError()' OBJDIR/main.o:/eos_src/game/src/main.cpp:183: first defined here OBJDIR/test.o: In function `heartbeat(heart*, int)': /eos_src/game/src/test.cpp:74: multiple definition of `heartbeat(heart*, int)' OBJDIR/main.o:/eos_src/game/src/main.cpp:242: first defined here OBJDIR/test.o: In function `Metin2Server_IsInvalid()': /eos_src/game/src/test.cpp:78: multiple definition of `Metin2Server_IsInvalid()' OBJDIR/main.o:/eos_src/game/src/main.cpp:364: first defined here OBJDIR/test.o: In function `start(int, char**)': /eos_src/game/src/test.cpp:102: multiple definition of `start(int, char**)' OBJDIR/main.o:/eos_src/game/src/main.cpp:699: first defined here OBJDIR/test.o: In function `main': /eos_src/game/src/test.cpp:118: multiple definition of `main' OBJDIR/main.o:/eos_src/game/src/main.cpp:444: first defined here OBJDIR/test.o: In function `__gthread_trigger': /usr/include/c++/4.2/bits/gthr-default.h:165: multiple definition of `max_bytes_written' OBJDIR/main.o:/usr/include/c++/4.2/bits/gthr-default.h:165: first defined here OBJDIR/test.o: In function `__gthread_trigger': /eos_src/game/src/arena.h:106: multiple definition of `total_bytes_written' OBJDIR/main.o:/usr/include/c++/4.2/bits/stl_tree.h:1335: first defined here OBJDIR/test.o: In function `__gthread_trigger': /usr/include/c++/4.2/bits/stl_tree.h:1335: multiple definition of `current_bytes_written' OBJDIR/main.o:/usr/include/c++/4.2/bits/stl_algo.h:2885: first defined here OBJDIR/test.o: In function `__gthread_trigger': /eos_src/game/src/arena.h:106: multiple definition of `main_fdw' OBJDIR/main.o:/usr/include/c++/4.2/tr1/hashtable_policy.h:346: first defined here OBJDIR/test.o: In function `__gthread_trigger': /usr/include/c++/4.2/bits/gthr-default.h:168: multiple definition of `udp_socket' OBJDIR/main.o:/usr/include/c++/4.2/tr1/hashtable_policy.h:346: first defined here OBJDIR/test.o: In function `__gthread_trigger': /usr/include/c++/4.2/bits/stl_tree.h:1340: multiple definition of `g_bShutdown' OBJDIR/main.o:/eos_src/game/src/main.cpp:364: first defined here Who can help? Regards
  13. Well, buttons are no problems and I didn't speak about them I said something like mouse over E.g. in the inventory SetOverInItemEvent for tooltips. Thanks anyway! Other? Regards
  14. Dear community, I'd like to know if someone could tell me how to call a function over ui.__mem_func__ (used in e.g. mouse over) with parameters? So if I have the function funcWithParams(self, par1, par2) and I know want to call it with ui.__mem_func__(self.funcWithParams) I want to give some parameters. I already tried this: ui.__mem_func__(self.funcWithParams, 1, 2) ui.__mem_func__(self.funcWithParams(1, 2)) ui.__mem_func__(self.funcWithParams, (1, 2)) Nothing works (except my workaround which is not really good!). Someone knows a solution? Regards
  15. Yiv

    Farewell

    Well, I'm having respect on this step but 2 questions were left: - What's going to happen with World of Metin2? - What's going to happen with Eterhost? Questions are anwsered! Have a nice time without Metin2 and I wish you good luck in your life! Regards
  16. Yeah, I already thought about that and I know that. Since there's no compiling error in visual studio (windows) everything's fine with the cpp's. I also checked the Makefile if there's the error but for me it looks okay (compared with some others but nothing important is different just the version management I mean the thing with rXXX). The main.cpp is compiling (I mean I just get the error at the end at linking things and I can see that it's compiled). Regards
  17. Well, I know that, too, but I don't know how to fix :S Regards
  18. Well, yeah, those are declared but what should I change? I'm using the Metin2Server_IsInvalid() because I use the variable g_isInvalidServer in an other way Regards
  19. Dear community, I'm actually having some trouble compiling my gamecore. I changed nothing important just added some features (but even without I'm now receiving these errors!) and I get these at compiling on FreeBSD: linking ../game_r126_dev_PET.... linking ../test /usr/lib/crt1.o: In function `_start1': crt1_c.c:(.text+0xa6): undefined reference to `main' /usr/lib/crt1.o: In function `_start1': crt1_c.c:(.text+0xa6): undefined reference to `main' OBJDIR/desc.o: In function `DESC::ProcessOutput()': /eos_src/game/src/desc.cpp:406: undefined reference to `max_bytes_written' /eos_src/game/src/desc.cpp:408: undefined reference to `total_bytes_written' /eos_src/game/src/desc.cpp:409: undefined reference to `current_bytes_written' /eos_src/game/src/desc.cpp:406: undefined reference to `max_bytes_written' OBJDIR/desc.o: In function `DESC::ProcessOutput()': /eos_src/game/src/desc.cpp:406: undefined reference to `max_bytes_written' /eos_src/game/src/desc.cpp:408: undefined reference to `total_bytes_written' /eos_src/game/src/desc.cpp:409: undefined reference to `current_bytes_written' /eos_src/game/src/desc.cpp:406: undefined reference to `max_bytes_written' OBJDIR/event.o: In function `event_process(int)': /eos_src/game/src/event.cpp:135: undefined reference to `ContinueOnFatalError()' OBJDIR/event.o: In function `event_process(int)': /eos_src/game/src/event.cpp:135: undefined reference to `ContinueOnFatalError()' OBJDIR/input.o: In function `CInputProcessor::Pong(DESC*)': /eos_src/game/src/input.cpp:187: undefined reference to `Metin2Server_IsInvalid()' /eos_src/game/src/input.cpp:190: undefined reference to `g_bShutdown' OBJDIR/input.o: In function `CInputProcessor::Pong(DESC*)': /eos_src/game/src/input.cpp:187: undefined reference to `Metin2Server_IsInvalid()' /eos_src/game/src/input.cpp:190: undefined reference OBJDIR/input_auth.o: In function `CInputAuth::LoginOpenID(DESC*, char const*)': /eos_src/game/src/input_auth.cpp:246: undefined reference to `Metin2Server_IsInvalid()' OBJDIR/input_auth.o: In function `CInputAuth::Login(DESC*, char const*)': /eos_src/game/src/input_auth.cpp:115: undefined reference to `Metin2Server_IsInvalid()' to `g_bShutdown' OBJDIR/input_auth.o: In function `CInputAuth::LoginOpenID(DESC*, char const*)': /eos_src/game/src/input_auth.cpp:246: undefined reference to `Metin2Server_IsInvalid()' OBJDIR/input_auth.o: In function `CInputAuth::Login(DESC*, char const*)': /eos_src/game/src/input_auth.cpp:115: undefined reference to `Metin2Server_IsInvalid()' OBJDIR/input_db.o: In function `CInputDB::P2P(char const*)': /eos_src/game/src/input_db.cpp:1356: undefined reference to `main_fdw' OBJDIR/input_db.o: In function `CInputDB::P2P(char const*)': /eos_src/game/src/input_db.cpp:1356: undefined reference to `main_fdw' OBJDIR/marriage.o: In function `marriage::TMarriage::Logout(unsigned int)': /eos_src/game/src/marriage.cpp:299: undefined reference to `g_bShutdown' /eos_src/game/src/marriage.cpp:316: undefined reference to `g_bShutdown' /eos_src/game/src/marriage.cpp:316: undefined reference to `g_bShutdown' OBJDIR/marriage.o: In function `marriage::TMarriage::Logout(unsigned int)': /eos_src/game/src/marriage.cpp:299: undefined reference to `g_bShutdown' /eos_src/game/src/marriage.cpp:316: undefined reference to `g_bShutdown' /eos_src/game/src/marriage.cpp:316: undefined reference to `g_bShutdown' gmake: *** [../test] Error 1 gmake: *** Waiting for unfinished jobs.... gmake: *** [../game_r126_dev_PET] Error 1 I returned my changes and I did them again (step by step always checking if I really did it right!). On windows I can compile without any problems. Someone can help me out? Regards
  20. Dear community, because I need to change something in the archiver I wanted to use the Metin2PackMaker but now my problem is that I don't know how I have to use it. With the old archiver (metin2dev archiver) I got this structure: For example, the structure of NPC: archiver_folder/NPC/d_/ymir_work/npc Who can help me? Thanks in advance! Regards
  21. @callmax: As I said I removed/disabled hotbackup. @Night: syserr doesn't say anything. Regards
  22. Dear community, I think this topic has been treated several times but I still have problems. If I want to start my database it's working the first time. But if I know e.g. want to restart it, it doesn't start. Real Server Log OffAsyncSQL: connected to localhost (reconnect 1) Success PLAYER AsyncSQL: connected to localhost (reconnect 1) Success ACCOUNT AsyncSQL: connected to localhost (reconnect 1) Success COMMON I already tried this guide, which didn't work for me (I checked if I did everything correctly): http://metin2dev.org/board/topic/2705-c-db-fix-startup-error/ Then, as you can see, I removed HOTBACKUP because it's not used, it doesn't change anything. If I check with GDB, I get this: (gdb) core db.core Core was generated by `db'. Program terminated with signal 11, Segmentation fault. #0 0x28613930 in ?? () (gdb) bt #0 0x28613930 in ?? () #1 0xfffffffa in ?? () #2 0xffffffff in ?? () #3 0x00000000 in ?? () (gdb) Who knows what I should do? Regards
  23. Well, for me it didn't work. I did everything like it was shown in this thread (I checked twice) except with the "latin1" and not "latin2" charset. It's sitll not working. Regards
  24. Dear community, due I'm currently using a very large lib folder in my client (1609 files - I think I took it from the source but it was long time ago) I'd like to clean the folder so I'd like to delete all unneeded files. Because this is a huge amount of work I wanted to ask if someone could upload his lib folder. I'm using Python-2.2 (I have trouble if I update it :S). Thanks in advance! Regards
×
×
  • 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.