mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-06 08:39:06 +00:00
fixup ordering of shop items
This commit is contained in:
@@ -67,7 +67,8 @@ public class Bot {
|
||||
if (items.size() <= 0) return;
|
||||
int item_id = Misc.randomArrayListItem(items);
|
||||
String item_name = ItemAssistant.getItemName(item_id);
|
||||
int value = Math.max(1, BotHandler.getItemPrice(botClient.myShopId, item_id));
|
||||
int value = BotHandler.getItemPrice(botClient.myShopId, item_id);
|
||||
if (value <= 0) return;
|
||||
botClient.forcedChat("Selling " + item_name + " " + formatSellPrice(value) + " ea");
|
||||
/*
|
||||
Real chat - Disabled for now, can't get it to function correctly
|
||||
|
||||
@@ -107,13 +107,13 @@ public class BotHandler
|
||||
public static int getItemPrice(int shop_id, int item_id){
|
||||
item_id++;
|
||||
Client shop = getPlayerShop(shop_id);
|
||||
if (shop == null) return 1;
|
||||
if (shop == null) return 0;
|
||||
for (int slot = 0; slot < ShopHandler.MaxShopItems; slot++) {
|
||||
if (shop.bankItems[slot] == item_id) {
|
||||
return Math.max(1, shop.bankItemsV[slot]);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static void setPrice(int shop_id, int item_id, int amount){
|
||||
|
||||
Reference in New Issue
Block a user