Jump to content
  • 0

How to make the new cart working


Surefirer

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.02
  • Content Count:  113
  • Reputation:   1
  • Joined:  12/15/18
  • Last Seen:  

How to make this new cart working in the game? Thanks in advance.

1.JPG.267ed41e38e42e007cae862cd0530bab.JPG

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  255
  • Reputation:   232
  • Joined:  07/24/13
  • Last Seen:  

58 minutes ago, Surefirer said:

How to make this new cart working in the game? Thanks in advance.

1.JPG.267ed41e38e42e007cae862cd0530bab.JPG

Add new cart in function (// new cart)
https://github.com/rathena/rathena/blob/master/src/map/clif.cpp#L12332

void clif_parse_ChangeCart(int fd,struct map_session_data *sd)
{// TODO: State tracking?
	int type;

	if( !sd || pc_checkskill(sd, MC_CHANGECART) < 1 )
		return;

#ifdef RENEWAL
	if (sd->npc_id || pc_hasprogress(sd, WIP_DISABLE_SKILLITEM)) {
		clif_msg(sd, WORK_IN_PROGRESS);
		return;
	}
#endif

	type = (int)RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]);

	if( 
#ifdef NEW_CARTS
		(type == 9 && sd->status.base_level > 130) ||
		(type == 8 && sd->status.base_level > 120) ||
		(type == 7 && sd->status.base_level > 110) ||
		(type == 6 && sd->status.base_level > 100) ||
		(type == 13 && sd->status.base_level > 100) || // new cart
#endif
		(type == 5 && sd->status.base_level > 90) ||
	    (type == 4 && sd->status.base_level > 80) ||
	    (type == 3 && sd->status.base_level > 65) ||
	    (type == 2 && sd->status.base_level > 40) ||
	    (type == 1))
		pc_setcart(sd, type);
}

and
https://github.com/rathena/rathena/blob/master/src/common/mmo.hpp#L1067
change to
MAX_CARTS 13

Edited by Balfear
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.02
  • Content Count:  113
  • Reputation:   1
  • Joined:  12/15/18
  • Last Seen:  

27 minutes ago, Balfear said:

Add new cart in function (// new cart)
https://github.com/rathena/rathena/blob/master/src/map/clif.cpp#L12332


void clif_parse_ChangeCart(int fd,struct map_session_data *sd)
{// TODO: State tracking?
	int type;

	if( !sd || pc_checkskill(sd, MC_CHANGECART) < 1 )
		return;

#ifdef RENEWAL
	if (sd->npc_id || pc_hasprogress(sd, WIP_DISABLE_SKILLITEM)) {
		clif_msg(sd, WORK_IN_PROGRESS);
		return;
	}
#endif

	type = (int)RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]);

	if( 
#ifdef NEW_CARTS
		(type == 9 && sd->status.base_level > 130) ||
		(type == 8 && sd->status.base_level > 120) ||
		(type == 7 && sd->status.base_level > 110) ||
		(type == 6 && sd->status.base_level > 100) ||
		(type == 13 && sd->status.base_level > 100) || // new cart
#endif
		(type == 5 && sd->status.base_level > 90) ||
	    (type == 4 && sd->status.base_level > 80) ||
	    (type == 3 && sd->status.base_level > 65) ||
	    (type == 2 && sd->status.base_level > 40) ||
	    (type == 1))
		pc_setcart(sd, type);
}

 

Hello, I just tried this method, it didn't work, do I have to add something in the client side file? where can I find the type 13 reference? Thanks. 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  255
  • Reputation:   232
  • Joined:  07/24/13
  • Last Seen:  

5 minutes ago, Surefirer said:

Hello, I just tried this method, it didn't work, do I have to add something in the client side file? where can I find the type 13 reference? Thanks. 

Forgot this:
https://github.com/rathena/rathena/blob/master/src/common/mmo.hpp#L1067
change to
MAX_CARTS 13

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.02
  • Content Count:  113
  • Reputation:   1
  • Joined:  12/15/18
  • Last Seen:  

5 minutes ago, Balfear said:

awesome! it's working. Thank you so much.

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