get rid of less than overcharged selling price warning

Lord Ganja

New member
Messages
161
Points
0
Age
34
Location
Ganja World
Okay, I intentionally added an item with less than overcharged selling price.

Now I was thinking if I can get rid of the warnings that appear by adding the item id to the source so it won't show the warning even if these 'ids' are less than overcharged selling price.

For example, if I set the id 607 less than overcharged selling price. I'll add the id 607 to the src so the warning won't appear.

 ' if( type == SHOP && value*0.75 < id->value_sell*1.24 && itemid != 607) { <== This is just my idea for excluding items id's.

How do I do that?
default_hmm.gif
  Thanks in advance.

this is the part in npc.c 

Code:
if( type == SHOP && value*0.75 < id->value_sell*1.24 ) {	// Exploit possible: you can buy and sell back with profit	ShowWarning("npc_parse_shop: Item %s [%d] discounted buying price (%d->%d) is less than overcharged selling price (%d->%d) in file '%s', line '%d'.n",		id->name, nameid, value, (int)(value*0.75), id->value_sell, (int)(id->value_sell*1.24), filepath, strline(buffer,start-buffer));	if (retval) *retval = EXIT_FAILURE;}
 
This is not good code practice but here's how you do it

if( type == SHOP && value*0.75 < id->value_sell*1.24 && nameid != 607 ) { // Exploit possible: you can buy and sell back with profit ShowWarning("npc_parse_shop: Item %s [%d] discounted buying price (%d->%d) is less than overcharged selling price (%d->%d) in file '%s', line '%d'.n", id->name, nameid, value, (int)(value*0.75), id->value_sell, (int)(id->value_sell*1.24), filepath, strline(buffer,start-buffer)); if (retval) *retval = EXIT_FAILURE;}
notice the && nameid != 607

 
Back
Top