Jump to content

Release: Extended Vending 2.0


Easycore

Recommended Posts


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

8 hours ago, Hyroshima said:

@ Rook1es

I added the manual fix, you can install the diff and make the fix I left in the post.

 

 

thanks it works.

here is a working diff patch for the latest version.

credits goes to  Hyroshima

ExtendedVending_Rev9.2.diff

  • Love 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  92
  • Reputation:   4
  • Joined:  06/21/15
  • Last Seen:  

On 12/6/2022 at 4:31 PM, Hyroshima said:

@ Rook1es

I added the manual fix, you can install the diff and make the fix I left in the post.

 

 

Thank you for update ❤️

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  92
  • Reputation:   4
  • Joined:  06/21/15
  • Last Seen:  

On 12/7/2022 at 1:19 AM, Brynner said:

thanks it works.

here is a working diff patch for the latest version.

credits goes to  Hyroshima

ExtendedVending_Rev9.2.diff 32.3 kB · 14 downloads

Is it safe to use? yes 100% working now but i can still buy on vend when i have still bound items on my inventory is it safe to use?

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  220
  • Reputation:   252
  • Joined:  04/08/13
  • Last Seen:  

Pending approval:

  • Updated item_vending_db.yml to Rapid YAML.
  • Updated some deprecated functions regarding item database.
  • Fixed an issue with bound item battle config.
  • Updated to latest GitHash: d93d41
  • Upvote 1
  • Love 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

34 minutes ago, Easycore said:

Pending approval:

  • Updated item_vending_db.yml to Rapid YAML.
  • Updated some deprecated functions regarding item database.
  • Fixed an issue with bound item battle config.
  • Updated to latest GitHash: d93d41

this is for the latest version correct?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

bump to this

sir @Easycore

i did recv error on this part

image.png.f1edd31baf8ec4c1bd95de199206b9ae.png

 

EDIT: figured out 

 

#include "../common/malloc.hpp" // aMalloc, aFree
#include "../common/nullpo.hpp"
#include "../common/showmsg.hpp" // ShowInfo
#include "../common/strlib.hpp"
#include "../common/timer.hpp"  // DIFF_TICK
#include "../common/utils.hpp"
#include "achievement.hpp"
#include "atcommand.hpp"
#include "battle.hpp"
#include "buyingstore.hpp"
#include "buyingstore.hpp" // struct s_autotrade_entry, struct s_autotrader
#include "chrif.hpp"
#include "clif.hpp"
#include "itemdb.hpp"
#include "intif.hpp" <------ the diff file doenst include this
#include "log.hpp"
#include "npc.hpp"
#include "path.hpp"
#include "pc.hpp"
#include "pc_groups.hpp"

 

Edited by AinsLord
solved
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  220
  • Reputation:   252
  • Joined:  04/08/13
  • Last Seen:  

@AinsLord

Fixed. Waiting for approval.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

On 2/1/2023 at 3:49 AM, Easycore said:

@AinsLord

Fixed. Waiting for approval.

cash and zeny is missing.

 

it works i forgot the db\import\item_db_ex.yml

image.png.e7db42f6bbe9f6328e49da9fdb774a8e.png

Edited by Brynner
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

4 hours ago, Brynner said:

cash and zeny is missing.

 

it works i forgot the db\import\item_db_ex.yml

image.png.e7db42f6bbe9f6328e49da9fdb774a8e.png

add this to your import/item_db.yml

#=============================================================
# Extended Vending Items
#=============================================================
  - Id: 30000
    AegisName: Zeny
    Name: Zeny
    Type: Etc
    Weight: 1
  - Id: 30001
    AegisName: Cash
    Name: Cash
    Type: Etc
    Weight: 1

 

Edited by AinsLord
Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

hi @Easycore there was a problem with the latest rathena git hash

https://github.com/rathena/rathena/commit/a35063dfd653ee19385a4d8599822247abdee170

i update my git to this latest pull in rathena

no problem compiling however when doing @reloaditemdb this error occurs

image.png.b0abf5e7a0d6d6cef1e0b4f59db3e97b.png

i tried to edit the file src\map\vending.cpp since the latest have this

#include <common/malloc.hpp> // aMalloc, aFree
#include <common/nullpo.hpp>
#include <common/showmsg.hpp> // ShowInfo
#include <common/strlib.hpp>
#include <common/timer.hpp>  // DIFF_TICK

and not this one

#include "../common/malloc.hpp" // aMalloc, aFree
#include "../common/nullpo.hpp"
#include "../common/showmsg.hpp" // ShowInfo
#include "../common/strlib.hpp"
#include "../common/timer.hpp"  // DIFF_TICK

i changed

#include "../common/utils.hpp"

to

#include <common/utils.hpp>

works fine after compiling

but do @reloaditemdb mapcrash error will occur

 

thanks i hope this will be notice ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  92
  • Reputation:   18
  • Joined:  11/24/14
  • Last Seen:  

On 2/14/2023 at 6:00 PM, AinsLord said:

hi @Easycore there was a problem with the latest rathena git hash

https://github.com/rathena/rathena/commit/a35063dfd653ee19385a4d8599822247abdee170

i update my git to this latest pull in rathena

no problem compiling however when doing @reloaditemdb this error occurs

image.png.b0abf5e7a0d6d6cef1e0b4f59db3e97b.png

i tried to edit the file src\map\vending.cpp since the latest have this

#include <common/malloc.hpp> // aMalloc, aFree
#include <common/nullpo.hpp>
#include <common/showmsg.hpp> // ShowInfo
#include <common/strlib.hpp>
#include <common/timer.hpp>  // DIFF_TICK

and not this one

#include "../common/malloc.hpp" // aMalloc, aFree
#include "../common/nullpo.hpp"
#include "../common/showmsg.hpp" // ShowInfo
#include "../common/strlib.hpp"
#include "../common/timer.hpp"  // DIFF_TICK

i changed

#include "../common/utils.hpp"

to

#include <common/utils.hpp>

works fine after compiling

but do @reloaditemdb mapcrash error will occur

 

thanks i hope this will be notice ?

we have the same problem, although I still don't understand which part of the mod the crash comes from. 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  92
  • Reputation:   18
  • Joined:  11/24/14
  • Last Seen:  

I found where the extend vending started to fail ... just starting from here. 
https://github.com/rathena/rathena/pull/7599

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

12 hours ago, JinYuichi said:

I found where the extend vending started to fail ... just starting from here. 
https://github.com/rathena/rathena/pull/7599

did you find any solution to this?

?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  92
  • Reputation:   18
  • Joined:  11/24/14
  • Last Seen:  

2 hours ago, AinsLord said:

encontraste alguna solucion a esto?

?

I only had to omit that one commit, all the others are correct, it does not interfere with extending vending. 

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

hi @Easycore i found some problem with the vending system

when i try to cancel the vending it shows me this

image.png.ce35afa62515b0d79258b0626780206f.png

and the vending still opens up

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  92
  • Reputation:   18
  • Joined:  11/24/14
  • Last Seen:  

1 hour ago, AinsLord said:

hi @Easycore i found some problem with the vending system

when i try to cancel the vending it shows me this

image.png.ce35afa62515b0d79258b0626780206f.png

and the vending still opens up

what you say does not happen to me, did you install the manual diff?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

On 2/20/2023 at 7:20 AM, JinYuichi said:

what you say does not happen to me, did you install the manual diff?

yea manual diff im using the latest one he updated

 

Bump to my post

yea i tried to re-diff again again using the latest rathena git

and once i press the vending skill and instead of selecting 

a currency press cancel and still the vending window will open

im using this latest rev of extended vending

ExtendedVending_[Rev8].diff

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  715
  • Reputation:   83
  • Joined:  01/05/12
  • Last Seen:  

I also have the same issues with that cancel but still the vending tab opens and item id does not exist that @AinsLord have experienced.

Edited by Lelouch vi Britannia
Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  08/26/13
  • Last Seen:  

On 2/4/2023 at 1:03 AM, Brynner said:

cash and zeny is missing.

 

it works i forgot the db\import\item_db_ex.yml

image.png.e7db42f6bbe9f6328e49da9fdb774a8e.png

In db/import-tmpl and db/import add in item_db.yml
Body:
  - Id: 30000
    AegisName: Zeny
    Name: Zeny
    Type: Etc
    Weight: 1
  - Id: 30001
    AegisName: Cash
    Name: Cash
    Type: Etc
    Weight: 1

If not resolved. create a file called item_db_ex.yml and add it inside and put it in db/import-tmpl and db/import.

I had the same problem and after doing that it fixed it.

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  6
  • Reputation:   0
  • Joined:  11/25/22
  • Last Seen:  

if the vending skill is closed, or not vending. such an error appears

Screenshot_2.png

Screenshot_3.png

Edited by adisutomo89
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   86
  • Joined:  04/10/12
  • Last Seen:  

  

On 2/19/2023 at 3:47 PM, AinsLord said:

hi @Easycore i found some problem with the vending system

when i try to cancel the vending it shows me this

image.png.ce35afa62515b0d79258b0626780206f.png

and the vending still opens up

 

On 2/27/2023 at 10:16 AM, Lelouch vi Britannia said:

I also have the same issues with that cancel but still the vending tab opens and item id does not exist that @AinsLord have experienced.

 

On 3/15/2023 at 11:32 PM, adisutomo89 said:

if the vending skill is closed, or not vending. such an error appears

Screenshot_2.png

Screenshot_3.png

 

 

To fix this you gotta change this code from the skill_vending() function;

 

if (!pc_can_give_items(sd) || (item = itemdb_search(nameid)) == NULL) 

to this 

if (!pc_can_give_items(sd) || item_db.find(nameid)) {

 

and this 

struct item_data *item;
 
to this
std::shared_ptr<item_data> item;




Ending up with something like this

/**
* 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_db.exists(nameid)) {
        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;
}
 
That change will fix the problem; 
Edited by sapitosucio
Fix by @JinYuichi
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  6
  • Reputation:   0
  • Joined:  11/25/22
  • Last Seen:  

7 hours ago, sapitosucio said:

  

 

 

 

 

To fix this you gotta change this code from the skill_vending() function;

 

if (!pc_can_give_items(sd) || (item = itemdb_search(nameid)) == NULL) 

to this 

if (!pc_can_give_items(sd) || item_db.find(nameid)) {

 

and this 

struct item_data *item;
 
to this
std::shared_ptr<item_data> item;




Ending up with something like this

/**
* 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_db.exists(nameid)) {
        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;
}
 
That change will fix the problem; 

yeyy thanks.. work perfectly 

using patch manual 9.1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

On 3/21/2023 at 3:05 PM, sapitosucio said:

  

 

 

 

 

To fix this you gotta change this code from the skill_vending() function;

 

if (!pc_can_give_items(sd) || (item = itemdb_search(nameid)) == NULL) 

to this 

if (!pc_can_give_items(sd) || item_db.find(nameid)) {

 

and this 

struct item_data *item;
 
to this
std::shared_ptr<item_data> item;




Ending up with something like this

/**
* 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_db.exists(nameid)) {
        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;
}
 
That change will fix the problem; 

in what src file should i edit this lines

thanks

 

EDIT: i modified skill.cpp after opening the veding skill and close it map server crashed and DCed

/**
* 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_db.find(nameid)) {
		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;

its exactly the same as yours

Edited by AinsLord
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  92
  • Reputation:   18
  • Joined:  11/24/14
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

5 hours ago, JinYuichi said:

i dont think this will be fixed my extended vending unless i get fresh src again and manually add it

im using this diff

ExtendedVending_[Rev8].diff

ExtendedVending_[Rev9].diff

Edited by AinsLord
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
Reply to this topic...

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