Jump to content

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


Recommended Posts

Posted (edited)

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
  • 2 weeks later...
Posted (edited)

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
  • 3 weeks later...
Posted (edited)

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
  • 4 weeks later...
  • 1 month later...
  • 4 weeks later...
Posted

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
Posted

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
  • 5 weeks later...
Posted

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.

Posted (edited)

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
  • 2 weeks later...
  • 2 months later...
Posted
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!

Posted
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

  • 1 month later...
Posted (edited)

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
  • 3 weeks later...
Posted
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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...