Jump to content
  • 0
Hadeszeus

Reduce the price of all items

Question

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?

Edited by Hadeszeus

Share this post


Link to post
Share on other sites

19 answers to this question

Recommended Posts

  • 0

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?

Edited by Dastgir Pojee

Share this post


Link to post
Share on other sites
  • 0

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.

Edited by Hadeszeus

Share this post


Link to post
Share on other sites
  • 0

 

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.

Share this post


Link to post
Share on other sites
  • 0

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 items
EDIT wait ...

hercules still haven't fix the weapon and armor item type ?

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

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 items
EDIT wait ...hercules still haven't fix the weapon and armor item type ?

Im using item_db.txt :(

Share this post


Link to post
Share on other sites
  • 0

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

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

 

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 items
EDIT 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/

Share this post


Link to post
Share on other sites
  • 0

https://github.com/HerculesWS/Hercules/blob/master/src/map/clif.c#L73

holy **** ...

this can't be right ...

I can't believe hercules is using bandage solution ...

I don't think you're getting the point, it means client devs have swapped the ids on packetver 20080827 onwards, therefore we have to swap it accordingly with the packetver, either one way or another, in order to support a high range of clients

Share this post


Link to post
Share on other sites
  • 0

http://rathena.org/board/tracker/issue-8180-storage-armor-weapon-tab-are-inverted/

The problem seems to be that Athena got wrong the item types. We've always believed that 4 is Weapon, while 5 is Armor/Garment/Boots/Headgear (see documentation/item_db.txt), but it's actually the other way around.

so skotlex means that "We've always believed" is actually since year 2008 ?

 

hmm ... well at least this has clear one of my doubt

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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  :(

Edited by AnnieRuru
move to source request

Share this post


Link to post
Share on other sites
  • 0

simple patch

 

http://upaste.me/631810678b37dc39c

 

tested with

prontera,157,183,1	shop	kjvhkxjvx	100,501:-1,1201:-1,2304:-1
note that npc shops that already has a value will still overwrite the price though

 

and of course ... merchant can discount/overcharge it

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

@AnnieRuru, thank you again for this one. This made my day. :)

I'll test this after work.

 

Annie, just a quick question. when you say npc shops, means POD shops are included? 

I mean for example this one http://pastebin.com/raw.php?i=SSrWesuy

no, pod shops like this are not included.

Share this post


Link to post
Share on other sites
  • 0

 

@AnnieRuru, thank you again for this one. This made my day. :)

I'll test this after work.

 

Annie, just a quick question. when you say npc shops, means POD shops are included? 

I mean for example this one http://pastebin.com/raw.php?i=SSrWesuy

no, pod shops like this are not included.

Yey! Then, that's awesomeness! Thanks Dastgir for confirming.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.