Jump to content
  • 0

Zeny Redenomination System


serakh00

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   4
  • Joined:  02/08/12
  • Last Seen:  

I was thinking about economy-friendly world in ragnarok. And lead me to think what if everything in the game is subject of "pricecut"?

Let say we have 1:10 zeny redenomination, i will turn :

-Zeny from selling "gold" from 100,000 down to 10,000z.

-An item which sold by npc for 2,000,000z down to 200,000z.

-A quest which gives 30,000z to 3,000z.

-Player will think Zeny is more precious thing than before.

All changes are made without any value edit in DB/npc script.

But due to lack of my knowledge in source, i beg to someone here for creating this system. Hope this system will be usefull for other people too..

Thanks rAthena.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

I was thinking about economy-friendly world in ragnarok. And lead me to think what if everything in the game is subject of "pricecut"?

Let say we have 1:10 zeny redenomination, i will turn :

-Zeny from selling "gold" from 100,000 down to 10,000z.

-An item which sold by npc for 2,000,000z down to 200,000z.

-A quest which gives 30,000z to 3,000z.

-Player will think Zeny is more precious thing than before.

All changes are made without any value edit in DB/npc script.

But due to lack of my knowledge in source, i beg to someone here for creating this system. Hope this system will be usefull for other people too..

Thanks rAthena.

in itemdb.c

change

	//When a particular price is not given, we should base it off the other one
	//(it is important to make a distinction between 'no price' and 0z)
	if ( str[4][0] )
		id->value_buy = atoi(str[4]);
	else
		id->value_buy = atoi(str[5]) * 2;

	if ( str[5][0] )
		id->value_sell = atoi(str[5]);
	else
		id->value_sell = id->value_buy / 2;

to

 

	//When a particular price is not given, we should base it off the other one
	//(it is important to make a distinction between 'no price' and 0z)
	if ( str[4][0] )
		id->value_buy = atoi(str[4]);
	else
		id->value_buy = atoi(str[5]) * 10;// [Stolao]

	if ( str[5][0] )
		id->value_sell = atoi(str[5]);
	else
		id->value_sell = id->value_buy / 10;// Lowered Sell Value [Stolao]

as for quest you'll have to manually edit the quests

don't forget to recompile

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   5
  • Joined:  04/23/12
  • Last Seen:  

{
    Id: 969
    AegisName: "Gold"
    Name: "Gold"
change this ->    Buy: 20000
    Weight: 200
    BuyingStore: true
},

You have to change each item from your self i think in the item_db the same is for quest  just search for the quest npc  and change the value
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  383
  • Reputation:   121
  • Joined:  03/31/12
  • Last Seen:  

{
    Id: 969
    AegisName: "Gold"
    Name: "Gold"
change this ->    Buy: 20000
    Weight: 200
    BuyingStore: true
},
You have to change each item from your self i think in the item_db the same is for quest  just search for the quest npc  and change the value

 

That moment when you use Hercules Emulator. xD

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   4
  • Joined:  02/08/12
  • Last Seen:  

{
    Id: 969
    AegisName: "Gold"
    Name: "Gold"
change this ->    Buy: 20000
    Weight: 200
    BuyingStore: true
},
You have to change each item from your self i think in the item_db the same is for quest  just search for the quest npc  and change the value

 

 

yeah realize that,  but it will take a lot of time to be done, beside i need to edit all NPC and Shop which defines price sell for every item. thanks for help btw.

 

in itemdb.c

change

	//When a particular price is not given, we should base it off the other one
	//(it is important to make a distinction between 'no price' and 0z)
	if ( str[4][0] )
		id->value_buy = atoi(str[4]);
	else
		id->value_buy = atoi(str[5]) * 2;

	if ( str[5][0] )
		id->value_sell = atoi(str[5]);
	else
		id->value_sell = id->value_buy / 2;

to

 

	//When a particular price is not given, we should base it off the other one
	//(it is important to make a distinction between 'no price' and 0z)
	if ( str[4][0] )
		id->value_buy = atoi(str[4]);
	else
		id->value_buy = atoi(str[5]) * 10;// [Stolao]

	if ( str[5][0] )
		id->value_sell = atoi(str[5]);
	else
		id->value_sell = id->value_buy / 10;// Lowered Sell Value [Stolao]

as for quest you'll have to manually edit the quests

don't forget to recompile

 

i done with this and somehow it cut the price by 60% and if i make NPC that sell an item and make the price 1,000,000 it doesn affected.

is there another method for cutting the price of script defined-price shop via source?

 

Thanks for helping

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   5
  • Joined:  04/23/12
  • Last Seen:  

 

{
    Id: 969
    AegisName: "Gold"
    Name: "Gold"
change this ->    Buy: 20000
    Weight: 200
    BuyingStore: true
},
You have to change each item from your self i think in the item_db the same is for quest  just search for the quest npc  and change the value

 

That moment when you use Hercules Emulator. xD

 

Oh wrong Folder   /oops

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

{
    Id: 969
    AegisName: "Gold"
    Name: "Gold"
change this ->    Buy: 20000
    Weight: 200
    BuyingStore: true
},
You have to change each item from your self i think in the item_db the same is for quest just search for the quest npc and change the value

yeah realize that, but it will take a lot of time to be done, beside i need to edit all NPC and Shop which defines price sell for every item. thanks for help btw.

in itemdb.c

change

	//When a particular price is not given, we should base it off the other one
	//(it is important to make a distinction between 'no price' and 0z)
	if ( str[4][0] )
		id->value_buy = atoi(str[4]);
	else
		id->value_buy = atoi(str[5]) * 2;

	if ( str[5][0] )
		id->value_sell = atoi(str[5]);
	else
		id->value_sell = id->value_buy / 2;
to

	//When a particular price is not given, we should base it off the other one
	//(it is important to make a distinction between 'no price' and 0z)
	if ( str[4][0] )
		id->value_buy = atoi(str[4]);
	else
		id->value_buy = atoi(str[5]) * 10;// [Stolao]

	if ( str[5][0] )
		id->value_sell = atoi(str[5]);
	else
		id->value_sell = id->value_buy / 10;// Lowered Sell Value [Stolao]
as for quest you'll have to manually edit the quests

don't forget to recompile

i done with this and somehow it cut the price by 60% and if i make NPC that sell an item and make the price 1,000,000 it doesn affected.

is there another method for cutting the price of script defined-price shop via source?

Thanks for helping

Code I did will only effect item with no sell price (most of the db) anything custom where you define the sell value will sell at the define value

Ie if you make a custom coin that buys for 20000 and sells for 10000 it will sell for 10000 but if you set buy as 20000 but leave sell blank it will sell for 4000.

On phone so can't leave codes easily

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   4
  • Joined:  02/08/12
  • Last Seen:  

{
    Id: 969
    AegisName: "Gold"
    Name: "Gold"
change this ->    Buy: 20000
    Weight: 200
    BuyingStore: true
},
You have to change each item from your self i think in the item_db the same is for quest just search for the quest npc and change the value

yeah realize that, but it will take a lot of time to be done, beside i need to edit all NPC and Shop which defines price sell for every item. thanks for help btw.

in itemdb.c

change

	//When a particular price is not given, we should base it off the other one
	//(it is important to make a distinction between 'no price' and 0z)
	if ( str[4][0] )
		id->value_buy = atoi(str[4]);
	else
		id->value_buy = atoi(str[5]) * 2;

	if ( str[5][0] )
		id->value_sell = atoi(str[5]);
	else
		id->value_sell = id->value_buy / 2;
to

	//When a particular price is not given, we should base it off the other one
	//(it is important to make a distinction between 'no price' and 0z)
	if ( str[4][0] )
		id->value_buy = atoi(str[4]);
	else
		id->value_buy = atoi(str[5]) * 10;// [Stolao]

	if ( str[5][0] )
		id->value_sell = atoi(str[5]);
	else
		id->value_sell = id->value_buy / 10;// Lowered Sell Value [Stolao]
as for quest you'll have to manually edit the quests

don't forget to recompile

i done with this and somehow it cut the price by 60% and if i make NPC that sell an item and make the price 1,000,000 it doesn affected.

is there another method for cutting the price of script defined-price shop via source?

Thanks for helping

Code I did will only effect item with no sell price (most of the db) anything custom where you define the sell value will sell at the define value

Ie if you make a custom coin that buys for 20000 and sells for 10000 it will sell for 10000 but if you set buy as 20000 but leave sell blank it will sell for 4000.

On phone so can't leave codes easily

 

Based on your clue this what i've done

 

npc.c

	if (value  > 1 && (type == NPCTYPE_SHOP || type == NPCTYPE_MARKETSHOP)) {
			value = value/10;
			if (value == 0) value=1; //+1 to avoid selling free item
		}
		if( value < 0 ) {
			if (type == NPCTYPE_SHOP || type == NPCTYPE_MARKETSHOP) value = id->value_buy;
			else value = 0; // Cashshop doesn't have a "buy price" in the item_db
		}
		if (value == 0 && (type == NPCTYPE_SHOP || type == NPCTYPE_MARKETSHOP)) { // NPC selling items for free!
			ShowWarning("npc_parse_shop: Item %s [%hu] is being sold for FREE in file '%s', line '%d'.\n",
				id->name, nameid2, filepath, strline(buffer,start-buffer));
itemdb.c

 

	//When a particular price is not given, we should base it off the other one
	//(it is important to make a distinction between 'no price' and 0z)
	if ( str[4][0] )
		id->value_buy = atoi(str[4])/10+1;
	else
		id->value_buy = (atoi(str[5]) * 2)/10+1; //+1 to avoid selling free item
	if ( str[5][0] )
		id->value_sell = atoi(str[5])/10;
	else
		id->value_sell = id->value_buy / 20;
Checked and item price in shop NPC/selling item to NPC are divided by 10.

Please tell me if this src edit is wrong / dangerous.

i attached my  screenie :

post-2188-0-66813200-1472859576_thumb.png

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

id->value_buy = (atoi(str[5]) * 2)/10+1; //+1 to avoid selling free item

Don't devide by 10 there that is the buy value just use the code I sent you. In my server I did it /5 to make zeny harder to farm as well, but I left quest zeny alone to make quest more valuable.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   4
  • Joined:  02/08/12
  • Last Seen:  

id->value_buy = (atoi(str[5]) * 2)/10+1; //+1 to avoid selling free item
Don't devide by 10 there that is the buy value just use the code I sent you. In my server I did it /5 to make zeny harder to farm as well, but I left quest zeny alone to make quest more valuable.

 

 

Thank for helping me  /no1

 

mark as solved

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...