Jump to content

miguelmig

Member
  • Posts

    44
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by miguelmig

  1. 6 hours ago, Chyu ^^ said:

    Everything is possible. In this case you have to edit a lot of things to get a solution you want.

    Well, I'd rather say not everything is possible.

    As people have said, monsters are not sent to the client if they're not in View Range.

     

    So M2Bob either tries to guess where those monsters are by using a default regen.txt or they use a tp-hack to teleport around the map and save the coordinates of the monsters sent while they are tp-ing around the map.

  2. 1 minute ago, Dobrescu Sebastian said:

    Talk about performance when you have a server. It's not normal that a game run out of memory. I have 10 loop_timers to all connected players and the game doesn't even feel them. It's about data you put that loop to read/write. But most loops writes/read just some lines of code. Just stop

    Who said I don't have one? I don't even know how the conversation got to this point but my idea is pretty simple, loop timers are completely un-necessary to do what OP wanted and most of the times are just worthless when the same thing could be implemented in C++ without the performance overhead.

    If you want to continue using loop_timers for simple things feel free, just know that one day it MIGHT bit you in the ass ( remember that for each player in your case it's another 10x loop_timers ), 100 more players is another 1000x loop_timers running. Complexity is a thing, look it up.

     

    6 minutes ago, Syreldar said:

     

    I don't know you, but if someone who claims to know more than ME, thinks he's going to improve the performance of HUNDRED OF THOUSANDS of bad code lines and over 200 SOURCE-SIDED permanently active TIMERS by adding ONE SIMPLE THING to a function that's meant to manage generic things related mainly to the mob_proto which behaves similarly  to what I did which, remember that WAS A SIMPLE EXAMPLE, then I can easily say that you can throw everything you gained and learned into the trash can, there's a reason someone here is acknowledged as a developer and you aren't.

     

    I won't say anything else, nor will I answer further to your bullshit.

    Have a good day.

    Throw everything I gained into the trash? Guess I'll have to do that since some random told me on the internet, oh boy there goes my Compute Science diplome into the trash can.

    I don't need a "Developer" tag to feel superior or to know how good of a developer I am.

    Most of the "source-sided permantently active timers" are of high times or only happen once, they're not in a loop.

    The worst case that I know of Looped Events/Timers hard-coded on source are the regen events which I've been trying to think of a good way to refactor them.

  3. 4 minutes ago, Dobrescu Sebastian said:

    Game performance can't be affected by a loop_timer.

    lmao you can't be serious. You seriously think that? Every loop_timer is a event more for the game to process, not to speak whatever happens inside the timer body itself is code executed by the game core

    To think that loop_timers don't affect Game performance is ludicrous and outright stupid. Not to mention if those loop_timers are never cleared they will run until the game core process gets shutdown or you run out of memory :)

  4. Just now, Syreldar said:

    At least don't comment at all.. if you want to make fun of yourself you can do it somewhere else. Talking of performance in metin2? About an instanciated server timer? Just..do us a favor and do not comment anymore.

    You're pathetic. Yes, performance is important in Metin2, at least server-side it can be improved or at least not made worse. A single "instanciated" server timer in combination with many other server_timers used when it isn't needed will surely lag out the server. 

    Plus, there's no reason to use LUA in this context, it is utterly un-necessary, and needless to say your solution only works on a dungeon AND with a single monster ( you used unique ).

    Don't come here saying I'm making fun of myself, I have a lot more experience on this area than you do, I'm sure.

  5. @Syreldar Holy shit you just gave the worst possible solution regarding performance that I could think of.

    In CHARACTER::StateBattle(char_state.cpp) do a check for mob1_vnum and if below the percentage you want, you can spawn the mob2 with CHARACTER_MANAGER::SpawnMob.

    For more information look for dwSummonVnum from TMobTable and see how it is implemented, it seems to be closer to what you want to implement

  6. On 2/12/2018 at 9:21 PM, Socialized said:

    I wouldn't suggest anyone using the ops solution, as it isn't working as intended.
    The issue that you don't take into account is, that e.g. a warrior can use "Sword Aura" or use a dew, ... and the shaman can then use heal onto him (which will trigger RefreshAffect() and thus Compute and apply the points for the already existing affect again!)

    You should recompute all the players points or refactor the whole affect system (because it is actual garbage) to actually solve this bug.

    tl;dr: Replace RefreshAffect() through ComputePoints()

    You don't have to refactor the whole affect system, you can "fix" it with a fix similar to OP's one, just not exactly the same.

     

    EDIT: I tried reproducing that bug on my source, but neither the "Sword Aura" nor the "Heal" invokes ComputePoints()

  7. 2 minutes ago, VegaS said:

    Hahaha, this is your reason for which you criticize me? Because you already sell or want to sell it?

    Bro, I try to share with you some small idea, I do not sell this shit, which already sells 3 people, and that is already free in the globalmt2 client that was decrypted by a few people.

    Please do not judge me senseless.

    I have not never talked to you, and I have not offended again.

     

    I didn't offend you, or did I? I wasn't criticizing you, nor offending you. I was saying that the way you mentioned wasn't the most correct way and that it could be improved.

    I'm sorry that you took it so deeply. And in case you thought I only criticized because I was selling, you're wrong. I only planned on working on this system right after reading this thread, I had no interest in this before I opened this thread.

  8. Just now, VegaS said:

    You can read with urllib from website.

    You will make changes to the file very few times, if you have a stable server once you do not need to edit 5 minutes mod_drop.

    
    	import urllib
    	try:
    		MOB_DROP_FILE_NAME = urllib.urlopen(url + "/src/game/mob_drop_item.txt").readlines()

     

    This is version sucks know, it's just an idea hahaha.

    You can get information directly vacuum mob_drop_item part of the server, but in some cases you'll need to work with some packages.

     

    I'd just do the right way, send the information from server. And I'm working on it, if someone wants to buy it, let me know.

  9. 12 minutes ago, VegaS said:

    Is not so hard.

    Small example how to get informations from mob_drop_item.txt:

     

    
    	MOB_DROP_FILE_NAME = "%s/mob_drop_item.txt" % app.GetLocalePath()
    	mobDropInfo = pack_open(MOB_DROP_FILE_NAME, "r").readlines()
    
    	for drop in range(1, len(mobDropInfo) + 1):
    		mobDropTable = mobDropInfo[drop-1][:-1].split("\t")
    				
    		self.SetItemSlot(i, have, bigDick)

     

     

     

    I disagree with this method, you'd have to copy the drops' file every time.

  10. 2 minutes ago, Vanilla said:

    I know it is but using git and svn could be troublesome if it gets closed. And I won't have a server nor do I want to rely on something for this work. I won't publish any branches but that doesn't mean I won't work with revisions locally :)

    You're right with the send it to me. I'll change that into "Post it into the release topic". This way everyone can see who posted the code and where it came from. Additionally I can give credit to those wo contributed to the project and add a link to their post in my thread. Thank you! :)

    Yep, I already replaced it. It's not that difficult and maybe I'll write a guide to it though everyone will be possible to clearly see it once the project is released.

    The major reason for the change from lzo to lz4 is the client, not the server. Of course using a ramdisk or ssd will improve loading times by a lot it doesn't mean everyone will do that. If you're on a laptop chances are that you don't have that many RAM nor an ssd to work with (of course you'd possibly upgrade..). But it's just for the broad masses and getting a faster algorithm is always better as long as it's safe, no matter the circumstances

    1 word. Bitbucket, you can create private repos for free.

  11.  

    1 hour ago, ds_aim said:

    AES is the best. I alredy use it for mysql hash password..  SELECT HEX(AES_ENCRYPT('password', 'key'));

    Please tell me you're kidding. You gotta be kidding. AES is Encryption, not Hashing. You should hash a password, not encrypt it. That means that if your database is compromised, the hackers will be able to get all the passwords in plaintext.

  12. Just now, Frozen said:

    Oh i didnt notice that! Thanks for detecting that bug i will see what i can do.

    Kind Regards 

    What?? Why you say that?

    Well, it's quite common for python systems to use constinfo.py to store data, but that usually causes to things to stop working when a player has multiple clients open, since it appears that the constinfo data is shared between clients, or so it was in the old clients, but I'm pretty sure that it will still happen, give it a try

×
×
  • 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.