MTA fixes:

- It is now possible to talk to the telekinetic guardian through the maze wall.
- Asking for the price of an MTA reward no longer attempts to purchase said reward.
- Graveyard bones now give the correct amount of bananas/peaches.
- Number of telekinetic mazes solved now persist when exiting.
This commit is contained in:
Avi Weinstock
2022-01-24 20:11:14 -05:00
committed by Ryan
parent c6290f4079
commit 514c86f4a6
4 changed files with 10 additions and 10 deletions
@@ -241,9 +241,9 @@ public class MTAShop {
if (item == null) {
return true;
}
if (opcode == 230) {
if (opcode == 155) {
value(player, item, slot);
} else {
} else if (opcode == 196) {
buy(player, item, slot);
}
return true;
@@ -122,11 +122,6 @@ public class TelekineticZone extends MTAZone {
if (player == null || player != this.player) {
return super.leave(entity, logout);
}
if (logout) {
player.getSavedData().getActivityData().setSolvedMazes(solved);
} else {
player.getSavedData().getActivityData().setSolvedMazes(0);
}
if (statue != null) {
GroundItemManager.destroy(statue);
}
@@ -277,6 +272,7 @@ public class TelekineticZone extends MTAZone {
}
});
}
player.getSavedData().getActivityData().setSolvedMazes(solved);
incrementPoints(player, MTAType.TELEKINETIC.ordinal(), points);
TelekineticZone.this.update(player);
player.setAttribute("camera", false);
@@ -2,6 +2,7 @@ package rs09.game.content.activity.mta
import core.game.content.activity.mta.impl.AlchemistZone
import core.game.node.item.Item
import core.game.world.map.Direction
import core.game.world.update.flag.context.Animation
import core.game.world.update.flag.context.Graphics
import org.rs09.consts.Items
@@ -16,6 +17,9 @@ class MTAListeners : InteractionListener() {
player.dialogueInterpreter.open(node.id, node)
return@on true
}
setDest(NPC, intArrayOf(NPCs.MAZE_GUARDIAN_3102), "talk-to") { player, node ->
return@setDest node.location.transform(Direction.getDirection(player.location, node.location), -1);
}
}
}
@@ -99,4 +103,4 @@ class MTASpellListeners : SpellListener("modern"){
}
}
}
}
@@ -154,7 +154,7 @@ class ModernListeners : SpellListener("modern"){
if(isInMTA){
if(bones.contains(item.id)){
val inInventory = player.inventory.getAmount(item.id)
val amount = inInventory * GraveyardZone.BoneType.forItem(Item(item.id)).ordinal + 1
val amount = inInventory * (GraveyardZone.BoneType.forItem(Item(item.id)).ordinal + 1)
if(amount > 0){
player.inventory.remove(Item(item.id,inInventory))
player.inventory.add(Item(if(bananas) Items.BANANA_1963 else Items.PEACH_6883,amount))
@@ -272,4 +272,4 @@ class ModernListeners : SpellListener("modern"){
addXP(player,30.0)
setDelay(player,true)
}
}
}