Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.97 KB | None | 0 0
  1. This is all in shop.java ~~
  2.  
  3. Declare this
  4.  
  5. public static int pointShop = 50;
  6.  
  7. Put this under the public boolean "is general store"
  8.  
  9. public static int[][] EctoTokenPrices = {
  10.     {20135, 500}, //This means {itemid, value}
  11.     {20139, 200}};
  12.  
  13. search for this
  14.  
  15. int price = getBuyPrice(item);
  16.  
  17. under that put this there
  18.  
  19. if (money != 995) {
  20.             for (int i11 = 0; i11 < EctoTokenPrices.length; i11++) {
  21.                 pointShop = 50;
  22.             if (item.getId() == EctoTokenPrices[i11][0]) {
  23.                 if (money < EctoTokenPrices[i11][1] * quantity) {
  24.                 player.getPackets().sendGameMessage("You need " + EctoTokenPrices[i11][1] + " Ecto-Tokens to buy this item!");
  25.                 return;
  26.             } else
  27.                 pointShop = 50;
  28.                 player.getPackets().sendGameMessage("You have bought a " + item.getDefinitions().getName() + " from the store.");
  29.                 player.getInventory().addItem(EctoTokenPrices[i11][0], 1);
  30.                 player.getInventory().deleteItem(EctoTokenPrices[i11][1], i11);
  31.                 return;
  32.             }
  33.         }
  34.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement