metin2united
Syron

[Source/SLN] Lycan Source

155 posts in this topic

Hello , first off all , if you don't have any ideea what C++ is and you want Wolfman/Lycan full unbugged on your server and other features , you can contact http://metin2dev.org/board/index.php?/user/2058-ken/(Ellie) 

 

I will give you everything to run a test-server with Lycan , but you have to work a lot to make something stable , there are a lot of major bugs. :)

The server files doesn't contains any data , no drops , no npcs , no quests. Only the basic things to make it work. 

 

With these , i will give you a fully compatible client in English with everything already installed. The SLN files to recompile your own launcher , and the source files for the server.

 

The compiled DB on the Test Server will run mob_proto & item_proto only from MySQL. :D

 

Screens:

djzZ2IV.jpg58Zofjg.jpg

 

Test account:

Username: syron

Password: test

 

Download links & Virustotal:

 

Lycan Test Client (EN) - https://mega.co.nz/#!7F92UIaa!Dq9OpQv66bBmIOTQmY87xNNevq8zM9LHN5PW2hWHJ-o

Wolfman Source - https://mega.co.nz/#!aN9j3LKC!jjmRcVlhk1QDY6E0HxMJTbudckTtFrlevfVM4ezvdfI

Wolfman Binary SLN - https://mega.co.nz/#!vB8AiSyJ!nN0Wy0M1vylQbU0y14LktF9668buzbGdI2ys_0_0eBo

Test Server -  https://mega.co.nz/#!CZUG2bhJ!_FNNqK0fr8btKnC2dP52oDFMVOLmN7u_Rd1VwnKvTao

item_proto.sql update in English (only rewrite , don't delete the one from Test Server, thanks to Asta ! ) - https://mega.co.nz/#!mRkiyKKB!_ALzJDovYvbNUtsEyKGmPHOll3urFIWoqAplnzFjiEQ

Start Positions for Lycan Special Map ( thanks to Denis for some informations! ) (compatible with my Test Server) - https://mega.co.nz/#!XZEDlZgL!QLPZyrhsSvMqFlPYFgPEAfLUseVXtbkqELyezXLDYnM

 

Wolfman Source - https://www.virustotal.com/en/file/e16b7987070863d4c2e6746c073c3a398bf397a6f6c42796ba672c4e2342ae43/analysis/1423440992/

Wolfman Binary SLN - https://www.virustotal.com/en/file/7e0a1b0b857c37e8bfe6f03132538b9d4197b5e6ab02d9eb6f3553ca2d0c0bf7/analysis/1423440956/

Test Server - https://www.virustotal.com/en/file/34fa1a5be24be994340488efcc3c7b0a5dd1d5b7406904d1a21cfa7faee10069/analysis/1423441220/

Start Positions - https://www.virustotal.com/en/file/485c635d93846282ec98c1f15e657c171178b6facf403559c9fb7beb54366ec2/analysis/1423488974/

  • Like 18
  • Thanks 1

Share this post


Link to post
Share on other sites

I have a question: when you made the start_position u edited start_position.cpp and start_position.h and what?

I didn't , i'm still searching that too. :D

But as i see , i tried to remove one of the 7 in start_position files ( they are 7 with wolf , and there is one with index 0 , coordonates 0 ) edit that and see if it works.

metin2_map_e1 index in the Test Server is 222

Try here:

DWORD g_create_position[4][2] =
{
    {       0,      0 },
    { 459800, 953900 },
    { 52070, 166600 },
    { 957300, 255200 },
};
 
If you manage to get that working , you can create a simple-quest file to edit that too. 

quest towntp begin 
    state start begin 
        when login with pc.getqf("first_login") == 0 begin 
            if pc.get_empire() == 1 and pc.get_job() == 4 then 
                pc.warp(xxx, yyy) 
                pc.setqf("first_login", 1) 
            if pc.get_emmpire() == 2 and pc.get_job() == 4 then 
                pc.warp(xxx, yyy) 
                pc.setqf("first_login", 1) 
            if pc.get_empire() == 3 and pc.get_job() == 4 then 
                pc.warp(xxx, yyy) 
                pc.setqf("first_login", 1) 
            else 
            end 
        end 
    end  
  • Like 2

Share this post


Link to post
Share on other sites

I did it like this :

start_position.cpp :

DWORD g_create_position_wolfman[4][2] = 
{
{  0,  0 },
{ 808100, 935100 },
{ 859300, 935100 },
{ 910500, 935100 }, 
};
 
start_position.h:
extern DWORD g_create_position_wolfman[4][2];
 
inline DWORD CREATE_START_X_WOLFMAN(BYTE e)
{
if (e >= 1 && e <= 3)
{
return g_create_position_wolfman[e][0];
}
}
 
inline DWORD CREATE_START_Y_WOLFMAN(BYTE e)
{
if (e >= 1 && e <= 3)
{
return g_create_position_wolfman[e][1];
}
}
 
still I need to do somenthing else ... with quest is oke. 

Share this post


Link to post
Share on other sites
if (!NewPlayerTable2(&player_create_packet.player_table, pinfo->name, pinfo->job, pinfo->shape, d->GetEmpire()))

to

if (!NewPlayerTable2(&player_create_packet.player_table, pinfo->name, pinfo->job, pinfo->shape, (pinfo->job == 8 ? 4 : d->GetEmpire())))

at file input_login.cpp and the only thing you need to do is to add the new coords to start_position without creating extra functions like @Tasho did.

  • Like 3

Share this post


Link to post
Share on other sites
if (!NewPlayerTable2(&player_create_packet.player_table, pinfo->name, pinfo->job, pinfo->shape, d->GetEmpire()))

to

if (!NewPlayerTable2(&player_create_packet.player_table, pinfo->name, pinfo->job, pinfo->shape, (pinfo->job == 8 ? 4 : d->GetEmpire())))

at file input_login.cpp and the only thing you need to do is to add the new coords to start_position without creating extra functions like @Tasho did.

 

 

Thanks !

Tested and working.

Added to main post.

  • Like 1

Share this post


Link to post
Share on other sites

What's the mysql password?

There is no MySQL password , it's a backup without mysql folder.

You can make a default user instead , here are the steps:

1. cd /var/db

2. rm -rf mysql ( service mysql-server stop before )

3. service mysql-server start

4. mysql ( run this in SSH ) 

5. use mysql;

6. create user 'default'@'%' identified by 'yourpassword';

7. grant all privileges on * . * to 'default'@'%' with GRANT option;

8. flush privileges;

9. exit

10. service mysql-server restart

 

And you have your own user with full privileges. Then just put up the Test Server MySQL.

  • Like 1

Share this post


Link to post
Share on other sites

What's the mysql password?

There is no MySQL password , it's a backup without mysql folder.

You can make a default user instead , here are the steps:

1. cd /var/db

2. rm -rf mysql ( service mysql-server stop before )

3. service mysql-server start

4. mysql ( run this in SSH ) 

5. use mysql;

6. create user 'default'@'%' identified by 'yourpassword';

7. grant all privileges on * . * to 'default'@'%' with GRANT option;

8. flush privileges;

9. exit

10. service mysql-server restart

 

And you have your own user with full privileges. Then just put up the Test Server MySQL.

Ok, do I need to change anything in configs?

Share this post


Link to post
Share on other sites

 

 

What's the mysql password?

There is no MySQL password , it's a backup without mysql folder.

You can make a default user instead , here are the steps:

1. cd /var/db

2. rm -rf mysql ( service mysql-server stop before )

3. service mysql-server start

4. mysql ( run this in SSH ) 

5. use mysql;

6. create user 'default'@'%' identified by 'yourpassword';

7. grant all privileges on * . * to 'default'@'%' with GRANT option;

8. flush privileges;

9. exit

10. service mysql-server restart

 

And you have your own user with full privileges. Then just put up the Test Server MySQL.

 

Ok, do I need to change anything in configs?

 

No. It's a default config.

  • Like 1

Share this post


Link to post
Share on other sites

Ok last thing, I hope...
Do I need to change start scripts?

 

When I do

sh start.sh

472Tc.png

 

Thanks so far.  :)

Share this post


Link to post
Share on other sites

Just create that user in MySQL

create user 'mt2user'@'localhost' identified by 'password_from_config';
grant all privileges on * . * to 'mt2user'@'localhost';
flush privileges;
  • Like 2

Share this post


Link to post
Share on other sites

I get connection refused.

Verify if item_proto & mob_proto are loaded from MySQL. ( message input when start db.sh ) 

or check if db is opened ( type 'ps' ) 

Try to restart db , or restart mysql-server and try again.

  • Like 1

Share this post


Link to post
Share on other sites

 

I get connection refused.

Verify if item_proto & mob_proto are loaded from MySQL. ( message input when start db.sh ) 

or check if db is opened ( type 'ps' ) 

Try to restart db , or restart mysql-server and try again.

 

I needed to start db first.

Thanks.

 

Edit: Where or how can I choose the skills?

 

Btw, thank you very much Syron for your support!!

I really appreciated!

Share this post


Link to post
Share on other sites

 

 

I get connection refused.

Verify if item_proto & mob_proto are loaded from MySQL. ( message input when start db.sh ) 

or check if db is opened ( type 'ps' ) 

Try to restart db , or restart mysql-server and try again.

 

I needed to start db first.

Thanks.

 

Edit: Where or how can I choose the skills?

 

Btw, thank you very much Syron for your support!!

I really appreciated!

 

 

Make a quest like the Skill-Teachers , and set Skill_Group to (1) :)

  • Like 1

Share this post


Link to post
Share on other sites

 

 

 

I get connection refused.

Verify if item_proto & mob_proto are loaded from MySQL. ( message input when start db.sh ) 

or check if db is opened ( type 'ps' ) 

Try to restart db , or restart mysql-server and try again.

 

I needed to start db first.

Thanks.

 

Edit: Where or how can I choose the skills?

 

Btw, thank you very much Syron for your support!!

I really appreciated!

 

 

Make a quest like the Skill-Teachers , and set Skill_Group to (1) :)

 

I forgot about the quests. facepalm.png

Thanks. 

 

Edit: When compiling the game

 

start_position.cpp:17: error: conflicting declaration 'long int g_start_map [4]'
start_position.h:8: error: 'g_start_map' has a previous declaration as 'long int g_start_map [7]'
start_position.cpp:25: error: conflicting declaration 'DWORD g_start_position [4][2]'
start_position.h:7: error: 'g_start_position' has a previous declaration as 'DWORD g_start_position [7][2]'
start_position.cpp:43: error: conflicting declaration 'DWORD g_create_position [4][2]'
start_position.h:9: error: 'g_create_position' has a previous declaration as 'DWORD g_create_position [7][2]'
start_position.cpp:51: error: conflicting declaration 'DWORD g_create_position_canada [4][2]'
start_position.h:10: error: 'g_create_position_canada' has a previous declaration as 'DWORD g_create_position_canada [7][2]'
gmake: *** [OBJDIR/start_position.o] Error 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.