Jump to content
Lilith

Extended Vending System [1.8]

Recommended Posts

Got this working on older eA Revisions.

Replace "USESKILL_FAIL_LEVEL" with "0" without the quotations, and replace "LOG_TYPE_VENDING" with ""V"" including the quotations. Look at your output build in Visual Studio to know where to replace them, it should tell you the line number where the errors are.

 

Since you have to put the patch in manually, I'd suggest downloading a .diff reader. I use GVIM. All the manual additions are straightforward, don't change any of it, except the changes above, even if it looks like it doesn't fit with the rest of the parameters.

 

Be careful of the itemdb.c addition, make sure the code is above:

/*======================================

  * Applies gender restrictions according to settings. [Skotlex]

  *======================================*/

If all is done correctly, the only warning that comes up is "warning C4020: 'pc_delitem' : too many actual parameters", but you can ignore this. Or you can just remove the ",6", since you're using the eA_patch, to get rid of the warning.

Edited by Pillows
Link to comment
Share on other sites

how to put the patch 

 ExtendedVendingSystem_1.8.1.patch you mean

 

It's either you apply it manually or like this https://rathena.org/board/topic/84289-how-to-apply-patch-by-use-diff-on-linux/

Link to comment
Share on other sites

Does anyone know how to solve this problem ?

 

PrintScreen

 

You might need to follow some fixes and update it on this thread https://rathena.org/board/topic/97889-extended-vending-system-19-cleanup-fix/

Link to comment
Share on other sites

 

Does anyone know how to solve this problem ?

 

PrintScreen

 

You might need to follow some fixes and update it on this thread https://rathena.org/board/topic/97889-extended-vending-system-19-cleanup-fix/

 

Thank you, had downloaded the current version of the system, without being using the latest update of the emulator .

Link to comment
Share on other sites

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 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-34159500-1457768812_thumb.png

And Here's my Vending.c 

 

 

/**

* Extended Vending system [Lilith]
**/
if(battle_config.extended_vending){
if(vsd->vend_loot == ITEMID_ZENY || !vsd->vend_loot) {
 
//Logs (V)ending Zeny [Lupus]
log_zeny(vsd, LOG_TYPE_VENDING, sd, (int)z);
 
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);
 
} else if(vsd->vend_loot == ITEMID_CASH) {
pc_paycash(sd,(int)z,0, LOG_TYPE_VENDING);
pc_getcash(vsd,(int)z,0, LOG_TYPE_VENDING);
} else {
for( i = 0; i < MAX_INVENTORY; i++)
if(sd->status.inventory.nameid == vsd->vend_loot)
{
struct item *item;
item = &sd->status.inventory;
pc_additem(vsd,item,(int)z, LOG_TYPE_VENDING);
}
pc_delitem(sd,pc_search_inventory(sd, vsd->vend_loot),(int)z,0,6, LOG_TYPE_VENDING);
 
}
}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);
}

 

@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

ahmm should i put this to battle/features.conf??


// Extended Vending System [Lilith]
// Enable or disable extended vending system? (Note 1)
extended_vending: yes
// Show currency's name in vending board? (Note 1)
show_item_vending: yes
// Show more info about buying? (Note 1)
ex_vending_info: yes
// Item ID for Zeny. Set to 0 if you don't want use Zeny.
item_zeny: 30000
// Item ID for Cash. Set to 0 if you don't want use Cash.
item_cash: 30001


bump


is this working on rAmod???

Link to comment
Share on other sites

Hi I manage to make it work.. but the problem is when i try to purchase an item in vend it says " you do not have enough items" even tho i have all the requirements :( what could be the problem?

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.