Shattered Kingdoms
https://shatteredkingdoms.org/forums/

Buy
https://shatteredkingdoms.org/forums/viewtopic.php?f=26&t=22041
Page 1 of 2

Author:  TheBladeMasta [ Thu Dec 08, 2011 9:19 pm ]
Post subject:  Buy

Quote:
>buy sage
You buy some sage leaves.
Wetha Voons says to you 'Hese it 9 pl`sjnum, 8 fomd, 5 rhlvfs, 1 coqpeq in ch`nge.'
Wetha Voons exclaims 'Ugank you!'



An ebon cloak adorned with runes contains:
5 obsidian coins
5 platinum coins
974 gold coins
733 silver coins
530 copper coins



I always thought that the buy code used the smaller coins before exchanging the larger coins.
Am I right and this is a bug or am I just imagining things?

If it is a bug, it might be because the buy code looks for the first coins in the cloak instead of checking all of the coin the coins in the cloak.

Author:  TheBladeMasta [ Thu Dec 08, 2011 9:21 pm ]
Post subject:  Re: Buy

Just tested it to satisfy my own curiosity lol.


Quote:
>get all.coin cloak
You get 5 obsidian coins from an ebon cloak adorned with runes.
You get 5 platinum coins from an ebon cloak adorned with runes.
You get 974 gold coins from an ebon cloak adorned with runes.
You get 733 silver coins from an ebon cloak adorned with runes.
You get 530 copper coins from an ebon cloak adorned with runes.


>buy sage
You buy some sage leaves.
Wetha Voons says to you 'Hfre is zero in chbnge.'
Wetha Voons exclaims 'Thank yot!'



Quote:
>put all.coin cloak
You put 380 copper coins in an ebon cloak adorned with runes.
You put 740 silver coins in an ebon cloak adorned with runes.
You put 982 gold coins in an ebon cloak adorned with runes.
You put 14 platinum coins in an ebon cloak adorned with runes.
You put 5 obsidian coins in an ebon cloak adorned with runes.

-{Health:100\ -{Magic: 94| 98:Move}- Spice Shop
16 obsidian, 9 platinum, 9 gold, 8 silver
>take copper cloak
You get 380 copper coins from an ebon cloak adorned with runes.

-{Health:100\ -{Magic: 94| 98:Move}- Spice Shop
16 obsidian, 9 platinum, 9 gold, 8 silver
>take silver cloak
You get 740 silver coins from an ebon cloak adorned with runes.

-{Health:100\ -{Magic: 94| 98:Move}- Spice Shop
16 obsidian, 9 platinum, 9 gold, 8 silver
>put silver cloak
You put 740 silver coins in an ebon cloak adorned with runes.

-{Health:100\ -{Magic: 94| 98:Move}- Spice Shop
16 obsidian, 9 platinum, 9 gold, 8 silver
>put copper cloak
You put 380 copper coins in an ebon cloak adorned with runes.

-{Health:100\ -{Magic: 94| 98:Move}- Spice Shop
16 obsidian, 9 platinum, 9 gold, 8 silver
>buy sage
You buy some sage leaves.
Wetha Voons says to you 'Hfre is zero in chbnge.'
Wetha Voons exclaims 'Thank yot!'



First snippet is fairly self explanatory.

Second snippet I re-arranged the coins in the container confirmed the suspicion. The buy code only looks at the first instance of coins in a container, and will only look at the second and so on if the first instance is not sufficient.

Author:  Dulrik [ Thu Dec 08, 2011 10:01 pm ]
Post subject:  Re: Buy

As long as you end up with the appropriate amount of money subtracted from what you are currently carrying, I'm not going to consider it a bug.

Author:  TheBladeMasta [ Thu Dec 08, 2011 10:10 pm ]
Post subject:  Re: Buy

Fair enough then. :)

Author:  AndrewRooz [ Fri Dec 09, 2011 5:10 am ]
Post subject:  Re: Buy

From container it take the largest denomination. From inventory it takes the small denominations.

Author:  jhorleb [ Fri Dec 09, 2011 7:49 am ]
Post subject:  Re: Buy

AndrewRooz wrote:
From container it take the largest denomination. From inventory it takes the small denominations.


Wow nice. Totally did not know that.

Author:  Edoras [ Fri Dec 09, 2011 7:57 am ]
Post subject:  Re: Buy

wow, who cares?

Author:  j3r3myp1pp3n [ Fri Dec 09, 2011 8:02 am ]
Post subject:  Re: Buy

Buying lots of things repetitively with money in your bag causes you to get lots of change back. This adds weight. Weight is a concern. That amount of weight gained is almost 100% of the time negligible, but there is the possibility that the little bit of extra weight you gain throws you over and impacts your fighting abilities.

Author:  Pushing40 [ Fri Dec 09, 2011 10:57 am ]
Post subject:  Re: Buy

I agree with Jeremy Pippin. Some time ago, the code was created specifically to prevent this. But now the code that was created to prevent this, which never prevented this, is not bugged merely because it doesn't prevent what it was created to prevent. My solution: Make sure all your little coins are on top of your backpack because you know full well, you always pull out the 100 dollar bills out of your wallet before you pull out your twenties when buying a candy bar.

Author:  ObjectivistActivist [ Fri Dec 09, 2011 11:17 am ]
Post subject:  Re: Buy

Pushing40 wrote:
because you know full well, you always pull out the 100 dollar bills out of your wallet before you pull out your twenties when buying a candy bar.


Depends on what your wallet is usually filled with. Sometimes, I only have 100s in mine to buy candy bars with.

Page 1 of 2 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/