dantoki Posted February 18, 2024 Group: Members Topic Count: 67 Topics Per Day: 0.01 Content Count: 235 Reputation: 42 Joined: 10/21/12 Last Seen: April 5 Share Posted February 18, 2024 (edited) /** * Extended Vending system [Lilith] **/ int skill_vending(struct map_session_data *sd, t_itemid nameid) { struct item_data *item; char output[1024]; nullpo_ret(sd); if (!pc_can_give_items(sd) || (item = itemdb_search(nameid)) == NULL) { sd->state.prevend = 0; sd->vend_loot = 0; sd->state.workinprogress = WIP_DISABLE_NONE; clif_skill_fail(sd, MC_VENDING, USESKILL_FAIL_LEVEL, 0); } else { sd->vend_loot = nameid; sd->state.prevend = 1; clif_openvendingreq(sd, 2 + sd->vend_lvl); sprintf(output, msg_txt(sd, 1594), item->ename.c_str()); clif_messagecolor(&sd->bl, color_table[COLOR_CYAN], output, false, SELF); } return 0; } how do you guys solve this part when canceling the vending it still go for vending and the currency becomes unknown item. if (!pc_can_give_items(sd) || (item = itemdb_search(nameid)) == NULL) { Edited February 18, 2024 by qtdan Quote Link to comment Share on other sites More sharing options...
0 LeonZ Posted February 19, 2024 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 22 Reputation: 13 Joined: 07/11/12 Last Seen: December 16, 2024 Share Posted February 19, 2024 (edited) Regarding canceling and being left with unknown item, I couldn't resolve it. However, in relation to Warning, just create a file named item_db_ex.yml in the db/import folder. With the following: Quote # Easycore's Works # - - - ########################################################################### # Item Vending Database ########################################################################### # - Item Item Aegis Name. ########################################################################### Header: Type: ITEM_DB Version: 3 Body: - Id: 30000 AegisName: Zeny Name: Zeny Type: Etc Weight: 1 - Id: 30001 AegisName: Cash Name: Cash Type: Etc Weight: 1 After creating the file, go to the db folder and open Item_db and add the following line. Quote - Path: db/import/item_db_ex.yml Edited February 19, 2024 by LeonZ Quote Link to comment Share on other sites More sharing options...
0 dantoki Posted February 19, 2024 Group: Members Topic Count: 67 Topics Per Day: 0.01 Content Count: 235 Reputation: 42 Joined: 10/21/12 Last Seen: April 5 Author Share Posted February 19, 2024 Already done that. Just the cancel is my issue. Quote Link to comment Share on other sites More sharing options...
0 LeonZ Posted February 19, 2024 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 22 Reputation: 13 Joined: 07/11/12 Last Seen: December 16, 2024 Share Posted February 19, 2024 (edited) I managed to solve it. I say at least it solved it for me, Every time I press cancel it appears that the skill failed, It depends a lot on your emulator too. Src/Map/Skill.cpp clif_item_identified(sd,idx,flag); } /** /* Extended Vending system [Lilith] **/ int skill_vending(struct map_session_data *sd, t_itemid nameid) { std::shared_ptr<item_data> item; char output[1024]; nullpo_ret(sd); if (!pc_can_give_items(sd) || (item = item_db.find(nameid)) == NULL) { sd->state.prevend = 0; sd->vend_loot = 0; sd->state.workinprogress = WIP_DISABLE_NONE; clif_skill_fail(sd, MC_VENDING, USESKILL_FAIL_LEVEL, 0); } else { sd->vend_loot = nameid; sd->state.prevend = 1; clif_openvendingreq(sd, 2 + sd->vend_lvl); sprintf(output, msg_txt(sd, 1594), item->ename.c_str()); clif_messagecolor(&sd->bl, color_table[COLOR_CYAN], output, false, SELF); } return 0; } ExtendedVending_Rev9.2.diff Edited February 19, 2024 by LeonZ Quote Link to comment Share on other sites More sharing options...
0 dantoki Posted February 20, 2024 Group: Members Topic Count: 67 Topics Per Day: 0.01 Content Count: 235 Reputation: 42 Joined: 10/21/12 Last Seen: April 5 Author Share Posted February 20, 2024 Damnnn it works thanks a lot man. Quote Link to comment Share on other sites More sharing options...
0 Notorius Posted February 13 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 109 Reputation: 1 Joined: 09/24/19 Last Seen: March 11 Share Posted February 13 On 2/19/2024 at 9:46 AM, LeonZ said: I managed to solve it. I say at least it solved it for me, Every time I press cancel it appears that the skill failed, It depends a lot on your emulator too. Src/Map/Skill.cpp clif_item_identified(sd,idx,flag); } /** /* Extended Vending system [Lilith] **/ int skill_vending(struct map_session_data *sd, t_itemid nameid) { std::shared_ptr<item_data> item; char output[1024]; nullpo_ret(sd); if (!pc_can_give_items(sd) || (item = item_db.find(nameid)) == NULL) { sd->state.prevend = 0; sd->vend_loot = 0; sd->state.workinprogress = WIP_DISABLE_NONE; clif_skill_fail(sd, MC_VENDING, USESKILL_FAIL_LEVEL, 0); } else { sd->vend_loot = nameid; sd->state.prevend = 1; clif_openvendingreq(sd, 2 + sd->vend_lvl); sprintf(output, msg_txt(sd, 1594), item->ename.c_str()); clif_messagecolor(&sd->bl, color_table[COLOR_CYAN], output, false, SELF); } return 0; } ExtendedVending_Rev9.2.diff 32.3 kB · 86 downloads Do you have the version for the latest Rathena? Quote Link to comment Share on other sites More sharing options...
0 lestari8 Posted April 12 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 2 Reputation: 0 Joined: 01/15/23 Last Seen: 4 hours ago Share Posted April 12 rev9.2 make character freeze once using vend skill. no error shown. my emu version 20240902 if anyone manage to make it work using latest rathena, please share the solution. Quote Link to comment Share on other sites More sharing options...
Question
dantoki
how do you guys solve this part when canceling the vending it still go for vending and the currency becomes unknown item.
if (!pc_can_give_items(sd) || (item = itemdb_search(nameid)) == NULL) {
Link to comment
Share on other sites
6 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.