Zamorak robe top and bottom now count as Zamorak god items
Zamorak robe top and bottom now allowed into Entrana Implemented the right-click take-boat options for the monks of Entrana Fixed some silly typos in the Monk-of-Entrana dialogue Removed unused god item definitions
This commit is contained in:
+8
-6
@@ -41,6 +41,11 @@ public final class MonkOfEntranaDialogue extends DialoguePlugin {
|
|||||||
return new MonkOfEntranaDialogue(player);
|
return new MonkOfEntranaDialogue(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void sail(Player player, Ships ship) {
|
||||||
|
ship.sail(player);
|
||||||
|
playJingle(player, 172);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean open(Object... args) {
|
public boolean open(Object... args) {
|
||||||
npc = (NPC) args[0];
|
npc = (NPC) args[0];
|
||||||
@@ -98,7 +103,7 @@ public final class MonkOfEntranaDialogue extends DialoguePlugin {
|
|||||||
stage = 25;
|
stage = 25;
|
||||||
break;
|
break;
|
||||||
case 23:
|
case 23:
|
||||||
interpreter.sendDialogues(npc, null, "Do not try and decieve us again. Come back when you", "have liad down your Zamorakian instruments of death.");
|
interpreter.sendDialogues(npc, null, "Do not try to deceive us again. Come back when you", "have laid down your Zamorakian instruments of death.");
|
||||||
stage = 24;
|
stage = 24;
|
||||||
break;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
@@ -106,8 +111,7 @@ public final class MonkOfEntranaDialogue extends DialoguePlugin {
|
|||||||
break;
|
break;
|
||||||
case 25:
|
case 25:
|
||||||
end();
|
end();
|
||||||
Ships.PORT_SARIM_TO_ENTRANA.sail(player);
|
sail(player, Ships.PORT_SARIM_TO_ENTRANA);
|
||||||
playJingle(player, 172);
|
|
||||||
if (!player.getAchievementDiaryManager().getDiary(DiaryType.FALADOR).isComplete(0, 14)) {
|
if (!player.getAchievementDiaryManager().getDiary(DiaryType.FALADOR).isComplete(0, 14)) {
|
||||||
player.getAchievementDiaryManager().getDiary(DiaryType.FALADOR).updateTask(player, 0, 14, true);
|
player.getAchievementDiaryManager().getDiary(DiaryType.FALADOR).updateTask(player, 0, 14, true);
|
||||||
}
|
}
|
||||||
@@ -133,9 +137,7 @@ public final class MonkOfEntranaDialogue extends DialoguePlugin {
|
|||||||
stage = 511;
|
stage = 511;
|
||||||
break;
|
break;
|
||||||
case 511:
|
case 511:
|
||||||
end();
|
sail(player, Ships.ENTRANA_TO_PORT_SARIM);
|
||||||
Ships.ENTRANA_TO_PORT_SARIM.sail(player);
|
|
||||||
playJingle(player, 172);
|
|
||||||
break;
|
break;
|
||||||
case 520:
|
case 520:
|
||||||
end();
|
end();
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package content.region.misc.entrana.handlers
|
||||||
|
|
||||||
|
import content.global.travel.ship.Ships
|
||||||
|
import core.api.*
|
||||||
|
import core.cache.def.impl.ItemDefinition
|
||||||
|
import core.game.dialogue.DialogueFile
|
||||||
|
import core.game.interaction.IntType
|
||||||
|
import core.game.interaction.InteractionListener
|
||||||
|
import core.game.node.entity.npc.NPC
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.game.node.entity.player.link.diary.DiaryType
|
||||||
|
import core.tools.END_DIALOGUE
|
||||||
|
import org.rs09.consts.NPCs
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Listeners for the Entrana monks' fast-travel option
|
||||||
|
* @author Player Name
|
||||||
|
*/
|
||||||
|
|
||||||
|
fun sail(player: Player?, ship: Ships) {
|
||||||
|
ship.sail(player)
|
||||||
|
playJingle(player!!, 172)
|
||||||
|
}
|
||||||
|
|
||||||
|
class EntranaListeners : InteractionListener {
|
||||||
|
override fun defineListeners() {
|
||||||
|
for (npc in arrayOf(NPCs.MONK_OF_ENTRANA_2730, NPCs.MONK_OF_ENTRANA_658, NPCs.MONK_OF_ENTRANA_2731)) {
|
||||||
|
on(npc, IntType.NPC, "take-boat") { player, _ ->
|
||||||
|
sail(player, Ships.ENTRANA_TO_PORT_SARIM)
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (npc in arrayOf(NPCs.MONK_OF_ENTRANA_2728, NPCs.MONK_OF_ENTRANA_657, NPCs.MONK_OF_ENTRANA_2729)) {
|
||||||
|
on(npc, IntType.NPC, "take-boat") { player, _ ->
|
||||||
|
if (!ItemDefinition.canEnterEntrana(player)) {
|
||||||
|
openDialogue(player, object : DialogueFile() {
|
||||||
|
override fun handle(componentID: Int, buttonID: Int) {
|
||||||
|
this.npc = NPC(npc)
|
||||||
|
when (stage) {
|
||||||
|
0 -> npc("NO WEAPONS OR ARMOUR are permitted on holy", "Entrana AT ALL. We will not allow you to travel there", "in breach of mighty Saradomin's edict.").also { stage++ }
|
||||||
|
1 -> npc("Do not try to deceive us again. Come back when you", "have laid down your Zamorakian instruments of death.").also { stage = END_DIALOGUE }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
sail(player, Ships.PORT_SARIM_TO_ENTRANA)
|
||||||
|
if (!player.achievementDiaryManager.getDiary(DiaryType.FALADOR).isComplete(0, 14)) {
|
||||||
|
player.achievementDiaryManager.getDiary(DiaryType.FALADOR).updateTask(player, 0, 14, true)
|
||||||
|
}
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1731,7 +1731,7 @@ fun sendPlayerOnInterface(player: Player, iface: Int, child: Int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a dialogue that uses the player's chathead.
|
* Sends a dialogue that uses the npc's chathead.
|
||||||
* @param player the player to send the dialogue to
|
* @param player the player to send the dialogue to
|
||||||
* @param npc the ID of the NPC to use for the chathead
|
* @param npc the ID of the NPC to use for the chathead
|
||||||
* @param msg the message to send.
|
* @param msg the message to send.
|
||||||
@@ -1744,7 +1744,7 @@ fun sendNPCDialogue(player: Player, npc: Int, msg: String, expr: core.game.dialo
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a dialogue that uses the player's chathead.
|
* Sends a dialogue that uses the npc's chathead.
|
||||||
* @param player the player to send the dialogue to
|
* @param player the player to send the dialogue to
|
||||||
* @param npc the ID of the NPC to use for the chathead
|
* @param npc the ID of the NPC to use for the chathead
|
||||||
* @param expr the FacialExpression to use. An enum exists for these called FacialExpression.
|
* @param expr the FacialExpression to use. An enum exists for these called FacialExpression.
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ enum class God(vararg val validItems: Int) {
|
|||||||
Items.ZAMORAK_STAFF_2417,
|
Items.ZAMORAK_STAFF_2417,
|
||||||
Items.ZAMORAK_STOLE_10474,
|
Items.ZAMORAK_STOLE_10474,
|
||||||
Items.ZAMORAK_SYMBOL_8056,
|
Items.ZAMORAK_SYMBOL_8056,
|
||||||
|
Items.ZAMORAK_ROBE_1033,
|
||||||
|
Items.ZAMORAK_ROBE_1035,
|
||||||
),
|
),
|
||||||
GUTHIX(
|
GUTHIX(
|
||||||
Items.STEEL_HERALDIC_HELM_8692,
|
Items.STEEL_HERALDIC_HELM_8692,
|
||||||
@@ -118,12 +120,6 @@ enum class God(vararg val validItems: Int) {
|
|||||||
Items.GUTHIX_ROBE_TOP_10788,
|
Items.GUTHIX_ROBE_TOP_10788,
|
||||||
Items.GUTHIX_STAFF_2416,
|
Items.GUTHIX_STAFF_2416,
|
||||||
Items.GUTHIX_STOLE_10472,
|
Items.GUTHIX_STOLE_10472,
|
||||||
Items.GUTHIX_SYMBOL_8057
|
Items.GUTHIX_SYMBOL_8057,
|
||||||
),
|
|
||||||
ZAROS(
|
|
||||||
Items.ANCIENT_STAFF_13406,
|
|
||||||
Items.ANCIENT_STAFF_4675,
|
|
||||||
Items.ANCIENT_MACE_11061,
|
|
||||||
Items.ANCIENT_BOOK_7633,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -661,7 +661,9 @@ public class ItemDefinition extends Definition<Item> {
|
|||||||
Items.HAM_CLOAK_4304,
|
Items.HAM_CLOAK_4304,
|
||||||
Items.HAM_LOGO_4306,
|
Items.HAM_LOGO_4306,
|
||||||
Items.GLOVES_4308,
|
Items.GLOVES_4308,
|
||||||
Items.BOOTS_4310
|
Items.BOOTS_4310,
|
||||||
|
Items.ZAMORAK_ROBE_1033,
|
||||||
|
Items.ZAMORAK_ROBE_1035
|
||||||
));
|
));
|
||||||
private static final HashSet<Integer> entranaBannedItems = new HashSet(Arrays.asList(
|
private static final HashSet<Integer> entranaBannedItems = new HashSet(Arrays.asList(
|
||||||
/**Items.BUTTERFLY_NET_10010, easing the restriction until barehanded implementation**/
|
/**Items.BUTTERFLY_NET_10010, easing the restriction until barehanded implementation**/
|
||||||
|
|||||||
Reference in New Issue
Block a user