Merge remote-tracking branch 'upstream/master'

This commit is contained in:
skelsoft
2021-07-10 09:45:35 +10:00
22 changed files with 1135 additions and 1458 deletions
-746
View File
@@ -46283,752 +46283,6 @@
}
]
},
{
"default": [
{
"minAmount": "1",
"weight": "100.0",
"id": "532",
"maxAmount": "1"
}
],
"charm": [
{
"minAmount": "1",
"weight": "100.0",
"id": "12158",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "12159",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "12160",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "12163",
"maxAmount": "1"
}
],
"ids": "",
"description": "moved ID's to runt",
"main": [
{
"minAmount": "1",
"weight": "25.0",
"id": "1145",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "1181",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "3122",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1161",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1119",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1141",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "1341",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "1357",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1347",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "830",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1345",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1343",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1339",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "807",
"maxAmount": "1"
},
{
"minAmount": "10",
"weight": "50.0",
"id": "557",
"maxAmount": "60"
},
{
"minAmount": "4",
"weight": "25.0",
"id": "561",
"maxAmount": "10"
},
{
"minAmount": "3",
"weight": "5.0",
"id": "563",
"maxAmount": "3"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "199",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "201",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "203",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "205",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "209",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "207",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "215",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "213",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "2485",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "217",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "5321",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "5311",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5100",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5323",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5105",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5293",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5296",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5292",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5294",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5297",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5299",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5280",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5281",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5104",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "5295",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "5303",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "5302",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "995",
"maxAmount": "1"
},
{
"minAmount": "10",
"weight": "50.0",
"id": "402",
"maxAmount": "10"
},
{
"minAmount": "10",
"weight": "50.0",
"id": "1760",
"maxAmount": "41"
},
{
"minAmount": "3",
"weight": "25.0",
"id": "354",
"maxAmount": "3"
},
{
"minAmount": "3",
"weight": "25.0",
"id": "454",
"maxAmount": "3"
},
{
"minAmount": "2",
"weight": "5.0",
"id": "384",
"maxAmount": "8"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "10976",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "10977",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "31",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "0",
"maxAmount": "1"
}
]
},
{
"default": [
{
"minAmount": "1",
"weight": "100.0",
"id": "532",
"maxAmount": "1"
}
],
"charm": [
{
"minAmount": "1",
"weight": "100.0",
"id": "12158",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "12159",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "12160",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "12163",
"maxAmount": "1"
}
],
"ids": "",
"description": "moved ID's to runt",
"main": [
{
"minAmount": "1",
"weight": "50.0",
"id": "1341",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "1339",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "1141",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "1343",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "1181",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1347",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1357",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1345",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "3122",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1161",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1145",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1121",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "1119",
"maxAmount": "1"
},
{
"minAmount": "8",
"weight": "50.0",
"id": "557",
"maxAmount": "60"
},
{
"minAmount": "5",
"weight": "25.0",
"id": "561",
"maxAmount": "7"
},
{
"minAmount": "2",
"weight": "25.0",
"id": "563",
"maxAmount": "2"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "5291",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "5292",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "5293",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "5294",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "50.0",
"id": "5281",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5296",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5297",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5311",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5105",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5298",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5299",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5301",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5302",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5303",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5100",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5323",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5321",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5280",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "5104",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "5295",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "12176",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "199",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "201",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "203",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "205",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "207",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "209",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "211",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "213",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "215",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "2485",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "25.0",
"id": "217",
"maxAmount": "1"
},
{
"minAmount": "35",
"weight": "50.0",
"id": "995",
"maxAmount": "300"
},
{
"minAmount": "2",
"weight": "5.0",
"id": "384",
"maxAmount": "8"
},
{
"minAmount": "13",
"weight": "5.0",
"id": "454",
"maxAmount": "13"
},
{
"minAmount": "4",
"weight": "50.0",
"id": "402",
"maxAmount": "10"
},
{
"minAmount": "10",
"weight": "50.0",
"id": "1760",
"maxAmount": "41"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "10976",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "10977",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "5.0",
"id": "31",
"maxAmount": "1"
},
{
"minAmount": "1",
"weight": "100.0",
"id": "0",
"maxAmount": "1"
}
]
},
{
"default": [
{
+20
View File
@@ -10651,6 +10651,10 @@
"npc_id": "5497",
"loc_data": "{2376,10198,0,1,0}-{2384,10202,0,1,0}-{2390,10207,0,1,0}-{2385,10193,0,1,0}-{2419,10192,0,1,0}-{2412,10200,0,1,0}"
},
{
"npc_id": "5498",
"loc_data": "{2412,3818,0,1,0}-{2412,3801,0,1,0}-{2392,3802,0,1,0}"
},
{
"npc_id": "5474",
"loc_data": "{2390,10216,0,1,0}-{2417,10228,0,1,0}-{2385,10227,0,1,0}"
@@ -10662,5 +10666,21 @@
{
"npc_id": "5473",
"loc_data": "{2377,10212,0,1,0}-{2392,10226,0,1,0}-{2407,10228,0,1,0}-{2406,10214,0,1,0}-{2420,10214,0,1,0}"
},
{
"npc_id": "5491",
"loc_data": "{2387,3800,0,0,3}-{2411,3795,0,0,6}-{2417,3825,0,0,1}"
},
{
"npc_id": "5492",
"loc_data": "{2387,3797,0,0,3}-{2414,3825,0,0,1}-{2414,3795,0,0,6}"
},
{
"npc_id": "5481",
"loc_data": "{2644,3709,0,1,0}"
},
{
"npc_id": "5482",
"loc_data": "{2422,3781,0,1,0}"
}
]
@@ -4,6 +4,8 @@ import core.game.content.dialogue.DialoguePlugin;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
import core.game.world.map.Location;
import rs09.game.util.region.rellekka.RellekkaDestination;
import rs09.game.util.region.rellekka.RellekkaUtils;
/**
* Handles the maria gunnars dialogue.
@@ -62,9 +64,9 @@ public class MariaGunnarsDialogue extends DialoguePlugin {
break;
case 3:
if (npc.getId() == 5508) {
RellekkaZone.sail(player, "Relleka", new Location(2310, 3782, 0));
RellekkaUtils.sail(player, RellekkaDestination.RELLEKKA_TO_NEITIZNOT);
} else {
RellekkaZone.sail(player, "Neitiznot", new Location(2644, 3710, 0));
RellekkaUtils.sail(player, RellekkaDestination.NEITIZNOT_TO_RELLEKKA);
}
end();
break;
@@ -49,13 +49,11 @@ public final class RellekkaZone extends MapZone implements Plugin<Object> {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
NPCDefinition.forId(5507).getHandlers().put("option:ferry-rellekka", this);
return this;
}
@Override
public boolean handle(Player player, Node node, String option) {
sail(player, "Relleka", new Location(2644, 3710, 0));
return true;
}
@@ -107,11 +105,6 @@ public final class RellekkaZone extends MapZone implements Plugin<Object> {
return true;
}
break;
case 5508:
if (option.getName().equals("Ferry-Neitiznot")) {
sail(player, "Neitiznot", new Location(2310, 3782, 0));
}
return true;
}
}
return super.interact(e, target, option);
@@ -127,35 +120,6 @@ public final class RellekkaZone extends MapZone implements Plugin<Object> {
register(new ZoneBorders(2602, 3639, 2739, 3741));
}
/**
* Sails a player using the relleka ships.
* @param player the player.
* @param name the name.
* @param destination the destination.
*/
public static void sail(final Player player, final String name, final Location destination) {
player.lock();
player.getInterfaceManager().open(new Component(224));
player.addExtension(LogoutTask.class, new LocationLogoutTask(5, destination));
GameWorld.getPulser().submit(new Pulse(1, player) {
int count;
@Override
public boolean pulse() {
switch (++count) {
case 5:
player.unlock();
player.getInterfaceManager().close();
player.getProperties().setTeleportLocation(destination);
player.getDialogueInterpreter().sendDialogue("The ship arrives at " + name + ".");
return true;
}
return false;
}
});
}
/**
* Handles options related to relleka.
* @author Vexia
@@ -5,6 +5,8 @@ import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
import core.game.world.map.Location;
import static rs09.tools.DialogueConstKt.END_DIALOGUE;
/**
* Handles the sailor dialogue.
* @author Vexia
@@ -40,7 +42,7 @@ public final class SailorDialogue extends DialoguePlugin {
public boolean open(Object... args) {
npc = (NPC) args[0];
rellekaNpc = npc.getId() == 1385;
player("Hello. Can I get a ride on your ship?");
player("Ship's closed due to stingrays?");
return true;
}
@@ -48,8 +50,10 @@ public final class SailorDialogue extends DialoguePlugin {
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 0:
npc("Hello again, brother " + player.getUsername() + ". If you're ready to jump", "aboard, we're all ready to set sail with the tide!");
stage++;
npc("Yes.");
stage = END_DIALOGUE;
//npc("Hello again, brother " + player.getUsername() + ". If you're ready to jump", "aboard, we're all ready to set sail with the tide!");
//stage++;
break;
case 1:
player("Let's go!");
@@ -59,7 +63,7 @@ public final class SailorDialogue extends DialoguePlugin {
end();
player.lock();
player.sendMessage("You board the longship...");
RellekkaZone.sail(player, rellekaNpc ? "Miscellania" : "Rellekka", rellekaNpc ? Location.create(2581, 3845, 0) : Location.create(2629, 3693, 0));
//RellekkaZone.sail(player, rellekaNpc ? "Miscellania" : "Rellekka", rellekaNpc ? Location.create(2581, 3845, 0) : Location.create(2629, 3693, 0));
break;
}
return true;
+31
View File
@@ -435,6 +435,25 @@ object ContentAPI {
player.interfaceManager.open(Component(id))
}
/**
* Opens the given interface as an overlay for the given player
* @param player the player to open the interface for
* @param id the ID of the interface to open
*/
@JvmStatic
fun openOverlay(player: Player, id: Int){
player.interfaceManager.openOverlay(Component(id))
}
/**
* Closes any open overlays for the given player
* @param player the player to close for
*/
@JvmStatic
fun closeOverlay(player: Player){
player.interfaceManager.closeOverlay()
}
/**
* Runs the given Emote for the given Entity
* @param entity the entity to run the emote on
@@ -1094,4 +1113,16 @@ object ContentAPI {
ZoneBuilder.configure(zone)
zone.register(borders)
}
/**
* Animates a component of an interface.
* @param player the player to animate the interface for.
* @param iface the ID of the interface to animate.
* @param child the child on the interface to animate.
* @param anim the ID of the animation to use.
*/
@JvmStatic
fun animateInterface(player: Player, iface: Int, child: Int, anim: Int){
player.packetDispatch.sendAnimationInterface(anim,iface,child)
}
}
@@ -1,5 +1,6 @@
package rs09.game.content.dialogue
import api.DialUtils.splitLines
import core.game.component.Component
import core.game.content.dialogue.DialogueInterpreter
import core.game.content.dialogue.DialoguePlugin
@@ -56,6 +57,24 @@ abstract class DialogueFile {
return interpreter!!.sendDialogues(player, expression, *messages)
}
/**
* Use the automatic linesplitting feature in DialUtils to produce npc dialogues
* @param expr the FacialExpression to use, located in the FacialExpression enum.
* @param msg the message for the NPC to say
*/
open fun npcl(expr: FacialExpression?, msg: String?): Component? {
return npc(expr, *splitLines(msg!!))
}
/**
* Use the automatic linesplitting feature in DialUtils to produce player dialogues
* @param expr the FacialExpression to use, located in the FacialExpression enum.
* @param msg the message for the player to say
*/
open fun playerl(expr: FacialExpression?, msg: String?): Component? {
return player(expr, *splitLines(msg!!))
}
fun end(){
if(interpreter != null) interpreter!!.close()
}
@@ -1,41 +0,0 @@
package rs09.game.content.dialogue
import core.game.content.dialogue.DialoguePlugin
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.plugin.Initializable
/**
* Dialogue for Lensa on Jaitizso
* @author qmqz
*/
@Initializable
class LensaDialogue(player: Player? = null) : DialoguePlugin(player){
fun gender (male : String = "brother", female : String = "sister") = if (player.isMale) male else female
override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC
player(FacialExpression.FRIENDLY,"Hello.")
stage = 0
return true
}
//should say [Fremennik name] after gender, but this is not yet implemented
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
0 -> npc(FacialExpression.FURIOUS,"My apologies " + gender() + "!", "I have not time to tarry here with you!").also { stage++ }
1 -> player(FacialExpression.AFRAID,"That's okay, I didn't really want anything.").also { stage = 99 }
99 -> end()
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return LensaDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(5494)
}
}
@@ -0,0 +1,58 @@
package rs09.game.content.dialogue.area.jatizso
import core.game.content.dialogue.DialoguePlugin
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.NPCs
import rs09.tools.END_DIALOGUE
@Initializable
class CitizenDialogue(player: Player? = null) : DialoguePlugin(player) {
val stages = intArrayOf(0, 100, 200, 300)
override fun newInstance(player: Player?): DialoguePlugin {
return CitizenDialogue(player)
}
override fun open(vararg args: Any?): Boolean {
stage = stages.random()
handle(0,0)
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
0 -> playerl(FacialExpression.NEUTRAL, "It's a bit grey round here, isn't it?").also { stage++ }
1 -> npcl(FacialExpression.NEUTRAL, "It gets you down after a while, you know. There are 273 shades of grey, you know, and we have them all.").also { stage++ }
2 -> playerl(FacialExpression.NEUTRAL, "That's grey-t.").also { stage++ }
3 -> npcl(FacialExpression.SAD, "That attempt at humour merely made me more depressed. Leave me alone.").also { stage = END_DIALOGUE }
100 -> playerl(FacialExpression.NEUTRAL, "Cheer up! It's not the end of the world.").also { stage++ }
101 -> npcl(FacialExpression.SAD, "I'd prefer that, if it meant I didn't have to talk to people as inanely happy as you.").also { stage++ }
102 -> playerl(FacialExpression.AMAZED, "Whoa! I think you need to get out more.").also { stage = END_DIALOGUE }
200 -> playerl(FacialExpression.NEUTRAL, "How's the King treating you then?").also { stage++ }
201 -> npcl(FacialExpression.SAD, "Like serfs.").also { stage++ }
202 -> playerl(FacialExpression.HALF_THINKING, "Serf?").also { stage++ }
203 -> npcl(FacialExpression.SAD, "Yes, you know - peons, plebs, the downtrodden. He treats us like his own personal possessions.").also { stage++ }
204 -> playerl(FacialExpression.NEUTRAL, "You should leave this place.").also { stage++ }
205 -> npcl(FacialExpression.SAD, "I keep trying to save up enough to leave, but the King keeps taxing us! We have no money left." ).also { stage++ }
206 -> playerl(FacialExpression.SAD, "Oh dear." ).also { stage = END_DIALOGUE }
300 -> playerl(FacialExpression.HALF_THINKING, "How are you today?").also { stage++ }
301 -> npcl(FacialExpression.SAD, "**sigh**").also { stage++ }
302 -> playerl(FacialExpression.ASKING, "That good? Everyone around here seems a little depressed. ").also { stage++ }
303 -> npcl(FacialExpression.SAD, "**sigh**").also { stage++ }
304 -> playerl(FacialExpression.HALF_THINKING, "And not particularly talkative.").also { stage++ }
305 -> npcl(FacialExpression.SAD, "**sigh**").also { stage++ }
306 -> playerl(FacialExpression.HALF_THINKING,"I'll leave you to your sighing. It looks like you have plenty to do." ).also { stage = END_DIALOGUE }
}
return true
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.LENSA_5494, NPCs.SASSILIK_5496, NPCs.FREYGERD_5493)
}
}
@@ -0,0 +1,31 @@
package rs09.game.content.dialogue.area.jatizso
import core.game.content.dialogue.DialoguePlugin
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.NPCs
import rs09.tools.END_DIALOGUE
@Initializable
class EricDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun newInstance(player: Player?): DialoguePlugin {
return EricDialogue(player)
}
override fun open(vararg args: Any?): Boolean {
npcl(FacialExpression.HALF_GUILTY, "Spare us a few coppers mister")
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
playerl(FacialExpression.ANGRY, "NO!")
stage = END_DIALOGUE
return true
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.ERIC_5499)
}
}
@@ -0,0 +1,34 @@
package rs09.game.content.dialogue.area.jatizso
import core.game.content.dialogue.DialoguePlugin
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.NPCs
import rs09.tools.END_DIALOGUE
@Initializable
class GruvaPatrullDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun newInstance(player: Player?): DialoguePlugin {
return GruvaPatrullDialogue(player)
}
override fun open(vararg args: Any?): Boolean {
npcl(FacialExpression.FRIENDLY,"Ho! Outerlander.")
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
0 -> playerl(FacialExpression.HALF_ASKING, "What's down the scary-looking staircase?").also { stage++ }
1 -> npcl(FacialExpression.NEUTRAL, "These are the stairs down to the mining caves. There are rich veins of many types down there, and miners too. Though be careful; some of the trolls occasionally sneak into the far end of the cave.").also { stage++ }
2 -> playerl(FacialExpression.NEUTRAL, "Thanks. I'll look out for them.").also { stage = END_DIALOGUE }
}
return true
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.GRUVA_PATRULL_5500)
}
}
@@ -0,0 +1,32 @@
package rs09.game.content.dialogue.area.jatizso
import api.DialUtils
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import org.rs09.consts.NPCs
import rs09.game.content.dialogue.DialogueFile
import rs09.tools.END_DIALOGUE
class LeftieRightieDialogue() : DialogueFile() {
val rightie = NPCs.GUARD_5491
val leftie = NPC(NPCs.GUARD_5492)
override fun handle(componentID: Int, buttonID: Int) {
when(stage){
0 -> npcl(FacialExpression.NEUTRAL, "Are you all right? Leftie?").also { stage++ }
1 -> npc2("No, I'm on the left.").also { stage++ }
2 -> npcl(FacialExpression.NEUTRAL, "Only from your perspective. Someone entering the gate should call you Rightie, right Leftie?").also { stage++ }
3 -> npc2("Right, Rightie. So you'd be Leftie not Rightie, right?").also { stage++ }
4 -> npcl(FacialExpression.NEUTRAL, "That's right Leftie, that's right.").also { stage++ }
5 -> npc2("Rightie-oh Rightie, or should I call you Leftie?").also { stage++ }
6 -> npcl(FacialExpression.NEUTRAL, "No, Rightie's fine Leftie.").also { stage++ }
7 -> playerl(FacialExpression.ANGRY, "Aaagh! Enough! If either of you mention left or right in my presence I'll have to scream! Can I come through the gate?" ).also { stage++ }
8 -> npc2("Don't let us stop you.").also { stage++ }
9 -> npcl(FacialExpression.NEUTRAL, "Yes, head right on in, sir.").also { stage++ }
10 -> playerl(FacialExpression.ANGRY, "You said it! You said it! ARRRRRRRRGH!").also { stage = END_DIALOGUE }
}
}
fun npc2(messages: String){
sendNormalDialogue(leftie, FacialExpression.NEUTRAL, *DialUtils.splitLines(messages))
}
}
@@ -0,0 +1,62 @@
package rs09.game.content.dialogue.area.jatizso
import core.game.content.dialogue.DialoguePlugin
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.NPCs
import rs09.game.content.dialogue.DialogueFile
import rs09.tools.END_DIALOGUE
@Initializable
class MinerDialogue(player: Player? = null) : DialoguePlugin(player) {
val stages = intArrayOf(0, 100, 200, 300, 400, 500)
override fun newInstance(player: Player?): DialoguePlugin {
return MinerDialogue(player)
}
override fun open(vararg args: Any?): Boolean {
stage = stages.random()
handle(0,0)
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
0 -> npcl(FacialExpression.SAD, "I've been here for two days straight. When I close my eyes, I see rocks.").also { stage++ }
1 -> playerl(FacialExpression.HALF_ASKING, "Why would anyone stay here for so long?").also { stage++ }
2 -> npcl(FacialExpression.NEUTRAL, "I fear the outside. I fear the big light.").also { stage++ }
3 -> playerl(FacialExpression.HALF_GUILTY, "Oh dear. Being underground for so long may have driven you mad.").also { stage = END_DIALOGUE }
100 -> npcl(FacialExpression.NEUTRAL, "My back is killing me!").also { stage++ }
101 -> playerl(FacialExpression.HALF_GUILTY, "Could be worse, it could be the trolls killing you." ).also { stage++ }
102 -> npcl(FacialExpression.NEUTRAL, "How very droll.").also { stage++ }
103 -> playerl(FacialExpression.NEUTRAL, "No, troll.").also { stage++ }
104 -> npcl(FacialExpression.SAD, "Bah! I resist your attempts at jollity.").also { stage = END_DIALOGUE }
200 -> npcl(FacialExpression.SCARED, "Gah! Trolls everywhere. There's no escape!").also { stage++ }
201 -> playerl(FacialExpression.HALF_THINKING, "You could just leave the mine.").also { stage++ }
202 -> npcl(FacialExpression.NEUTRAL, "Oh, I'd never thought of that.").also { stage = END_DIALOGUE }
300 -> playerl(FacialExpression.HALF_ASKING, "How's your prospecting going?").also { stage++ }
301 -> npcl(FacialExpression.LAUGH, "Mine's been going pretty well.").also { stage++ }
302 -> playerl(FacialExpression.HALF_THINKING, "...").also { stage++ }
303 -> npcl(FacialExpression.LAUGH, "Mine? Mine...you get it?").also { stage++ }
304 -> playerl(FacialExpression.HALF_THINKING, "Oh, I got it. That doesn't make it funny though.").also { stage++ }
305 -> npcl(FacialExpression.NEUTRAL, "Suit yourself.").also { stage = END_DIALOGUE }
400 -> npcl(FacialExpression.NEUTRAL, "High hoe, High hoe!").also { stage++ }
401 -> playerl(FacialExpression.ASKING, "Why are you singing about farming implements at altitude?").also { stage++ }
402 -> npcl(FacialExpression.NEUTRAL, "I don't know, I've never thought about it. Ask my Dad, he taught me the song.").also { stage = END_DIALOGUE }
500 -> npcl(FacialExpression.NEUTRAL, "This place rocks!").also { stage++ }
501 -> playerl(FacialExpression.HALF_THINKING, "No it doesn't, it stays perfectly still.").also { stage++ }
502 -> npcl(FacialExpression.HALF_THINKING, "Bah! Be quiet, pedant." ).also { stage = END_DIALOGUE }
}
return true
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.MINER_5497, NPCs.MINER_5498)
}
}
@@ -0,0 +1,49 @@
package rs09.game.content.dialogue.area.jatizso
import core.game.content.dialogue.DialoguePlugin
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.NPCs
import rs09.game.util.region.rellekka.RellekkaDestination
import rs09.game.util.region.rellekka.RellekkaUtils
import rs09.tools.END_DIALOGUE
@Initializable
class MordGunnarsDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun newInstance(player: Player?): DialoguePlugin {
return MordGunnarsDialogue(player)
}
override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC
if(npc.id == NPCs.MORD_GUNNARS_5481){
npcl(FacialExpression.FRIENDLY, "Would you like to sail to Jatizso?")
} else {
npcl(FacialExpression.FRIENDLY, "Would you like to sail back to Rellekka?")
}
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
0 -> options("Yes, please.", "No, thanks.").also { stage++ }
1 -> when(buttonId){
1 -> playerl(FacialExpression.FRIENDLY, "Yes, please!").also { stage++ }
2 -> playerl(FacialExpression.FRIENDLY, "No, thank you.").also { stage = END_DIALOGUE }
}
2 -> {
end()
RellekkaUtils.sail(player, if(npc.id == NPCs.MORD_GUNNARS_5481) RellekkaDestination.RELLEKKA_TO_JATIZSO else RellekkaDestination.JATIZSO_TO_RELLEKKA)
}
}
return true
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.MORD_GUNNARS_5482, NPCs.MORD_GUNNARS_5481)
}
}
@@ -0,0 +1,52 @@
package rs09.game.content.dialogue.area.jatizso
import core.game.content.dialogue.DialoguePlugin
import core.game.content.dialogue.FacialExpression
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.Player
import core.plugin.Initializable
import org.rs09.consts.NPCs
import rs09.game.interaction.InteractionListener
import rs09.game.interaction.InteractionListeners
import rs09.tools.END_DIALOGUE
@Initializable
class TowerGuardDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun newInstance(player: Player?): DialoguePlugin {
return TowerGuardDialogue(player)
}
override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC
playerl(FacialExpression.HALF_ASKING, "What are you doing here?")
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
0 -> npc(FacialExpression.NEUTRAL, "I'M ON SHOUTING DUTY!").also { stage++ }
1 -> playerl(FacialExpression.HALF_THINKING, "No need to shout.").also { stage++ }
2 -> npc(FacialExpression.NEUTRAL, "I'M SORRY I'VE BEEN SHOUTING","INSULTS SO LONG I CAN'T HELP IT!").also { stage++ }
3 -> playerl(FacialExpression.HALF_THINKING, "Who are you insulting?").also { stage++ }
4 -> npc(FacialExpression.NEUTRAL, "THE TOWER IN NEITIZNOT.","THEY SHOUT INSULTS BACK.").also { stage++ }
5 -> playerl(FacialExpression.ASKING, "Err, why?" ).also { stage++ }
6 -> npc(FacialExpression.NEUTRAL, "THE KING TELLS US TO.").also { stage++ }
7 -> playerl(FacialExpression.HALF_THINKING, "Your King is a strange person.").also { stage++ }
8 -> options("Can I watch? I'm curious.", "Oh well, I'd better get going.").also { stage++ }
9 -> when(buttonId){
1 -> playerl(FacialExpression.ASKING, "Can I watch? I'm curious.").also { stage++ }
2 -> npcl(FacialExpression.HALF_THINKING, "Oh well, I'd better get going.").also { stage = END_DIALOGUE }
}
10 -> npcl(FacialExpression.NEUTRAL, "IF YOU LIKE!").also {
stage = END_DIALOGUE
InteractionListeners.run(NPCs.GUARD_5489, InteractionListener.NPC, "watch-shouting", player, npc)
}
}
return true
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.GUARD_5489)
}
}
@@ -172,8 +172,6 @@ object InteractionListeners {
else -> DestinationFlag.OBJECT
}
if(player.zoneMonitor.interact(node, Option(option, 0))) return true
if(player.locks.isInteractionLocked) return false
val method = get(id,type,option) ?: get(option,type) ?: return false
@@ -185,6 +183,7 @@ object InteractionListeners {
if(player.locks.isMovementLocked) return false
player.pulseManager.run(object : MovementPulse(player, node, flag, destOverride) {
override fun pulse(): Boolean {
if(player.zoneMonitor.interact(node, Option(option, 0))) return true
player.faceLocation(node.location)
method.invoke(player,node)
return true
@@ -1,13 +1,14 @@
package rs09.game.interaction.region
package rs09.game.interaction.region.rellekka
import api.ContentAPI
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.link.audio.Audio
import core.game.system.task.Pulse
import core.game.world.map.Direction
import core.game.world.map.Location
import core.game.world.map.zone.ZoneBorders
import org.rs09.consts.NPCs
import rs09.game.camerautils.PlayerCamera
import rs09.game.content.dialogue.area.jatizso.LeftieRightieDialogue
import rs09.game.interaction.InteractionListener
class JatizsoListeners : InteractionListener() {
@@ -16,6 +17,7 @@ class JatizsoListeners : InteractionListener() {
val WEST_GATE_ZONE = ZoneBorders(2386,3797,2390,3801)
val SOUTH_GAE_ZONE = ZoneBorders(2411,3795,2414,3799)
val BELL = 21394
val GUARDS = intArrayOf(NPCs.GUARD_5491, NPCs.GUARD_5492)
val LINES = arrayOf(
arrayOf(
"YOU WOULDN'T KNOW HOW TO FIGHT A TROLL IF IT CAME UP AND BIT YER ARM OFF",
@@ -38,34 +40,32 @@ class JatizsoListeners : InteractionListener() {
if(NORTH_GATE_ZONE.insideBorder(player)){
if(node.id == GATES_CLOSED.first()){
val other = ContentAPI.getScenery(node.location.transform(1, 0, 0)) ?: return@on true
ContentAPI.replaceScenery(node.asScenery(), node.id + 1, -1, Direction.EAST)
ContentAPI.replaceScenery(other.asScenery(), other.id - 1, -1, Direction.SOUTH)
ContentAPI.replaceScenery(node.asScenery(), node.id + 1, 10, Direction.EAST)
ContentAPI.replaceScenery(other.asScenery(), other.id - 1, 10, Direction.NORTH_EAST)
} else {
val other = ContentAPI.getScenery(node.location.transform(-1, 0, 0)) ?: return@on true
ContentAPI.replaceScenery(node.asScenery(), node.id + 1, -1, Direction.SOUTH)
ContentAPI.replaceScenery(other.asScenery(), other.id, -1, Direction.EAST)
ContentAPI.replaceScenery(node.asScenery(), node.id + 1, 10, Direction.NORTH_EAST)
ContentAPI.replaceScenery(other.asScenery(), other.id, 10, Direction.EAST)
}
ContentAPI.playAudio(player, ContentAPI.getAudio(81))
} else if(WEST_GATE_ZONE.insideBorder(player)){
if(node.id == GATES_CLOSED.first()){
val other = ContentAPI.getScenery(node.location.transform(0, 1, 0)) ?: return@on true
ContentAPI.replaceScenery(node.asScenery(), node.id + 1, -1, Direction.WEST)
ContentAPI.replaceScenery(other.asScenery(), other.id + 1, -1, Direction.NORTH)
ContentAPI.replaceScenery(node.asScenery(), node.id + 1, 10, Direction.WEST)
ContentAPI.replaceScenery(other.asScenery(), other.id + 1, 10, Direction.NORTH)
} else {
val other = ContentAPI.getScenery(node.location.transform(0, -1, 0)) ?: return@on true
ContentAPI.replaceScenery(node.asScenery(), node.id + 1, -1, Direction.NORTH)
ContentAPI.replaceScenery(other.asScenery(), other.id + 1, -1, Direction.WEST)
ContentAPI.replaceScenery(node.asScenery(), node.id + 1, 10, Direction.NORTH)
ContentAPI.replaceScenery(other.asScenery(), other.id + 1, 10, Direction.WEST)
}
} else if(SOUTH_GAE_ZONE.insideBorder(player)){
if(node.id == GATES_CLOSED.first()){
val other = ContentAPI.getScenery(node.location.transform(-1, 0, 0)) ?: return@on true
ContentAPI.replaceScenery(node.asScenery(), node.id + 1, -1, Direction.SOUTH)
ContentAPI.replaceScenery(other.asScenery(), other.id - 1, -1, Direction.EAST)
ContentAPI.replaceScenery(node.asScenery(), node.id + 1, 10, Direction.SOUTH)
ContentAPI.replaceScenery(other.asScenery(), other.id - 1, 10, Direction.EAST)
} else {
val other = ContentAPI.getScenery(node.location.transform(1, 0, 0)) ?: return@on true
ContentAPI.replaceScenery(node.asScenery(), node.id + 1, -1, Direction.EAST)
ContentAPI.replaceScenery(other.asScenery(), other.id, -1, Direction.SOUTH)
ContentAPI.replaceScenery(node.asScenery(), node.id + 1, 10, Direction.EAST)
ContentAPI.replaceScenery(other.asScenery(), other.id, 10, Direction.SOUTH)
}
}
ContentAPI.playAudio(player, ContentAPI.getAudio(81))
@@ -73,9 +73,10 @@ class JatizsoListeners : InteractionListener() {
}
on(NPCs.GUARD_5489, NPC, "watch-shouting"){player, node ->
val local = ContentAPI.findLocalNPC(player, node.id)
ContentAPI.lock(player, 200)
ContentAPI.face(node.asNpc(), Location.create(2371, 3801, 2))
node.asNpc().isRespawn = false
ContentAPI.face(local!!, Location.create(2371, 3801, 2))
local.asNpc().isRespawn = false
ContentAPI.submitIndividualPulse(player, object : Pulse(4){
var id = node.id
var counter = 0
@@ -101,7 +102,7 @@ class JatizsoListeners : InteractionListener() {
override fun stop() {
ContentAPI.unlock(player)
other?.isRespawn = true
node.asNpc().isRespawn = true
local.asNpc().isRespawn = true
super.stop()
}
@@ -122,6 +123,11 @@ class JatizsoListeners : InteractionListener() {
return@on true
}
on(GUARDS, NPC, "talk-to"){player, node ->
player.dialogueInterpreter.open(LeftieRightieDialogue(), NPC(NPCs.GUARD_5491))
return@on true
}
setDest(NPC, NPCs.MAGNUS_GRAM_5488){_ ->
return@setDest Location.create(2416, 3801, 0)
}
@@ -1,7 +1,10 @@
package rs09.game.interaction.region
package rs09.game.interaction.region.rellekka
import core.game.world.map.Location
import org.rs09.consts.NPCs
import rs09.game.interaction.InteractionListener
import rs09.game.util.region.rellekka.RellekkaDestination
import rs09.game.util.region.rellekka.RellekkaUtils
/**
* File to be used for anything Rellekka related.
@@ -43,5 +46,25 @@ class RellekkaListeners : InteractionListener() {
}
return@on true
}
on(NPCs.MARIA_GUNNARS_5508, NPC, "ferry-neitiznot"){player, _ ->
RellekkaUtils.sail(player, RellekkaDestination.RELLEKKA_TO_NEITIZNOT)
return@on true
}
on(NPCs.MARIA_GUNNARS_5507, NPC, "ferry-rellekka"){player, node ->
RellekkaUtils.sail(player, RellekkaDestination.NEITIZNOT_TO_RELLEKKA)
return@on true
}
on(NPCs.MORD_GUNNARS_5481, NPC, "ferry-jatizso"){player, node ->
RellekkaUtils.sail(player, RellekkaDestination.RELLEKKA_TO_JATIZSO)
return@on true
}
on(NPCs.MORD_GUNNARS_5482, NPC, "ferry-rellekka"){player, node ->
RellekkaUtils.sail(player, RellekkaDestination.JATIZSO_TO_RELLEKKA)
return@on true
}
}
}
@@ -1,5 +1,6 @@
package rs09.game.system.command.oldsys
import api.ContentAPI
import core.cache.Cache
import core.game.container.access.InterfaceContainer
import core.game.content.quest.tutorials.tutorialisland.CharacterDesign
@@ -187,6 +188,8 @@ class VisualCommand : CommandPlugin() {
return true
}
player!!.packetDispatch.sendSceneryAnimation(`object`, Animation(toInteger(args[args.size - 1]!!)))
//ContentAPI.sendMessage(player, `object`.definition.modelIds.map { it.toString() }.toString())
ContentAPI.sendMessage(player, `object`.definition.animationId.toString())
return true
}
"inter", "component", "interface" -> {
@@ -215,16 +218,50 @@ class VisualCommand : CommandPlugin() {
}
"loop_varposition" -> {
val value = (args!![1]!!.toString().toInt()) ?: 0
val config_index = (args!![2]!!.toString().toInt())
GameWorld.Pulser.submit(object : Pulse(3, player) {
val cfg_index = (args.getOrNull(2)?.toString()?.toInt() ?: -1)
if(cfg_index == -1){
ContentAPI.submitWorldPulse(object : Pulse(3, player){
var pos = 0
var shift = 0
override fun pulse(): Boolean {
for(i in 0..1999){
player?.configManager?.forceSet(i, pos shl shift, false)
}
player?.sendMessage("$pos << $shift")
if(pos++ >= 32){
shift += 4
pos = 0
}
return shift >= 32
}
})
} else {
ContentAPI.submitWorldPulse(object : Pulse(3, player) {
var pos = 0
override fun pulse(): Boolean {
player?.configManager?.forceSet(config_index, value shl pos,false)
player?.configManager?.forceSet(cfg_index, value shl pos, false)
player?.sendMessage("$pos")
return pos++ >= 32
}
})
}
}
"loop_anim_on_i" -> {
var anim = toInteger(args!![1]!!)
ContentAPI.submitWorldPulse(object : Pulse(3){
override fun pulse(): Boolean {
player!!.packetDispatch.sendAnimationInterface(anim++, 224, 7)
ContentAPI.sendMessage(player, "${anim - 1}")
return false
}
})
}
"send_i_anim" -> {
val iface = args?.getOrNull(0) ?: return true
val anim = args.getOrNull(1) ?: return true
player?.packetDispatch?.sendAnimationInterface(toInteger(anim), toInteger(iface),7)
}
"loop_inter" -> {
val st = toInteger(args!![1]!!)
val en = if (args.size > 2) toInteger(args[2]!!) else 740
@@ -58,6 +58,12 @@ class ModerationCommandSet : CommandSet(Command.Privilege.MODERATOR){
if(otherPlayer == null){
reject(player, "Can not find $name in the player list!")
}
val NameCheck = name.toLowerCase()
if (NameCheck == "kermit" || NameCheck == "ceikry"){
reject(player, "You cannot jail $name, they are a god. Nice try though ${player.username}!")
}
notify(player, "Jailing ${otherPlayer!!.username} for $timeSeconds seconds.")
notify(otherPlayer, "${player.username} has jailed you for $timeSeconds seconds.")
GameWorld.Pulser.submit(object : Pulse(3){
@@ -0,0 +1,35 @@
package rs09.game.util.region.rellekka
import api.ContentAPI
import core.game.node.entity.player.Player
import core.game.system.task.Pulse
import core.game.world.map.Location
import org.rs09.consts.Components
object RellekkaUtils {
@JvmStatic
fun sail(player: Player, destination: RellekkaDestination){
ContentAPI.lock(player, 100)
ContentAPI.openOverlay(player, 115)
ContentAPI.openInterface(player, Components.MISC_SHIPJOURNEY_224)
ContentAPI.animateInterface(player, Components.MISC_SHIPJOURNEY_224, 7, destination.shipAnim)
val animDuration = ContentAPI.animationDuration(ContentAPI.getAnimation(destination.shipAnim))
ContentAPI.submitWorldPulse(object : Pulse(animDuration){
override fun pulse(): Boolean {
ContentAPI.teleport(player, destination.destLoc)
ContentAPI.closeInterface(player)
ContentAPI.closeOverlay(player)
ContentAPI.unlock(player)
return true
}
})
}
}
enum class RellekkaDestination(val destName: String, val destLoc: Location, val shipAnim: Int){
RELLEKKA_TO_JATIZSO("Jatizso", Location.create(2421, 3781, 0), 5766),
JATIZSO_TO_RELLEKKA("Rellekka", Location.create(2644, 3710, 0), 5767),
RELLEKKA_TO_NEITIZNOT("Neitiznot",Location(2310, 3782, 0), 5764),
NEITIZNOT_TO_RELLEKKA("Rellekka", Location(2644, 3710, 0), 5765)
}