Jump to content

[40250] Reference Serverfile + Client + Src [15 Available Languages]


TMP4

Recommended Posts

  • Contributor
On 12/27/2021 at 3:46 PM, Mahtox said:

Just include boost next to your source as you did with cryptopp so people will not do stupid things like the guy did above 😂

It is a good idea actually. At least when boost gets updated in the pkg in the future, the source will work even if the future version of boost will be incompatible. I'll do it later today/tomorrow and update the mega drive. Thank you.

Edit:

2021.12.28: - Boost included in the /usr/metin2/src/etc folder, so you don't need to install it seperatly.
            - Backup.sh modified to use compression. (tar -zcf)
            - Fixed item 76006 in item_proto.txt, it will show up in the inventory now.
            - Energy crystal time increased from 30 to 120 mins like official. (blend.txt)
            - Added pc.set_level to quest_functions so now you can use it in your custom quests.
Edited by TMP4
  • Metin2 Dev 1
  • Good 3
Link to comment
Share on other sites

16 hours ago, TMP4 said:

40k have the original pet system. (Not the growth one.)

Oh I see.. any idea where to get it with complete GUI, including the Evolve feature? Is it released somewhere?

Or anything like what WoM2 had.. I loved it.

Edited by covfefe
Link to comment
Share on other sites

  • Active+ Member
19 hours ago, TMP4 said:

Your best choice is to check the translation each time you do something and you'll know when it gets bad. Nobody can help you otherwise.

I did that, and the translation bug only starts after i implement the 3/4 inventory, i implemented all the armors,weapons,itens, i had before, also implemented 6º skill and changed max lvl, and the translation was completly fine, after i implemented the aditional inventory slots, it got fucked

Link to comment
Share on other sites

Fix Pickup Distances Bug 100%

 

locale_inc.h

Add: #define ENABLE_QUICK_PICKUP // Fast pickup close items

 

PythonItem.cpp

 

Search:

bool CPythonItem::GetCloseItem(const TPixelPosition & c_rPixelPosition, DWORD * pdwItemID, DWORD dwDistance) { DWORD dwCloseItemID = 0; DWORD dwCloseItemDistance = 1000 * 1000; TGroundItemInstanceMap::iterator i; for (i = m_GroundItemInstanceMap.begin(); i != m_GroundItemInstanceMap.end(); ++i) { TGroundItemInstance * pInstance = i->second; DWORD dwxDistance = DWORD(c_rPixelPosition.x-pInstance->v3EndPosition.x); DWORD dwyDistance = DWORD(c_rPixelPosition.y-(-pInstance->v3EndPosition.y)); DWORD dwDistance = DWORD(dwxDistance*dwxDistance + dwyDistance*dwyDistance); if (dwxDistance*dwxDistance + dwyDistance*dwyDistance < dwCloseItemDistance) { dwCloseItemID = i->first; dwCloseItemDistance = dwDistance; } } if (dwCloseItemDistance>float(dwDistance)*float(dwDistance)) return false; *pdwItemID=dwCloseItemID; return true; }

 

add underneath:

#ifdef ENABLE_QUICK_PICKUP
bool CPythonItem::GetAllCloseItems(const std::string& myName, const TPixelPosition& c_rPixelPosition, std::vector<DWORD>& itemVidList)
{
    DWORD dwCloseItemDistance = 1000 * 1000;

    TGroundItemInstanceMap::iterator i;
    for (i = m_GroundItemInstanceMap.begin(); i != m_GroundItemInstanceMap.end(); ++i)
    {
        TGroundItemInstance * pInstance = i->second;

        DWORD dwxDistance = DWORD(c_rPixelPosition.x - pInstance->v3EndPosition.x);
        DWORD dwyDistance = DWORD(c_rPixelPosition.y - (-pInstance->v3EndPosition.y));
        DWORD dwDistance = DWORD(dwxDistance * dwxDistance + dwyDistance * dwyDistance);

        if (dwDistance < dwCloseItemDistance && (pInstance->stOwnership == "" || pInstance->stOwnership == myName))
        {
            itemVidList.push_back(i->first);
        }
    }

    return true;
}
#endif

 

 

PythonItem.h

Search:

        bool    GetCloseMoney(const TPixelPosition & c_rPixelPosition, DWORD* dwItemID, DWORD dwDistance=300);

 

add underneath:

 

#ifdef ENABLE_QUICK_PICKUP
        bool    GetAllCloseItems(const std::string& myName, const TPixelPosition& c_rPixelPosition, std::vector<DWORD>& itemVidList);
#endif

 

 

Edited by MarcoJorge
Link to comment
Share on other sites

After using the compiled game source I get kicked after charselect... I'd been using the precompiled game file the serverfiles came with and everything was working fine until this, wasn't it also 40k game and same source? Curious why this problem now...hmm...

edit: rebooted and it seems to be working fine now!!

Edited by covfefe
Link to comment
Share on other sites

  • Contributor
10 hours ago, MarcoJorge said:

can i open server for players on my computer or only on vps

You can, if you have access to your router.
Check FAQ.txt for "kick after charselect". You basicly have to open ports in the router & use PROXY_IP feature.

9 hours ago, LethalArms said:

I did that, and the translation bug only starts after i implement the 3/4 inventory, i implemented all the armors,weapons,itens, i had before, also implemented 6º skill and changed max lvl, and the translation was completly fine, after i implemented the aditional inventory slots, it got fucked

Then you screwed up the encoding of the cpp file and the korean characters turns into something else.
Turn off notepad++ auto character encoding, or use visual studio or even a simple notepad what comes with Windows.
(Extract the edited cpp file(s) again from the tar.gz since you already saved it in a bad form)

Edited by TMP4
Link to comment
Share on other sites

  • Active+ Member
2 hours ago, TMP4 said:

Then you screwed up the encoding of the cpp file and the korean characters turns into something else.
Turn off notepad++ auto character encoding, or use visual studio or even a simple notepad what comes with Windows.
(Extract the edited cpp file(s) again from the tar.gz since you already saved it in a bad form)

How can i do that? I use two editors and they both use utf-8 (Kate / Atom) and idk how to disable auto character enconding

Link to comment
Share on other sites

  • Contributor
6 minutes ago, LethalArms said:

How can i do that? I use two editors and they both use utf-8 (Kate / Atom) and idk how to disable auto character enconding

I don't use those, so I can't tell you. In notepad++ it's in the settings > preferences > misc and disable auto detect character encoding.

Link to comment
Share on other sites

  • Contributor
24 minutes ago, Arvydas said:

I found a bug, a lot of website not working, I found a solution, the coin column missing from the account table that's why functions like registrations fails.

Hi, the `coin` column is a pserver thing, official using the `cash` column for dragon coins and `mileage` for dragon marks. 
I'm not gonna add `coin` column since that is not official and redundant, if anyone want to have it they can add it themselves.

  • Good 2
Link to comment
Share on other sites

  • Active+ Member
23 hours ago, andre1 said:

someone help me implement level 255.

https://metin2.dev/topic/27610-40250-reference-serverfile-client-src-15-available-languages/?do=findComment&comment=141489&_rid=35493

Edited by LethalArms
  • Love 1
Link to comment
Share on other sites

  • Active+ Member
1 hour ago, metin222 said:

nice guide but really confusing to make it work without problems.

What problems are u having with it? I used it multiple times and the only "problem" i found was with status points, and that is easily fixable

Link to comment
Share on other sites

Hello guy's. I have a little question for you. After i made the changes in Locale_ro(my languge),translate.lua and item_name,mob_names, i changed theat strange simbols for T and S and the server dosen't start,in FreeBSD panel it's says "Conection refused" as long i keep the server open. I try with DBcompile,questcompile,gamecompile....and othing works. Some Ideea how to fix this? i don't try iet to implement 4inventory and other system cuz im just a bigginer on this things. TY for you help

 

Link to comment
Share on other sites

2 hours ago, Lupio1024 said:

Not works on a VPS! Only runs in virtualbox! But that's not good for a production, my friends can't even connect to the server when it is on virtualbox, error while connecting to server... It is like one person only server like a singleplayer metin2.

TMP4 please give your Discord to sort this out.

I think this is a personal problem.  for this you have to deal with the topic of networks and then you should deal with the topic of networksecurity at the same time. 😉
 

Note -> port forwarding

Edited by test423klein12ss3
  • Love 1
Link to comment
Share on other sites

23 minutes ago, test423klein12ss3 said:

I think this is a personal problem.  for this you have to deal with the topic of networks and then you should deal with the topic of networksecurity at the same time. 😉
 

Note -> port forwarding

If it would work on vps then this hassle does not even need... I set up everything, Mysql server, Libs, Python on FreeBSD12.3 but it does not starts successfully...

Link to comment
Share on other sites

2 minutes ago, Lupio1024 said:

If it would work on vps then this hassle does not even need... I set up everything, Mysql server, Libs, Python on FreeBSD12.3 but it does not starts successfully...

These serverfiles are already optimized for use with the current FreeBSD version 13. You can find a lot about FreeBSD 12 and the related problems in this thread.  however, an update to version 13 is advisable.

Link to comment
Share on other sites

  • Contributor

You can run the serverfile on FreeBSD 12.3 unless you compile the game & db on the same revision.
The vm is FreeBSD13.0, so obviously the game & db grabbed from there will not work on 12.3.

Even tho FreeBSD12.3 is newer then 13.0 regarding the release date, it is just a fixed version for FreeBSD12.
It is still adviced to use FreeBSD13.0, not by me but the FreeBSD team. FreeBSD12.3 meant for people who can't use FreeBSD13.0 for reasons like hardware incompatibility or so (because 13 was a big update for FreeBSD).

Edited by TMP4
Link to comment
Share on other sites

  • Active+ Member

For some reason the 6/7 adding bonus translation is fucked up, even in a fresh server install, i didn't add anything or changed anything and i only saw it happen when adding 6/7 if its the normal 1/5 bonus its good

1adedc9db94b170cd24b82f679722b72.png

Does anyone know why?

I did a fresh install of both server and client, put only the translation (translate.lua, locale_string.txt, item_names.txt, mob_names.txt, locale name folder, db locale name) and its the only translation that i found to be fucked up, maybe im missing something or maybe the translation on my language is incomplete? (i didnt test with plain english)

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

Announcements



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