Jump to content
  • 0
Sign in to follow this  
sageofmali

[562] Buy 500 Option Glitch

Question

Alright, so I noticed that when you try and buy 500 items from a shop it says not enough space, rather than it giving you the amount for your free slots. So, I edited my shophandler so it would buy that much:
[code]
int itemid = returnItemId(p.shopid, buttonId2);
long value = p.getInventory().getFreeSlots() * GameEngine.prices.getMaximumPrice(itemid);
case 173:
/* Buy 500. fixed by Sageofmali*/
if(p.getInventory().getFreeSlots() > 500 && p.getInventory().numberOf(995) >= value) {
buystock(p, itemid, 500);
} else if(p.getInventory().getFreeSlots() <= 500 && p.getInventory().numberOf(995) >= value) {
buystock(p, itemid, p.getInventory().getFreeSlots());
return;
}
break;[/code]
It works fine until you have one free space and you buy 500 of a stackable item, it buys 2147m of it without having to pay for it. Could someone possibly help me fix this?

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
I'm not sure why it would do this, but I would recommend using this [URL="http://www.runelocus.com/forums/showthread.php?19362-562-New-ShopHandler"]http://www.runelocus.com/forums/showthread.php?19362-562-New-ShopHandler[/URL] It's a completely new Shophandler designed for RS2HD works well in my opinion.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×