Jump to content
  • Join-Us

    https://metin2.dev is the 1st international community on Metin2 development. Join us to develop your skills and share your knowledge with the community, respectful and ethical forum.

  • 0

Guild wars bug no teleport


wubservice

Question

Good morning friends, I have a problem with guild wars, when doing battle with the first mode the following happens:

1- I do not get the mission to enter, I must teleport to appear, yes, the quest exists and has the correct name "guild_join_war.quest" something like that.

2- By clicking on the mission (when it finally appears), I give it "teleport" and it does nothing.

3- Yes, I have the maps in game99 (110 and 111).

4- I checked the "guild" files from the source with another binary and everything is exactly the same.

 

Any idea what it could be? I don't mind what happens in the first point... The real problem is in the second point It should be noted that in the other modes (arena and flags) if it teleports me

(Translate by google)

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 0
1 hour ago, SDlongju2 said:

./qc guild_join_war.quest ?

or maybe post the quest , something is wrong with the teleport coords

The quest are the same of all serverfiles... and the coordinates are the ones that come in all the serverfiles as well

Link to comment
Share on other sites

  • 0
  • Distinguished Member
1 hour ago, LordZiege said:

try add mapindex 103 and 105 to ch99 as well, they are also neccesary.

Can you explain my why? I'm just checking the source rn to find out but can't really find anything. I know they have similar names but that's it? But again i may missing something, that's why i asked explain.

------------------------------------

@wubservice The map's coords are stored in  CWarMapManager::LoadWarMapInfo

bool CWarMapManager::LoadWarMapInfo(const char * c_pszFileName)
{
    TWarMapInfo * k;

    k = M2_NEW TWarMapInfo;
    k->bType = WAR_MAP_TYPE_NORMAL;

    k->lMapIndex = 110;
    k->posStart[0].x = 48 * 100 + 32000;
    k->posStart[0].y = 52 * 100 + 0;
    k->posStart[1].x = 183 * 100 + 32000;
    k->posStart[1].y = 206 * 100 + 0;
    k->posStart[2].x = 141 * 100 + 32000;
    k->posStart[2].y = 117 * 100 + 0;

    m_map_kWarMapInfo.insert(std::make_pair(k->lMapIndex, k));

    k = M2_NEW TWarMapInfo;
    k->bType = WAR_MAP_TYPE_FLAG;

    k->lMapIndex = 111;
    k->posStart[0].x = 68 * 100 + 57600;
    k->posStart[0].y = 69 * 100 + 0;
    k->posStart[1].x = 171 * 100 + 57600;
    k->posStart[1].y = 182 * 100 + 0; 
    k->posStart[2].x = 122 * 100 + 57600;
    k->posStart[2].y = 131 * 100 + 0;

    m_map_kWarMapInfo.insert(std::make_pair(k->lMapIndex, k));
    return true;
}

Can you actually warp to these coords? Like /warp 368 52 (not needing the ending 00 in /warp)

The warp actually happens in guild_war.cpp ch->WarpSet(pos.x, pos.y, gw.map_index);

Insert something like this above there to find out it is working:

ch->ChatPacket(CHAT_TYPE_INFO, "Test: %d, %d, %d", pos.x, pos.y, gw.map_index);

If you can't see that test message, the function stops somewhere back.

Edited by TMP4
Link to comment
Share on other sites

  • 0
2 hours ago, TMP4 said:

Can you explain my why? I'm just checking the source rn to find out but can't really find anything. I know they have similar names but that's it? But again i may missing something, that's why i asked explain.

It was told me some years ago, i dont know why, i cant find any reference in the source, but some tests showed me that its "why the heck" needed. i tried several times without 103 and 105 (t1/t2) but for me it doesnt work without them.

Link to comment
Share on other sites

  • 0
12 hours ago, LordZiege said:

try add mapindex 103 and 105 to ch99 as well, they are also neccesary.

 

I already had those too

11 hours ago, TMP4 said:

Can you explain my why? I'm just checking the source rn to find out but can't really find anything. I know they have similar names but that's it? But again i may missing something, that's why i asked explain.

------------------------------------

@wubservice The map's coords are stored in  CWarMapManager::LoadWarMapInfo

bool CWarMapManager::LoadWarMapInfo(const char * c_pszFileName)
{
    TWarMapInfo * k;

    k = M2_NEW TWarMapInfo;
    k->bType = WAR_MAP_TYPE_NORMAL;

    k->lMapIndex = 110;
    k->posStart[0].x = 48 * 100 + 32000;
    k->posStart[0].y = 52 * 100 + 0;
    k->posStart[1].x = 183 * 100 + 32000;
    k->posStart[1].y = 206 * 100 + 0;
    k->posStart[2].x = 141 * 100 + 32000;
    k->posStart[2].y = 117 * 100 + 0;

    m_map_kWarMapInfo.insert(std::make_pair(k->lMapIndex, k));

    k = M2_NEW TWarMapInfo;
    k->bType = WAR_MAP_TYPE_FLAG;

    k->lMapIndex = 111;
    k->posStart[0].x = 68 * 100 + 57600;
    k->posStart[0].y = 69 * 100 + 0;
    k->posStart[1].x = 171 * 100 + 57600;
    k->posStart[1].y = 182 * 100 + 0; 
    k->posStart[2].x = 122 * 100 + 57600;
    k->posStart[2].y = 131 * 100 + 0;

    m_map_kWarMapInfo.insert(std::make_pair(k->lMapIndex, k));
    return true;
}

Can you actually warp to these coords? Like /warp 368 52 (not needing the ending 00 in /warp)

The warp actually happens in guild_war.cpp ch->WarpSet(pos.x, pos.y, gw.map_index);

Insert something like this above there to find out it is working:

ch->ChatPacket(CHAT_TYPE_INFO, "Test: %d, %d, %d", pos.x, pos.y, gw.map_index);

If you can't see that test message, the function stops somewhere back.

i will try

9 hours ago, LordZiege said:

It was told me some years ago, i dont know why, i cant find any reference in the source, but some tests showed me that its "why the heck" needed. i tried several times without 103 and 105 (t1/t2) but for me it doesnt work without them.

it didn't work for me

Link to comment
Share on other sites

  • 0

UPDATE:
I get this sysser:
Entergame: !GetMovablePosition (name Python 57600x0 map 111 changed to 70400x12800)
Entergame: !GetMovablePosition (name Python 32000x0 map 110 changed to 44800x12800)

I compare all files with other files and is the same, all is be right

17 hours ago, TMP4 said:

Can you explain my why? I'm just checking the source rn to find out but can't really find anything. I know they have similar names but that's it? But again i may missing something, that's why i asked explain.

------------------------------------

@wubservice The map's coords are stored in  CWarMapManager::LoadWarMapInfo

bool CWarMapManager::LoadWarMapInfo(const char * c_pszFileName)
{
    TWarMapInfo * k;

    k = M2_NEW TWarMapInfo;
    k->bType = WAR_MAP_TYPE_NORMAL;

    k->lMapIndex = 110;
    k->posStart[0].x = 48 * 100 + 32000;
    k->posStart[0].y = 52 * 100 + 0;
    k->posStart[1].x = 183 * 100 + 32000;
    k->posStart[1].y = 206 * 100 + 0;
    k->posStart[2].x = 141 * 100 + 32000;
    k->posStart[2].y = 117 * 100 + 0;

    m_map_kWarMapInfo.insert(std::make_pair(k->lMapIndex, k));

    k = M2_NEW TWarMapInfo;
    k->bType = WAR_MAP_TYPE_FLAG;

    k->lMapIndex = 111;
    k->posStart[0].x = 68 * 100 + 57600;
    k->posStart[0].y = 69 * 100 + 0;
    k->posStart[1].x = 171 * 100 + 57600;
    k->posStart[1].y = 182 * 100 + 0; 
    k->posStart[2].x = 122 * 100 + 57600;
    k->posStart[2].y = 131 * 100 + 0;

    m_map_kWarMapInfo.insert(std::make_pair(k->lMapIndex, k));
    return true;
}

Can you actually warp to these coords? Like /warp 368 52 (not needing the ending 00 in /warp)

The warp actually happens in guild_war.cpp ch->WarpSet(pos.x, pos.y, gw.map_index);

Insert something like this above there to find out it is working:

ch->ChatPacket(CHAT_TYPE_INFO, "Test: %d, %d, %d", pos.x, pos.y, gw.map_index);

If you can't see that test message, the function stops somewhere back.

 

I do / warp 368 52 and it teleports me but it takes me off the map and takes me to the city

Link to comment
Share on other sites

  • 0
  • Nitro Booster
1 hour ago, wubservice said:

UPDATE:
I get this sysser:
Entergame: !GetMovablePosition (name Python 57600x0 map 111 changed to 70400x12800)
Entergame: !GetMovablePosition (name Python 32000x0 map 110 changed to 44800x12800)

First of all, double check if the coordinates and the map index are correct in the server files.
Server/share/locale/map/index

103	metin2_map_t1
105	metin2_map_t2
110	metin2_map_t3
111	metin2_map_t4

Server/share/locale/map/metin2_map_t1/Setting.txt

Spoiler
ScriptType	MapSetting

CellScale	200
HeightScale	0.500000

ViewRadius	128

MapSize	3	3
BasePosition	0	25600
TextureSet	metin2_map_t1.txt
Environment	map_b_fielddungeon2.msenv

 

Server/share/locale/map/metin2_map_t2/Setting.txt

Spoiler
ScriptType	MapSetting

CellScale	200
HeightScale	0.500000

ViewRadius	128

MapSize	1	1
BasePosition	6400	0
TextureSet	textureset\metin2_map_t2.txt
Environment	t2.msenv

 

Server/share/locale/map/metin2_map_t3/Setting.txt

Spoiler
ScriptType	MapSetting

CellScale	200
HeightScale	0.500000

ViewRadius	128

MapSize	1	1
BasePosition	32000	0
TextureSet	textureset\metin2_map_t3.txt
Environment	t2.msenv

 

Server/share/locale/map/metin2_map_t4/Setting.txt

Spoiler
ScriptType	MapSetting

CellScale	200
HeightScale	0.500000

ViewRadius	128

MapSize	1	1
BasePosition	57600	0
TextureSet	textureset\metin2_map_t4.txt
Environment	moonlight04.msenv

 

This is the hidden content, please
all the files mentioned above and the additional server_attr file for each map.


Server/Game99/CONFIG

MAP_INDEX: 103 105 110 111


In your client files, you should also check if the atlasinfo.txt contains the correct coordinates for each map as in your server files.
Client/locale/atlasinfo.txt
Client/root/atlasinfo.txt

metin2_map_t1	0	25600	3	3
metin2_map_t2	6400	0	1	1
metin2_map_t3	32000	0	1	1
metin2_map_t4	57600	0	1	1

You should also double check if you have another map on top of the guild map's coordinates, sometimes this is a common issue when warping to a map or simply using the GM go command.

Here is what I mean,
Each block represents a map, as you can see T1, T2, T3 and T4 are separate from each other and no other map is on top of them.

210959AtlasMap.jpg

Now, in this case you can clearly see another map is on top of map T1 which will mess the coordinates of the map.

211138AtlasMapBricked.jpg

This is the hidden content, please
the tool "M2Koordinator - By KingSora!1" used in the demonstration above.

There is also a possibility that the map index is not correct in your source, this should be a rare case but it should also be verified.

Source/Server/game/war_map.h
Make sure you are using the correct map index.

enum EWarMapIndex
{
	WAR_MAP_INDEX_NORMAL = 110,
	WAR_MAP_INDEX_FLAG = 111,
};

 

Quote

1- I do not get the mission to enter, I must teleport to appear, yes, the quest exists and has the correct name "guild_join_war.quest" something like that.

Instead of using makequestbutton in the guild_war_join.quest you can use send_letter.
Here is an example:

Spoiler
quest guild_war_join begin
	state start begin
		when letter with (pc.get_map_index() != 71 and pc.get_map_index() != 104 and pc.get_map_index() != 72 and pc.get_map_index() != 73 and pc.get_map_index() != 208) and pc.get_map_index() <= 200 begin
			local e = guild.get_any_war()

			if e != 0 and pc.get_war_map() == 0 then
				setskin(NOWINDOW)
				send_letter(gameforge.locale.guild.war_join_request)
				--makequestbutton(gameforge.locale.guild.war_join_request)
			end
		end

		when button with (pc.get_map_index() != 71 and pc.get_map_index() != 104 and pc.get_map_index() != 72 and pc.get_map_index() != 73 and pc.get_map_index() != 208) and pc.get_map_index() <= 200 begin
			local e = guild.get_any_war()

			if e == 0 then
				say(gameforge.locale.guild.war_over)
			else
				say(string.format(gameforge.guild_war_join._10_say, guild.name(e)))

				local s = select(gameforge.locale.guild.yes, gameforge.locale.guild.no)

				if s == 1 then
					guild.war_enter(e)
				else
					setskin(NOWINDOW)
					send_letter(gameforge.locale.guild.war_join_request)
					--makequestbutton(gameforge.locale.guild.war_join_request)
				end
			end
		end
	end
end

 

 

Edited by Owsap
  • Metin2 Dev 2
  • Good 1
  • Sad 1
Link to comment
Share on other sites

  • 0
41 minutes ago, Owsap said:

First of all, double check if the coordinates and the map index are correct in the server files.
Server/share/locale/map/index

103	metin2_map_t1
105	metin2_map_t2
110	metin2_map_t3
111	metin2_map_t4

Server/share/locale/map/metin2_map_t1/Setting.txt

  Reveal hidden contents
ScriptType	MapSetting

CellScale	200
HeightScale	0.500000

ViewRadius	128

MapSize	3	3
BasePosition	0	25600
TextureSet	metin2_map_t1.txt
Environment	map_b_fielddungeon2.msenv

 

Server/share/locale/map/metin2_map_t2/Setting.txt

  Reveal hidden contents
ScriptType	MapSetting

CellScale	200
HeightScale	0.500000

ViewRadius	128

MapSize	1	1
BasePosition	6400	0
TextureSet	textureset\metin2_map_t2.txt
Environment	t2.msenv

 

Server/share/locale/map/metin2_map_t3/Setting.txt

  Reveal hidden contents
ScriptType	MapSetting

CellScale	200
HeightScale	0.500000

ViewRadius	128

MapSize	1	1
BasePosition	32000	0
TextureSet	textureset\metin2_map_t3.txt
Environment	t2.msenv

 

Server/share/locale/map/metin2_map_t4/Setting.txt

  Reveal hidden contents
ScriptType	MapSetting

CellScale	200
HeightScale	0.500000

ViewRadius	128

MapSize	1	1
BasePosition	57600	0
TextureSet	textureset\metin2_map_t4.txt
Environment	moonlight04.msenv

 

This is the hidden content, please
all the files mentioned above and the additional server_attr file for each map.


Server/Game99/CONFIG

MAP_INDEX: 103 105 110 111


In your client files, you should also check if the atlasinfo.txt contains the correct coordinates for each map as in your server files.
Client/locale/atlasinfo.txt
Client/root/atlasinfo.txt

metin2_map_t1	0	25600	3	3
metin2_map_t2	6400	0	1	1
metin2_map_t3	32000	0	1	1
metin2_map_t4	57600	0	1	1

You should also double check if you have another map on top of the guild map's coordinates, sometimes this is a common issue when warping to a map or simply using the GM go command.

Here is what I mean,
Each block represents a map, as you can see T1, T2, T3 and T4 are separate from each other and no other map is on top of them.

210959AtlasMap.jpg

Now, in this case you can clearly see another map is on top of map T1 which will mess the coordinates of the map.

211138AtlasMapBricked.jpg

This is the hidden content, please
the tool "M2Koordinator - By KingSora!1" used in the demonstration above.

There is also a possibility that the map index is not correct in your source, this should be a rare case but it should also be verified.

Source/Server/game/war_map.h
Make sure you are using the correct map index.

enum EWarMapIndex
{
	WAR_MAP_INDEX_NORMAL = 110,
	WAR_MAP_INDEX_FLAG = 111,
};

 

Instead of using makequestbutton in the guild_war_join.quest you can use send_letter.
Here is an example:

  Reveal hidden contents
quest guild_war_join begin
	state start begin
		when letter with (pc.get_map_index() != 71 and pc.get_map_index() != 104 and pc.get_map_index() != 72 and pc.get_map_index() != 73 and pc.get_map_index() != 208) and pc.get_map_index() <= 200 begin
			local e = guild.get_any_war()

			if e != 0 and pc.get_war_map() == 0 then
				setskin(NOWINDOW)
				send_letter(gameforge.locale.guild.war_join_request)
				--makequestbutton(gameforge.locale.guild.war_join_request)
			end
		end

		when button with (pc.get_map_index() != 71 and pc.get_map_index() != 104 and pc.get_map_index() != 72 and pc.get_map_index() != 73 and pc.get_map_index() != 208) and pc.get_map_index() <= 200 begin
			local e = guild.get_any_war()

			if e == 0 then
				say(gameforge.locale.guild.war_over)
			else
				say(string.format(gameforge.guild_war_join._10_say, guild.name(e)))

				local s = select(gameforge.locale.guild.yes, gameforge.locale.guild.no)

				if s == 1 then
					guild.war_enter(e)
				else
					setskin(NOWINDOW)
					send_letter(gameforge.locale.guild.war_join_request)
					--makequestbutton(gameforge.locale.guild.war_join_request)
				end
			end
		end
	end
end

 

 

SYSERR: Jul 20 20:57:32 :: Entergame: !GetMovablePosition (name Python 32000x0 map 110 changed to 44800x12800)

Same error... 😞 Is the only sysser... And it appear when i make /warp 320 0

Link to comment
Share on other sites

  • 0
  • Distinguished Member

Basicly your war map is not operating. Owsap gave you a good explanation how to check it. I just say one more thing, check if you have more then 32 map in your ch99 config file since that's the maximum, the 33th is not working by default.

Link to comment
Share on other sites

  • 0
21 minutes ago, TMP4 said:

Basicly your war map is not operating. Owsap gave you a good explanation how to check it. I just say one more thing, check if you have more then 32 map in your ch99 config file since that's the maximum, the 33th is not working by default.

The map don't work on "Arena" mode, but on "Normal" mode work good...

EDIT: My ch99 have only 19 maps

Edited by wubservice
Link to comment
Share on other sites

  • 0
  • Distinguished Member

Yes because on "normal" mode you can fight on map1 or any map. Your t1 and t2 map is not working. We don't have access to your computer to check them... So read Owsap tutorial and check what's wrong.

Edited by TMP4
Link to comment
Share on other sites

  • 0
4 minutes ago, TMP4 said:

Yes because on "normal" mode you can fight on map1 or any map. Your t1 and t2 map is not working. We don't have access to your computer to check them... So read Owsap tutorial and check what's wrong.

Is the same map, and T1 and T2 is for the empire war

Link to comment
Share on other sites

  • 0
  • Bronze

I had the same problem and I stayed with her for a while. Check if your map is initialized, put some syserr and see how far it takes you (classic method). But I know I had this problem because the folder is not initialized.

Link to comment
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


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