Semi functional player shops

This commit is contained in:
RedSparr0w
2019-11-23 01:44:57 +13:00
parent 3afb44615e
commit ca12809861
17 changed files with 213 additions and 331 deletions
@@ -1642,8 +1642,7 @@ public class PlayerAssistant {
switch (spellId) {
case 1162: // low alch
if (player.inTrade) {
player.getActionSender().sendMessage(
"You can't alch while in trade!");
player.getActionSender().sendMessage("You can't alch while in trade!");
return;
}
if (player.isBotting == true) {
@@ -1667,7 +1666,7 @@ public class PlayerAssistant {
}
}
if (canAlch) {
int value = player.getShopAssistant().getItemShopValue( itemId) / 3;
int value = (int) Math.floor(player.getShopAssistant().getItemShopValue(itemId) * 0.4);
String itemName = ItemAssistant.getItemName(itemId).toLowerCase();
if (player.getPlayerAssistant().isPlayer()) {
GameLogger.writeLog(player.playerName, "alchemy", player.playerName + " cast Low Alchemy on " + itemName + " for " + GameLogger.formatCurrency(value) + " coins");
@@ -1740,7 +1739,7 @@ public class PlayerAssistant {
}
}
if (canAlch) {
int value = (int) (player.getShopAssistant().getItemShopValue(itemId) * .75);
int value = (int) Math.floor(player.getShopAssistant().getItemShopValue(itemId) * 0.75);
String itemName = ItemAssistant.getItemName(itemId).toLowerCase();
if (player.getPlayerAssistant().isPlayer()) {
GameLogger.writeLog(player.playerName, "alchemy", player.playerName + " cast High Alchemy on " + itemName + " for" + GameLogger.formatCurrency(value) + " coins");