forked from 2009Scape/Server
Port Phasmatys entry fee can be paid with Ecto-tokens in the bank
This commit is contained in:
parent
a411c7a5e2
commit
e88bdf94d3
1 changed files with 5 additions and 2 deletions
|
|
@ -187,11 +187,14 @@ public final class PhasmatysZone extends MapZone implements Plugin<Object> {
|
|||
*/
|
||||
private void handleEnergyBarrier(Player player, Scenery object) {
|
||||
boolean force = object.getLocation().equals(3659, 3508, 0) && player.getLocation().getY() < 3508 || object.getLocation().equals(3652, 3485, 0) && player.getLocation().getX() > 3652;
|
||||
if (!force && !player.getInventory().contains(4278, 2)) {
|
||||
//Snowscape modification: allow paying from bank or inventory. Also notify player if they don't have enough, since the dialogue doesn't seem to trigger
|
||||
if (!force && !(player.getInventory().contains(4278, 2) || player.getBank().contains(4278, 2))) {
|
||||
player.sendMessage("You need 2 ecto-tokens in your inventory or bank to pay the entry fee.");
|
||||
player.getDialogueInterpreter().open(1706);
|
||||
return;
|
||||
}
|
||||
if (force || player.getInventory().remove(new Item(4278, 2))) {
|
||||
if (force || player.getInventory().remove(new Item(4278, 2)) || player.getBank().remove(new Item(4278, 2))) {
|
||||
if (!force) player.sendMessage("You pay the ghost guard 2 ecto-tokens to enter the barrier.");
|
||||
final Direction direction = Direction.getLogicalDirection(player.getLocation(), object.getLocation());
|
||||
Location end = player.getLocation().transform(direction, 2);
|
||||
if (player.getLocation().getY() >= 3508) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue