remove discounts

Break San

New member
Messages
240
Points
0
Location
França
How do I remove the item sold at discounts of npc and purchased by merchants / stalker.
 
#Example Here from 6500 to 4875 zeny
 
cGIX1Gc.png

 
two places:

npc.c

// custom merchant shop exp bonus if( battle_config.shop_exp > 0 && z > 0 && (skill_t = pc->checkskill2(sd,idx)) > 0 ) { if( sd->status.skill[idx].flag >= SKILL_FLAG_REPLACED_LV_0 ) skill_t = sd->status.skill[idx].flag - SKILL_FLAG_REPLACED_LV_0; if( skill_t > 0 ) { z = z * (double)skill_t * (double)battle_config.shop_exp/10000.; if( z < 1 ) z = 1; pc->gainexp(sd,NULL,0,(int)z, false); } }

pc.c

Code:
int pc_modifybuyvalue(struct map_session_data *sd,int orig_value) {	int skill_lv,val = orig_value,rate1 = 0,rate2 = 0;	if((skill_lv=pc->checkskill(sd,MC_DISCOUNT))>0)   // merchant discount		rate1 = 5+skill_lv*2-((skill_lv==10)? 1:0);	if((skill_lv=pc->checkskill(sd,RG_COMPULSION))>0) // rogue discount		rate2 = 5+skill_lv*4;	if(rate1 < rate2) rate1 = rate2;	if(rate1)		val = (int)((double)orig_value*(double)(100-rate1)/100.);	if(val < 0) val = 0;	if(orig_value > 0 && val < 1) val = 1;	return val;}
 
two places:

npc.c

// custom merchant shop exp bonus if( battle_config.shop_exp > 0 && z > 0 && (skill_t = pc->checkskill2(sd,idx)) > 0 ) { if( sd->status.skill[idx].flag >= SKILL_FLAG_REPLACED_LV_0 ) skill_t = sd->status.skill[idx].flag - SKILL_FLAG_REPLACED_LV_0; if( skill_t > 0 ) { z = z * (double)skill_t * (double)battle_config.shop_exp/10000.; if( z < 1 ) z = 1; pc->gainexp(sd,NULL,0,(int)z, false); } }

pc.c

int pc_modifybuyvalue(struct map_session_data *sd,int orig_value) { int skill_lv,val = orig_value,rate1 = 0,rate2 = 0; if((skill_lv=pc->checkskill(sd,MC_DISCOUNT))>0) // merchant discount rate1 = 5+skill_lv*2-((skill_lv==10)? 1:0); if((skill_lv=pc->checkskill(sd,RG_COMPULSION))>0) // rogue discount rate2 = 5+skill_lv*4; if(rate1 < rate2) rate1 = rate2; if(rate1) val = (int)((double)orig_value*(double)(100-rate1)/100.); if(val < 0) val = 0; if(orig_value > 0 && val < 1) val = 1; return val;}

remove or add?

 
disable skill MC_DISCOUNT and RG_COMPULSION from skill_db

default_ani_meow.gif

// put in front did not solve
first of all restart server and reset all players that has it..

default_ani_meow.gif
the market disappeared off the look, plus the price is still decreasing.

evilpuncker
Code:
npc.c: In function ‘npc_buylist’:npc.c:1757: warning: unused variable ‘idx’npc.c:1757: warning: unused variable ‘skill_t’        CC      npc_chat.c        CC      party.c        CC      path.c        CC      pc.cpc.c: In function ‘pc_defaults’:pc.c:10802: error: ‘pc_modifybuyvalue’ undeclared (first use in this function)pc.c:10802: error: (Each undeclared identifier is reported only oncepc.c:10802: error: for each function it appears in.)make[1]: *** [obj_sql/pc.o] Error 1
 
Back
Top