Reduce the price of all items

Hadeszeus

New member
Messages
651
Points
0
Location
Philippines
Is there a simple script that reduced all the price of the items by group or by type?

Like what @autoloottype list: Healing, usable, etc, weapon, armor, card, petegg, petarmor, ammo.

For example: (Price applied on each item regardless the rarity or level of the item.)

Healing: 1z EACH

Usable: 1z EACH

Etc: 5z EACH

Armor: 10z EACH

Weapon: 20 EACH

Is this even possible?

 
Last edited by a moderator:
Well its possible, but you want this for global shops?

If want shop specific its better to edit script, if want global, then edit the source.

Today, have no time so maybe in next 2 days, i can do this,

Just describe it more, so others can also help you.

You said reduce all price, but in next line you told, healing item worth 10k, but some healing items are only of 100, so would it be possible for you to describe little more about how you want it to work?

 
Last edited by a moderator:
Well its possible, but you want this for global shops?

If want shop specific its better to edit script, if want global, then edit the source.

Today, have no time so maybe in next 2 days, i can do this,

Just describe it more, so others can also help you.

You said reduce all price, but in next line you told, healing item worth 10k, but some healing items are only of 100, so would it be possible for you to describe little more about how you want it to work?
Sorry for confusion..
Yes what I really want to do is to reduce the price of all items in item_db without modifying the file.

Item listed on npc or shops are not affected since modifying the shop files is easy.

The goal is to easily control your future game economy. Without editting each line in itemdb.

 
Last edited by a moderator:
Well its possible, but you want this for global shops?

If want shop specific its better to edit script, if want global, then edit the source.

Today, have no time so maybe in next 2 days, i can do this,

Just describe it more, so others can also help you.

You said reduce all price, but in next line you told, healing item worth 10k, but some healing items are only of 100, so would it be possible for you to describe little more about how you want it to work?
Sorry for confusion.. Yes what I really want to do is to reduce the price of all items in item_db without modifying the file.

Item listed on npc or shops are not affected since modifying the shop files is easy.

The goal is to easily control your future game economy. Without editting each line in itemdb.
reduce price by percentage or fixed price?and if price is reduced, surely all shops will be affected.

 
if you use SQL database

update item_db_re set price_buy = 1 where type = 0; #healing itemsupdate item_db_re set price_buy = 1 where type = 2 or type = 11; #usable itemsupdate item_db_re set price_buy = 5 where type = 3; #Etc itemsupdate item_db_re set price_buy = 10 where type = 5; #Armor itemsupdate item_db_re set price_buy = 20 where type = 4; #Weapon itemsEDIT wait ...hercules still haven't fix the weapon and armor item type ?

 
Last edited by a moderator:
if you use SQL database 

update item_db_re set price_buy = 1 where type = 0; #healing itemsupdate item_db_re set price_buy = 1 where type = 2 or type = 11; #usable itemsupdate item_db_re set price_buy = 5 where type = 3; #Etc itemsupdate item_db_re set price_buy = 10 where type = 5; #Armor itemsupdate item_db_re set price_buy = 20 where type = 4; #Weapon itemsEDIT wait ...hercules still haven't fix the weapon and armor item type ?
Im using item_db.txt
default_sad.png


 
honestly ... that's the reason I go for SQL database ...

I knew hercules has rewritten the item_db.txt has better loading time

but I still in favor for the SQL ones ...

because I can always manipulate the data easily with SQL commands

hercules's item_db.txt ... is extremely hard to edit

unlike rathena still using old system, I can still suggest using regular expression to solve this problem

but hercules one ... I have no idea how to edit them ... because the Type: and Buy: is in different lines

EDIT:

suddenly I feel like this might work if modify source code ..

 
Last edited by a moderator:
if you use SQL database

update item_db_re set price_buy = 1 where type = 0; #healing itemsupdate item_db_re set price_buy = 1 where type = 2 or type = 11; #usable itemsupdate item_db_re set price_buy = 5 where type = 3; #Etc itemsupdate item_db_re set price_buy = 10 where type = 5; #Armor itemsupdate item_db_re set price_buy = 20 where type = 4; #Weapon itemsEDIT wait ...hercules still haven't fix the weapon and armor item type ?
About storage armor & weapon Inverted  issue , Herc's solution was different form rA,It's no need to switch item type

 http://herc.ws/board/tracker/issue-7749-storage-problem/

 
yes, the values in use officially were those before that packetver. we did not swap ours (in the db files) as rathena did because we found it to be an unnecessary burden on the users.

 
Last edited by a moderator:
honestly ... that's the reason I go for SQL database ...

I knew hercules has rewritten the item_db.txt has better loading time

but I still in favor for the SQL ones ...

because I can always manipulate the data easily with SQL commands

hercules's item_db.txt ... is extremely hard to edit

unlike rathena still using old system, I can still suggest using regular expression to solve this problem

but hercules one ... I have no idea how to edit them ... because the Type: and Buy: is in different lines

EDIT:

suddenly I feel like this might work if modify source code ..
 Hi Annie, can you please help me with this one? If you have time or in the mood to edit the source and make it possible. 

Right now, I was able to convert itemdb to sql using db2slq.bat the problem is I can't convert it back to item_db.conf 
default_sad.png


 
Last edited by a moderator:
simple patch

http://upaste.me/631810678b37dc39c

tested with

prontera,157,183,1 shop kjvhkxjvx 100,501:-1,1201:-1,2304:-1note that npc shops that already has a value will still overwrite the price though
and of course ... merchant can discount/overcharge it

 
Last edited by a moderator:
Back
Top