Jump to content

"buy 500"


skylor12344

Recommended Posts

What about stackable items?

Tainaith.png

*99 Cooking Achieved: 4th of July, 2009--99 Fishing Achieved: Christmas Day, 2009--99 Woodcutting Achieved: May 4th, 2010--99 Magic Achieved: September 11, 2010--99 Fletching Achieved: June 14th, 2012--2000 Total Achieved: July 2nd, 2012*

*1100 Dominion Bosses defeated*

Heroes of Newerth player -- IGN: SaveTehPanda

StarCraft 2 player -- IGN: plasmaJelly

Link to comment
Share on other sites

Well if you're so nit-picky go work for JaGex and spend the hours it takes coding specifically for each and every item at each and every shop. It takes time to code.

 

 

 

Thats exactly why programmers need customer feedback, so they know which part of the code need fixing. We are helping them to save time to make their program better, win-win.

 

 

 

On topic, it used to be "buy-x" before the stores update, but after the stores update they change it to "buy 500" for no reason :? ...

 

 

 

lol i was just asking a fking question no need to be such a freaking [wagon] about it...screw it CLOSE THIS PLEASE!!!!!

 

Are you alright?

Link to comment
Share on other sites

lol i was just asking a fking question no need to be such a freaking [wagon] about it...screw it CLOSE THIS PLEASE!!!!!

 

 

 

I would guess its because of programming things, as others have rudely stated. Do you really want this closed?

 

 

 

In the mean time I think this is better suited in the General discussion, unless the harsh behavior continues, then it may get to sink to the bottom of the forum and rot with a padlock attached...

35b9enp.jpg

Link to comment
Share on other sites

It was probably just easier to code everything with the same options instead of going through every item and making "custom" options.

lovepanda86.png
lovepanda86.png
--8727th person to achieve 99 Fishing on 8/19/2008--
--6012th person to achieve 99 Thieving on 10/12/2008--

R.I.P. October 31, 2013

 

lovepanda.png

99 Fletching 7/16/2015

Link to comment
Share on other sites

I wasn't trying to sound rude. I was trying to get to the point.

 

 

 

They took away buy X because as the amount of an item decreases in stock, the amount of the price goes up.

 

Take for instance, buying a feather for 5 gp while at 20,000 stock, whereas the price rises to 8 gp while at 1,000 stock. If you were to buy X, and buy all the stock at once, it would cost you 5 gp each, thus breaking their system.

 

 

 

If they were to have the team who worked on the Shop Update go in and change every single non-stackable item's buy options to better suit its max stock, then that would be a good deal of time wasted. All in all, it would be a large waste of time, of which better content could be made in; including the new skill, as it would most likely be pushed back a bit.

Stellactic.gif
Link to comment
Share on other sites

I wasn't trying to sound rude. I was trying to get to the point.

 

 

 

They took away buy X because as the amount of an item decreases in stock, the amount of the price goes up.

 

Take for instance, buying a feather for 5 gp while at 20,000 stock, whereas the price rises to 8 gp while at 1,000 stock. If you were to buy X, and buy all the stock at once, it would cost you 5 gp each, thus breaking their system.

 

 

 

 

Dynamic price was working when buy-x was there.

 

In fact if you try buying 1 at a time for 10 items, wait for the store to restock to full and then compared the money used to buying 10 at a time. It cost exactally the same. You should notice it recalculate the price of each item purchase no matter you choose buy 1 or buy 10.

 

Thats also true, if you choose buy 500 from something that only have 10 in stock (thus buying all stock at once), the cost is exactly the same as if you click buy 1 ten times.

 

(In fact it is cheaper to click buy 1 ten times, because the store would have been restocked by 1 or 2 before you bought the 10th item)

 

 

 

I always buy apples at lumbridge chest and I know what I am saying. Lumbridge chest has limited stocks even before the stores update and it used to have buy-x.

 

 

 

The only difference now is you have to click 9 extra times if you want to buy x9 items.

 

 

 

just lock this i dont even care to ask this question anymore since all im going to get is rude answers

 

You are too easy to get emotional and manipulated, thats why we have trolls in tip.it.

Link to comment
Share on other sites

Yeah, like Krampell said, for spirit shards. I still think that they should have kept buy-x or even added "Buy 50,000" for Spirit shards alone, but that's moot and not really on topic.

 

 

 

Programming the "Buy-500" to be universal is way easier and shorter than having to code it for stackable items. The items probably have a flag indicating whether it's stackable or not, but it still takes longer to code, and what's the end result? Practically nothing, really.

Mungo_0.png

awesomesiggeh2.jpg

Yes... Yes, that's what he said.

 

Siggeh1.jpg

Siggeh2.jpg

:D

Link to comment
Share on other sites

Yeah, like Krampell said, for spirit shards. I still think that they should have kept buy-x or even added "Buy 50,000" for Spirit shards alone, but that's moot and not really on topic.

 

 

 

Programming the "Buy-500" to be universal is way easier and shorter than having to code it for stackable items. The items probably have a flag indicating whether it's stackable or not, but it still takes longer to code, and what's the end result? Practically nothing, really.

 

 

 

They can just have buy-x for everything, like it was before.

Link to comment
Share on other sites

Yeah, like Krampell said, for spirit shards. I still think that they should have kept buy-x or even added "Buy 50,000" for Spirit shards alone, but that's moot and not really on topic.

 

 

 

Programming the "Buy-500" to be universal is way easier and shorter than having to code it for stackable items. The items probably have a flag indicating whether it's stackable or not, but it still takes longer to code, and what's the end result? Practically nothing, really.

 

 

 

They can just have buy-x for everything, like it was before.

 

 

 

As stated a few posts up, buy x is simply not possible with the current shop system. Well im sure its "possible" if they worked on it enough, but it would be a coding nightmare.

 

 

 

Think about it. Shop stock changes prices every few items bought. So if you were to buy-x, for 100 items, it would buy 1 at 5gp, 1 at 7gp, 1 at 9gp, ect... all the way up for 100 items.

 

 

 

It would be a literal nightmare to code something like that, and also for the player. Imagine if you went to a shop and said, oh 100 stock, its 5gp each right now, so if I buy-x 100 thats 500gp right? Wrong. Because the shop price increases, you'd be spending easily over TRIPLE of what you thought you would pay origionally.

 

 

 

Spirit shards are the only item im aware of in the game that have a static price, and dont change from 25gp. However, they used a simplicity in designing the shops so they all funtion alike. So the buy x was not possible on the shards because its cannot be in the programming for the other shops. They could have coded the shop on its own, but my guess is there is other technically limitations to this, or simply takes to much time to do.

 

 

 

Onto the OT question..

 

Why is the buy 500 on non-stackable items? Simple.

 

 

 

It's there because they use the same shop system for ALL of their shops. So the buy 10, 500, ect.. options stay there regardless of what you are purchasing. The game dosent care IF you can buy 500 of the item at one time, it simply cares that the option is there so you CAN buy 500 at one time if its possible to do so. With harpoons its not possible to do so. See how it works?

dawnsigblue-3.png
Link to comment
Share on other sites

 

As stated a few posts up, buy x is simply not possible with the current shop system. Well im sure its "possible" if they worked on it enough, but it would be a coding nightmare.

 

 

 

Think about it. Shop stock changes prices every few items bought. So if you were to buy-x, for 100 items, it would buy 1 at 5gp, 1 at 7gp, 1 at 9gp, ect... all the way up for 100 items.

 

 

 

 

Impossible...what are you talking about?

 

There is already a "buy 500", which can buy 499 of an item if there is only 499 or whatever the amount of the item left in stock.

 

That is exactly the "nightmare" you are talking about and it is working smoothly in game.

 

And whats the computing difference between buying 500 at a time of a 2998 stock of bolt tips and buying 2998 at once?

 

6O(n) = O(n) Nothing.

 

 

 

Did I said that before, I think I did in a few post up.

 

 

 

I dont really know how it works, but it was there before in lumbridge chest and clearly it work exactly the way you claimed it is impossible.

 

I am not going into the details like [Caution: Jagex Rule Violation]isthebest freaks, but they can just precalculate with their awesome computer and make a price table for each stock of each shop items as there is in fact have a maximum stock.

Link to comment
Share on other sites

With the buy x I used to just either bang in 99 or click 10 3 times to fill an inventory now its 1 click, not typing and less hassle.

 

Should it be any less? Not really imagine buying 40k of spirit shards in 50's.

 

Should it be more? Well looking at the rune levels in stores 500 is a nice number.

 

 

 

I can't see anything wrong with it.

 

 

 

Sure they could make the 500 into the amount of free space you have at that moment in time, but it would only put more load on the servers and not be any more beneficial to the user.

 

 

 

skylor12344 you seem to be taking it well too seriously.

 

Thing about it every store has a number of stock which can vary from zero to thousands. To make stores have specific right click options for each item would be a lot of work especially on the player stock side. If I sell 100 in noted what should be the right click option for the item?

 

Theres tons of variables, Jagex just uses an average figure in there to simplify the code, help reduce server load and make it easier for the player.

[hide=Drops]

  • Dragon Axe x11
    Berserker Ring x9
    Warrior Ring x8
    Seercull
    Dragon Med
    Dragon Boots x4 - all less then 30 kc
    Godsword Shard (bandos)
    Granite Maul x 3

Solo only - doesn't include barrows[/hide][hide=Stats]

joe_da_studd.png[/hide]

Link to comment
Share on other sites

//buy500 is called when the player clicks on the "buy-500"

//option in a shop, and calculates the total price one-by-

//one for n items of the item corresponding to itemID from

//the shop corresponding with shopID.



//Assumes the use of the following:

//  player.freeInvenSpace() = the amount of free inventory space available

//  curStore.hasStock() = checks if the current Store has any stock

//    of the requested item.

//  player.hasGold() = checks if the player has enough gold to buy

//    one of the specified items

//  player.buyItem() = purchases that item



void buy500(int n, int itemID, int shopID)

{



 if (player.freeInvenSpace() == 0)

 {

   printToChat("Not enough inventory space!");

   return;

 }



 for (i = 0; i < player.freeInvenSpace() || i < n; ++i)

 {

   if (curStore.hasStock())

   {

     if (player.hasGold(calcPrice(shopID, itemID, 1))

       player.buyItem(shopID, itemID, 1);

     else

     {

       printToChat("Not enough gold!")

       return;

     }

   }

   else

   {

     printToChat("The shop has run out of items.");

     return;

   }

   }

 }

}

 

 

 

That took me maybe 10 minutes to make.. not a hassle at all! It just takes in parameters of what you're buying, what shop you're buying from, and how much you're buying. Then it goes through one at a time and recalculates the price according to how much stock is left of that item in that particular shop, and buys it if you have enough gold and enough inventory spaces. It stops when you either run out of inventory spaces (non-stackable) or have bought all the items or have no gold. Not a coding nightmare at all.

demonslayer2.png

Retired Tip.It Mod || Admin and Founder of Caesar 3 Mod Squad! All are welcome!

Link to comment
Share on other sites

 

That took me maybe 10 minutes to make.. not a hassle at all! It just takes in parameters of what you're buying, what shop you're buying from, and how much you're buying. Then it goes through one at a time and recalculates the price according to how much stock is left of that item in that particular shop, and buys it if you have enough gold and enough inventory spaces. It stops when you either run out of inventory spaces (non-stackable) or have bought all the items or have no gold. Not a coding nightmare at all.

 

 

 

The price recalculating is the "nightmare" part. They must have some clever algorithm/formula or else they will have to recalculate 500 times (!) or what ever the frequency the price changes per stock left.

 

 

 

What I said was, they could have already calculated the price at each stock level and basically just do a sum of the list when each player buys.

 

 

 

But by anyway, that shouldn't make any difference in computational time for "buy-500" or "buy-x" at all.

Link to comment
Share on other sites

It recalculates with calcPrice(shopID, itemID, 1).. I'm not saying that's how they do it, but it would work. We don't know the formula that they use to calculate the price of an item, but we know that it is based on the base price of the item * a fixed variable * amount left or something like that.

 

 

 

It recalcs the price every time you click buy 1... so buy-1 500 times is the same as buy-500 1 time, just less clicking for the user. It ends up using the same amount of memory, it just does it all at once. Doing a calculation 500 times (even 50,000 times) is not a strain on a computer. If we could buy millions of items at once with a finite stock from a store with millions of said item, the recalculating may show through with a bit of lag time. But doing such a simple algebraic problem (which I assume they use for calculating stock prices) 500 times is not any thing to be worried about in terms of memory usage.

demonslayer2.png

Retired Tip.It Mod || Admin and Founder of Caesar 3 Mod Squad! All are welcome!

Link to comment
Share on other sites

 

The price recalculating is the "nightmare" part. They must have some clever algorithm/formula or else they will have to recalculate 500 times (!) or what ever the frequency the price changes per stock left.

 

 

 

What I said was, they could have already calculated the price at each stock level and basically just do a sum of the list when each player buys.

 

 

 

But by anyway, that shouldn't make any difference in computational time for "buy-500" or "buy-x" at all.

 

 

 

Hmmm. I may be wrong, but wouldn't a simple nth term algorithm work here? Can't think how it could be done at the moment, but I'm fairly sure it would work, as the increase in prices is linear.

Mungo_0.png

awesomesiggeh2.jpg

Yes... Yes, that's what he said.

 

Siggeh1.jpg

Siggeh2.jpg

:D

Link to comment
Share on other sites

 

The price recalculating is the "nightmare" part. They must have some clever algorithm/formula or else they will have to recalculate 500 times (!) or what ever the frequency the price changes per stock left.

 

 

 

What I said was, they could have already calculated the price at each stock level and basically just do a sum of the list when each player buys.

 

 

 

But by anyway, that shouldn't make any difference in computational time for "buy-500" or "buy-x" at all.

 

 

 

Hmmm. I may be wrong, but wouldn't a simple nth term algorithm work here? Can't think how it could be done at the moment, but I'm fairly sure it would work, as the increase in prices is linear.

 

 

 

Yes, you are absolutely right! I can confirm this, the price change is indeed constant. (Eg, apples is always +1gp and spice is always +7gp)

 

All they need to do is to record/calculate the no. of stock which the price changes after that point!

 

 

 

And yes, buy-1 500 times have the same computations as buy-500 once.

 

So i guess Buy-x is possible by merely substituting 500 into a user defined parameter.

Link to comment
Share on other sites

That's assuming they calculate prices that way. It's possible that in order to "recalculate" the item price they have to do some "reload" the stock and could cause problems.

 

 

 

Honestly, until you've sat down and looked at their code you cannot know whether what they said was true or not. If they were using a formula to calculate the 50 and 500 etc rather than calling "calculate item price" for every item, then yes it would be a nightmare to make it work with X. it's not impossible, for sure. But maybe they didn't want to allocate resources to it, when they deemed it unnecessary.

Serena_Sedai.png
Maxed since Sunday, January 9th, 2014
Completionist since Wednesday, June 4th, 2014

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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