Surefirer Posted August 4, 2020 Posted August 4, 2020 How to make this new cart working in the game? Thanks in advance. Quote
0 Balfear Posted August 4, 2020 Posted August 4, 2020 (edited) 58 minutes ago, Surefirer said: How to make this new cart working in the game? Thanks in advance. 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); } andhttps://github.com/rathena/rathena/blob/master/src/common/mmo.hpp#L1067change toMAX_CARTS 13 Edited August 4, 2020 by Balfear Quote
0 Surefirer Posted August 4, 2020 Author Posted August 4, 2020 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. Quote
0 Balfear Posted August 4, 2020 Posted August 4, 2020 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 Quote
0 Surefirer Posted August 4, 2020 Author Posted August 4, 2020 5 minutes ago, Balfear said: Forgot this:https://github.com/rathena/rathena/blob/master/src/common/mmo.hpp#L1067 change to MAX_CARTS 13 awesome! it's working. Thank you so much. Quote
Question
Surefirer
How to make this new cart working in the game? Thanks in advance.
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.