schan
New member
- Messages
- 60
- Points
- 0
- Github
- xschan
- Emulator
Hi,
I need to add something like vending_tax in items_conf but instead of giving tax for all, I'd like to add a separate tax for Guild members and Guild allies.
These are the changes I made:
srcmapbattle.c
line 6490
+{ "vending_tax_ally", &battle_config.vending_tax_ally, 0, 0, 10000, },
srcmapbattle.h
line 257
+int vending_tax_ally;
confbattleitems_conf.txt
+vending_tax_ally: 1200
srcmapvending.c
line 162
+//-- Check for Guild/Ally+ if( guild->check_member == 1 || guild->check_alliance == 0 ){+ pc->payzeny(sd, (int)z, LOG_TYPE_VENDING, vsd);+ if( battle_config.vending_tax_ally )+ z -= z * (battle_config.vending_tax_ally/10000.);+ pc->getzeny(vsd, (int)z, LOG_TYPE_VENDING, sd);+ } 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);
I'm not sure with what I did but it didn't work as expected. No errors were returned after compiling.
Did I miss anything?
Thank you!
I need to add something like vending_tax in items_conf but instead of giving tax for all, I'd like to add a separate tax for Guild members and Guild allies.
These are the changes I made:
srcmapbattle.c
line 6490
+{ "vending_tax_ally", &battle_config.vending_tax_ally, 0, 0, 10000, },
srcmapbattle.h
line 257
+int vending_tax_ally;
confbattleitems_conf.txt
+vending_tax_ally: 1200
srcmapvending.c
line 162
+//-- Check for Guild/Ally+ if( guild->check_member == 1 || guild->check_alliance == 0 ){+ pc->payzeny(sd, (int)z, LOG_TYPE_VENDING, vsd);+ if( battle_config.vending_tax_ally )+ z -= z * (battle_config.vending_tax_ally/10000.);+ pc->getzeny(vsd, (int)z, LOG_TYPE_VENDING, sd);+ } 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);
I'm not sure with what I did but it didn't work as expected. No errors were returned after compiling.
Did I miss anything?
Thank you!
Last edited by a moderator: