Jump to content

Recommended Posts

  • 2 weeks later...
  • 1 month later...
  • 2 weeks later...
Posted (edited)

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
  • 4 weeks later...
  • 1 month later...
  • 2 months later...
  • 4 weeks later...
  • 2 months later...
  • 10 months later...
Posted (edited)

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

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

  • 4 months later...
  • 5 months later...
  • 3 weeks later...
  • 5 months later...
Posted

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?

  • 3 months later...
Posted

Can someone help me add this system to my amulator?
I've tried manually adding more the emulator is with the slightly different codes nowadays. Made several errors when compiling the emulator.
If anyone with more advanced knowledge in c ++ could help me I would be very grateful, as this is only missing for me to review and for the online server.
If someone decides to call me on Skype: [email protected]

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