mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
Add trade zones
This commit is contained in:
@@ -30,6 +30,12 @@ public class BotHandler
|
||||
}
|
||||
|
||||
public static void playerShop(Client player){
|
||||
// Must be in the correct zones
|
||||
if (!player.inPlayerShopArea() && !player.inBankArea()) {
|
||||
player.getActionSender().sendMessage("You need to be in a bank zone or trade area for this.");
|
||||
return;
|
||||
}
|
||||
|
||||
Client playerShop = getPlayerShop(player);
|
||||
|
||||
if (playerShop == null) {
|
||||
@@ -182,5 +188,4 @@ public class BotHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -621,6 +621,26 @@ public abstract class Player {
|
||||
isInArea(3422,2895,3433,2885) || //Nardah
|
||||
isInArea(3685,3473,3694,3461) || //Phasmatys
|
||||
isInArea(2530,4725,2550,4705) || //Phasmatys
|
||||
isInArea(2834, 10215, 2841, 10204) || // Keldagrim
|
||||
isInArea(2379, 4453, 2386, 4462) || // Zanaris
|
||||
false;
|
||||
}
|
||||
|
||||
public boolean inPlayerShopArea() {
|
||||
return isInArea(2938, 3389, 3059, 3329) || // Falador
|
||||
isInArea(3172, 3449, 3270, 3384) || // Varrock
|
||||
isInArea(3200, 3256, 3237, 3201) || // Lumbridge
|
||||
isInArea(2716, 3498, 2735, 3480) ||
|
||||
isInArea(3075, 3513, 3106, 3466) ||
|
||||
isInArea(3074, 3262, 3102, 3239) ||
|
||||
isInArea(2435, 3101, 2459, 3080) ||
|
||||
isInArea(2618, 3075, 2598, 3108) ||
|
||||
isInArea(2678, 3267, 2601, 3341) ||
|
||||
isInArea(3265, 3157, 3324, 3215) ||
|
||||
isInArea(3386, 3264, 3348, 3286) ||
|
||||
isInArea(2797, 3454, 2838, 3430) ||
|
||||
isInArea(2546, 3157, 2512, 3176) ||
|
||||
isInArea(2451, 3408, 2425, 3437) ||
|
||||
false;
|
||||
}
|
||||
|
||||
|
||||
@@ -472,7 +472,6 @@ public class ShopAssistant {
|
||||
boolean isStackable = ItemDefinitions.getDef()[itemID].isStackable;
|
||||
int freeSlots = player.getItemAssistant().freeSlots();
|
||||
int storeQty = ShopHandler.getStock(shopID, itemID);
|
||||
System.out.println("Item " + itemID + " stock = " + storeQty);
|
||||
if (amount > 0) {
|
||||
if (storeQty <= 0) {
|
||||
// none in stock, or not sold here
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user