Jump to content

Amun

Contributor
  • Posts

    199
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    100%

Everything posted by Amun

  1. call 2.bat call 3.bat I see they are used to cythonize the root. If you don't have these, remove them from the build events. If you have them, update your paths. Also, try common sense, it usually works(like with your first problem, one simple google search would've taken you to this page [Hidden Content], which clearly says shared_ptr is defined in the <memory> header) Good luck
  2. Don't know if I'm too late, but try this: ////////////////////// // questlua_pc.cpp ////////////////////// add int pc_get_players_count_in_current_map_index(lua_State* L) { uint32_t mIdx = CQuestManager::instance().GetCurrentCharacterPtr()->GetMapIndex(); uint32_t pCount = SECTREE_MANAGER::Instance().GetPlayerCountInMap(mIdx); lua_pushnumber(L, pCount); return 1; } find luaL_reg pc_functions[] = { add { "get_players_count_in_map", pc_get_players_count_in_current_map_index}, ////////////////////// // sectree_manager.h ////////////////////// find size_t GetMonsterCountInMap(long lMapIndex); add size_t GetPlayerCountInMap(long lMapIndex); ////////////////////// // sectree_manager.cpp ////////////////////// struct FCountPlayers { std::unordered_map<VID, VID> m_map_Players; void operator() (LPENTITY ent) { if (ent->IsType(ENTITY_CHARACTER) == true) { LPCHARACTER lpChar = (LPCHARACTER)ent; if (lpChar->IsPC()) { m_map_Players[lpChar->GetVID()] = lpChar->GetVID(); } } } }; size_t SECTREE_MANAGER::GetPlayerCountInMap(long lMapIndex) { LPSECTREE_MAP sectree = SECTREE_MANAGER::instance().GetMap(lMapIndex); if (sectree != NULL) { struct FCountPlayers f; sectree->for_each(f); return f.m_map_Players.size(); } return 0; } //////////// // USAGE: //////////// /* local pCount = get_players_count_in_map() -- it might be pc.get_players_count_in_map, dunno or when something with get_players_count_in_map() > whatever begin */ Before you do, though: Counting them all the time isn't the most optimal way of doing this. In reality, you should keep track of the number of players from the beginning and just increment, decrement when they get in/get out of the map. However, I gave you some code, what you do with it is your choice. Also, I made this in the past 10 minutes, so I didn't test it(that's your job). Good luck!
  3. Couldn't answer earlier because I was muted, but I'll answer anyway.. You probably fucked something up when implementing the system, because the "StringPath" method is already implemented in the source. Can't remember where it was, but do a global search for it with n++ and recheck the changes you've made to that file.
  4. You missed the point of everything I wrote. I said most people have delusional expectations about the amount of work that goes into coding. Also, I explicitly noted where I wasn't specifically talking about him, but in general, hence the "Not related to you" part. Does it look like I didn't understand what he said?
  5. Damn, bro, you've probably never written a line of code in your life. That, or you must be a manager, considering you have such unrealistic expectations. Not related to you, but worth mentioning: That's exactly what most idiots think when leaking shit or complaining about the prices developers put on their code: "I bet he made that shit in a few hours, and now he's charging me X amount of money for it", effectively shitting on people's time because they have no idea about the amount of work that went into it.
  6. What's dumb is that they checked for the PID when deleting a player if (!c_rAccountTable.players[pinfo->index].dwID) { sys_err("PlayerDelete: Wrong Social ID index %d, login: %s", pinfo->index, c_rAccountTable.login); d->Packet(encode_byte(HEADER_GC_CHARACTER_DELETE_WRONG_SOCIAL_ID), 1); return; } but they didn't check when selecting it(they've done the same shit in ::ChangeName, the method above ::CharacterSelect). I advise you to check all packets using indexes sent by the client, because it's not just the one @ LTGT posted.
  7. Make sure you're using the correct version of mysql client/server. I don't see why this would happen if your versions match the C connector's version.
  8. Most likely because the source part is working, but he didn't add the other 2 inventories in uiInventory/inventoryWindow. Basically, it's working because he has 4 inventories, but he can't see shit because they're not displayed in inventory.
  9. Your first error is: lzio.c:40:25: error: unknown type name 'lua_Chunkreader' Do you have this in lua.h? typedef const char* (*lua_Chunkreader) (lua_State* L, void* ud, size_t* sz); Also: The fuck do you mean by "fixing the liblua source in the server"? What's wrong with it?
  10. [1]. [Hidden Content] or [Hidden Content] [2]. No. I already told you what to do.
  11. You should be hit over the fingers with a brick for even asking this fucking question. There is literally 100 topics about it, you could've gotten the solution from one of them. [Hidden Content] [Hidden Content] [Hidden Content] [Hidden Content]
  12. The client is freezing for a while(anywhere from a few ms to multiple seconds for slower PCs) when meeting a new NPC/enemy for the first time because that's when it registers, creates and loads the entity. Note: This is only a partial fix. Why is it partial? Because it only loads the static mobs and NPCs available in the map(npc, regen, boss, group and group_group), so it won't fix the problem for dynamic entities, like pets and mounts. It can be extended to load those as well, of course, but you'll have to take care of that on your own. Variant: A way of completely fixing this would be to create the instances and load their files after registering the path(in root->playerSettingModule->LoadGameNPC), BUT that would slow down the initial loading quite a bit, since it'll load ALL mobs/npcs/pets/mounts, even if most of them will never be used. There's advantages and drawbacks to both methods. Choose for yourself. Here's the link: [or] [Hidden Content] [or] [Hidden Content] Good luck! - Amun Edit: UPDATE 08/12/2022: 1. Refactored to use unordered_set from the beginning instead of creating a vector, then filtering unique entities by creating a set, and then moving them back to a vector. 2. Extended to load the full spectrum of entities(both static and dynamic), except for PC(which are loaded in loading phase), WARP, GOTO, and DOOR. They can be included by altering this block in char_manager.cpp: #ifdef ENABLE_ENTITY_PRELOADING //@Amun: or be specific, like if(ch->ispet, mount, whatever) if (!ch->IsPC() && !ch->IsGoto() && !ch->IsWarp() && !ch->IsDoor()) SECTREE_MANAGER::Instance().ExtendPreloadedEntitiesMap(lMapIndex, pkMob->m_table.dwVnum); #endif
  13. You're getting that error because the client can't find the index of your character's hair which, most likely, might be because it doesn't actually exist in pack. Both select and game phases receive the index(vnum) of your hair from the database(player->player->part_hair, as SirEldar mentioned) when HEADER_GC_CHARACTER_DETAILS is sent from the server(if I remember correctly), and attach them to your character by calling chr.SetHair(details.part_hair, which is the vnum). What I would do if I were you is check to see if you have the vnum(18841) in item_proto, item_list and race.msm, then check to see if the skin exists in pack(item/hair). To avoid showing up with no head when a skin is missing, we should probably have some sort of fallback to default when it can't find the current hair. Good luck, - Amun
  14. Maybe you messed something up around these? PythonBackground.cpp void CPythonBackground::RenderCharacterShadowToTexture() { extern bool GRAPHICS_CAPS_CAN_NOT_DRAW_SHADOW; if (GRAPHICS_CAPS_CAN_NOT_DRAW_SHADOW) return; if (!IsMapReady()) return; CMapOutdoor& rkMap = GetMapOutdoorRef(); uint32_t t1 = ELTimer_GetMSec(); if (m_eShadowLevel == SHADOW_ALL || m_eShadowLevel == SHADOW_ALL_HIGH || m_eShadowLevel == SHADOW_ALL_MAX || m_eShadowLevel == SHADOW_GROUND_AND_SOLO) { D3DXMATRIX matWorld; STATEMANAGER.GetTransform(D3DTS_WORLD, &matWorld); bool canRender = rkMap.BeginRenderCharacterShadowToTexture(); if (canRender) { CPythonCharacterManager& rkChrMgr = CPythonCharacterManager::Instance(); if (m_eShadowLevel == SHADOW_GROUND_AND_SOLO) rkChrMgr.RenderShadowMainInstance(); else rkChrMgr.RenderShadowAllInstances(); } rkMap.EndRenderCharacterShadowToTexture(); STATEMANAGER.SetTransform(D3DTS_WORLD, &matWorld); } uint32_t t2 = ELTimer_GetMSec(); m_dwRenderShadowTime = t2 - t1; } PythonCharacterManager.cpp void CPythonCharacterManager::RenderShadowMainInstance() { CInstanceBase* pkInstMain = GetMainInstancePtr(); if (pkInstMain) pkInstMain->RenderToShadowMap(); } Have you tried only rendering your shadow and nothing else?
  15. Right. 1. You just butchered English(I can't understand shit from the last block of text). 2. You keep rambling about what you can do and what a fucking unicorn dev you are, but I don't see shit about why this topic was created in the first place. Is it about 3D models? I see you said that's what you're not good at. Is it about someone making a server for you? How is the last sentence supposed to explain what the fuck you're looking for? Do you need help choosing the correct source files? Do you need help choosing the right host? Do you need help starting an existing server in a correct way? What the fuck does "start correct" supposed to mean in this context??? Regards, - Amun
  16. root/race_gender.msm, locale/item_list, (server and client)item_proto and you're done. PayPal, Revolut or Bank Transfer? Any preference? .. joking, obviously.
  17. SYSERR: Oct 2 18:33:46 :: Process: UNKNOWN HEADER: 214, LAST HEADER: 57(2), REMAIN BYTES: 4, fd: 17 Oct 2 18:33:46 :: DISCONNECT: [SA]YavruKurt (DESC::~DESC) fix your packets
  18. libthecore/include/stdafx.h find and comment this: #define strtof(str, endptr) (float)strtod(str, endptr) Edit: Just refreshed the page and noticed you updated your previous reply. Anyhow, wrapping them in "ifndef WIN32" is absolutely useless, since the whole block is wrapped in "ifdef WIN32", so you can just delete them.
  19. Cannot open include file "mysql/mysql.h". Fix your dependencies first
  20. Mate, I'm sorry, but I don't understand what you're trying to say. Are you trying to compile your server's source with Visual Studio(win32) or what do you mean? And what do "sql files" have to do with anything? I asked you to show us the piece of code that throws the first error. Where is it?
  21. Are you using Mali's highlight system? I didn't have any problems with it, except for a little thing where it was highlighting items after swapping them(equip->inv|inv->equip), but that's easily fixable.
  22. Whenever you have errors, go to the first one, not last, because the first one is usually creating a cascade/domino, triggering other errors. Show us the line where you get the first error. Also, as a piece of advice, since you're coding/programming in English, keep the damn IDE in English as well, because we can't understand shit and it certainly doesn't help you very much either.
  23. I know this happened with m2fun as well, and it was because of the shadows. Go to config->shadows->all. You probably messed something up in there. Unfortunately, I don't have this problem, so I can't help out with more info.
×
×
  • 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.