Jump to content

Extended Vending System [August 2016 | Renewal, Pre Renewal]


NilDigit

Recommended Posts


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   9
  • Joined:  02/04/16
  • Last Seen:  

original by Napster ( https://rathena.org/board/topic/97889- )

equivalent ExtendedVendingSystem_1.9.4_r15149.diff

 

very recommend use clean server for this patch.

back up your server first before patch and use as your own risk.

 

Step 1: download patch.diff and place to rAthena working directory.

Step 2: in Git Bash, browse to rathena directory (cd command) and execute this command.

patch -p1 -l < patch.diff

or

git apply patch.diff

result should be.

 

eP6TnLR.jpg

 

Step 3: migrate database by command.

mysql --user=dbuser -p dbname < sql-files/upgrade_extended_vending_item.sql

Step 4: re-compile.
Step 5: start the server.

 

test result with rAthena server commit "f8a8c9fe798c315a3a340eb5a484d275c5c543b2" (24 August 2016)

 

jxkJVCE.jpg

 

TcC9fdC.jpg

 

Edit: Updated 10 August 2016

patch.diff

Edited by NilDigit
  • Upvote 9
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  566
  • Reputation:   34
  • Joined:  11/17/11
  • Last Seen:  

+999 REP!! /no1

Edited by Jezu
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  153
  • Reputation:   8
  • Joined:  07/01/14
  • Last Seen:  

Nice man !! Thank you!!

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  06/08/15
  • Last Seen:  

Very nice!!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  161
  • Topics Per Day:  0.04
  • Content Count:  429
  • Reputation:   5
  • Joined:  11/21/11
  • Last Seen:  

sir can you help me about this? :D

 

HI im having error on Tax Deduction .

I change TCG to Poring Coin then i Enable the tax in  conf/battle/items.conf i set Tax to: 2000
means 1000 poring Coin = to 800 Poring Coin

Example 

1 Orange Potion = 1,000 Poring Coin

after it sell it will tax 200 poring coin the vendor will recieve only 800  Poring Coin like what i highlight in the image below " REVENUE 800" but the vendor still get the 1000 Poring COIN ?? how to fix this i follow this Rewrite in Vending.c  

post-467-0-52607200-1457834755_thumb.png



 

 


 

@suyothegreat

Another Scene,
Char 1 Sells Banana for 1 cash
Char 2 buy the banana
on the side of Char 1
on the Chatbox says; Revenue from "Char2" is: 0 but the item is sold and cash is reduce from char 2

what would be the possible problem for this ?

Tax

 

Kadze already fix that.

 

 

in vending.c

 

rewrite

pc_payzeny(sd, (int)z, LOG_TYPE_VENDING, vsd);
if( battle_config.vending_tax )
z -= z * (battle_config.vending_tax/10000.);
pc_getzeny(vsd, (int)z, LOG_TYPE_VENDING, sd);
 

to 

else
{
pc_payzeny(sd, (int)z, LOG_TYPE_VENDING, vsd);
if( battle_config.vending_tax )
z -= z * (battle_config.vending_tax/10000.);
pc_getzeny(vsd, (int)z, LOG_TYPE_VENDING, sd);
}
 

 

 

Fix for 1.8.3

-Added new rev 17288

-Fix Tax Credit to @kadze

 

[Note]

Always have a backup and use first on test server.

 

attachicon.gifExtendedVendingSystem_1.8.3.patch

Thanks You ROCK ! Solid2005

 

 

 

this i can't fix 

 

 

Char 1 Sells: Apple for 1 Cash
And Char 2 Buy 1 Apple for 1 Cash.
In order to buy the apple it needs 1zeny and 1 cash.
If zeny is 0 I can't buy the item using cash.

 

unless seperate the variable for zeny and for the custom, variable z is the zeny count.

 

 

@suyothegreat

Another Scene,
Char 1 Sells Banana for 1 cash
Char 2 buy the banana
on the side of Char 1
on the Chatbox says; Revenue from "Char2" is: 0 but the item is sold and cash is reduce from char 2

what would be the possible problem for this ?

Tax

 

Kadze already fix that.

 

 

in vending.c

 

rewrite

pc_payzeny(sd, (int)z, LOG_TYPE_VENDING, vsd);
if( battle_config.vending_tax )
z -= z * (battle_config.vending_tax/10000.);
pc_getzeny(vsd, (int)z, LOG_TYPE_VENDING, sd);
 

to 

else
{
pc_payzeny(sd, (int)z, LOG_TYPE_VENDING, vsd);
if( battle_config.vending_tax )
z -= z * (battle_config.vending_tax/10000.);
pc_getzeny(vsd, (int)z, LOG_TYPE_VENDING, sd);
}
 

 

 

Fix for 1.8.3

-Added new rev 17288

-Fix Tax Credit to @kadze

 

[Note]

Always have a backup and use first on test server.

 

attachicon.gifExtendedVendingSystem_1.8.3.patch

 

Edited by Kariton Revolution
Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  04/30/13
  • Last Seen:  

HO!!I need it. Thanks you NilDigit!!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.04
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

hi i've successfully applied this manually but it has warning on compiles and errors on mapserver my clientinfo's lang type is 0 any of you got this errors too?

EDIT: FIX now my problem is

[Warning]: itemdb_search: Item ID 0 does not exists in the item_db. Using dummy data. //this stuff

post-3976-0-51028000-1459600685_thumb.jpg

post-3976-0-77005300-1459600726_thumb.jpg

Edited by Yonko
Link to comment
Share on other sites

  • 4 weeks later...

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

Does any have an issue when the server restart all players that uses the extended vending system will turn all currency back into zeny?

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   9
  • Joined:  02/04/16
  • Last Seen:  

Updated 8 June 2016, rAthena Commit 98fdf31fb33746261d19d701ea2dcbee7ee73730
https://github.com/rathena/rathena/commit/98fdf31fb33746261d19d701ea2dcbee7ee73730

Link to comment
Share on other sites

  • 4 weeks later...

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

Maybe for your next update remove the map_msg.conf.orig also please change this...

		vendings_db, sd->vender_id, sd->status.account_id, sd->status.char_id, sd->status.sex == 0 ? 'F' : 'M', map[sd->bl.m].name, sd->bl.x, sd->bl.y, message_sql, sd->state.autotrade, at ? at->dir : sd->ud.dir, at ? at->head_dir : sd->head_dir, at ? at->sit : pc_issit(sd)) != SQL_SUCCESS) {

it should be this

		vendings_db, sd->vender_id, sd->status.account_id, sd->status.char_id, sd->status.sex == 0 ? 'F' : 'M', map[sd->bl.m].name, sd->bl.x, sd->bl.y, message_sql, sd->state.autotrade, at ? at->dir : sd->ud.dir, at ? at->head_dir : sd->head_dir, at ? at->sit : pc_issit(sd), sd->vend_loot ) != SQL_SUCCESS ) {
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  206
  • Reputation:   11
  • Joined:  12/06/11
  • Last Seen:  

Is the updated working?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  149
  • Reputation:   35
  • Joined:  04/01/13
  • Last Seen:  

original by Napster ( https://rathena.org/board/topic/97889- )

equivalent ExtendedVendingSystem_1.9.4_r15149.diff

 

very recommend use clean server for this patch.

back up your server first before patch and use as your own risk.

 

Step 1: download patch.diff and place to rAthena directory.

Step 2: in Git Bash, browse to rathena directory (cd command) and execute this command.

patch -p1 -l < patch.diff

or

git apply patch.diff

result should be.

 

eP6TnLR.jpg

 

Step 3: migrate database by command.

mysql --user=dbuser -p dbname < sql-files/upgrade_extended_vending_item.sql

Step 4: start the server.

 

test result with rAthena server commit "98fdf31fb33746261d19d701ea2dcbee7ee73730" (June 8, 2016)

 

jxkJVCE.jpg

 

TcC9fdC.jpg

 

Edit: Updated 8 June 2016

 

I found this warning at compile time:
Use rAthena review of the day 07/07/2016.
1>c:\users\douglas\desktop\rathena-master\src\map\skill.c(7310): warning C4013: 'clif_vend' undefined; assuming extern returning int
2>  login-server.vcxproj -> C:\Users\Douglas\Desktop\rathena-master\vcproj-10\..\login-server.exe
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  206
  • Reputation:   11
  • Joined:  12/06/11
  • Last Seen:  

U need to define the

'clif_vend' maybe in the map.h or skill.h.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  149
  • Reputation:   35
  • Joined:  04/01/13
  • Last Seen:  

U need to define the

'clif_vend' maybe in the map.h or skill.h.

How to do this?

Link to comment
Share on other sites

  • 5 weeks later...

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   9
  • Joined:  02/04/16
  • Last Seen:  

Updated 10 August 2016, rAthena Commit 5fcb3bff058cf2268328aee8b74874acb896216b
https://github.com/rathena/rathena/commit/5fcb3bff058cf2268328aee8b74874acb896216b

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  383
  • Reputation:   121
  • Joined:  03/31/12
  • Last Seen:  

Thank you :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

original by Napster ( https://rathena.org/board/topic/97889- )

equivalent ExtendedVendingSystem_1.9.4_r15149.diff

 

very recommend use clean server for this patch.

back up your server first before patch and use as your own risk.

 

Step 1: download patch.diff and place to rAthena working directory.

Step 2: in Git Bash, browse to rathena directory (cd command) and execute this command.

patch -p1 -l < patch.diff

or

git apply patch.diff

result should be.

 

eP6TnLR.jpg

 

Step 3: migrate database by command.

mysql --user=dbuser -p dbname < sql-files/upgrade_extended_vending_item.sql

Step 4: re-compile.

Step 5: start the server.

 

test result with rAthena server commit "5fcb3bff058cf2268328aee8b74874acb896216b" (10 August 2016)

 

jxkJVCE.jpg

 

TcC9fdC.jpg

 

Edit: Updated 10 August 2016

Thank you for this updating this patch.

We appreciate it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.04
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

Updated 10 August 2016, rAthena Commit 5fcb3bff058cf2268328aee8b74874acb896216b

https://github.com/rathena/rathena/commit/5fcb3bff058cf2268328aee8b74874acb896216b

Thanks but is this warning on compiler bring an issue?

 

1>c:\users\admin\desktop\rathena\serverupdate\rathena\src\map\skill.c(7316): warning C4013: 'clif_vend' undefined; assuming extern returning int

 

U need to define the

'clif_vend' maybe in the map.h or skill.h.

How to do this?

 

i try this the warnings has been removed but i didnt test coz i'm on my work right now. so i didnt know how it looks on the game

go to clif.h

find

void clif_SelectCart(struct map_session_data *sd);

under it just copy and paste this then recompile

 

/**
 
* Extended Vending system [Lilith]
 
**/
 
int clif_vend(struct map_session_data *sd, int skill_lv);
Edited by Yonko
  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   9
  • Joined:  02/04/16
  • Last Seen:  

Updated 24 August 2016, rAthena Commit f8a8c9fe798c315a3a340eb5a484d275c5c543b2

 
Thank Yonko for fix warning.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  206
  • Reputation:   11
  • Joined:  12/06/11
  • Last Seen:  

 

Updated 24 August 2016, rAthena Commit f8a8c9fe798c315a3a340eb5a484d275c5c543b2

 
Thank Yonko for fix warning.

 

Thank you :D

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   1
  • Joined:  11/02/14
  • Last Seen:  

On 6/30/2016 at 8:43 AM, Lelouch vi Britannia said:

Maybe for your next update remove the map_msg.conf.orig also please change this...


		vendings_db, sd->vender_id, sd->status.account_id, sd->status.char_id, sd->status.sex == 0 ? 'F' : 'M', map[sd->bl.m].name, sd->bl.x, sd->bl.y, message_sql, sd->state.autotrade, at ? at->dir : sd->ud.dir, at ? at->head_dir : sd->head_dir, at ? at->sit : pc_issit(sd)) != SQL_SUCCESS) {

it should be this


		vendings_db, sd->vender_id, sd->status.account_id, sd->status.char_id, sd->status.sex == 0 ? 'F' : 'M', map[sd->bl.m].name, sd->bl.x, sd->bl.y, message_sql, sd->state.autotrade, at ? at->dir : sd->ud.dir, at ? at->head_dir : sd->head_dir, at ? at->sit : pc_issit(sd), sd->vend_loot ) != SQL_SUCCESS ) {

Thank you so much mate! :) My issue about restart was fixed!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

3 hours ago, pongpong said:

Thank you so much mate! :) My issue about restart was fixed!

What hash are you using? I'm currently having problems with extended vending system. I've posted it here LINK

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  78
  • Reputation:   12
  • Joined:  05/08/16
  • Last Seen:  

HI! I  try install in the last rev of rA and dont work HI! I  try install in the last rev of rA and dont work :(

3>..\src\map\vending.c(197): error C2039: 'inventory': is not a member of 'mmo_charstatus'
3>  c:\users\hi\see_->\folder\src\map\../common/mmo.h(426): note: see declaration of 'mmo_charstatus'

 

Edited by Darknessfmy
Link to comment
Share on other sites

  • 3 weeks later...

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

On 12/26/2016 at 2:39 AM, Darknessfmy said:

HI! I  try install in the last rev of rA and dont work HI! I  try install in the last rev of rA and dont work :(


3>..\src\map\vending.c(197): error C2039: 'inventory': is not a member of 'mmo_charstatus'
3>  c:\users\hi\see_->\folder\src\map\../common/mmo.h(426): note: see declaration of 'mmo_charstatus'

 


Try changing this

status.inventory

to this

inventory.u.items_inventory

 

and this

status.cart

to this

cart.u.items_cart

 

This was changed when they added the Optimized Inventory, Cart Inventory, and Storage usage

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  78
  • Reputation:   12
  • Joined:  05/08/16
  • Last Seen:  

Hey @Lelouch vi Britannia thank you very 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
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...