Jump to content

WeedHex

Premium
  • Posts

    1547
  • Joined

  • Last visited

  • Days Won

    33
  • Feedback

    0%

Posts posted by WeedHex

  1. In char_battle.cpp file

    In the function:

    bool CHARACTER::Damage(...)

    In the skills statement:

    if (type == DAMAGE_TYPE_MELEE || type == DAMAGE_TYPE_RANGE || type == DAMAGE_TYPE_MAGIC)

     

    These boys

    iCriticalPct -= GetPoint(POINT_RESIST_CRITICAL);
    
    iPenetratePct -= GetPoint(POINT_RESIST_PENETRATE);

    are getting calculated after the Korean nerf used for skills (If you have 100% critical, your skills won't be always critical like normal hits).

    Using a determinated amount of resistance in the gameplay you can lead the real bonus to reach 0%, so no critical skills in PvP (Mob doesn't have the bonus by default).

    To fix the problem you should just move the resist calculation after the critical check >0.

     

    Eg:

    if (iCriticalPct)
    {
      iCriticalPct -= GetPoint(POINT_RESIST_CRITICAL);
    
      // OLD YMIR CALCULATION
      if (iCriticalPct >= 10)
        iCriticalPct = 5 + (iCriticalPct - 10) / 4;
      else
        iCriticalPct /= 2;
    
      if (number(1, 100) <= iCriticalPct)
        ....
    }
    • Good 1
  2. 28 minutes ago, iambmys9 said:

    Hello, I have two Dragon God Attacks on my server. One drops from metin stones and is limited, single use. The other one can be obtained by craft from the blacksmith.

     

    The problem is that these two items can be used at the same time and their buffs can be stacked. How can I prevent this, one of the two can only be used once. Note: I don't have the source code of my files.

    It's because you're using a stupid extended system from some "dev" I think.

  3. How do you generate the fake characters? I doubt you connected 180 clients 😂

    You should be sure that your "clones" are same of real players in level of heaviness.

    Very curious about it, keep it up 😄

  4. 2 minutes ago, Tomio said:

    Hello i still can't resolve my problem with mysql. I rented VPS and after installation mysql i can't start mysql. I resolve many problems and errors but now i need help in err file i have this

    2024-02-27T18:56:07.6NZ mysqld_safe Logging to '/var/db/mysql/vps2357.err'.
    2024-02-27T18:56:07.6NZ mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
    ld-elf.so.1: Shared object "libprotobuf-lite.so.3.19.4" not found, required by "mysqld"
    2024-02-27T18:56:07.6NZ mysqld_safe mysqld from pid file /var/db/mysql/vps2357.pid ended

    Please how to install and where LIBPROTOBUF-lite ? Thaaaank you ! (I use [40250] Reference Serverfile + Client + Src by TMP4 ) 

    Talk to the AI, better than waiting here.

    • kekw 1
  5. 54 minutes ago, Rakancito said:

    I like to avoid tragedies even if I have avoided them before. If you don't like C++ code, use Lua, but... since when is a high-level language better than a low-level?

    I'm not using the server, I don't have problems.

    Checking the pointer from the beginning, but controlling it again before destroy and then using again. The guy meant this with the arrows.

    I agree about the use of LUA for dungeons. It's much faster and already prepared for use, without risk of memory, at the end it's linking c++, you got less lines and more order/safety.

     

    Obv it's good for pratice c++ doing as you did. 

    Thanks for the share, will be very useful for my Yohara 🙏🙏

  6. It was blocking also Set Value to 0.

    			if (value == NULL)
    				return 0;

    My version:

    	int item_set_socket(lua_State* L)
    	{
    		LPITEM item = CQuestManager::instance().GetCurrentItem();
    		if (!item)
    			return 0;
    
    		if (lua_isnumber(L, 1) && lua_isnumber(L, 2))
    		{
    			const auto idx = static_cast<int>(lua_tonumber(L, 1));
    			if (idx < 0 || idx >= ITEM_SOCKET_MAX_NUM)
    				return 0;
    
    			// Value can be 0 or negative.
    			const auto value = static_cast<int>(lua_tonumber(L, 2));
    
    			item->SetSocket(idx, value);
    		}
    		else
    			sys_err("Passing bad argument from LUA.");
    
    		return 0;
    	}

     

    • Metin2 Dev 1
    • Good 2
  7. On 1/16/2024 at 9:04 PM, BYB said:

    Thats the only answer I could find but its really hard to believe a code like this can be mastered to such degree some people have here , but honestly respect to anyone who actually made it out of the phase very impressive in my opinion .

    Lots of luck guys. thank you for your continuous effort to improving such a nostalgic memory , that even the owners never could do with millions in their pockets 

    Doesn't matter if you have a degree or not. Knowing this source is question of time because you have to empathize with old code from people of the other side of the world (idk where are u from). Do not think everything in wrote is good, in the Asia the reasoning is not same as EU etc.. It's a nice challenge for people who like to feel the pain and mistery, enjoy 😂

    • Love 1
  8. 6 hours ago, lTz said:

    hi , ty all for ur answers
    i finaly found the problem
    That item was somehow dupping in my inventory , and that was what made the sv crash (hard to see that cuz that item was invisible and stacked over another visible one, and no sys)
    but i stil don't get why was crashing the server just when i move the window around , normal login didn;t have any problem
    As for the window freeze i try this one

    and i make it so i cant right click the window to so it avoid game freze

    Ty all

    That's why I told to truncate the player.item table, but surely you didn't understand what I was meaning.

    Good luck.

  9. 4 minutes ago, lTz said:

    ty for answer
    i tried an /ip all
    i deleted that item nothing worked
    the main problem is that when i log in the game and press start and the loading window come if i move the game window around a lot the server crashes
    if i dont move it is ok

    i gues is because when i move the window the game freeze and data are kept floating and never reaching the server
    this is my ques i may be wrong

    Its a test server? Did you also try truncating the player.item table?

    I don't see any logic relation by the "move" you were explaining 😨

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