Fixed blessing of graves belonging to ironmen

Fixed POH teleport issue
Fixed charter requirements
Fixed entrana weapon check bypass
Small authenticity improvements
This commit is contained in:
Player Name 2024-10-06 11:14:56 +00:00 committed by Ryan
parent 4799176c14
commit b2f7f86d6a
9 changed files with 63 additions and 23 deletions

View file

@ -23,7 +23,9 @@ object DrillDemonUtils {
val DD_NPC = NPCs.SERGEANT_DAMIEN_2790
fun teleport(player: Player) {
setAttribute(player, DD_KEY_RETURN_LOC, player.location)
if (getAttribute(player, DD_KEY_RETURN_LOC, null) == null) {
setAttribute(player, DD_KEY_RETURN_LOC, player.location)
}
teleport(player, Location.create(3163, 4819, 0))
player.interfaceManager.closeDefaultTabs()
setComponentVisibility(player, 548, 69, true)

View file

@ -16,7 +16,6 @@ object EvilBobUtils {
const val prevLocation = "/save:original-loc"
const val eventComplete = "/save:evilbob:eventcomplete"
const val assignedFishingZone = "/save:evilbob:fishingzone"
const val fishCaught = "evilbob:fishcaught"
const val attentive = "/save:evilbob:attentive"
const val servantHelpDialogueSeen = "/save:evilbob:servantdialogeseen"
const val attentiveNewSpot = "/save:evilbob:attentivenewspot"
@ -53,7 +52,9 @@ object EvilBobUtils {
}
fun teleport(player: Player) {
setAttribute(player, prevLocation, player.location)
if (getAttribute(player, prevLocation, null) == null) {
setAttribute(player, prevLocation, player.location)
}
player.properties.teleportLocation = Location.create(3419, 4776, 0)
}

View file

@ -27,7 +27,9 @@ object FreakUtils{
}
fun teleport(player: Player) {
setAttribute(player, freakPreviousLoc, player.location)
if (getAttribute(player, freakPreviousLoc,null) == null) {
setAttribute(player, freakPreviousLoc, player.location)
}
teleport(player, Location.create(2599, 4777 ,0))
}

View file

@ -30,12 +30,12 @@ object SurpriseExamUtils {
)
fun teleport(player: Player){
player.setAttribute(SE_KEY_LOC,player.location)
if (getAttribute(player, SE_KEY_LOC, null) == null) {
player.setAttribute(SE_KEY_LOC, player.location)
}
registerLogoutListener(player, SE_LOGOUT_KEY){p ->
p.location = getAttribute(p, SE_KEY_LOC, ServerConstants.HOME_LOCATION)
}
player.properties.teleportLocation = Location.create(1886, 5025, 0)
}

View file

@ -188,6 +188,7 @@ public final class HouseManager {
construct();
}
player.setAttribute("poh_entry", HouseManager.this);
player.setAttribute("/save:original-loc", location.getExitLocation());
player.lock(1);
player.debug("House location: " + houseRegion.getBaseLocation() + ", entry: " + getEnterLocation());
}
@ -267,6 +268,7 @@ public final class HouseManager {
if (house.isInHouse(player)) {
player.animate(Animation.RESET);
player.getProperties().setTeleportLocation(house.location.getExitLocation());
removeAttribute(player, "original-loc");
}
}

View file

@ -85,7 +85,7 @@ public enum Altar {
}
if (this == LAW) {
if (!ItemDefinition.canEnterEntrana(player)) {
player.sendMessage("You can't take weapons and armour into the law rift.");
player.sendMessage("The power of Saradomin prevents you from taking armour or weaponry to Entrana.");
return;
}
}

View file

@ -84,7 +84,10 @@ public final class ShipCharter {
*/
public static int getCost(final Player player, Destination destination) {
int cost = destination.getCost(player, destination);
if (player.getEquipment().containsItem(RING_OF_CHAROS)) {// TODO: cabin fever quest
if (player.getQuestRepository().isComplete("Cabin Fever")) {
cost -= Math.round((cost / 2.));
}
if (player.getEquipment().containsItem(RING_OF_CHAROS)) {
cost -= Math.round((cost / 2.));
}
return cost;
@ -96,12 +99,10 @@ public final class ShipCharter {
* @return the hidden childs.
*/
public static int[] getHiddenComponents(final Player player, Destination base) {
final Destination[] restrictions = new Destination[] { /**
*
* Destination.MOS_LE_HARMLESS,
*/
Destination.OO_GLOG, Destination.SHIPYARD, /* Destination.PORT_TYRAS, */
Destination.CRANDOR };
final Destination[] restrictions = new Destination[] { /* Destination.MOS_LE_HARMLESS, */
Destination.OO_GLOG, Destination.SHIPYARD, /* Destination.PORT_TYRAS, */
Destination.CRANDOR
};
List<Integer> childs = new ArrayList<>(20);
for (Destination destination : restrictions) {
childs.add(destination.getXChild());
@ -141,10 +142,15 @@ public final class ShipCharter {
PORT_PHASMATYS(Location.create(3705, 3503, 1), 24, new int[] { 3650, 3250, 1850, 0, 0, 0, 2050, 1850, 3200, 1100 }, Location.create(3702, 3502, 0), 2, 13) {
@Override
public boolean checkTravel(Player player) {
return requireQuest(player, "Priest in Peril", "to go there");
return requireQuest(player, "Priest in Peril", "to go there.");
}
},
CRANDOR(Location.create(2792, 3417, 1), 32, new int[] { 0, 480, 480, 925, 400, 3650, 1600, 400, 3200, 3800 }, null, 10, 21) {
@Override
public boolean checkTravel(Player player) {
return requireQuest(player, "Dragon Slayer", "to go there.");
}
},
CRANDOR(new Location(2792, 3417, 1), 32, new int[] { 0, 480, 480, 925, 400, 3650, 1600, 400, 3200, 3800 }, null, 10, 21),
BRIMHAVEN(Location.create(2763, 3238, 1), 28, new int[] { 0, 480, 480, 925, 400, 3650, 1600, 400, 3200, 3800 }, Location.create(2760, 3238, 0), 6, 17){
@Override
public int getCost(Player player, Destination destination) {
@ -161,7 +167,13 @@ public final class ShipCharter {
return super.getCost(player, destination);
}
},
PORT_TYRAS(Location.create(2142, 3122, 0), 23, new int[] { 3200, 3200, 3200, 1600, 3200, 3200, 3200, 3200, 0, 3200 }, Location.create(2143, 3122, 0), 1, 12),
PORT_TYRAS(Location.create(2142, 3122, 0), 23, new int[] { 3200, 3200, 3200, 1600, 3200, 3200, 3200, 3200, 0, 3200 }, Location.create(2143, 3122, 0), 1, 12) {
@Override
public boolean checkTravel(Player player) {
return hasRequirement(player, "Regicide");
}
},
KARAMJA(Location.create(2957, 3158, 1), 27, new int[] { 200, 480, 0, 225, 400, 1850, 0, 200, 3200, 2000 }, Location.create(2954, 3156, 0), 5, 16) {
@Override
public int getCost(Player player, Destination destination) {
@ -178,9 +190,19 @@ public final class ShipCharter {
return super.getCost(player, destination);
}
},
SHIPYARD(Location.create(3001, 3032, 0), 26, new int[] { 400, 1600, 200, 225, 720, 1850, 400, 0, 3200, 900 }, Location.create(3001, 3032, 0), 4, 15),
SHIPYARD(Location.create(3001, 3032, 0), 26, new int[] { 400, 1600, 200, 225, 720, 1850, 400, 0, 3200, 900 }, Location.create(3001, 3032, 0), 4, 15) {
@Override
public boolean checkTravel(Player player) {
return requireQuest(player, "The Grand Tree", "to go there.");
}
},
OO_GLOG(Location.create(2623, 2857, 0), 33, new int[] { 300, 3400, 2000, 550, 5000, 2800, 1400, 900, 3200, 0}, Location.create(2622, 2857, 0), 11, 22),
MOS_LE_HARMLESS(Location.create(3671, 2931, 0), 31, new int[] { 725, 625, 1025, 0, 1025, 0, 325, 275, 1600, 500 }, Location.create(3671, 2933, 0), 9, 20);
MOS_LE_HARMLESS(Location.create(3671, 2931, 0), 31, new int[] { 725, 625, 1025, 0, 1025, 0, 325, 275, 1600, 500 }, Location.create(3671, 2933, 0), 9, 20) {
@Override
public boolean checkTravel(Player player) {
return hasRequirement(player, "Cabin Fever");
}
};
/**
* Constructs a new {@code ShipCharter} {@code Object}.

View file

@ -34,6 +34,7 @@ import content.minigame.vinesweeper.Vinesweeper.Companion.SEED_LOCS
import content.minigame.vinesweeper.Vinesweeper.Companion.populateSeeds
import content.minigame.vinesweeper.Vinesweeper.Companion.scheduleNPCs
import content.minigame.vinesweeper.Vinesweeper.Companion.sendPoints
import core.cache.def.impl.ItemDefinition
import core.game.interaction.InteractionListener
import core.game.interaction.IntType
import core.game.interaction.InterfaceListener
@ -83,7 +84,12 @@ class Vinesweeper : InteractionListener, InterfaceListener, MapArea {
on(Sceneries.PORTAL_29534, IntType.SCENERY, "enter") { player, _ ->
val x = player.getAttribute("vinesweeper:return-tele:x", 3052)
val y = player.getAttribute("vinesweeper:return-tele:y", 3304)
teleport(player, Location(x, y))
val loc = Location(x, y)
if (ZoneBorders.forRegion(11060).insideBorder(loc) && !ItemDefinition.canEnterEntrana(player)) {
sendMessage(player, "The power of Saradomin prevents you from taking armour or weaponry to Entrana.");
return@on true
}
teleport(player, loc)
return@on true
}
on(SIGNS, IntType.SCENERY, "read") { player, node ->

View file

@ -106,6 +106,12 @@ class GraveController : PersistWorld, TickListener, InteractionListener, Command
return true
}
val gOwner = Repository.uid_map[g.ownerUid]
if (gOwner != null && gOwner.ironmanManager.isIronman) {
sendMessage(player, "This grave belongs to an Ironman.")
return true
}
if (getStatLevel(player, Skills.PRAYER) < 70) {
sendMessage(player, "You need a Prayer level of 70 to bless a grave.")
return true
@ -125,7 +131,6 @@ class GraveController : PersistWorld, TickListener, InteractionListener, Command
playAudio(player, Sounds.PRAYER_RECHARGE_2674)
animate(player, 645)
val gOwner = Repository.uid_map[g.ownerUid]
if (gOwner != null) {
sendMessage(gOwner, colorize("%RYour grave has been blessed."))
}
@ -290,4 +295,4 @@ class GraveController : PersistWorld, TickListener, InteractionListener, Command
}
}
}
}
}