Jump to content
  • 0
Sora7

increasing the '/memo', warp skill

Question

total noob here,

I've successfully increase the /memo points at mmo.h, but when using the skill warp, it still shows only 3 places, exclude the save point.
how do i increase the choices of selecting my memo points?

Link to comment
Share on other sites

27 answers to this question

Recommended Posts

  • 0

Open ../src/common/mmo.h and change:

#define MAX_MEMOPOINTS 3

to:

#define MAX_MEMOPOINTS 9

 

Open ../src/map/clif.h and change:

void clif_skill_warppoint(struct map_session_data* sd, uint16 skill_id, uint16 skill_lv, unsigned short map1, unsigned short map2, unsigned short map3, unsigned short map4);

to:

void clif_skill_warppoint(struct map_session_data* sd, uint16 skill_id, uint16 skill_lv, unsigned short map1, unsigned short map2, unsigned short map3, unsigned short map4, unsigned short map5, unsigned short map6, unsigned short map7, unsigned short map8, unsigned short map9, unsigned short map10);

 

Open ../src/map/clif.c and in the function "clif_skill_warppoint" change:

void clif_skill_warppoint(struct map_session_data* sd, uint16 skill_id, uint16 skill_lv, unsigned short map1, unsigned short map2, unsigned short map3, unsigned short map4)

to:

void clif_skill_warppoint(struct map_session_data* sd, uint16 skill_id, uint16 skill_lv, unsigned short map1, unsigned short map2, unsigned short map3, unsigned short map4, unsigned short map5, unsigned short map6, unsigned short map7, unsigned short map8, unsigned short map9, unsigned short map10)

after:

	if (map4 > 0) mapindex_getmapname_ext(mapindex_id2name(map4), (char*)WFIFOP(fd,52));

add:

	if (map5 > 0) mapindex_getmapname_ext(mapindex_id2name(map5), (char*)WFIFOP(fd,68));
	if (map6 > 0) mapindex_getmapname_ext(mapindex_id2name(map6), (char*)WFIFOP(fd,84));
	if (map7 > 0) mapindex_getmapname_ext(mapindex_id2name(map7), (char*)WFIFOP(fd,100));
	if (map8 > 0) mapindex_getmapname_ext(mapindex_id2name(map8), (char*)WFIFOP(fd,116));
	if (map9 > 0) mapindex_getmapname_ext(mapindex_id2name(map9), (char*)WFIFOP(fd,132));
	if (map10 > 0) mapindex_getmapname_ext(mapindex_id2name(map10), (char*)WFIFOP(fd,148));

change:

	10, 39,  4, 10, 31, 35, 10, 18,  2, 13, 15, 20, 68,  2,  3, 16,

to:

	10, 39,  4, 10, 31, 35, 10, 18,  2, 13, 15, 20, 164,  2,  3, 16,

 

Open ../src/map/skills.c and in the function "skill_castend_nodamage_id" change:

			clif_skill_warppoint(sd,skill_id,skill_lv, (unsigned short)-1,0,0,0);
		else
			clif_skill_warppoint(sd,skill_id,skill_lv, (unsigned short)-1,sd->status.save_point.map,0,0);

to:

			clif_skill_warppoint(sd,skill_id,skill_lv, (unsigned short)-1,0,0,0,0,0,0,0,0,0);
		else
			clif_skill_warppoint(sd,skill_id,skill_lv, (unsigned short)-1,sd->status.save_point.map,0,0,0,0,0,0,0,0);

In the function "skill_castend_pos" change:

		clif_skill_warppoint(sd, skill_id, skill_lv, sd->status.save_point.map,
			(skill_lv >= 2) ? sd->status.memo_point[0].map : 0,
			(skill_lv >= 3) ? sd->status.memo_point[1].map : 0,
			(skill_lv >= 4) ? sd->status.memo_point[2].map : 0
		);

to:

		clif_skill_warppoint(sd, skill_id, skill_lv, sd->status.save_point.map,
			(skill_lv >= 2) ? sd->status.memo_point[0].map : 0,
			(skill_lv >= 3) ? sd->status.memo_point[1].map : 0,
			(skill_lv >= 4) ? sd->status.memo_point[2].map : 0,
			(skill_lv >= 4) ? sd->status.memo_point[3].map : 0,
			(skill_lv >= 4) ? sd->status.memo_point[4].map : 0,
			(skill_lv >= 4) ? sd->status.memo_point[5].map : 0,
			(skill_lv >= 4) ? sd->status.memo_point[6].map : 0,
			(skill_lv >= 4) ? sd->status.memo_point[7].map : 0,
			(skill_lv >= 4) ? sd->status.memo_point[8].map : 0
		);

In the function "skill_castend_map" change:

	const struct point *p[4];

to:

	const struct point *p[10];

after:

		p[3] = &sd->status.memo_point[2];

add:

		p[4] = &sd->status.memo_point[3];
		p[5] = &sd->status.memo_point[4];
		p[6] = &sd->status.memo_point[5];
		p[7] = &sd->status.memo_point[6];
		p[8] = &sd->status.memo_point[7];
		p[9] = &sd->status.memo_point[8];

change:

		if( lv > 4 ) lv = 4; // crash prevention

to:

		if (lv >= 4)
			lv = 10;

 

Save changes, compile the server and use this EXE:

https://mega.nz/#!pFdSELpL!Tb4dxxOUyiUqJFTPjSbfgYF4CIuKB0m_TQJ0LBVzu6Y

Edited by Functor
  • Upvote 1
Link to comment
Share on other sites

  • 0

Hello! How many warp points do you want to have in warp list?

You need to modify src of emulator and EXE.

Please, upload your EXE and send me a link.

Edited by Functor
Link to comment
Share on other sites

  • 0
8 hours ago, Functor said:

Hello! How many warp points do you want to have in warp list?

You need to modify src of emulator and EXE.

Please, upload your EXE and send me a link.

Hi!
if its ok with you? can you instruct me on how to do it?
i really wanna learn, for future purposes.. thank you.
sry for inconvenience.

Link to comment
Share on other sites

  • 0

I can patch EXE and give manual to modify src of emulator.

9 hours ago, Functor said:

Please, upload your EXE and send me a link.

Edited by Functor
Link to comment
Share on other sites

  • 0

Why do you ignore my question?

12 hours ago, Functor said:

How many warp points do you want to have in warp list?

I asked it not for fun.

Modification of EXE and src depends on it.

Edited by Functor
Link to comment
Share on other sites

  • 0
1 hour ago, Functor said:

Why do you ignore my question?

I asked it not for fun.

Modification of EXE and src depends on it.

im sorry,
10 pls.

Link to comment
Share on other sites

  • 0

Wow! i didn't know this need a lot of adding and editing

Thank you very much for this!

sir, the 10 warp points are working.

but i notice when i logged out and came back to log-in, the saved memo points are gone..

 

Edited by Sora7
Link to comment
Share on other sites

  • 0
1 hour ago, Shakto said:

Hello Functor, do you have the modified exe with from version of Artur9211 ?

Thank you

You should apply patches by using NEMO patcher and upload EXE. I will modify it.

Link to comment
Share on other sites

  • 0
11 hours ago, Functor said:

You should apply patches by using NEMO patcher and upload EXE. I will modify it.

Here you are.

Thank you !

2020-07-15bRagexe_patched.exe

Btw i couldn't figure out what to do with :

 

change:

	10, 39,  4, 10, 31, 35, 10, 18,  2, 13, 15, 20, 68,  2,  3, 16,

to:

	10, 39,  4, 10, 31, 35, 10, 18,  2, 13, 15, 20, 164,  2,  3, 16,

i couldn't find it in last rev of rathena in cliff.cpp

Edited by Shakto
add question
Link to comment
Share on other sites

  • 0

Since versions "2017-05-02aRagexe" and "2017-04-19bRagexeRE" there is no need to modify the code of EXE. These EXEs support the new network packet 0xABE. I will check the code of the latest rAthena after arriving at home.

Link to comment
Share on other sites

  • 0
24 minutes ago, Functor said:

Since versions "2017-05-02aRagexe" and "2017-04-19bRagexeRE" there is no need to modify the code of EXE. These EXEs support the new network packet 0xABE. I will check the code of the latest rAthena after arriving at home.

Well I do see the following inside packets_struct.hpp.

#if PACKETVER_MAIN_NUM >= 20170502 || PACKETVER_RE_NUM >= 20170419 || defined(PACKETVER_ZERO)
	skilWarpPointType = 0xabe,
#else
	skilWarpPointType = 0x11c,
#endif

But it's not being used anywhere (or Visual Studio is fooling me).

Link to comment
Share on other sites

  • 0
5 minutes ago, Neo-Mind said:

But it's not being used anywhere (or Visual Studio is fooling me).

Correct. Developers of rAthena haven't used it yet. Need to modify the code of the function "clif_skill_warppoint".

Edited by Functor
Link to comment
Share on other sites

  • 0

I changed 

	WFIFOHEAD(fd,packet_len(0x11c));
	WFIFOW(fd,0) = 0x11c;
	WFIFOW(fd,2) = skill_id;
	memset(WFIFOP(fd,4), 0x00, 4*MAP_NAME_LENGTH_EXT);
	if (map1 == (unsigned short)-1) strcpy(WFIFOCP(fd,4), "Random");
	else // normal map name
	if (map1 > 0) mapindex_getmapname_ext(mapindex_id2name(map1), WFIFOCP(fd,4));
	if (map2 > 0) mapindex_getmapname_ext(mapindex_id2name(map2), WFIFOCP(fd,20));
	if (map3 > 0) mapindex_getmapname_ext(mapindex_id2name(map3), WFIFOCP(fd,36));
	if (map4 > 0) mapindex_getmapname_ext(mapindex_id2name(map4), WFIFOCP(fd,52));
	WFIFOSET(fd,packet_len(0x11c));

 

by

 

	WFIFOHEAD(fd,packet_len(0xabe));
	WFIFOW(fd,0) = 0xabe;
	WFIFOW(fd,2) = skill_id;
	memset(WFIFOP(fd,4), 0x00, 4*MAP_NAME_LENGTH_EXT);
	if (map1 == (unsigned short)-1) strcpy(WFIFOCP(fd,4), "Random");
	else // normal map name
	if (map1 > 0) mapindex_getmapname_ext(mapindex_id2name(map1), WFIFOCP(fd,4));
	if (map2 > 0) mapindex_getmapname_ext(mapindex_id2name(map2), WFIFOCP(fd,20));
	if (map3 > 0) mapindex_getmapname_ext(mapindex_id2name(map3), WFIFOCP(fd,36));
	if (map4 > 0) mapindex_getmapname_ext(mapindex_id2name(map4), WFIFOCP(fd,52));
	if (map5 > 0) mapindex_getmapname_ext(mapindex_id2name(map5), WFIFOCP(fd,68));
	if (map6 > 0) mapindex_getmapname_ext(mapindex_id2name(map6), WFIFOCP(fd,84));
	if (map7 > 0) mapindex_getmapname_ext(mapindex_id2name(map7), WFIFOCP(fd,100));
	if (map8 > 0) mapindex_getmapname_ext(mapindex_id2name(map8), WFIFOCP(fd,116));
	if (map9 > 0) mapindex_getmapname_ext(mapindex_id2name(map9), WFIFOCP(fd,132));
	if (map10 > 0) mapindex_getmapname_ext(mapindex_id2name(map10), WFIFOCP(fd,248));
	WFIFOSET(fd,packet_len(0xabe));

but the warp skill doesn't react on the client, no menu open

Link to comment
Share on other sites

  • 0

Thanks for your time and work.Unfortunately, I am still only shown the 4 standard maps.
I am using the version 2020-06-17aRagexe.
Do I need to install anything apart from the mod?

Link to comment
Share on other sites

  • 0
1 hour ago, WhiteEagle said:

Thanks for your time and work.Unfortunately, I am still only shown the 4 standard maps.
I am using the version 2020-06-17aRagexe.
Do I need to install anything apart from the mod?

No. Have you recompiled the server?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.