Jump to content

Amun

Contributor
  • Posts

    199
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    100%

Everything posted by Amun

  1. #ifdef __WIN32__ #include "windows.h" #endif Edit: If this kicked your ass, honestly, just give up and start learning.
  2. Don't overthink it, mate. Even if you choose the central point of your players area, the slowdown caused by the internet connection is going to be insignificant(considering that m2 barely sends a couple kb of data to each player every second) The problem with most servers these days isn't the internet speed, but the shitty server cores. Internet speed isn't the problem when your core eats 100% of the CPU with 80 players on an octa core, 64GB VPS(yeah, I've seen that shit). What I always recommend is to get a decent dedicated VPS in the beginning(4 cores and 16/32Gb ram), keep it for a month, and then resize from there based on your needs - my bet is you'll keep it as is or, probably, size down.
  3. Pretty cool idea, not gonna lie. Thanks for sharing! Now I have that moment of "Why didn't I think about that?"
  4. You don't have to debug the server, just check the client's packets. Mine might be slightly different from yours, but you got the point. Who knows, maybe it's just a python problem and you forgot to send the "refine end" packet. Anyhow, you have everything you need in there.
  5. Can you check if it sends the packets to the server after each action(delete an item, throw it, open and close the refine window, refine an item)? Also check the packets you get back after trying that. You can't drop items while refining, so the client probably doesn't let the server know you've closed the window. Edit: here's a pic with the server's packets, just in case: root/uiRefine def Accept(self): net.SendRefinePacket(self.targetItemPos, self.type) self.Close() def CancelRefine(self): net.SendRefinePacket(255, 255) self.Close() def OnPressEscapeKey(self): self.CancelRefine() return True Which in turn is sent by the client and handled in input_main.cpp void CInputMain::Refine(LPCHARACTER ch, const char* c_pData) { // [...] if (p->type == 255) { // DoRefine Cancel ch->ClearRefineMode(); return; } // [...] } char_item.cpp void CHARACTER::SetRefineMode(int iAdditionalCell) { m_iRefineAdditionalCell = iAdditionalCell; m_bUnderRefine = true; } void CHARACTER::ClearRefineMode() { m_bUnderRefine = false; SetRefineNPC(NULL); } Good Luck
  6. I won't download that. You said you have errors, post them here. Are we supposed to read your fucking mind?
  7. I'll have to agree with @ Syreldarhere, mate. It doesn't matter if the bugs are already solved on some forum, as you're not paying for the bugfix, you're paying for that guy's time, knowledge, or experience. If you're not competent enough to even copy/paste the solution, then you shouldn't open a server. Instead of complaining that someone's asking for money for a "free" bugfix, you should go back to learning, fix your incompetence and fix them yourself (I'm not talking about you, I'm talking in general, I don't know who you are, so don't take it the wrong way). Many of us share stuff in the community, but we do it because we want to, not because we have to. Most of us aren't kids anymore, we have bills to pay, work, side projects, families/girlfriends/boyfriends, other hobbies, etc. We all want to help, but many simply don't have the time(or the mood) to spend 3 hours with every person asking for help. There's much more to say, but I'll just stop here, there's no point in writing a book about it. However, I hope you get my point. Have a great day!
  8. I don't know what the problem is, but seems really hard to fix. Also, that's not a bug, it's an error.
  9. Next time ask in questions and answers. There's a reason that part of the forum exists. [Hidden Content] Also, it took me literally 15 seconds to find this so, you're either an idiot, or just enjoy wasting our time.
  10. What I would do, if I was in your shoes, is move the source to windows and use visual studio's profiler to try and find the bottleneck. Logs add an overhead to cpu usage as well, look around and see if you have crazy amounts of logs/syserr coming from some system/part of the server. Also look for high magnitude loops - that's a viable option as well. Unfortunately, this is the best advice I can give you. I can't fix(or give advice about fixing) a problem that I don't have - problem that's probably coming from systems that I don't use. Have a great day, - Amun
  11. What you're showing us there is the Weighted CPU usage, not the memory. If you take a moment to look at what you gave us, you can see the cpu spikes when processing the data, then returns to baseline after it's done. However, yes, it does add some memory as well. Since it's doesn't just flood the database with updates whenever the player does something, the core is saving some data in memory, which gets cleaned up after a while, when it saves it in the database. Edit: A clean core is usually eating about 100mb of ram(in debug) at baseline and you don't need more than 5(maybe 10)mb per player so, if you do the math(with 10mb per player, which is quite huge), your server should be able to hold at least 400 players. Auth and db are insignificant. Hope it's helpful, Good luck
  12. Holy shit: 0421 17:59:45796 :: Update::Load spent 245 ms 0421 17:59:58387 :: Update::Load spent 709 ms 0421 17:59:04418 :: Update::Load spent 758 ms 0421 17:59:05284 :: Update::Load spent 305 ms 0421 17:59:08803 :: Update::Load spent 524 ms 0421 17:59:11367 :: Update::Load spent 406 ms Does this happen in every map? If it does, I don't think it's from the client. Have you tried reinstalling windows? I've seen some posts and articles of people complaining that windows 11 is shit and that their FPS dropped with like 20-80% after installing it. I'm not saying this is the solution or that it'll work(since I can't possibly know that), but maybe you could give it a try. I'm saying this because you said you downgraded from 11 to 10, and that's not the same thing as reinstalling it. Wait a few hours, maybe someone else has more ideas. Cheers!
  13. It says right there: uiNewInventory.py(line:248) uiNewInventory.BeltInventoryWindow.__LoadWindow Something wrong with the belt inventory. You played around with that?
  14. Completely deleted property from pack. No terrainmap No textureset
  15. The properties have nothing to do with this. Even if you have no properties, you'll just see a blank world. Look into locale/en/ui/LoadingWindow.py, that's the last file called before crashing. 0418 11:48:28810 :: CPythonNonPlayer::LoadNonPlayerData: locale/en/mob_proto, sizeof(TMobTable)=255 0418 11:48:30354 :: CPythonSkill::RegisterSkillTable(locale/en/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:158 Line:56] 0418 11:48:30356 :: CPythonSkill::RegisterSkillTable(locale/en/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:159 Line:57] 0418 11:48:30360 :: CPythonSkill::RegisterSkillTable(locale/en/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:160 Line:58] 0418 11:48:30361 :: CPythonSkill::RegisterSkillTable(locale/en/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:161 Line:59] 0418 11:48:30361 :: CPythonSkill::RegisterSkillTable(locale/en/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:162 Line:60] 0418 11:48:30362 :: CPythonSkill::RegisterSkillTable(locale/en/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:256 Line:61] 0418 11:48:30362 :: CPythonSkill::RegisterSkillTable(locale/en/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:257 Line:62] 0418 11:48:30363 :: CPythonSkill::RegisterSkillTable(locale/en/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:258 Line:63] 0418 11:48:30363 :: CPythonSkill::RegisterSkillTable(locale/en/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:259 Line:64] 0418 11:48:30364 :: CPythonSkill::RegisterSkillTable(locale/en/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:260 Line:65] 0418 11:48:30364 :: CPythonSkill::RegisterSkillTable(locale/en/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:261 Line:66] 0418 11:48:30365 :: CPythonSkill::RegisterSkillTable(locale/en/SkillTable.txt) - NOT EXIST SkillDesc [Vnum:262 Line:67] It might be because of the proto, but then, if you think about it, if the proto is fucked, then the client would just get stuck, not crash. You should probably check your packets if you don't find anything wrong with any of the previous things.
  16. I think it may be because of this: local shop = split(input(cmdchat('ITEMSHOP SEND#')), '#') It's asking for input there, add an option to not show the input if it's a command Edit: You can find basically anything if you look well enough:
  17. Look inside game.py def __InGameShop_Show(self, url): if constInfo.IN_GAME_SHOP_ENABLE: self.interface.OpenWebWindow(url) Just change self.interface.OpenWebWindow with whatever you want it to do
  18. Mate, I'm just telling you what the errors mean and where they're coming from. I've never used this, so I can't say anything for sure. Yet, if you're sending a command to the client, I would assume that the client has to know what that command means, right? No, it isn't case sensitive(unless you use Cython). If it was case sensitive, you wouldn't be able to enter the game. Edit: Here, take a look at this, maybe you'll find it useful:
  19. You're basically sending that ITEMSHOP command from the server and the client has no idea about what the fuck that means. Take a look in UserInterface/PythonNetworkStreamCommand.cpp void CPythonNetworkStream::ServerCommand(char * c_szCommand)
  20. Right, so I downloaded the system that TMP gave the link to. I don't have it implemented, so I can't help you by testing it myself, however, from what I read in the files, that problem might be coming from python. What I would do in your case is to remove everything about stones from uiTarget.py and uiToolTip.py(Careful, only comment the lines of the system, not absolutely everything you find!). You could give it a quick try by changing(in uiToolTip.py) def __SetNormalItemTitle(self): if app.ENABLE_SEND_TARGET_INFO: if self.isStone: itemName = item.GetItemName() realName = itemName[:itemName.find("+")] self.SetTitle(realName + " +0 - +4") else: self.SetTitle(item.GetItemName()) else: self.SetTitle(item.GetItemName()) Like this: def __SetNormalItemTitle(self): # if app.ENABLE_SEND_TARGET_INFO: # if self.isStone: # itemName = item.GetItemName() # realName = itemName[:itemName.find("+")] # self.SetTitle(realName + " +0 - +4") # else: # self.SetTitle(item.GetItemName()) # else: self.SetTitle(item.GetItemName()) It may not work without editing uiTarget.py, but it's worth a quick try.
  21. I think it kind of depends on the server and the number of I/O|R/W operations. If he has a shitty server and wants to hold 2-3k players, those direct queries might get slower and slower, thus slowing down the whole server. Of course, this is just assuming that all the players look in all the shops at the same time. In practice, even if you have 2-3000 players, only a really small number of them is going to look into shops at the same time.. Like, if there's 50 players looking in the shops with an average of 10-20 items per shop, let's say he needs to handle about 500-1000 operations per second(I don't think anyone opens more than one shop per second). Now, is that a lot considering that there's other parts using the database at the same time? Well, I don't know, it depends on the hardware. With a relatively ok server matching the number of active players, I would say nah, it won't make any difference. Would it help having some form of cache? Well, yes, that would be a no brainer. Taking some load off of the db is certainly going to help in peak/high traffic hours, but again.. how big of a difference is the offline shop going to make? On an ending note, I don't know why I wrote all of this, but whatever. Have a good day xD
  22. Your english isn't poor, I see you're speaking it quite well. What I said was that you didn't give any details about what's going on. I would assume by "gems" you mean "stones" You can't add them in mob_drop? Read the code for the system, maybe it's doing some crazy stuff for stones. Yet, it's pretty weird because if you add them normally, like any other item, it should actually read them like it reads everything else. The reason he made them like that was explained by TMP. Basically, the stones would occupy too much space because there's 4(or 5?) variants for each stone. If you do the math, you'd have 20 slots occupied by only 4 stones(and there's a shitload of them), so what the creator of that sistem did was quite smart, I would say. Could you provide some pictures about what exactly is the problem? Use imgur or something that doesn't just delete them after 10 minutes. Also, a link to the system would be helpful, so we can take a look at it. Cheers!
  23. Just add say("whatever") in lua and print("whatever") in python.. Look inside questlua_global.cpp.. { "sys_err", _syserr }, { "sys_log", _syslog }, { "char_log", _char_log }, { "item_log", _item_log }, { "say", _say }, { "chat", _chat }, { "cmdchat", _cmdchat }, { "syschat", _syschat }, { "notice", _notice }, { "notice_all", _notice_all }, { "notice_in_map", _notice_in_map }, { "say_in_map", _say_in_map }, Use whatever you want, just make sure you can see the output if it's crashing. Good luck
  24. Well, yeah, I get that, but you still need some code in the client to make that possible, right? It won't just magically appear just because you think about it. Anyhow, like I said previously - Add Logs everywhere and see where it hits the fan
×
×
  • 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.