Reintroduced PvP to level 49 deep wilderness and above (beyond the gate)
Traveling into the PvP area will auto-skull the player, but only whilst they remain in the area PvP in the deep wilderness does not apply a hard skull Deep wilderness soft skull is removed immediately upon leaving the deep wilderness Gates into the deep wilderness now give a warning about the danger of entering Gates allowing exit from the deep wilderness will not allow a player to leave if they are in combat The obelisk teleporter in the deep wilderness will not allow a player to use it if they are in combat All NPCs in the deep wilderness now drop PvP gear and brawlers The drop rate of PvP gear and brawlers in the deep wilderness has been boosted Fixed an issue that allowed PvP outside of explicit PvP scenarios
This commit is contained in:
@@ -38,6 +38,34 @@ class BankBoothListener : InteractionListener {
|
||||
Scenery.BANK_BOOTH_29085, Scenery.BANK_BOOTH_30015, Scenery.BANK_BOOTH_30016, Scenery.BANK_BOOTH_34205,
|
||||
Scenery.BANK_BOOTH_34752, Scenery.BANK_BOOTH_35647, Scenery.BANK_BOOTH_36786, Scenery.BANK_BOOTH_37474
|
||||
)
|
||||
|
||||
public fun convertToNotes (used: Node, player: Player) {
|
||||
val item = used as Item
|
||||
|
||||
if (item.noteChange != item.id) {
|
||||
if (item.definition.isUnnoted) {
|
||||
val amount = amountInInventory(player, item.id)
|
||||
if (removeItem(player, Item(item.id, amount))) {
|
||||
addItem(player, item.noteChange, amount)
|
||||
}
|
||||
} else {
|
||||
var amount = item.amount
|
||||
val freeSlotCount = freeSlots(player)
|
||||
|
||||
if (amount > freeSlotCount) {
|
||||
amount = freeSlotCount
|
||||
}
|
||||
|
||||
if (removeItem(player, Item(item.id, amount))) {
|
||||
addItem(player, item.noteChange, amount)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
sendMessage(player, "This item can't be noted.")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,32 +174,8 @@ class BankBoothListener : InteractionListener {
|
||||
tryInvokeBankerDialogue(player, with)
|
||||
return true
|
||||
}
|
||||
|
||||
val item = used as Item
|
||||
|
||||
if (item.noteChange != item.id) {
|
||||
if (item.definition.isUnnoted) {
|
||||
val amount = amountInInventory(player, item.id)
|
||||
if (removeItem(player, Item(item.id, amount))) {
|
||||
addItem(player, item.noteChange, amount)
|
||||
}
|
||||
} else {
|
||||
var amount = item.amount
|
||||
val freeSlotCount = freeSlots(player)
|
||||
|
||||
if (amount > freeSlotCount) {
|
||||
amount = freeSlotCount
|
||||
}
|
||||
|
||||
if (removeItem(player, Item(item.id, amount))) {
|
||||
addItem(player, item.noteChange, amount)
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
sendMessage(player, "This item can't be noted.")
|
||||
|
||||
convertToNotes (used, player)
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -184,4 +188,4 @@ class BankBoothListener : InteractionListener {
|
||||
onUseAnyWith(IntType.SCENERY, *BANK_BOOTHS, handler = ::attemptToConvertItems)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package content.minigame.allfiredup
|
||||
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.ServerConstants
|
||||
import core.game.dialogue.*
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.node.item.Item
|
||||
import core.plugin.Initializable
|
||||
import content.region.wilderness.dialogue.*
|
||||
import org.rs09.consts.Items
|
||||
|
||||
private val VALID_LOGS = arrayOf(Items.LOGS_1511, Items.OAK_LOGS_1521, Items.WILLOW_LOGS_1519, Items.MAPLE_LOGS_1517, Items.YEW_LOGS_1515, Items.MAGIC_LOGS_1513)
|
||||
@@ -20,6 +22,7 @@ class BeaconTenderDialogue(player: Player? = null) : core.game.dialogue.Dialogue
|
||||
}
|
||||
|
||||
override fun open(vararg args: Any?): Boolean {
|
||||
npc = (args[0] as NPC).getShownNPC(player)
|
||||
index = getIndexOf((args[0] as NPC).originalId)
|
||||
if(index == content.minigame.allfiredup.AFUBeacon.GWD.ordinal && player.skills.getLevel(Skills.SUMMONING) < 81){
|
||||
npc("Awwf uurrrhur","(You need 81 Summoning to communicate with Nanuq.)")
|
||||
@@ -27,11 +30,10 @@ class BeaconTenderDialogue(player: Player? = null) : core.game.dialogue.Dialogue
|
||||
return true
|
||||
}
|
||||
if(index == content.minigame.allfiredup.AFUBeacon.MONASTERY.ordinal && player.skills.getLevel(Skills.PRAYER) < 53){
|
||||
npc("I will aid you when your devotion is","strong enough.","(You need 53 Prayer for him to watch the beacon.)")
|
||||
npc("I will aid you when your devotion is","strong enough.","(You need 53 Prayer for him to assist you.)")
|
||||
stage = 1000
|
||||
return true
|
||||
}
|
||||
npc = (args[0] as NPC).getShownNPC(player)
|
||||
npc("Hello, adventurer.")
|
||||
return true
|
||||
}
|
||||
@@ -88,4 +90,4 @@ class BeaconTenderDialogue(player: Player? = null) : core.game.dialogue.Dialogue
|
||||
return intArrayOf(8067,8068,8069,8070,8071,8072,8073,8074,8075,8076)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package content.region.wilderness.handlers
|
||||
|
||||
import core.api.*
|
||||
import core.game.interaction.*
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.scenery.Scenery
|
||||
import core.game.node.Node
|
||||
import core.game.global.action.DoorActionHandler
|
||||
import core.game.dialogue.*
|
||||
import core.tools.*
|
||||
|
||||
class WildernessGateHandler : InteractionListener {
|
||||
val gates = intArrayOf(1597, 1596)
|
||||
|
||||
override fun defineListeners() {
|
||||
on (gates, IntType.SCENERY, "open", handler = ::handleGate)
|
||||
}
|
||||
|
||||
private fun handleGate (player: Player, node: Node) : Boolean {
|
||||
val isEntering = !player.skullManager.isDeepWilderness()
|
||||
|
||||
if (isEntering)
|
||||
openDialogue (player, GateDialogue(node.asScenery()))
|
||||
else {
|
||||
if (player.properties.combatPulse.isInCombat)
|
||||
sendMessage (player, "You cannot leave while you are under attack.")
|
||||
else {
|
||||
DoorActionHandler.handleAutowalkDoor (player, node.asScenery())
|
||||
player.skullManager.isDeepWilderness = false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
class GateDialogue (val gate: Scenery) : DialogueFile() {
|
||||
override fun handle (interfaceId: Int, buttonId: Int) {
|
||||
when (stage) {
|
||||
0 -> sendDialogueLines(player!!, "WARNING!", "Beyond this gate you enter the deep wilderness!", "Anyone will be able to attack you without consequence!", "You WILL NOT be able to leave during combat!").also { stage++ }
|
||||
1 -> showTopics (
|
||||
Topic(FacialExpression.NEUTRAL, "I wish to proceed.", 10, true),
|
||||
Topic(FacialExpression.NEUTRAL, "Nevermind.", END_DIALOGUE, true)
|
||||
)
|
||||
10 -> {
|
||||
end()
|
||||
DoorActionHandler.handleAutowalkDoor (player!!, gate)
|
||||
player!!.skullManager.isDeepWilderness = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,12 @@ public final class WildernessObeliskPlugin extends OptionHandler {
|
||||
if (stationObelisk == null) {
|
||||
return false;
|
||||
}
|
||||
if (player.getSkullManager().isDeepWilderness()) {
|
||||
if (player.getProperties().getCombatPulse().isInCombat()) {
|
||||
player.sendMessage("You can't use this while in combat.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
int x = stationObelisk.getLocation().getX();
|
||||
int y = stationObelisk.getLocation().getY();
|
||||
|
||||
Reference in New Issue
Block a user