mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-15 11:00:17 -07:00
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:
parent
4799176c14
commit
b2f7f86d6a
9 changed files with 63 additions and 23 deletions
|
|
@ -23,7 +23,9 @@ object DrillDemonUtils {
|
||||||
val DD_NPC = NPCs.SERGEANT_DAMIEN_2790
|
val DD_NPC = NPCs.SERGEANT_DAMIEN_2790
|
||||||
|
|
||||||
fun teleport(player: Player) {
|
fun teleport(player: Player) {
|
||||||
|
if (getAttribute(player, DD_KEY_RETURN_LOC, null) == null) {
|
||||||
setAttribute(player, DD_KEY_RETURN_LOC, player.location)
|
setAttribute(player, DD_KEY_RETURN_LOC, player.location)
|
||||||
|
}
|
||||||
teleport(player, Location.create(3163, 4819, 0))
|
teleport(player, Location.create(3163, 4819, 0))
|
||||||
player.interfaceManager.closeDefaultTabs()
|
player.interfaceManager.closeDefaultTabs()
|
||||||
setComponentVisibility(player, 548, 69, true)
|
setComponentVisibility(player, 548, 69, true)
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ object EvilBobUtils {
|
||||||
const val prevLocation = "/save:original-loc"
|
const val prevLocation = "/save:original-loc"
|
||||||
const val eventComplete = "/save:evilbob:eventcomplete"
|
const val eventComplete = "/save:evilbob:eventcomplete"
|
||||||
const val assignedFishingZone = "/save:evilbob:fishingzone"
|
const val assignedFishingZone = "/save:evilbob:fishingzone"
|
||||||
const val fishCaught = "evilbob:fishcaught"
|
|
||||||
const val attentive = "/save:evilbob:attentive"
|
const val attentive = "/save:evilbob:attentive"
|
||||||
const val servantHelpDialogueSeen = "/save:evilbob:servantdialogeseen"
|
const val servantHelpDialogueSeen = "/save:evilbob:servantdialogeseen"
|
||||||
const val attentiveNewSpot = "/save:evilbob:attentivenewspot"
|
const val attentiveNewSpot = "/save:evilbob:attentivenewspot"
|
||||||
|
|
@ -53,7 +52,9 @@ object EvilBobUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun teleport(player: Player) {
|
fun teleport(player: Player) {
|
||||||
|
if (getAttribute(player, prevLocation, null) == null) {
|
||||||
setAttribute(player, prevLocation, player.location)
|
setAttribute(player, prevLocation, player.location)
|
||||||
|
}
|
||||||
player.properties.teleportLocation = Location.create(3419, 4776, 0)
|
player.properties.teleportLocation = Location.create(3419, 4776, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,9 @@ object FreakUtils{
|
||||||
}
|
}
|
||||||
|
|
||||||
fun teleport(player: Player) {
|
fun teleport(player: Player) {
|
||||||
|
if (getAttribute(player, freakPreviousLoc,null) == null) {
|
||||||
setAttribute(player, freakPreviousLoc, player.location)
|
setAttribute(player, freakPreviousLoc, player.location)
|
||||||
|
}
|
||||||
teleport(player, Location.create(2599, 4777 ,0))
|
teleport(player, Location.create(2599, 4777 ,0))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,12 @@ object SurpriseExamUtils {
|
||||||
)
|
)
|
||||||
|
|
||||||
fun teleport(player: Player){
|
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 ->
|
registerLogoutListener(player, SE_LOGOUT_KEY){p ->
|
||||||
p.location = getAttribute(p, SE_KEY_LOC, ServerConstants.HOME_LOCATION)
|
p.location = getAttribute(p, SE_KEY_LOC, ServerConstants.HOME_LOCATION)
|
||||||
}
|
}
|
||||||
|
|
||||||
player.properties.teleportLocation = Location.create(1886, 5025, 0)
|
player.properties.teleportLocation = Location.create(1886, 5025, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,7 @@ public final class HouseManager {
|
||||||
construct();
|
construct();
|
||||||
}
|
}
|
||||||
player.setAttribute("poh_entry", HouseManager.this);
|
player.setAttribute("poh_entry", HouseManager.this);
|
||||||
|
player.setAttribute("/save:original-loc", location.getExitLocation());
|
||||||
player.lock(1);
|
player.lock(1);
|
||||||
player.debug("House location: " + houseRegion.getBaseLocation() + ", entry: " + getEnterLocation());
|
player.debug("House location: " + houseRegion.getBaseLocation() + ", entry: " + getEnterLocation());
|
||||||
}
|
}
|
||||||
|
|
@ -267,6 +268,7 @@ public final class HouseManager {
|
||||||
if (house.isInHouse(player)) {
|
if (house.isInHouse(player)) {
|
||||||
player.animate(Animation.RESET);
|
player.animate(Animation.RESET);
|
||||||
player.getProperties().setTeleportLocation(house.location.getExitLocation());
|
player.getProperties().setTeleportLocation(house.location.getExitLocation());
|
||||||
|
removeAttribute(player, "original-loc");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ public enum Altar {
|
||||||
}
|
}
|
||||||
if (this == LAW) {
|
if (this == LAW) {
|
||||||
if (!ItemDefinition.canEnterEntrana(player)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,10 @@ public final class ShipCharter {
|
||||||
*/
|
*/
|
||||||
public static int getCost(final Player player, Destination destination) {
|
public static int getCost(final Player player, Destination destination) {
|
||||||
int cost = destination.getCost(player, 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.));
|
cost -= Math.round((cost / 2.));
|
||||||
}
|
}
|
||||||
return cost;
|
return cost;
|
||||||
|
|
@ -96,12 +99,10 @@ public final class ShipCharter {
|
||||||
* @return the hidden childs.
|
* @return the hidden childs.
|
||||||
*/
|
*/
|
||||||
public static int[] getHiddenComponents(final Player player, Destination base) {
|
public static int[] getHiddenComponents(final Player player, Destination base) {
|
||||||
final Destination[] restrictions = new Destination[] { /**
|
final Destination[] restrictions = new Destination[] { /* Destination.MOS_LE_HARMLESS, */
|
||||||
*
|
|
||||||
* Destination.MOS_LE_HARMLESS,
|
|
||||||
*/
|
|
||||||
Destination.OO_GLOG, Destination.SHIPYARD, /* Destination.PORT_TYRAS, */
|
Destination.OO_GLOG, Destination.SHIPYARD, /* Destination.PORT_TYRAS, */
|
||||||
Destination.CRANDOR };
|
Destination.CRANDOR
|
||||||
|
};
|
||||||
List<Integer> childs = new ArrayList<>(20);
|
List<Integer> childs = new ArrayList<>(20);
|
||||||
for (Destination destination : restrictions) {
|
for (Destination destination : restrictions) {
|
||||||
childs.add(destination.getXChild());
|
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) {
|
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
|
@Override
|
||||||
public boolean checkTravel(Player player) {
|
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){
|
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
|
@Override
|
||||||
public int getCost(Player player, Destination destination) {
|
public int getCost(Player player, Destination destination) {
|
||||||
|
|
@ -161,7 +167,13 @@ public final class ShipCharter {
|
||||||
return super.getCost(player, destination);
|
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) {
|
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
|
@Override
|
||||||
public int getCost(Player player, Destination destination) {
|
public int getCost(Player player, Destination destination) {
|
||||||
|
|
@ -178,9 +190,19 @@ public final class ShipCharter {
|
||||||
return super.getCost(player, destination);
|
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),
|
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}.
|
* Constructs a new {@code ShipCharter} {@code Object}.
|
||||||
|
|
|
||||||
|
|
@ -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.populateSeeds
|
||||||
import content.minigame.vinesweeper.Vinesweeper.Companion.scheduleNPCs
|
import content.minigame.vinesweeper.Vinesweeper.Companion.scheduleNPCs
|
||||||
import content.minigame.vinesweeper.Vinesweeper.Companion.sendPoints
|
import content.minigame.vinesweeper.Vinesweeper.Companion.sendPoints
|
||||||
|
import core.cache.def.impl.ItemDefinition
|
||||||
import core.game.interaction.InteractionListener
|
import core.game.interaction.InteractionListener
|
||||||
import core.game.interaction.IntType
|
import core.game.interaction.IntType
|
||||||
import core.game.interaction.InterfaceListener
|
import core.game.interaction.InterfaceListener
|
||||||
|
|
@ -83,7 +84,12 @@ class Vinesweeper : InteractionListener, InterfaceListener, MapArea {
|
||||||
on(Sceneries.PORTAL_29534, IntType.SCENERY, "enter") { player, _ ->
|
on(Sceneries.PORTAL_29534, IntType.SCENERY, "enter") { player, _ ->
|
||||||
val x = player.getAttribute("vinesweeper:return-tele:x", 3052)
|
val x = player.getAttribute("vinesweeper:return-tele:x", 3052)
|
||||||
val y = player.getAttribute("vinesweeper:return-tele:y", 3304)
|
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
|
return@on true
|
||||||
}
|
}
|
||||||
on(SIGNS, IntType.SCENERY, "read") { player, node ->
|
on(SIGNS, IntType.SCENERY, "read") { player, node ->
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,12 @@ class GraveController : PersistWorld, TickListener, InteractionListener, Command
|
||||||
return true
|
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) {
|
if (getStatLevel(player, Skills.PRAYER) < 70) {
|
||||||
sendMessage(player, "You need a Prayer level of 70 to bless a grave.")
|
sendMessage(player, "You need a Prayer level of 70 to bless a grave.")
|
||||||
return true
|
return true
|
||||||
|
|
@ -125,7 +131,6 @@ class GraveController : PersistWorld, TickListener, InteractionListener, Command
|
||||||
playAudio(player, Sounds.PRAYER_RECHARGE_2674)
|
playAudio(player, Sounds.PRAYER_RECHARGE_2674)
|
||||||
animate(player, 645)
|
animate(player, 645)
|
||||||
|
|
||||||
val gOwner = Repository.uid_map[g.ownerUid]
|
|
||||||
if (gOwner != null) {
|
if (gOwner != null) {
|
||||||
sendMessage(gOwner, colorize("%RYour grave has been blessed."))
|
sendMessage(gOwner, colorize("%RYour grave has been blessed."))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue