mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-20 13:30:27 -07:00
Redwings Drop III.5: Tutorial Island, Tribal Totem
This commit is contained in:
parent
0b9d540d45
commit
a4ca46d262
127 changed files with 4044 additions and 4167 deletions
|
|
@ -32,7 +32,8 @@ dependencies {
|
||||||
"libs/classgraph-4.8.98.jar",
|
"libs/classgraph-4.8.98.jar",
|
||||||
"libs/mysql-connector-java-8.0.21.jar",
|
"libs/mysql-connector-java-8.0.21.jar",
|
||||||
"libs/mordant-jvm-2.0.0-alpha2.jar",
|
"libs/mordant-jvm-2.0.0-alpha2.jar",
|
||||||
"libs/colormath-jvm-2.0.0.jar"
|
"libs/colormath-jvm-2.0.0.jar",
|
||||||
|
"libs/sqlite-jdbc.jar"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -689,12 +689,6 @@
|
||||||
"fence": "false",
|
"fence": "false",
|
||||||
"metal": "false"
|
"metal": "false"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": "2706",
|
|
||||||
"replaceId": "25719",
|
|
||||||
"fence": "false",
|
|
||||||
"metal": "false"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "2712",
|
"id": "2712",
|
||||||
"replaceId": "36865",
|
"replaceId": "36865",
|
||||||
|
|
|
||||||
|
|
@ -325,7 +325,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"item_id": "1607",
|
"item_id": "1607",
|
||||||
"loc_data": "{1,3169,3887,0,32768400}-{1,3169,3887,0,32768400}"
|
"loc_data": "{1,3169,3887,0,32768400}-{1,3169,3887,0,32768400}-{1,2679,3740,0,32768400}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"item_id": "1641",
|
"item_id": "1641",
|
||||||
|
|
@ -351,6 +351,10 @@
|
||||||
"item_id": "1785",
|
"item_id": "1785",
|
||||||
"loc_data": "{1,2822,3355,0,11141270}"
|
"loc_data": "{1,2822,3355,0,11141270}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"item_id": "1856",
|
||||||
|
"loc_data": "{1,2638,3292,0,11141270}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"item_id": "1887",
|
"item_id": "1887",
|
||||||
"loc_data": "{1,3141,3452,1,7209050}"
|
"loc_data": "{1,3141,3452,1,7209050}"
|
||||||
|
|
@ -570,5 +574,25 @@
|
||||||
{
|
{
|
||||||
"item_id": "2957",
|
"item_id": "2957",
|
||||||
"loc_data": "{1,3443,9742,0,100}-{1,3443,9742,1,100}"
|
"loc_data": "{1,3443,9742,0,100}-{1,3443,9742,1,100}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": "21",
|
||||||
|
"loc_data": "{1,2613,9639,0,100}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": "23",
|
||||||
|
"loc_data": "{1,2583,9613,0,100}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": "24",
|
||||||
|
"loc_data": "{1,2564,9662,0,100}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": "20",
|
||||||
|
"loc_data": "{1,2577,9655,0,100}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item_id": "22",
|
||||||
|
"loc_data": "{1,2574,9633,0,100}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -1949,6 +1949,12 @@
|
||||||
"indexId": "329",
|
"indexId": "329",
|
||||||
"borders": "{2432,10112,2495,10175}"
|
"borders": "{2432,10112,2495,10175}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "454",
|
||||||
|
"name": "Home Sweet Home",
|
||||||
|
"indexId": "385",
|
||||||
|
"borders": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "456",
|
"id": "456",
|
||||||
"name": "Animal Apogee",
|
"name": "Animal Apogee",
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "27",
|
"npc_id": "27",
|
||||||
"loc_data": "{2574,3285,2,0,0}-{2574,3308,2,0,0}-{2582,3284,2,0,0}-{2582,3309,2,0,0}-{2588,3290,2,0,0}-{2588,3303,2,0,0}"
|
"loc_data": "{2574,3285,2,0,0}-{2574,3308,2,0,0}-{2582,3284,2,0,0}-{2582,3309,2,0,0}-{2588,3290,2,0,0}-{2588,3303,2,0,0}-{2902,3568,1,1,3}-{2903,3569,1,1,3}-{2903,3567,1,0,3}-{2904,3566,1,0,3}-{2894,3559,1,0,3}-{2892,3557,1,0,3}-{2893,3569,1,0,3}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "28",
|
"npc_id": "28",
|
||||||
|
|
@ -745,7 +745,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "279",
|
"npc_id": "279",
|
||||||
"loc_data": "{2604,3209,0,1,6}"
|
"loc_data": "{2604,3209,0,0,0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "280",
|
"npc_id": "280",
|
||||||
|
|
@ -5101,7 +5101,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "2796",
|
"npc_id": "2796",
|
||||||
"loc_data": "{3089,3124,0,0,3}-{3096,3108,0,0,6}-{3075,3091,0,0,6}-{3121,3103,0,0,1}-{3105,3095,0,0,3}"
|
"loc_data": "{3096,3108,0,0,6}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "2800",
|
"npc_id": "2800",
|
||||||
|
|
@ -5833,15 +5833,15 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "3341",
|
"npc_id": "3341",
|
||||||
"loc_data": "{1759,5191,0,0,0}-{1754,5200,0,0,0}-{1748,5223,0,0,0}-{1784,5199,0,0,0}-{1739,5154,0,0,0}"
|
"loc_data": "{1759,5191,0,1,0}-{1754,5200,0,1,0}-{1748,5223,0,1,0}-{1784,5199,0,1,0}-{1739,5154,0,1,0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "3342",
|
"npc_id": "3342",
|
||||||
"loc_data": "{1745,5208,0,0,0}-{1737,5215,0,0,0}-{1758,5210,0,0,0}-{1768,5175,0,0,0}-{1760,5152,0,0,0}-{1745,5169,0,0,0}"
|
"loc_data": "{1745,5208,0,1,0}-{1737,5215,0,1,0}-{1758,5210,0,1,0}-{1768,5175,0,1,0}-{1760,5152,0,1,0}-{1745,5169,0,1,0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "3343",
|
"npc_id": "3343",
|
||||||
"loc_data": "{1764,5198,0,0,0}-{1774,5195,0,0,0}-{1773,5149,0,0,0}-{1742,5292,0,0,0}"
|
"loc_data": "{1764,5198,0,1,0}-{1774,5195,0,1,0}-{1773,5149,0,1,0}-{1742,5292,0,1,0}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"npc_id": "3344",
|
"npc_id": "3344",
|
||||||
|
|
@ -10970,5 +10970,21 @@
|
||||||
{
|
{
|
||||||
"npc_id": "3322",
|
"npc_id": "3322",
|
||||||
"loc_data": "{2384,4439,0,1,0}"
|
"loc_data": "{2384,4439,0,1,0}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"npc_id": "223",
|
||||||
|
"loc_data": "{2569,3250,0,1,0}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"npc_id": "224",
|
||||||
|
"loc_data": "{2582,9656,0,1,0}-{2589,9657,0,1,0}-{2587,9658,0,1,0}-{2584,9657,0,1,0}-{2585,9656,0,1,0}-{2582,9658,0,1,0}-{2585,9653,0,1,0}-{2590,9658,0,1,0}-{2590,9655,0,1,0}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"npc_id": "1080",
|
||||||
|
"loc_data": "{2900,3567,1,1,0}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"npc_id": "1078",
|
||||||
|
"loc_data": "{2905,3540,1,1,0}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
BIN
Server/libs/sqlite-jdbc.jar
Normal file
BIN
Server/libs/sqlite-jdbc.jar
Normal file
Binary file not shown.
|
|
@ -1,6 +1,5 @@
|
||||||
package core.game.container.impl;
|
package core.game.container.impl;
|
||||||
|
|
||||||
import core.game.component.CloseEvent;
|
|
||||||
import core.game.container.access.InterfaceContainer;
|
import core.game.container.access.InterfaceContainer;
|
||||||
import rs09.ServerConstants;
|
import rs09.ServerConstants;
|
||||||
import core.game.component.Component;
|
import core.game.component.Component;
|
||||||
|
|
@ -91,7 +90,7 @@ public final class BankContainer extends Container {
|
||||||
player.getInterfaceManager().openDefaultTabs();
|
player.getInterfaceManager().openDefaultTabs();
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
player.getInterfaceManager().hideTabs(0, 1, 2, 3, 4, 5, 6);
|
player.getInterfaceManager().removeTabs(0, 1, 2, 3, 4, 5, 6);
|
||||||
InterfaceContainer.generateItems(player, player.getInventory().toArray(), new String[]{"Examine", "Deposit-X", "Deposit-All", "Deposit-10", "Deposit-5", "Deposit-1"}, 11, 15, 5, 7);
|
InterfaceContainer.generateItems(player, player.getInventory().toArray(), new String[]{"Examine", "Deposit-X", "Deposit-All", "Deposit-10", "Deposit-5", "Deposit-1"}, 11, 15, 5, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ public abstract class CutscenePlugin extends ActivityPlugin {
|
||||||
GameWorld.getPulser().submit(getStartPulse());
|
GameWorld.getPulser().submit(getStartPulse());
|
||||||
} else {
|
} else {
|
||||||
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, getMapState()));
|
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, getMapState()));
|
||||||
player.getInterfaceManager().hideTabs(getRemovedTabs());
|
player.getInterfaceManager().removeTabs(getRemovedTabs());
|
||||||
player.getProperties().setTeleportLocation(getStartLocation());
|
player.getProperties().setTeleportLocation(getStartLocation());
|
||||||
player.unlock();
|
player.unlock();
|
||||||
player.getWalkingQueue().reset();
|
player.getWalkingQueue().reset();
|
||||||
|
|
@ -174,7 +174,7 @@ public abstract class CutscenePlugin extends ActivityPlugin {
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, getMapState()));
|
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, getMapState()));
|
||||||
player.getInterfaceManager().hideTabs(getRemovedTabs());
|
player.getInterfaceManager().removeTabs(getRemovedTabs());
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
player.getProperties().setTeleportLocation(getStartLocation());
|
player.getProperties().setTeleportLocation(getStartLocation());
|
||||||
|
|
@ -222,7 +222,7 @@ public abstract class CutscenePlugin extends ActivityPlugin {
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, getMapState()));
|
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, getMapState()));
|
||||||
player.getInterfaceManager().hideTabs(getRemovedTabs());
|
player.getInterfaceManager().removeTabs(getRemovedTabs());
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
Location loc = (Location) (player.getAttribute("real-end", player.getAttribute("cutscene:original-loc", player.getLocation())));
|
Location loc = (Location) (player.getAttribute("real-end", player.getAttribute("cutscene:original-loc", player.getLocation())));
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import core.game.container.access.InterfaceContainer;
|
||||||
import core.game.container.impl.EquipmentContainer;
|
import core.game.container.impl.EquipmentContainer;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.player.info.login.PlayerParser;
|
import core.game.node.entity.player.info.login.PlayerParser;
|
||||||
import core.game.node.entity.player.link.RunScript;
|
|
||||||
import core.game.node.entity.state.EntityState;
|
import core.game.node.entity.state.EntityState;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.system.monitor.PlayerMonitor;
|
import core.game.system.monitor.PlayerMonitor;
|
||||||
|
|
@ -363,8 +362,8 @@ public final class DuelSession extends ComponentPlugin {
|
||||||
session.setAcceptState(4);
|
session.setAcceptState(4);
|
||||||
session.player.getInterfaceManager().closeSingleTab();
|
session.player.getInterfaceManager().closeSingleTab();
|
||||||
session.other.getInterfaceManager().closeSingleTab();
|
session.other.getInterfaceManager().closeSingleTab();
|
||||||
session.player.getInterfaceManager().hideTabs(0, 1, 2, 3, 4, 5, 6, 7, 11, 12);
|
session.player.getInterfaceManager().removeTabs(0, 1, 2, 3, 4, 5, 6, 7, 11, 12);
|
||||||
session.other.getInterfaceManager().hideTabs(0, 1, 2, 3, 4, 5, 6, 7, 11, 12);
|
session.other.getInterfaceManager().removeTabs(0, 1, 2, 3, 4, 5, 6, 7, 11, 12);
|
||||||
StringBuilder before = new StringBuilder();
|
StringBuilder before = new StringBuilder();
|
||||||
StringBuilder during = new StringBuilder();
|
StringBuilder during = new StringBuilder();
|
||||||
if (hasEquipmentRules()) {
|
if (hasEquipmentRules()) {
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ public final class GnomeCopterActivity extends ActivityPlugin {
|
||||||
@Override
|
@Override
|
||||||
public boolean pulse() {
|
public boolean pulse() {
|
||||||
if (++stage == 1) {
|
if (++stage == 1) {
|
||||||
player.getInterfaceManager().hideTabs(0, 1, 2, 3, 4, 5, 6, 7, 11);
|
player.getInterfaceManager().removeTabs(0, 1, 2, 3, 4, 5, 6, 7, 11);
|
||||||
ForceMovement.run(player, player.getLocation(), object.getLocation(), ForceMovement.WALK_ANIMATION, new Animation(8955), Direction.NORTH, 8);
|
ForceMovement.run(player, player.getLocation(), object.getLocation(), ForceMovement.WALK_ANIMATION, new Animation(8955), Direction.NORTH, 8);
|
||||||
player.lock();
|
player.lock();
|
||||||
} else if (stage == 3) {
|
} else if (stage == 3) {
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ public final class CatapultRoom extends MapZone implements Plugin<Object> {
|
||||||
}
|
}
|
||||||
ItemDefinition.getOptionHandlers().get("wield").handle(player, node, option);
|
ItemDefinition.getOptionHandlers().get("wield").handle(player, node, option);
|
||||||
if (player.getEquipment().getNew(EquipmentContainer.SLOT_SHIELD).getId() == SHIELD_ID) {
|
if (player.getEquipment().getNew(EquipmentContainer.SLOT_SHIELD).getId() == SHIELD_ID) {
|
||||||
player.getInterfaceManager().hideTabs(2, 3, 5, 6, 7, 11, 12);
|
player.getInterfaceManager().removeTabs(2, 3, 5, 6, 7, 11, 12);
|
||||||
player.getInterfaceManager().openTab(4, new Component(411));
|
player.getInterfaceManager().openTab(4, new Component(411));
|
||||||
player.getInterfaceManager().setViewedTab(4);
|
player.getInterfaceManager().setViewedTab(4);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ package core.game.content.dialogue;
|
||||||
import core.cache.def.impl.ItemDefinition;
|
import core.cache.def.impl.ItemDefinition;
|
||||||
import core.cache.def.impl.NPCDefinition;
|
import core.cache.def.impl.NPCDefinition;
|
||||||
import core.game.component.Component;
|
import core.game.component.Component;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.npc.NPC;
|
import core.game.node.entity.npc.NPC;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
|
@ -191,9 +190,6 @@ public final class DialogueInterpreter {
|
||||||
player.getPacketDispatch().sendString(messages[i], interfaceId, i + 1);
|
player.getPacketDispatch().sendString(messages[i], interfaceId, i + 1);
|
||||||
}
|
}
|
||||||
player.getInterfaceManager().openChatbox(interfaceId);
|
player.getInterfaceManager().openChatbox(interfaceId);
|
||||||
if (player.getAttribute("tut-island", false)) {
|
|
||||||
|
|
||||||
}
|
|
||||||
player.getPacketDispatch().sendInterfaceConfig(player.getInterfaceManager().getChatbox().getId(), 1, false);
|
player.getPacketDispatch().sendInterfaceConfig(player.getInterfaceManager().getChatbox().getId(), 1, false);
|
||||||
return player.getInterfaceManager().getChatbox();
|
return player.getInterfaceManager().getChatbox();
|
||||||
}
|
}
|
||||||
|
|
@ -253,8 +249,6 @@ public final class DialogueInterpreter {
|
||||||
player.getPacketDispatch().sendString(messages[i], 372, i + 1);
|
player.getPacketDispatch().sendString(messages[i], 372, i + 1);
|
||||||
}
|
}
|
||||||
player.getInterfaceManager().openChatbox(372);
|
player.getInterfaceManager().openChatbox(372);
|
||||||
if (player.getAttributes().containsKey("tut-island") || TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE) {
|
|
||||||
}
|
|
||||||
return player.getInterfaceManager().getChatbox();
|
return player.getInterfaceManager().getChatbox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -273,8 +267,6 @@ public final class DialogueInterpreter {
|
||||||
player.getPacketDispatch().sendString(messages[i], 421, i + 2);
|
player.getPacketDispatch().sendString(messages[i], 421, i + 2);
|
||||||
}
|
}
|
||||||
player.getInterfaceManager().openChatbox(421);
|
player.getInterfaceManager().openChatbox(421);
|
||||||
if (player.getAttributes().containsKey("tut-island")) {
|
|
||||||
}
|
|
||||||
return player.getInterfaceManager().getChatbox();
|
return player.getInterfaceManager().getChatbox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -443,8 +435,6 @@ public final class DialogueInterpreter {
|
||||||
player.getPacketDispatch().sendString(messages[i].toString().replace("@name", player.getUsername()), interfaceId, (i + 4));
|
player.getPacketDispatch().sendString(messages[i].toString().replace("@name", player.getUsername()), interfaceId, (i + 4));
|
||||||
}
|
}
|
||||||
player.getInterfaceManager().openChatbox(interfaceId);
|
player.getInterfaceManager().openChatbox(interfaceId);
|
||||||
if (player.getAttributes().containsKey("tut-island") || TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE) {
|
|
||||||
}
|
|
||||||
player.getPacketDispatch().sendInterfaceConfig(player.getInterfaceManager().getChatbox().getId(), 3, false);
|
player.getPacketDispatch().sendInterfaceConfig(player.getInterfaceManager().getChatbox().getId(), 3, false);
|
||||||
return player.getInterfaceManager().getChatbox();
|
return player.getInterfaceManager().getChatbox();
|
||||||
}
|
}
|
||||||
|
|
@ -465,8 +455,6 @@ public final class DialogueInterpreter {
|
||||||
for (int i = 0; i < options.length; i++) {
|
for (int i = 0; i < options.length; i++) {
|
||||||
player.getPacketDispatch().sendString(options[i].toString(), interfaceId, i + 2);
|
player.getPacketDispatch().sendString(options[i].toString(), interfaceId, i + 2);
|
||||||
}
|
}
|
||||||
if (player.getAttributes().containsKey("tut-island")) {
|
|
||||||
}
|
|
||||||
player.getInterfaceManager().openChatbox(interfaceId);
|
player.getInterfaceManager().openChatbox(interfaceId);
|
||||||
return player.getInterfaceManager().getChatbox();
|
return player.getInterfaceManager().getChatbox();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ public final class HansDialoguePlugin extends DialoguePlugin {
|
||||||
|
|
||||||
switch (stage) {
|
switch (stage) {
|
||||||
case 0:
|
case 0:
|
||||||
interpreter.sendOptions("Select an Option", "I'm looking for whoever is in charge of this place.", "I have come to kill everyone in this castle!", "I don't know. I'm lost. Where am I?", "More Options...");
|
interpreter.sendOptions("Select an Option", "I'm looking for whoever is in charge of this place.", "I have come to kill everyone in this castle!", "I don't know. I'm lost. Where am I?", "Have you been here as long as me?");
|
||||||
stage++;
|
stage++;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
|
@ -83,12 +83,8 @@ public final class HansDialoguePlugin extends DialoguePlugin {
|
||||||
stage = 50;
|
stage = 50;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (!inStartDungeon) {
|
interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "I've been patrolling this castle for years!");
|
||||||
interpreter.sendOptions("Select an Option", "Have you been here as long as me?", "About my xp rate...", "About Iron Man mode...","About random events...", "Go Back...");
|
stage = 41;
|
||||||
} else {
|
|
||||||
interpreter.sendOptions("Select an Option", "Have you been here as long as me?", "About my xp rate...", "About Iron Man mode...","About random events...");
|
|
||||||
}
|
|
||||||
stage = 10;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
package core.game.content.dialogue;
|
|
||||||
|
|
||||||
import core.game.node.entity.npc.NPC;
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
import core.game.node.entity.player.Player;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the knagi mau dialogue plugin.
|
|
||||||
* @author 'Vexia
|
|
||||||
* @version 1.0
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public final class KangaiMauDialogue extends DialoguePlugin {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code KangaiMauDialogue} {@code Object}.
|
|
||||||
*/
|
|
||||||
public KangaiMauDialogue() {
|
|
||||||
/**
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code KangaiMauDialogue} {@code Object}.
|
|
||||||
* @param player the player.
|
|
||||||
*/
|
|
||||||
public KangaiMauDialogue(Player player) {
|
|
||||||
super(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DialoguePlugin newInstance(Player player) {
|
|
||||||
return new KangaiMauDialogue(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean open(Object... args) {
|
|
||||||
npc = (NPC) args[0];
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Hello. I Kangai Mau of the Rantuki tribe.");
|
|
||||||
stage = 0;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(int interfaceId, int buttonId) {
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Nice to meet you!");
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
end();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int[] getIds() {
|
|
||||||
return new int[] { 846 };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -284,7 +284,7 @@ public final class RugMerchantDialogue extends DialoguePlugin {
|
||||||
player.lock();
|
player.lock();
|
||||||
player.getConfigManager().set(499, 0);
|
player.getConfigManager().set(499, 0);
|
||||||
player.getImpactHandler().setDisabledTicks(GameWorld.getTicks() + 200);
|
player.getImpactHandler().setDisabledTicks(GameWorld.getTicks() + 200);
|
||||||
player.getInterfaceManager().hideTabs(0,1,2,3,4,5,6,7,8,9,10,11,12,13);
|
player.getInterfaceManager().removeTabs(0,1,2,3,4,5,6,7,8,9,10,11,12,13);
|
||||||
player.getEquipment().replace(new Item(Items.MAGIC_CARPET_5614),EquipmentContainer.SLOT_WEAPON);
|
player.getEquipment().replace(new Item(Items.MAGIC_CARPET_5614),EquipmentContainer.SLOT_WEAPON);
|
||||||
player.getPacketDispatch().sendInterfaceConfig(548,69,true);
|
player.getPacketDispatch().sendInterfaceConfig(548,69,true);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ public final class DragonSlayerCutscene extends CutscenePlugin {
|
||||||
@Override
|
@Override
|
||||||
public Pulse getStartPulse() {
|
public Pulse getStartPulse() {
|
||||||
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, getMapState()));
|
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, getMapState()));
|
||||||
player.getInterfaceManager().hideTabs(getRemovedTabs());
|
player.getInterfaceManager().removeTabs(getRemovedTabs());
|
||||||
return new Pulse(1) {
|
return new Pulse(1) {
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ public class WLBelowCutscene extends CutscenePlugin {
|
||||||
king.lock();
|
king.lock();
|
||||||
king.getProperties().getCombatPulse().stop();
|
king.getProperties().getCombatPulse().stop();
|
||||||
player.getProperties().getCombatPulse().stop();
|
player.getProperties().getCombatPulse().stop();
|
||||||
player.getInterfaceManager().hideTabs(getRemovedTabs());
|
player.getInterfaceManager().removeTabs(getRemovedTabs());
|
||||||
zaff = NPC.create(5836, player.getLocation());
|
zaff = NPC.create(5836, player.getLocation());
|
||||||
Location loc = RegionManager.getSpawnLocation(player, zaff);
|
Location loc = RegionManager.getSpawnLocation(player, zaff);
|
||||||
if (loc != null) {
|
if (loc != null) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ package core.game.content.quest.tutorials.learningtheropes;
|
||||||
|
|
||||||
import core.game.content.activity.ActivityPlugin;
|
import core.game.content.activity.ActivityPlugin;
|
||||||
import core.game.content.activity.CutscenePlugin;
|
import core.game.content.activity.CutscenePlugin;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
import core.game.node.entity.combat.ImpactHandler;
|
import core.game.node.entity.combat.ImpactHandler;
|
||||||
import core.game.node.entity.npc.NPC;
|
import core.game.node.entity.npc.NPC;
|
||||||
|
|
@ -238,7 +237,6 @@ public class LTRDragonFightCutscene extends CutscenePlugin {
|
||||||
case 60:
|
case 60:
|
||||||
System.out.println("Fight end");
|
System.out.println("Fight end");
|
||||||
LTRDragonFightCutscene.this.stop(true);
|
LTRDragonFightCutscene.this.stop(true);
|
||||||
TutorialStage.load(player, 3, false);
|
|
||||||
CellarMapZone.get().create(player);
|
CellarMapZone.get().create(player);
|
||||||
return true;
|
return true;
|
||||||
case 61:
|
case 61:
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@ package core.game.content.quest.tutorials.learningtheropes;
|
||||||
import core.game.container.impl.EquipmentContainer;
|
import core.game.container.impl.EquipmentContainer;
|
||||||
import core.game.content.dialogue.DialoguePlugin;
|
import core.game.content.dialogue.DialoguePlugin;
|
||||||
import core.game.content.dialogue.FacialExpression;
|
import core.game.content.dialogue.FacialExpression;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.plugin.Initializable;
|
import core.plugin.Initializable;
|
||||||
|
|
@ -37,7 +35,7 @@ public class SirVantDialogue extends DialoguePlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean open(Object... args) {
|
public boolean open(Object... args) {
|
||||||
int tut_stage = TutorialSession.getExtension(player).getStage();
|
int tut_stage = 0;//TutorialSession.getExtension(player).getStage();
|
||||||
System.out.println("tut_stage = " + tut_stage);
|
System.out.println("tut_stage = " + tut_stage);
|
||||||
switch (tut_stage) {
|
switch (tut_stage) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
@ -86,7 +84,6 @@ public class SirVantDialogue extends DialoguePlugin {
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
end();
|
end();
|
||||||
TutorialStage.load(player, 2, false);
|
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
npc("I think the value of this property has slumped a little.");
|
npc("I think the value of this property has slumped a little.");
|
||||||
|
|
@ -114,7 +111,6 @@ public class SirVantDialogue extends DialoguePlugin {
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
end();
|
end();
|
||||||
TutorialStage.load(player, 4, false);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -1,136 +0,0 @@
|
||||||
package core.game.content.quest.tutorials.tutorialisland;
|
|
||||||
|
|
||||||
import core.game.content.dialogue.DialoguePlugin;
|
|
||||||
import core.game.node.entity.npc.NPC;
|
|
||||||
import core.game.node.entity.player.Player;
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the dialogue plugin used for the brother brace npc.
|
|
||||||
* @author Vexia
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public final class BrotherBraceDialogue extends DialoguePlugin {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code BrotherBraceDialogue} {@code Object}.
|
|
||||||
*/
|
|
||||||
public BrotherBraceDialogue() {
|
|
||||||
/**
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code BrotherBraceDialogue} {@code Object}.
|
|
||||||
* @param player the player.
|
|
||||||
*/
|
|
||||||
public BrotherBraceDialogue(Player player) {
|
|
||||||
super(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DialoguePlugin newInstance(Player player) {
|
|
||||||
return new BrotherBraceDialogue(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean open(Object... args) {
|
|
||||||
npc = (NPC) args[0];
|
|
||||||
switch (TutorialSession.getExtension(player).getStage()) {
|
|
||||||
case 60:
|
|
||||||
interpreter.sendDialogues(player, null, "Good day, brother my name's " + player.getUsername() + ".");
|
|
||||||
stage = 0;
|
|
||||||
break;
|
|
||||||
case 62:
|
|
||||||
interpreter.sendDialogues(npc, null, "This is your Prayer list. Prayers can help a lot in", "combat. Click on the prayer you wish to use to activate", "it and click it again to deactivate it.");
|
|
||||||
stage = 0;
|
|
||||||
break;
|
|
||||||
case 65:
|
|
||||||
interpreter.sendDialogues(npc, null, "Good. Now you have both menus open, I'll tell you a ", "little about each. You can add people to either list by", "clicking the add button then typing their name into the", "box that appears.");
|
|
||||||
stage = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(int interfaceId, int buttonId) {
|
|
||||||
switch (TutorialSession.getExtension(player).getStage()) {
|
|
||||||
case 60:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
interpreter.sendDialogues(npc, null, "Hello, " + player.getUsername() + ". I'm Brother Brace. I'm here to tell", "you all about Prayer.");
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 61, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 62:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
interpreter.sendDialogues(npc, null, "Active prayers wil drain your Prayer Points which", "you can recharge by finding an altar or other holy spot", "and praying there.");
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
interpreter.sendDialogues(npc, null, "As you noticed, most enemies will drop bones when", "defeated. Burying bones by clicking them in your", "inventory will gain you Prayer experience.");
|
|
||||||
stage = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
interpreter.sendDialogues(npc, null, "I'm also the community officer 'round here, so it's my", "job to tell you about your friends and ignore list.");
|
|
||||||
stage = 3;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 63, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 65:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
interpreter.sendDialogues(npc, null, "You remove people from the lists in the same way. If", "you add someone to your ignore list they will not be", "able to talk to you or send any form of message to", "you.");
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
interpreter.sendDialogues(npc, null, "Your friends list shows the online status of your", "friends. Friends in the red are offline, friends in green", "are online and on the same server and friends in yellow", "are online but on a different server.");
|
|
||||||
stage = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
interpreter.sendDialogues(player, null, "Are there rules on in-game behaviour? ");
|
|
||||||
stage = 3;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
interpreter.sendDialogues(npc, null, "Yes, you should read the rules of conduct on the", "website to make sure you do nothing to get yourself", "banned.");
|
|
||||||
stage = 4;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
interpreter.sendDialogues(npc, null, "But in general, always try to be courteous to other", "players - remember the people in the game are real", "people with real feelings.");
|
|
||||||
stage = 5;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
interpreter.sendDialogues(npc, null, "If you go 'round being abusive or causing trouble your", "character could end up being the one in trouble");
|
|
||||||
stage = 6;
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
interpreter.sendDialogues(player, null, "Okay thanks. I'll bear that in mind.");
|
|
||||||
stage = 7;
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 66, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int[] getIds() {
|
|
||||||
return new int[] { 954 };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -304,43 +304,6 @@ public final class CharacterDesign {
|
||||||
if (close) {
|
if (close) {
|
||||||
player.setAttribute("char-design:accepted", true);
|
player.setAttribute("char-design:accepted", true);
|
||||||
player.getInterfaceManager().close();
|
player.getInterfaceManager().close();
|
||||||
//Removing Tutorial Island properties on the account (?) and sending the Player to Lumbridge
|
|
||||||
player.getMusicPlayer().play(MusicEntry.forId(62));
|
|
||||||
player.removeAttribute("tut-island");
|
|
||||||
player.getConfigManager().set(1021, 0);
|
|
||||||
TutorialSession.getExtension(player).setStage(72);
|
|
||||||
player.getInterfaceManager().closeOverlay();
|
|
||||||
|
|
||||||
//Clears and Resets the Player's account and focuses the default interface to their Inventory
|
|
||||||
// player.getInventory().clear();
|
|
||||||
// player.getEquipment().clear();
|
|
||||||
// player.getBank().clear();
|
|
||||||
player.getInterfaceManager().restoreTabs(); //This still hides the Attack (double swords) in the player menu until Player wields a weapon.
|
|
||||||
player.getInterfaceManager().setViewedTab(3);
|
|
||||||
// player.getInventory().add(STARTER_PACK);
|
|
||||||
// player.getBank().add(STARTER_BANK);
|
|
||||||
|
|
||||||
player.getPulseManager().run(new Pulse(1){
|
|
||||||
@Override
|
|
||||||
public boolean pulse() {
|
|
||||||
player.unlock();
|
|
||||||
if (player.getIronmanManager().isIronman() && player.getSettings().isAcceptAid()) {
|
|
||||||
player.getSettings().toggleAcceptAid();
|
|
||||||
}
|
|
||||||
if (WorldCommunicator.isEnabled()) {
|
|
||||||
MSPacketRepository.sendInfoUpdate(player);
|
|
||||||
}
|
|
||||||
//This overwrites the stuck dialogue after teleporting to Lumbridge for some reason
|
|
||||||
//Dialogue from 2007 or thereabouts
|
|
||||||
//Original is five lines, but if the same is done here it will break. Need to find another way of showing all this information.
|
|
||||||
//player.getDialogueInterpreter().sendDialogue("Welcome to Lumbridge! To get more help, simply click on the", "Lumbridge Guide or one of the Tutors - these can be found by looking", "for the question mark icon on your mini-map. If you find you are", "lost at any time, look for a signpost or use the Lumbridge Home Port Spell.");
|
|
||||||
player.getDialogueInterpreter().sendPlaneMessageWithBlueTitle("Welcome to " + GameWorld.getSettings().getName() + "!","Hans at the castle in Lumbridge can","enable ironman mode, modify xp rate settings,","toggle random events, and more!","Use the ladder to leave.");
|
|
||||||
|
|
||||||
//Appending the welcome message and some other stuff
|
|
||||||
player.getPacketDispatch().sendMessage("Welcome to " + GameWorld.getSettings().getName() + ".");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
player.getAppearance().setGender(player.getAttribute("male", player.getAppearance().isMale()) ? Gender.MALE : Gender.FEMALE);
|
player.getAppearance().setGender(player.getAttribute("male", player.getAppearance().isMale()) ? Gender.MALE : Gender.FEMALE);
|
||||||
for (int i = 0; i < player.getAppearance().getAppearanceCache().length; i++) {
|
for (int i = 0; i < player.getAppearance().getAppearanceCache().length; i++) {
|
||||||
|
|
|
||||||
|
|
@ -1,166 +0,0 @@
|
||||||
package core.game.content.quest.tutorials.tutorialisland;
|
|
||||||
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
import core.game.content.dialogue.DialoguePlugin;
|
|
||||||
import core.game.node.entity.npc.NPC;
|
|
||||||
import core.game.node.entity.player.Player;
|
|
||||||
import core.game.node.item.Item;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the dialogue plugin related to the combat instructor npc.
|
|
||||||
* @author Vexia
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public final class CombatInstructorDialogue extends DialoguePlugin {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the items related to the combat instructor.
|
|
||||||
*/
|
|
||||||
private static final Item[] ITEMS = new Item[] { new Item(882, 50), new Item(841, 1), new Item(1171, 1), new Item(1277, 1) };
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code CombatInstructorDialogue} {@code Object}.
|
|
||||||
*/
|
|
||||||
public CombatInstructorDialogue() {
|
|
||||||
/**
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code CombatInstructorDialogue} {@code Object}.
|
|
||||||
* @param player the player.
|
|
||||||
*/
|
|
||||||
public CombatInstructorDialogue(Player player) {
|
|
||||||
super(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DialoguePlugin newInstance(Player player) {
|
|
||||||
return new CombatInstructorDialogue(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean open(Object... args) {
|
|
||||||
npc = (NPC) args[0];
|
|
||||||
switch (TutorialSession.getExtension(player).getStage()) {
|
|
||||||
case 44:
|
|
||||||
interpreter.sendDialogues(player, null, "Hi! My name's " + player.getUsername() + ".");
|
|
||||||
stage = 0;
|
|
||||||
break;
|
|
||||||
case 47:
|
|
||||||
interpreter.sendDialogues(npc, null, "Very good, but that little butter knife isn't going to ", "protect you much. Here, take these.");
|
|
||||||
stage = 0;
|
|
||||||
break;
|
|
||||||
case 53:
|
|
||||||
interpreter.sendDialogues(player, null, "I did it! I killed a giant rat! ");
|
|
||||||
stage = 0;
|
|
||||||
break;
|
|
||||||
case 54:
|
|
||||||
if (!player.getInventory().containItems(841, 882)) {
|
|
||||||
if (player.getInventory().freeSlots() > 2) {
|
|
||||||
interpreter.sendDoubleItemMessage(ITEMS[0], ITEMS[1], "The Combat Guide gives you some <col=08088A>bronze arrows</col> and a <col=08088A>shortbow</col>!");
|
|
||||||
player.getInventory().add(ITEMS[0], ITEMS[1]);
|
|
||||||
stage = 3;
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 54, false);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 54, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(int interfaceId, int buttonId) {
|
|
||||||
switch (TutorialSession.getExtension(player).getStage()) {
|
|
||||||
case 44:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
interpreter.sendDialogues(npc, null, "Do I look like I care? To me you're just another", "newcomer who thinks they're ready to fight.");
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
interpreter.sendDialogues(npc, null, "I am Vannaka, the greatest swordsman alive.");
|
|
||||||
stage = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
interpreter.sendDialogues(npc, null, "Let's get started by teaching you to wield a weapon.");
|
|
||||||
stage = 3;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 45, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 54:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 54, false);
|
|
||||||
break;
|
|
||||||
case 47:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
if (!player.getInventory().containItems(1171, 1277)) {
|
|
||||||
if (player.getInventory().freeSlots() > 2) {
|
|
||||||
interpreter.sendDoubleItemMessage(1171, 1277, "The Combat Guide gives you a <col=08088A>bronze sword</col> and a <col=08088A>wooden shield</col>!");
|
|
||||||
player.getInventory().add(ITEMS[2]);
|
|
||||||
player.getInventory().add(ITEMS[3]);
|
|
||||||
stage = 1;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 48, false);
|
|
||||||
stage = 1;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 48, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 53:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
interpreter.sendDialogues(npc, null, "I saw, " + player.getUsername() + ". You seem better at this than I", "thought. Now that you have grasped basic swordplay", "let's move on.");
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
interpreter.sendDialogues(npc, null, "Let's try some ranged attacking, with this you can kill", "foes from a distance. Also, foes unable to reach you are", "as good as dead. You'll be able to attack the rats, ", "without entering the pit.");
|
|
||||||
stage = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
if (!player.getInventory().containItems(841, 882)) {
|
|
||||||
if (player.getInventory().freeSlots() > 2) {
|
|
||||||
interpreter.sendDoubleItemMessage(ITEMS[0], ITEMS[1], "The Combat Guide gives you some <col=08088A>bronze arrows</col> and a <col=08088A>shortbow</col>!");
|
|
||||||
player.getInventory().add(ITEMS[0], ITEMS[1]);
|
|
||||||
stage = 3;
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 53, false);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 54, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 54, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int[] getIds() {
|
|
||||||
return new int[] { 944 };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,101 +0,0 @@
|
||||||
package core.game.content.quest.tutorials.tutorialisland;
|
|
||||||
|
|
||||||
import core.game.content.dialogue.DialoguePlugin;
|
|
||||||
import core.game.node.entity.npc.NPC;
|
|
||||||
import core.game.node.entity.player.Player;
|
|
||||||
import rs09.game.world.GameWorld;
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the financial advisor plugin.
|
|
||||||
* @author Vexia
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public final class FinancialAdvisorDialogue extends DialoguePlugin {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code FinancialAdvisorPlugin {@code Object}.
|
|
||||||
*/
|
|
||||||
public FinancialAdvisorDialogue() {
|
|
||||||
/**
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code FinancialAdvisorPlugin} {@code Object}.
|
|
||||||
* @param player the player.
|
|
||||||
*/
|
|
||||||
public FinancialAdvisorDialogue(Player player) {
|
|
||||||
super(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DialoguePlugin newInstance(Player player) {
|
|
||||||
return new FinancialAdvisorDialogue(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean open(Object... args) {
|
|
||||||
npc = (NPC) args[0];
|
|
||||||
switch (TutorialSession.getExtension(player).getStage()) {
|
|
||||||
case 58:
|
|
||||||
interpreter.sendDialogues(player, null, "Hello. Who are you?");
|
|
||||||
stage = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(int interfaceId, int buttonId) {
|
|
||||||
switch (TutorialSession.getExtension(player).getStage()) {
|
|
||||||
case 58:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
interpreter.sendDialogues(npc, null, "I'm the Financial Advisor. I'm here to tell people how to", "make money.");
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
interpreter.sendDialogues(player, null, "Okay. How can I make money then?");
|
|
||||||
stage = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
interpreter.sendDialogues(npc, null, "How you can make money? Quite.");
|
|
||||||
stage = 3;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
interpreter.sendDialogues(npc, null, "Well there are three basic ways of making money here:", "combat, quests, and trading. I will talk you through each", "of them very quickly.");
|
|
||||||
stage = 4;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
interpreter.sendDialogues(npc, null, "Let's start with combat as it is probably still fresh in", "your mind. Many enemies, both human and monster", "will drop items when they die.");
|
|
||||||
stage = 5;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
interpreter.sendDialogues(npc, null, "Now, the next way to earn money quickly is by quests", "Many people on " + GameWorld.getSettings().getName() + " have things they need", "doing, which they will reward you for.");
|
|
||||||
stage = 6;
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
interpreter.sendDialogues(npc, null, "By getting a high level in skills such as Cooking, Mining,", "Smithing or Fishing, you can create or catch your own", "items and sell them for pure profit.");
|
|
||||||
stage = 7;
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
interpreter.sendDialogues(npc, null, "Well that about covers it. Come back if you'd like to go", "over this again.");
|
|
||||||
stage = 8;
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 59, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int[] getIds() {
|
|
||||||
return new int[] { 947 };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,168 +0,0 @@
|
||||||
package core.game.content.quest.tutorials.tutorialisland;
|
|
||||||
|
|
||||||
import core.game.component.Component;
|
|
||||||
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.game.node.item.Item;
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the master chef dialogue plugin.
|
|
||||||
* @author 'Vexia
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public class MasterChefDialogue extends DialoguePlugin {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code MasterChefDialogue} {@code Object}
|
|
||||||
*/
|
|
||||||
public MasterChefDialogue() {
|
|
||||||
/**
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code MasterChefDialogue} {@code Object}
|
|
||||||
* @param player the player.
|
|
||||||
*/
|
|
||||||
public MasterChefDialogue(Player player) {
|
|
||||||
super(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean open(Object... args) {
|
|
||||||
npc = (NPC) args[0];
|
|
||||||
int tut_stage = TutorialSession.getExtension(player).getStage();
|
|
||||||
switch (tut_stage) {
|
|
||||||
case 18:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Ahh! Welcome, newcomer. I am the Master Chef, Lev. It", "is here I will teach you how to cook food truly fit for a", "king."));
|
|
||||||
break;
|
|
||||||
case 20:
|
|
||||||
if (player.getInventory().containsAll(1933,1929)) {
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "Mix together the flour and water to form a dough."));
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "Mix together the flour and water to form a dough."));
|
|
||||||
stage = 1;
|
|
||||||
|
|
||||||
} else if (player.getInventory().containsItem(new Item(2307))) {
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "You already have some dough, no need", "to make more."));
|
|
||||||
stage = 1;
|
|
||||||
|
|
||||||
} else if (player.getInventory().containsItem(new Item(2307))) {
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "You already have some dough, no need", "to make more."));
|
|
||||||
stage = 1;
|
|
||||||
/* Disabled for now, not sure what is supposed to be happening here, but the else can't be here
|
|
||||||
} else {
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "I see you have lost your pot of flour and bucket of water,", "No worries i will supply you with more."));
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Mix together the flour and water to form a dough."));
|
|
||||||
stage = 1;
|
|
||||||
*/
|
|
||||||
} else if (player.getInventory().containsItem(new Item(2307))) {
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "You already have some dough, no need", "to make more."));
|
|
||||||
stage = 1;
|
|
||||||
} else {
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I see you have lost your pot of flour and bucket of water,", "No worries i will supply you with more."));
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "I see you have lost your pot of flour and bucket of water,", "No worries i will supply you with more."));
|
|
||||||
if (player.getInventory().freeSlots() >= 2) {
|
|
||||||
player.getInventory().add(new Item(1933));
|
|
||||||
player.getInventory().add(new Item(1929));
|
|
||||||
stage = 1;
|
|
||||||
} else {
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogue("You don't have enough inventory space."));
|
|
||||||
stage = 99;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case 19:
|
|
||||||
if (!player.getInventory().contains(1929, 1) && !player.getInventory().containItems(1933)) {
|
|
||||||
if (player.getInventory().hasSpaceFor(new Item(1929, 1)) && player.getInventory().hasSpaceFor(new Item(1933, 1))) {
|
|
||||||
Component.setUnclosable(player, interpreter.sendDoubleItemMessage(1929, 1933, "The Cooking Guide gives you a <col=08088A>bucket of water<col> and a <col=08088A>pot of flour</col>."));
|
|
||||||
player.getInventory().add(new Item(1933));
|
|
||||||
player.getInventory().add(new Item(1929));
|
|
||||||
stage = 4;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 19, false);
|
|
||||||
}
|
|
||||||
stage = 4;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(int interfaceId, int buttonId) {
|
|
||||||
int tut_stage = TutorialSession.getExtension(player).getStage();
|
|
||||||
switch (tut_stage) {
|
|
||||||
case 20:
|
|
||||||
switch (stage) {
|
|
||||||
case 1:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 20, false);
|
|
||||||
break;
|
|
||||||
case 99:
|
|
||||||
TutorialStage.load(player, 20, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 19:
|
|
||||||
switch (stage) {
|
|
||||||
case 4:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 19, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 18:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I already know how to cook. Brynna taught me just", "now."));
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Hahahahahaha! You call THAT cooking? Some shrimp", "on an open log fire? Oh, no, no no. I am going to", "teach you the fine art of cooking bread."));
|
|
||||||
stage = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "And no fine meal is complete without good music, so", "we'll cover that while you're here too."));
|
|
||||||
stage = 3;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
if (!player.getInventory().contains(1929, 1) && !player.getInventory().containItems(1933)) {
|
|
||||||
if (player.getInventory().hasSpaceFor(new Item(1929, 1)) && player.getInventory().hasSpaceFor(new Item(1933, 1))) {
|
|
||||||
Component.setUnclosable(player, interpreter.sendDoubleItemMessage(1929, 1933, "The Cooking Guide gives you a <col=08088A>bucket of water<col> and a <col=08088A>pot of flour</col>."));
|
|
||||||
player.getInventory().add(new Item(1933));
|
|
||||||
player.getInventory().add(new Item(1929));
|
|
||||||
stage = 4;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 19, false);
|
|
||||||
}
|
|
||||||
stage = 4;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 19, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DialoguePlugin newInstance(Player player) {
|
|
||||||
return new MasterChefDialogue(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int[] getIds() {
|
|
||||||
return new int[] { 942 };
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,188 +0,0 @@
|
||||||
package core.game.content.quest.tutorials.tutorialisland;
|
|
||||||
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
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.game.node.item.Item;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the mining instructor dialogue.
|
|
||||||
* @author Vexia
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public final class MiningInstructorDialogue extends DialoguePlugin {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the hammer item.
|
|
||||||
*/
|
|
||||||
private static final Item HAMMER = new Item(2347, 1);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the pickaxe item.
|
|
||||||
*/
|
|
||||||
private static final Item PICKAXE = new Item(1265);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code MiningInstructorDialogue} {@code Object}.
|
|
||||||
*/
|
|
||||||
public MiningInstructorDialogue() {
|
|
||||||
/**
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code MiningInstructorDialogue} {@code Object}.
|
|
||||||
* @param player the player.
|
|
||||||
*/
|
|
||||||
public MiningInstructorDialogue(Player player) {
|
|
||||||
super(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DialoguePlugin newInstance(Player player) {
|
|
||||||
return new MiningInstructorDialogue(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean open(Object... args) {
|
|
||||||
npc = (NPC) args[0];
|
|
||||||
switch (TutorialSession.getExtension(player).getStage()) {
|
|
||||||
case 30:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Hi there. You must be new around here. So what do I", "call you? 'Newcomer' seems so impersonal, and if we're", "going to be working together, I'd rather call you by", "name.");
|
|
||||||
break;
|
|
||||||
case 34:
|
|
||||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I prospected both types of rock! One set contains tin", "and the other has copper ore inside.");
|
|
||||||
break;
|
|
||||||
case 35:
|
|
||||||
if (!player.getInventory().contains(1265, 1)) {
|
|
||||||
if (player.getInventory().hasSpaceFor(PICKAXE)) {
|
|
||||||
interpreter.sendItemMessage(1265, "Dezzick gives you a <col=08088A>bronze pickaxe</col>!");
|
|
||||||
player.getInventory().add(PICKAXE);
|
|
||||||
stage = 3;
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 35, false);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 35, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 40:
|
|
||||||
interpreter.sendDialogues(player, null, "How do I make a weapon out of this?");
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 41:
|
|
||||||
if (!player.getInventory().contains(2347, 1)) {
|
|
||||||
if (player.getInventory().hasSpaceFor(HAMMER)) {
|
|
||||||
interpreter.sendItemMessage(2347, "Dezzick gives you a <col=08088A>hammer!");
|
|
||||||
player.getInventory().add(HAMMER);
|
|
||||||
stage = 3;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 41, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(int interfaceId, int buttonId) {
|
|
||||||
switch (TutorialSession.getExtension(player).getStage()) {
|
|
||||||
case 30:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "You can call me " + player.getUsername() + ".");
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Ok then, " + player.getUsername() + ". My name is Dezzick and I'm a", "miner by Trade. Let's prospect some of those rocks.");
|
|
||||||
stage = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 31, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 35:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 35, false);
|
|
||||||
break;
|
|
||||||
case 40:
|
|
||||||
switch (stage) {
|
|
||||||
case 1:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Okay, I'll show you how to make a dagger out of it.", "You'll be needing this..");
|
|
||||||
stage = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
if (!player.getInventory().contains(2347, 1)) {
|
|
||||||
if (player.getInventory().hasSpaceFor(HAMMER)) {
|
|
||||||
interpreter.sendItemMessage(2347, "Dezzick gives you a <col=08088A>hammer!");
|
|
||||||
player.getInventory().add(HAMMER);
|
|
||||||
stage = 3;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 41, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 41, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 41:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 41, false);
|
|
||||||
break;
|
|
||||||
case 34:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Absolutely right, " + player.getUsername() + ". These two ore types can be", "Smelted together to make bronze.");
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "So now you know what ore is in the rocks over there,", "why don't you have a go at mining some tin and", "copper? Here, you'll need this to start with.");
|
|
||||||
stage = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
if (!player.getInventory().contains(1265, 1)) {
|
|
||||||
if (player.getInventory().hasSpaceFor(PICKAXE)) {
|
|
||||||
interpreter.sendItemMessage(1265, "Dezzick gives you a <col=08088A>bronze pickaxe</col>!");
|
|
||||||
player.getInventory().add(PICKAXE);
|
|
||||||
stage = 3;
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 34, false);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 35, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 35, false);
|
|
||||||
break;
|
|
||||||
case 99:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 34, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int[] getIds() {
|
|
||||||
return new int[] { 948 };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,93 +0,0 @@
|
||||||
package core.game.content.quest.tutorials.tutorialisland;
|
|
||||||
|
|
||||||
import core.game.component.Component;
|
|
||||||
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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the quest guide.
|
|
||||||
* @author Vexia
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public class QuestGuideDialogue extends DialoguePlugin {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code QuestGuide} {@code Object}.
|
|
||||||
*/
|
|
||||||
public QuestGuideDialogue() {
|
|
||||||
/**
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code QuestGuideDialogue} {@code Object}
|
|
||||||
* @param player the player.
|
|
||||||
*/
|
|
||||||
public QuestGuideDialogue(Player player) {
|
|
||||||
super(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean open(Object... args) {
|
|
||||||
npc = (NPC) args[0];
|
|
||||||
switch (TutorialSession.getExtension(player).getStage()) {
|
|
||||||
case 27:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Ah. Welcome adventurer. I'm here to tell you all about", "quests. Lets start by opening the Quest list."));
|
|
||||||
stage = 0;
|
|
||||||
break;
|
|
||||||
case 28:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Now you have the journal open. I'll tell you a bit about", "it At the moment all the quests are shown in red. Which", "means you have not started them yet."));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(int interfaceId, int buttonId) {
|
|
||||||
switch (TutorialSession.getExtension(player).getStage()) {
|
|
||||||
case 27:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
Component.setUnclosable(player, interpreter.sendPlaneMessageWithBlueTitle("Open the Quest Journal.", "Click on the flashing icon next to your inventory.", "", "", ""));
|
|
||||||
player.getConfigManager().set(1021, 3);
|
|
||||||
player.getInterfaceManager().openTab(new Component(274));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 28:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "When you start a quest it will change colour to yellow,", "and to green when you've finished. This is so you can", "easily see what's complete, what's started and what's left", "to begin."));
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "The start of quests are easy to find. Look out for the", "star icons on the minimap, just like the one you should", "see marking my house."));
|
|
||||||
stage = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "There's not a lot more I can tell you about questing.", "You have to experience the thrill of it yourself to fully", "understand. You may find some adevnture in the caves", "under my house."));
|
|
||||||
stage = 3;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 29, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DialoguePlugin newInstance(Player player) {
|
|
||||||
return new QuestGuideDialogue(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int[] getIds() {
|
|
||||||
return new int[] { 949 };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,243 +0,0 @@
|
||||||
package core.game.content.quest.tutorials.tutorialisland;
|
|
||||||
|
|
||||||
import core.game.component.Component;
|
|
||||||
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 rs09.game.world.GameWorld;
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Hanldes the 2009scape guide's dialogue.
|
|
||||||
* @author Vexia
|
|
||||||
* @author Splinter
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public class RSGuideDialogue extends DialoguePlugin {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code 2009scapeGuideDialogue} {@code Object}.
|
|
||||||
*/
|
|
||||||
public RSGuideDialogue() {
|
|
||||||
/**
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code 2009scapeGuideDialogue} {@code Object}.
|
|
||||||
* @param player The player.
|
|
||||||
*/
|
|
||||||
private RSGuideDialogue(Player player) {
|
|
||||||
super(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean open(Object... args) {
|
|
||||||
npc = (NPC) args[0];
|
|
||||||
int tut_stage = TutorialSession.getExtension(player).getStage();
|
|
||||||
if(tut_stage < TutorialSession.MAX_STAGE){
|
|
||||||
switch (tut_stage) {
|
|
||||||
case 0:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Greetings! I see you are a new arrival to this land. My", "job is to welcome all new visitors. So welcome!"));
|
|
||||||
return true;
|
|
||||||
case 1:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "You will notice a flashing icon of a spanner; please click", "on this to continue the tutorial."));
|
|
||||||
return true;
|
|
||||||
case 2:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I'm glad you're making progress!"));
|
|
||||||
stage = 1;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if(player.getSkills().getTotalLevel() < 300){
|
|
||||||
interpreter.sendDialogues(npc, null, "Greetings, "+player.getUsername()+". Welcome to "+GameWorld.getSettings().getName()+".", "The flashing icon above my head will disappear once", "you've reached a total level of three hundred.");
|
|
||||||
} else {
|
|
||||||
interpreter.sendDialogues(npc, null, "Greetings, "+player.getUsername()+". Welcome to "+GameWorld.getSettings().getName()+".");
|
|
||||||
}
|
|
||||||
stage = 10;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(int interfaceId, int buttonId) {
|
|
||||||
final int tut_stage = TutorialSession.getExtension(player).getStage();
|
|
||||||
if(tut_stage < TutorialSession.MAX_STAGE){
|
|
||||||
switch (tut_stage) {
|
|
||||||
case 0:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "You have already learned the first thing needed to", "succeed in this world: talking to other people!"));
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "You will find many inhabitants of this world have useful", "things to say to you. By clicking on them with your", "mouse you can talk to them."));
|
|
||||||
stage = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I would also suggest reading through some of the", "supporting information on the website. There you can", "find the Knowledge Base, which contains all the", "additional information you're ever likely to need. It also"));
|
|
||||||
stage = 3;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "contains maps and helpful tips to help you on your", "journey."));
|
|
||||||
stage = 4;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "You will notice a flashing icon of a wrench, please click", "on this to continue the tutorial."));
|
|
||||||
player.getInterfaceManager().openTab(new Component(261));
|
|
||||||
player.getConfigManager().set(1021, 12);
|
|
||||||
stage = 5;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 1, false);
|
|
||||||
stage = 1;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
switch (stage) {
|
|
||||||
case 1:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "To continue the tutorial go through that door over", "there and speak to your first instructor!"));
|
|
||||||
stage = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 3, false);
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
end();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
switch(stage){
|
|
||||||
case 10:
|
|
||||||
interpreter.sendDialogues(npc, null, "I am the "+GameWorld.getSettings().getName()+" guide. I offer free and helpful assistance", "for newcomers. What would you like to ask about?");
|
|
||||||
stage++;
|
|
||||||
break;
|
|
||||||
case 11:
|
|
||||||
interpreter.sendOptions("Select a Question", "Money making", "Getting around", "List of game content");
|
|
||||||
stage++;
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
switch(buttonId){
|
|
||||||
case 1:
|
|
||||||
interpreter.sendDialogues(player, null, "I'd like to ask about money-making techniques.");
|
|
||||||
stage = 13;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
interpreter.sendDialogues(player, null, "I'd like to know how to get around on "+GameWorld.getSettings().getName()+".");
|
|
||||||
stage = 18;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
interpreter.sendDialogues(player, null, "I'd like to know about all the content in "+GameWorld.getSettings().getName()+".");
|
|
||||||
stage = 25;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
interpreter.sendDialogues(npc, null, "That is one of the most commonly asked questions.", "First of all, there are many different ways to make large", "amounts of coins in "+GameWorld.getSettings().getName()+". There's hundreds", "of hours of emulated content awaiting you.");
|
|
||||||
stage = 14;
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
interpreter.sendDialogues(npc, null, "Many players prefer to start with leveling their Slayer skill.", "The skill is profitable because of the vast amount of items","that come with defeating monsters in combat. Speak", "to Turael to the east. He is the lowest level");
|
|
||||||
stage = 15;
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
interpreter.sendDialogues(npc, null, "Slayer Master available. He will get you started with Slayer.", "The other Slayer Masters may be found spread through", "out the game world.");
|
|
||||||
stage = 16;
|
|
||||||
break;
|
|
||||||
case 16:
|
|
||||||
interpreter.sendDialogues(npc, null, "As for other money-making methods, consider all of the other", "skills available to you. You may chop down Magic trees and","sell the valuable logs to players, or you may even catch", "sharks and sell them for over one thousand gold pieces each.");
|
|
||||||
stage = 17;
|
|
||||||
break;
|
|
||||||
case 17:
|
|
||||||
interpreter.sendDialogues(npc, null, GameWorld.getSettings().getName()+" is an economy-driven server. All gathering skills", "are highly profitable and sought after. Herblore and", "Farming, for example, are guaranteed to make you", "profit.");
|
|
||||||
stage = 11;
|
|
||||||
break;
|
|
||||||
case 18:
|
|
||||||
interpreter.sendDialogues(npc, null, "A good question indeed. Traveling is the key to"," experiencing all the game content that "+GameWorld.getSettings().getName()+" has to offer.");
|
|
||||||
stage = 19;
|
|
||||||
break;
|
|
||||||
case 19:
|
|
||||||
interpreter.sendDialogues(npc, null, "First of all, you may use your spellbook to teleport to", "major cities. There are three fully working spellbooks", "available to you. However, they require a Magic level", "in order to be used.");
|
|
||||||
stage = 20;
|
|
||||||
break;
|
|
||||||
case 20:
|
|
||||||
interpreter.sendDialogues(npc, null, "Next we have teletabs. They may be bought by accessing", "the green teleporter to the west of me.", "These tablets are very convenient and only require", "a single inventory space.");
|
|
||||||
stage = 21;
|
|
||||||
break;
|
|
||||||
case 21:
|
|
||||||
interpreter.sendDialogues(npc, null, "We also have Spirit trees. These talkative trees are", "willing to take you to a few odd locations.");
|
|
||||||
stage = 22;
|
|
||||||
break;
|
|
||||||
case 22:
|
|
||||||
interpreter.sendDialogues(npc, null, "Next up is the charter system. You make take a ferry boat", "to many coastal cities like Port Phasmatys and", "Catherby.");
|
|
||||||
stage = 23;
|
|
||||||
break;
|
|
||||||
case 23:
|
|
||||||
interpreter.sendDialogues(npc, null, "We also have the convenient Gnome glider system.", "The friendly Gnomes of "+GameWorld.getSettings().getName()+" offer their services","completely free of charge.");
|
|
||||||
stage = 24;
|
|
||||||
break;
|
|
||||||
case 24:
|
|
||||||
interpreter.sendDialogues(npc, null, "Finally, we have the green teleporter located in the", "Grand Exchange and Fairy rings.", "All of these teleportation methods should assist you", "in traveling the wide-open world of "+GameWorld.getSettings().getName()+".");
|
|
||||||
stage = 50;
|
|
||||||
break;
|
|
||||||
case 25:
|
|
||||||
interpreter.sendDialogues(npc, null, "First up, we have our emulated quests. You may", "type ::quests in your chatbox in order to view a full", "list of ones that fully work.", "I will now begin listing off a lot of other game content.");
|
|
||||||
stage = 26;
|
|
||||||
break;
|
|
||||||
case 26:
|
|
||||||
interpreter.sendDialogue("Current OSRS content:", "Rune packs, the Zamorakian Hasta, Lava dragons,","Boss pets, Ecumenical keys, Staff of the Dead,", "Armadyl C'bow, colored Dark bows, and the Dragon defender.");
|
|
||||||
stage = 27;
|
|
||||||
break;
|
|
||||||
case 27:
|
|
||||||
interpreter.sendDialogue("Boss content:", "The Tz-Tok Jad, King Black Dragon, Dagannoth kings, Bork,","Godwars Dungeon bosses, Giant Mole, Kalphite Queen,", "Chaos elemental, and the Corporeal beast.");
|
|
||||||
stage = 28;
|
|
||||||
break;
|
|
||||||
case 28:
|
|
||||||
interpreter.sendDialogue("Minigame content:", "Barrows, Bounty Hunter, Clan Wars, Duel Arena,","Gnomecopters, Magic Training Area, Falador Partyroom,","Pest Control, Puro Puro, The Stronghold of Security,");
|
|
||||||
stage = 29;
|
|
||||||
break;
|
|
||||||
case 29:
|
|
||||||
interpreter.sendDialogue("Minigame content continued:", "The Stronghold of Player Safety, the Warrior's Guild,", "Sorceress' Garden, and the Fight Pits.");
|
|
||||||
stage = 30;
|
|
||||||
break;
|
|
||||||
case 30:
|
|
||||||
interpreter.sendDialogue("Skill content:", "All skills except Construction are fully functional.");
|
|
||||||
stage = 31;
|
|
||||||
break;
|
|
||||||
case 31:
|
|
||||||
interpreter.sendDialogue("Misc content:", "Achievement Diaries, Grand Exchange, Clue scrolls,", "Game sounds, Random events, Lootshare, Slayer points,","Cutscenes, Bank tabs,");
|
|
||||||
stage = 32;
|
|
||||||
break;
|
|
||||||
case 32:
|
|
||||||
interpreter.sendDialogues(npc, null, "... and simply too much else to list.", "There's lots of content out there for you to explore.", "Don't just take my word for it. Experience our perfected", "game content for yourself.");
|
|
||||||
stage = 11;
|
|
||||||
break;
|
|
||||||
case 50:
|
|
||||||
interpreter.sendDialogues(npc, null, "Oh... I almost forgot.", "Our world also has unique teleport methods like the", "convenient ectophial and enchanted rings and amulets.");
|
|
||||||
stage = 11;
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DialoguePlugin newInstance(Player player) {
|
|
||||||
return new RSGuideDialogue(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int[] getIds() {
|
|
||||||
return new int[] { 945 };
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,173 +0,0 @@
|
||||||
package core.game.content.quest.tutorials.tutorialisland;
|
|
||||||
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
import core.game.component.Component;
|
|
||||||
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.game.node.item.Item;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles survival expert dialogue.
|
|
||||||
* @author 'Vexia
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public class SurvivalExpertDialogue extends DialoguePlugin {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The NPC ids that use this dialogue plugin.
|
|
||||||
*/
|
|
||||||
private static final int[] NPC_IDS = { 943 };
|
|
||||||
|
|
||||||
public SurvivalExpertDialogue() {
|
|
||||||
/*
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
public SurvivalExpertDialogue(Player player) {
|
|
||||||
super(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int[] getIds() {
|
|
||||||
return NPC_IDS;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(int interfaceId, int buttonId) {
|
|
||||||
int tut_stage = TutorialSession.getExtension(player).getStage();
|
|
||||||
switch (tut_stage) {
|
|
||||||
case 6:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 6, false);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 15, false);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDoubleItemMessage(590, 1351, "The Surivival Guide gives you a <col=08088A>tinderbox</col> and a <col=08088A>bronze axe</col>!"));
|
|
||||||
player.getInventory().add(new Item(590, 1));
|
|
||||||
player.getInventory().add(new Item(1351, 1));
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
end();// Component.setUnclosable(player,
|
|
||||||
TutorialStage.load(player, 5, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 11:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
Component.setUnclosable(player, interpreter.sendItemMessage(303, "The Survival Guide gives you a <col=08088A>net</col>!"));
|
|
||||||
player.getInventory().add(new Item(303));
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 12, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, TutorialSession.getExtension(player).getStage(), false);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, TutorialSession.getExtension(player).getStage(), false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, TutorialSession.getExtension(player).getStage(), false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DialoguePlugin newInstance(Player player) {
|
|
||||||
return new SurvivalExpertDialogue(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean open(Object... args) {
|
|
||||||
npc = (NPC) args[0];
|
|
||||||
int tut_stage = TutorialSession.getExtension(player).getStage();
|
|
||||||
switch (tut_stage) {
|
|
||||||
case 4:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Hello there, newcomer. My name is Brynna. My job is", "to teach you a few suvival tips and tricks. First off", "we're going to start with the most basic skill of", "all: making a fire."));
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
if (!player.getInventory().contains(1351, 1) && player.getInventory().contains(590, 1)) {
|
|
||||||
Component.setUnclosable(player, interpreter.sendItemMessage(1351, "The Surivival Guide gives you a <col=08088A>bronze axe</col>."));
|
|
||||||
player.getInventory().add(new Item(1351));
|
|
||||||
} else if (!player.getInventory().contains(590, 1) && player.getInventory().contains(1351, 1)) {
|
|
||||||
player.getInventory().add(new Item(590, 1));
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogue("The Surivival Guide gives you a <col=08088A>tinderbox</col>."));
|
|
||||||
} else if (!player.getInventory().contains(590, 1) && !player.getInventory().contains(1351, 1)) {
|
|
||||||
Component.setUnclosable(player, interpreter.sendDoubleItemMessage(590, 1351, "The Surivival Guide gives you a <col=08088A>tinderbox</col> and a <col=08088A>bronze axe</col>!"));
|
|
||||||
player.getInventory().add(new Item(590, 1));
|
|
||||||
player.getInventory().add(new Item(1351, 1));
|
|
||||||
}
|
|
||||||
stage = 90;
|
|
||||||
break;
|
|
||||||
case 11:
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Well done! Next we need to get some food in our", "bellies. We'd need something to cook. There are shrimp", "in the pond there. So let's catch and cook some."));
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
if (!player.getInventory().contains(1351, 1) && player.getInventory().contains(590, 1)) {
|
|
||||||
Component.setUnclosable(player, interpreter.sendItemMessage(1351, "The Surivival Guide gives you a <col=08088A>bronze axe</col>."));
|
|
||||||
player.getInventory().add(new Item(1351));
|
|
||||||
} else if (!player.getInventory().contains(590, 1) && player.getInventory().contains(1351, 1)) {
|
|
||||||
player.getInventory().add(new Item(590, 1));
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogue("The Surivival Guide gives you a <col=08088A>tinderbox</col>."));
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 8, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
if (!player.getInventory().contains(1351, 1) && player.getInventory().contains(590, 1)) {
|
|
||||||
Component.setUnclosable(player, interpreter.sendItemMessage(1351, "The Surivival Guide gives you a <col=08088A>bronze axe</col>."));
|
|
||||||
player.getInventory().add(new Item(1351));
|
|
||||||
} else if (!player.getInventory().contains(590, 1) && player.getInventory().contains(1351, 1)) {
|
|
||||||
player.getInventory().add(new Item(590, 1));
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogue("The Surivival Guide gives you a <col=08088A>tinderbox</col>."));
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 14, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
if (!player.getInventory().contains(303, 1)) {
|
|
||||||
player.getInventory().add(new Item(303, 1));
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogue("The Surivival Guide gives you a <col=08088A>net</col>."));
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 12, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
if (!player.getInventory().contains(303, 1)) {
|
|
||||||
player.getInventory().add(new Item(303, 1));
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogue("The Surivival Guide gives you a <col=08088A>net</col>."));
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 15, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,97 +0,0 @@
|
||||||
package core.game.content.quest.tutorials.tutorialisland;
|
|
||||||
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
import core.game.content.dialogue.DialoguePlugin;
|
|
||||||
import core.game.content.dialogue.book.Book;
|
|
||||||
import core.game.content.dialogue.book.BookLine;
|
|
||||||
import core.game.content.dialogue.book.Page;
|
|
||||||
import core.game.content.dialogue.book.PageSet;
|
|
||||||
import core.game.node.entity.player.Player;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the introductory after-tutorial book.
|
|
||||||
* @author Splinter
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public final class TutorialBook extends Book {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the book id
|
|
||||||
*/
|
|
||||||
public static int ID = 387454;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the array of pages for this book.
|
|
||||||
*/
|
|
||||||
private static final PageSet[] PAGES = new PageSet[] {
|
|
||||||
new PageSet(
|
|
||||||
new Page(
|
|
||||||
new BookLine("THIS BOOK NEEDS TO HAVE ITS TEXT CHANGED Starting off", 55), new BookLine("", 56), new BookLine(" It is a good idea", 57), new BookLine("to raid the two strongholds", 58),
|
|
||||||
new BookLine("in Barbarian Village in order", 59), new BookLine("to gain a ludicrous amount of", 60), new BookLine("coins to start with. Also", 61),
|
|
||||||
new BookLine("Consider collecting skilling", 62), new BookLine("materials to sell in bulk", 63), new BookLine("on the Grand Exchange.", 64),
|
|
||||||
new BookLine("Raw meat, dropped from", 65)),
|
|
||||||
new Page(
|
|
||||||
new BookLine("cows, is useful in the", 66), new BookLine("Summoning skill and can", 67),
|
|
||||||
new BookLine("be easily sold for coins.", 68), new BookLine(" ", 69), new BookLine(" Credits/Double XP", 70), new BookLine("Credits are our way", 71),
|
|
||||||
new BookLine("of thanking you for voting.", 72), new BookLine("You may spend credits", 73), new BookLine("in the online store at:", 74),
|
|
||||||
new BookLine("www.2009Scape-pk.com/shop or", 75), new BookLine("by using our in-game ::shop.", 76))),
|
|
||||||
new PageSet(
|
|
||||||
new Page(
|
|
||||||
new BookLine(" Suggestions", 55),
|
|
||||||
new BookLine("Please suggest new features", 56), new BookLine("you'd like to see via", 57), new BookLine("the forums located at", 58),
|
|
||||||
new BookLine("www.2009Scape-pk.com.", 59), new BookLine("We wholeheartedly look over", 60), new BookLine("and consider all suggestions.", 61))),
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code ShieldofArravBook} {@code Object}.
|
|
||||||
*/
|
|
||||||
public TutorialBook(final Player player) {
|
|
||||||
super(player, "Early Guide Book", 1856, PAGES);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code ShieldofArravBook} {@code Object}.
|
|
||||||
*/
|
|
||||||
public TutorialBook() {
|
|
||||||
/**
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void finish() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void display(Page[] set) {
|
|
||||||
player.lock();
|
|
||||||
player.getInterfaceManager().open(getInterface());
|
|
||||||
player.getPacketDispatch().sendString("Previous", getInterface().getId(), 77);
|
|
||||||
player.getPacketDispatch().sendString("Next", getInterface().getId(), 78);
|
|
||||||
for (int i = 55; i < 77; i++) {
|
|
||||||
player.getPacketDispatch().sendString("", getInterface().getId(), i);
|
|
||||||
}
|
|
||||||
player.getPacketDispatch().sendString(getName(), getInterface().getId(), 6);
|
|
||||||
for (Page page : set) {
|
|
||||||
for (BookLine line : page.getLines()) {
|
|
||||||
player.getPacketDispatch().sendString(line.getMessage(), getInterface().getId(), line.getChild());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
boolean lastPage = index == sets.length - 1;
|
|
||||||
if (lastPage) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
player.unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DialoguePlugin newInstance(Player player) {
|
|
||||||
return new TutorialBook(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int[] getIds() {
|
|
||||||
return new int[] { ID };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,397 +0,0 @@
|
||||||
package core.game.content.quest.tutorials.tutorialisland;
|
|
||||||
|
|
||||||
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.game.node.entity.player.link.HintIconManager;
|
|
||||||
import core.game.node.entity.player.link.IronmanMode;
|
|
||||||
import core.game.node.item.GroundItemManager;
|
|
||||||
import core.game.node.item.Item;
|
|
||||||
import rs09.game.world.GameWorld;
|
|
||||||
import core.game.world.map.Location;
|
|
||||||
import core.net.amsc.MSPacketRepository;
|
|
||||||
import core.net.amsc.WorldCommunicator;
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the tutorial completition dialogue (skippy, magic instructor)
|
|
||||||
* @author Vexia
|
|
||||||
* @author Splinter
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public class TutorialCompletionDialogue extends DialoguePlugin {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The starter pack of items.
|
|
||||||
*/
|
|
||||||
private static final Item[] STARTER_PACK = new Item[] { new Item(1351, 1), new Item(590, 1), new Item(303, 1), new Item(315, 1), new Item(1925, 1), new Item(1931, 1), new Item(2309, 1), new Item(1265, 1), new Item(1205, 1), new Item(1277, 1), new Item(1171, 1), new Item(841, 1), new Item(882, 25), new Item(556, 25), new Item(558, 15), new Item(555, 6), new Item(557, 4), new Item(559, 2) };
|
|
||||||
private static final Item[] STARTER_BANK = new Item[] { new Item( 995, 25)};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the rune items.
|
|
||||||
*/
|
|
||||||
private static final Item[] RUNES = new Item[] { new Item(556, 5), new Item(558, 5) };
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If ironman is enabled.
|
|
||||||
*/
|
|
||||||
private static final boolean IRONMAN = true;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code TutorialCompletionDialogue} {@code Object}
|
|
||||||
*/
|
|
||||||
public TutorialCompletionDialogue() {
|
|
||||||
/*
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code TutorialCompletionDialogue} {@code Object}
|
|
||||||
* @param player the player.
|
|
||||||
*/
|
|
||||||
public TutorialCompletionDialogue(Player player) {
|
|
||||||
super(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DialoguePlugin newInstance(Player player) {
|
|
||||||
return new TutorialCompletionDialogue(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean open(Object... args) {
|
|
||||||
npc = (NPC) args[0];
|
|
||||||
if (npc == null) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Magic Instructor Dialogue
|
|
||||||
if (npc.getId() == 946) {
|
|
||||||
switch (TutorialSession.getExtension(player).getStage()) {
|
|
||||||
case 67:
|
|
||||||
interpreter.sendDialogues(player, FacialExpression.FRIENDLY, "Hello.");
|
|
||||||
stage = 0;
|
|
||||||
return true;
|
|
||||||
case 69:
|
|
||||||
interpreter.sendDialogues(946, FacialExpression.NEUTRAL, "Good. This is a list of your spells. Currently you can", "only cast one offensive spell called Wind Strike. Let's", "try it out on one of those chickens.");
|
|
||||||
stage = 0;
|
|
||||||
return true;
|
|
||||||
case 70:
|
|
||||||
if (!player.getInventory().contains(556, 1) && !player.getInventory().contains(558, 1)) {
|
|
||||||
if (player.getInventory().hasSpaceFor(RUNES[0]) && player.getInventory().hasSpaceFor(RUNES[1])) {
|
|
||||||
interpreter.sendDoubleItemMessage(RUNES[0], RUNES[1], "Terrova gives you five <col=08088A>air runes</col> and five <col=08088A>mind runes</col>!");
|
|
||||||
player.getInventory().add(RUNES);
|
|
||||||
stage = 3;
|
|
||||||
} else {
|
|
||||||
GroundItemManager.create(RUNES, player.getLocation(), player);
|
|
||||||
stage = 3;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 70, false);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
case 71:
|
|
||||||
interpreter.sendDialogues(946, FacialExpression.NEUTRAL, "Well you're all finished here now. I'll give you a", "reasonable number of runes when you leave.");
|
|
||||||
stage = -2;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Skippy Dialogue used whenever the Player talks to Skippy during the tutorial
|
|
||||||
else {
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.SUSPICIOUS, "*psst.* Hey, do you want to skip the tutorial?", "I can send you straight to the mainland, easy.");
|
|
||||||
stage = 1;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(int interfaceId, int buttonId) {
|
|
||||||
|
|
||||||
//Final Dialogue from the either the Magic Instructor or Skippy
|
|
||||||
if (npc.getId() == 2796 || TutorialSession.getExtension(player).getStage() >= 71) {
|
|
||||||
switch (stage) {
|
|
||||||
case -2: //Only used by the Magic Instructor
|
|
||||||
interpreter.sendOptions("Leave Tutorial Island?", "Yes.", "No.");
|
|
||||||
stage = -1;
|
|
||||||
break;
|
|
||||||
case -1:
|
|
||||||
switch (buttonId) {
|
|
||||||
case 1:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.ASKING,"One more thing: Would you like to", "be an Ironman account?");
|
|
||||||
stage = 501;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 71, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
//Dialogue used by Skippy to leave Tutorial Island
|
|
||||||
case 1:
|
|
||||||
interpreter.sendOptions("What would you like to say?", "<col=CC0000>Leave Tutorial Island.", "Can I decide later?", "I'll stay here for the Tutorial.");
|
|
||||||
stage = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
switch (buttonId) {
|
|
||||||
case 1:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.ASKING,"One more thing: Would you like to", "be an Ironman account?");
|
|
||||||
stage = 501;
|
|
||||||
if (!IRONMAN) {
|
|
||||||
stage = 1205;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
interpreter.sendDialogues(player, FacialExpression.THINKING, "Can I decide later?.");
|
|
||||||
stage = 39;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
interpreter.sendDialogues(player, FacialExpression.NEUTRAL, "I'll stay here for the Tutorial.");
|
|
||||||
stage = 40;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 39:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "Yes. Talk to me at any point during this tutorial", "if you change your mind.");
|
|
||||||
stage = 99;
|
|
||||||
break;
|
|
||||||
case 40:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "Very well. Have fun, adventurer.");
|
|
||||||
stage = 99;
|
|
||||||
break;
|
|
||||||
|
|
||||||
//Continuation of Ironman Dialogues
|
|
||||||
case 501:
|
|
||||||
player.removeAttribute("ironMode");
|
|
||||||
player.removeAttribute("ironPermanent");
|
|
||||||
options("Yes, please.", "What is an Ironman account?", "No, thanks.");
|
|
||||||
stage++;
|
|
||||||
break;
|
|
||||||
case 502:
|
|
||||||
switch (buttonId) {
|
|
||||||
case 1:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.HAPPY,"Yes, please.");
|
|
||||||
stage = 506;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.ASKING,"What is an Ironman account?");
|
|
||||||
stage = 530;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.NEUTRAL,"No, thanks.");
|
|
||||||
stage = 534;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 506:
|
|
||||||
interpreter.sendOptions("Select a Mode", "Standard", "<col=8A0808>Hardcore</col>", "<col=ECEBEB>Ultimate</col>", "Go back.");
|
|
||||||
stage++;
|
|
||||||
break;
|
|
||||||
case 507:
|
|
||||||
switch (buttonId) {
|
|
||||||
case 1:
|
|
||||||
case 2:
|
|
||||||
case 3:
|
|
||||||
npc("You have chosen the " + (buttonId == 1 ? "Standard" : (buttonId == 2 ? "<col=8A0808>Hardcore</col>" : "<col=ECEBEB>Ultimate</col>")) + " Ironman mode.");
|
|
||||||
player.setAttribute("ironMode", IronmanMode.values()[buttonId]);
|
|
||||||
player.getSavedData().getActivityData().setHardcoreDeath(false);
|
|
||||||
stage = 516;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
player.removeAttribute("ironMode");
|
|
||||||
player.removeAttribute("ironPermanent");
|
|
||||||
options("Yes, please.", "What is an Ironman account?", "No, thanks.");
|
|
||||||
stage = 502;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 516:
|
|
||||||
player.getIronmanManager().setMode(player.getAttribute("ironMode"));
|
|
||||||
MSPacketRepository.sendInfoUpdate(player);
|
|
||||||
|
|
||||||
//Split Dialogue depending on if the Player is talking to the Magic Instructor or Skippy.
|
|
||||||
if (npc.getId() == 946) {
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.HAPPY,"Congratulations, you have setup your Ironman account.", "Let's continue.");
|
|
||||||
stage = 1199;
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.FRIENDLY,"Congratulations, you have setup your Ironman account.", "You will travel to the mainland in a moment.");
|
|
||||||
stage = 1204;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
//About Ironman mode
|
|
||||||
case 530:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.NEUTRAL,"An Iron Man account is a style of playing where players", "are completely self-sufficient.");
|
|
||||||
stage++;
|
|
||||||
break;
|
|
||||||
case 531:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.NEUTRAL,"A Standard Ironman does not receive items or", "assistance from other players. They cannot trade, stake,", "receive PK loot, scavenge dropped items, nor play", "certain minigames.");
|
|
||||||
stage++;
|
|
||||||
break;
|
|
||||||
case 532:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.NEUTRAL,"In addition to Standard Ironman restrictions,", "<col=8A0808>Hardcore</col> Ironmen only have one life. In the event of","a dangerous death, a player will be downgraded to a", "Standard Ironman, and their stats frozen on the hiscores.");
|
|
||||||
stage++;
|
|
||||||
break;
|
|
||||||
case 533:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.NEUTRAL,"For the ultimate challenge, players who choose the", "<col=ECEBEB>Ultimate</col> Ironman mode cannot use banks, nor", "retain any items on death in dangerous areas.");
|
|
||||||
stage = 501;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 534:
|
|
||||||
// From saying no thanks to being an ironman.
|
|
||||||
//Split Dialogue depending on if the Player is talking to the Magic Instructor or Skippy.
|
|
||||||
if (npc.getId() == 946) {
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.NEUTRAL,"Very well.", "Let's continue.");
|
|
||||||
stage = 1199;
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.NEUTRAL,"Very well.", "You will travel to the mainland in a moment.");
|
|
||||||
stage = 1204;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
//Final Regards from the Magic Instructor
|
|
||||||
case 1199:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "When you get to the mainland you will find yourself in", "the town of Lumbridge. If you want some ideas on", "where to go next talk to my friend the Lumbridge", "Guide. You can't miss him; he's holding a big staff with");
|
|
||||||
stage++;
|
|
||||||
break;
|
|
||||||
case 1200:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "a question mark on the end. He also has a white beard","and carries a rucksack full of scrolls. There are also","many tutors willing to teach you about the many skills","you could learn.");
|
|
||||||
stage++;
|
|
||||||
break;
|
|
||||||
case 1201: //TODO: Needs to be the Lumbridge Guide Icon... Not sure of the ID or interface.
|
|
||||||
interpreter.sendItemMessage(RUNES[1], "When you get to Lumbridge, look for this icon on you","mini-map. The Lumbridge Guide or one of the other","tutors should be near there. The Lumbridge","Guide should be standing slightly to the north-east of");
|
|
||||||
stage++;
|
|
||||||
break;
|
|
||||||
case 1202: //TODO: Needs to be the Lumbridge Guide Icon... Not sure of the ID or interface.
|
|
||||||
interpreter.sendItemMessage(RUNES[1], "the castle's courtyard and the others you will find","scattered around Lumbridge.");
|
|
||||||
stage++;
|
|
||||||
break;
|
|
||||||
case 1203:
|
|
||||||
interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "If all else fails, visit the "+ GameWorld.getSettings().getName()+ " website for a whole","chestload of information on quests, skills, and minigames","as well as a very good starter's guide.");
|
|
||||||
stage++;
|
|
||||||
break;
|
|
||||||
|
|
||||||
//Final words, if using Skippy it should go straight to this
|
|
||||||
//Could be removed to try and keep the 'nostalgic' feeling of Tutorial Island.
|
|
||||||
case 1204:
|
|
||||||
npc("Keep in mind: our server has more content than any other", "server ever released. There's hundreds of hours of", "exciting and flawless gameplay awaiting you, "+player.getUsername()+".", "Enjoy your time playing "+GameWorld.getSettings().getName()+"!");
|
|
||||||
stage++;
|
|
||||||
break;
|
|
||||||
|
|
||||||
//End of Tutorial
|
|
||||||
case 1205:
|
|
||||||
stage = 7; //Next Stage force ends any conversations?
|
|
||||||
|
|
||||||
//Removing Tutorial Island properties on the account (?) and sending the Player to Lumbridge
|
|
||||||
player.removeAttribute("tut-island");
|
|
||||||
player.getConfigManager().set(1021, 0);
|
|
||||||
player.getProperties().setTeleportLocation(new Location(3233, 3230));
|
|
||||||
TutorialSession.getExtension(player).setStage(72);
|
|
||||||
player.getInterfaceManager().closeOverlay();
|
|
||||||
|
|
||||||
//Clears and Resets the Player's account and focuses the default interface to their Inventory
|
|
||||||
player.getInventory().clear();
|
|
||||||
player.getEquipment().clear();
|
|
||||||
player.getBank().clear();
|
|
||||||
player.getInterfaceManager().restoreTabs(); //This still hides the Attack (double swords) in the player menu until Player wields a weapon.
|
|
||||||
player.getInterfaceManager().setViewedTab(3);
|
|
||||||
player.getInventory().add(STARTER_PACK);
|
|
||||||
player.getBank().add(STARTER_BANK);
|
|
||||||
|
|
||||||
//This overwrites the stuck dialogue after teleporting to Lumbridge for some reason
|
|
||||||
//Dialogue from 2007 or thereabouts
|
|
||||||
//Original is five lines, but if the same is done here it will break. Need to find another way of showing all this information.
|
|
||||||
interpreter.sendDialogue("Welcome to Lumbridge! To get more help, simply click on the","Lumbridge Guide or one of the Tutors - these can be found by looking","for the question mark icon on your mini-map. If you find you are","lost at any time, look for a signpost or use the Lumbridge Home Port Spell.");
|
|
||||||
|
|
||||||
//Appending the welcome message and some other stuff
|
|
||||||
player.getPacketDispatch().sendMessage("Welcome to " + GameWorld.getSettings().getName() + ".");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
player.unlock();
|
|
||||||
TutorialSession.getExtension(player).setStage(TutorialSession.MAX_STAGE + 1);
|
|
||||||
if (player.getIronmanManager().isIronman() && player.getSettings().isAcceptAid()) {
|
|
||||||
player.getSettings().toggleAcceptAid();
|
|
||||||
}
|
|
||||||
if (WorldCommunicator.isEnabled()) {
|
|
||||||
MSPacketRepository.sendInfoUpdate(player);
|
|
||||||
}
|
|
||||||
int slot = player.getAttribute("tut-island:hi_slot", -1);
|
|
||||||
if (slot < 0 || slot >= HintIconManager.MAXIMUM_SIZE) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
player.removeAttribute("tut-island:hi_slot");
|
|
||||||
HintIconManager.removeHintIcon(player, slot);
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
end();
|
|
||||||
break;
|
|
||||||
case 99:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, TutorialSession.getExtension(player).getStage(), false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Magic Instructor Dialogue during the Tutorial, Repeated from above?
|
|
||||||
switch (TutorialSession.getExtension(player).getStage()) {
|
|
||||||
case 67:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
interpreter.sendDialogues(946, FacialExpression.NEUTRAL, "Good day, newcomer. My name is Terrova. I'm here", "to tell you about Magic. Let's start by opening your", "spell list.");
|
|
||||||
stage = 1;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 68, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 69:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
if (!player.getInventory().contains(556, 1) && !player.getInventory().contains(558, 1)) {
|
|
||||||
if (player.getInventory().freeSlots() > 2) {
|
|
||||||
interpreter.sendDoubleItemMessage(RUNES[0], RUNES[1], "Terrova gives you five <col=08088A>air runes</col> and five <col=08088A>mind runes</col>!");
|
|
||||||
player.getInventory().add(RUNES[0], RUNES[1]);
|
|
||||||
stage = 3;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 70, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 70, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 70:
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
end();
|
|
||||||
TutorialStage.load(player, 70, false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int[] getIds() {
|
|
||||||
return new int[] {/* skippy */2796, /* magic instructor */946 };
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,175 +0,0 @@
|
||||||
package core.game.content.quest.tutorials.tutorialisland;
|
|
||||||
|
|
||||||
import core.cache.def.impl.NPCDefinition;
|
|
||||||
import core.cache.def.impl.SceneryDefinition;
|
|
||||||
import core.game.content.global.action.ClimbActionHandler;
|
|
||||||
import core.game.content.global.action.DoorActionHandler;
|
|
||||||
import core.game.interaction.OptionHandler;
|
|
||||||
import core.game.node.Node;
|
|
||||||
import core.game.node.entity.Entity;
|
|
||||||
import core.game.node.entity.npc.NPC;
|
|
||||||
import core.game.node.entity.player.Player;
|
|
||||||
import core.game.node.scenery.Scenery;
|
|
||||||
import core.game.world.map.Location;
|
|
||||||
import core.game.world.update.flag.context.Animation;
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
import core.plugin.Plugin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the node options in tutorial island.
|
|
||||||
* @author Vexia
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public class TutorialIslandPlugin extends OptionHandler {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
|
||||||
SceneryDefinition.forId(3015).getHandlers().put("option:open", this);
|
|
||||||
SceneryDefinition.forId(3016).getHandlers().put("option:open", this);
|
|
||||||
NPCDefinition.forId(2796).getHandlers().put("option:skip-tutorial", this);
|
|
||||||
SceneryDefinition.forId(3014).getHandlers().put("option:open", this);
|
|
||||||
SceneryDefinition.forId(3017).getHandlers().put("option:open", this);
|
|
||||||
SceneryDefinition.forId(3018).getHandlers().put("option:open", this);
|
|
||||||
SceneryDefinition.forId(3019).getHandlers().put("option:open", this);
|
|
||||||
SceneryDefinition.forId(3020).getHandlers().put("option:open", this);
|
|
||||||
SceneryDefinition.forId(3021).getHandlers().put("option:open", this);
|
|
||||||
SceneryDefinition.forId(3022).getHandlers().put("option:open", this);
|
|
||||||
SceneryDefinition.forId(3023).getHandlers().put("option:open", this);
|
|
||||||
SceneryDefinition.forId(3024).getHandlers().put("option:open", this);
|
|
||||||
SceneryDefinition.forId(3025).getHandlers().put("option:open", this);
|
|
||||||
SceneryDefinition.forId(3026).getHandlers().put("option:open", this);
|
|
||||||
SceneryDefinition.forId(3029).getHandlers().put("option:climb-down", this);
|
|
||||||
SceneryDefinition.forId(3030).getHandlers().put("option:climb-up", this);
|
|
||||||
SceneryDefinition.forId(3031).getHandlers().put("option:climb-down", this);
|
|
||||||
SceneryDefinition.forId(1740).getHandlers().put("option:climb-down", this);
|
|
||||||
SceneryDefinition.forId(3028).getHandlers().put("option:climb-up", this);
|
|
||||||
// PluginManager.definePlugin(new BrotherBraceDialogue(), new CombatInstructorDialogue(), new TutorialBook(), new FinancialAdvisorDialogue(), new MasterChefDialogue(), new MiningInstructorDialogue(), new QuestGuideDialogue(), new RSGuideDialogue(), new SurvivalExpertDialogue(), new TutorialCompletionDialogue());
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(Player player, Node node, String option) {
|
|
||||||
if (node instanceof NPC) {
|
|
||||||
if (option.equals("skip-tutorial")) {
|
|
||||||
player.getDialogueInterpreter().open(((NPC) node).getId(), ((NPC) node));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else if (node instanceof Scenery) {
|
|
||||||
if (TutorialSession.getExtension(player).getStage() == 16) {
|
|
||||||
int first = node.getId();
|
|
||||||
int second = first == 3015 ? 3016 : 3015;
|
|
||||||
if (DoorActionHandler.autowalkFence(player, (Scenery) node, first, second)) {
|
|
||||||
TutorialStage.load(player, 17, false);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
final int tut_stage = TutorialSession.getExtension(player).getStage();
|
|
||||||
final Scenery object = (Scenery) node;
|
|
||||||
if (object.getId() == 3028) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (object.getId() == 3023 || object.getId() == 3022) {
|
|
||||||
if (tut_stage == 54) {
|
|
||||||
player.getDialogueInterpreter().sendDialogues(944, null, "No, don't enter the pit. Range the rats from outside", "the cage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (tut_stage > 54) {
|
|
||||||
player.getDialogueInterpreter().sendDialogues(944, null, "Oi! Get away from there. Only enter the rat cage", "when I say so.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (tut_stage >= 50) {
|
|
||||||
if (DoorActionHandler.handleAutowalkDoor(player, object) && tut_stage == 50) {
|
|
||||||
TutorialStage.load(player, 51, false);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (object.getId() == 3031) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (object.getId() == 1740) {
|
|
||||||
if (player.getLocation().equals(Location.create(3084, 3124, 1))) {
|
|
||||||
ClimbActionHandler.climb(player, new Animation(827), Location.create(3084, 3124, 0));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
ClimbActionHandler.climbLadder(player, object, option);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
switch (tut_stage) {
|
|
||||||
case 3:
|
|
||||||
if (DoorActionHandler.handleAutowalkDoor(player, object)) {
|
|
||||||
TutorialStage.load(player, 4, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 17:
|
|
||||||
if (DoorActionHandler.handleAutowalkDoor(player, object)) {
|
|
||||||
TutorialStage.load(player, 18, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 22:
|
|
||||||
if (object.getId() == 3018 && DoorActionHandler.handleAutowalkDoor(player, object)) {
|
|
||||||
TutorialStage.load(player, 23, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 26:
|
|
||||||
if (DoorActionHandler.handleAutowalkDoor(player, object)) {
|
|
||||||
TutorialStage.load(player, 27, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 29:
|
|
||||||
if (object.getId() != 3019) {
|
|
||||||
ClimbActionHandler.climbLadder(player, object, option);
|
|
||||||
TutorialStage.load(player, 30, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 43:
|
|
||||||
if (object.getId() == 3021 || object.getId() == 3020) {
|
|
||||||
if (DoorActionHandler.handleAutowalkDoor(player, object)) {
|
|
||||||
TutorialStage.load(player, 44, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 55:
|
|
||||||
if (object.getId() == 3030) {
|
|
||||||
ClimbActionHandler.climbLadder(player, object, option);
|
|
||||||
TutorialStage.load(player, 56, false);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 57:
|
|
||||||
if (object.getId() == 3024) {
|
|
||||||
if (DoorActionHandler.handleAutowalkDoor(player, object)) {
|
|
||||||
TutorialStage.load(player, 58, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 59:
|
|
||||||
if (object.getId() == 3025) {
|
|
||||||
if (DoorActionHandler.handleAutowalkDoor(player, object)) {
|
|
||||||
TutorialStage.load(player, 60, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 66:
|
|
||||||
if (object.getId() == 3026) {
|
|
||||||
if (DoorActionHandler.handleAutowalkDoor(player, object)) {
|
|
||||||
TutorialStage.load(player, 67, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Location getDestination(Node node, Node n) {
|
|
||||||
if (n instanceof Scenery) {
|
|
||||||
Scenery object = (Scenery) n;
|
|
||||||
if (object.getDefinition().hasAction("open")) {
|
|
||||||
return DoorActionHandler.getDestination((Entity) node, object);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,191 +0,0 @@
|
||||||
package core.game.content.quest.tutorials.tutorialisland;
|
|
||||||
|
|
||||||
import core.game.node.entity.player.Player;
|
|
||||||
import core.game.system.task.Pulse;
|
|
||||||
import rs09.game.world.GameWorld;
|
|
||||||
import core.net.packet.PacketRepository;
|
|
||||||
import core.net.packet.context.InterfaceConfigContext;
|
|
||||||
import core.net.packet.out.InterfaceConfig;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the session used during tutorial.
|
|
||||||
* @author 'Vexia
|
|
||||||
*/
|
|
||||||
public final class TutorialSession {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The maximum stage, the tutorial can go to.
|
|
||||||
*/
|
|
||||||
public final static int MAX_STAGE = 72;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the player instance.
|
|
||||||
*/
|
|
||||||
private Player player;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the delay pulse.
|
|
||||||
*/
|
|
||||||
private DelayPulse delayPulse;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code TutorialSession} {@code Object}.
|
|
||||||
* @param player the player.
|
|
||||||
*/
|
|
||||||
public TutorialSession(Player player) {
|
|
||||||
this.player = player;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method used to extend this class.
|
|
||||||
* @param player the player.
|
|
||||||
*/
|
|
||||||
public static void extend(Player player) {
|
|
||||||
player.addExtension(TutorialSession.class, new TutorialSession(player));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method used to init this session.
|
|
||||||
*/
|
|
||||||
public void init() {
|
|
||||||
if (getStage() >= MAX_STAGE) {
|
|
||||||
player.removeAttribute("tut-island");
|
|
||||||
setStage(MAX_STAGE + 1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/*if (getStage() < 26) {
|
|
||||||
player.getSettings().setRunToggled(true);
|
|
||||||
}*/
|
|
||||||
delayPulse = new DelayPulse();
|
|
||||||
//player.setAttribute("tut-island", true);
|
|
||||||
//player.getInterfaceManager().openOverlay(new Component(371));
|
|
||||||
//GameWorld.getPulser().submit(delayPulse);
|
|
||||||
//PacketRepository.send(InterfaceConfig.class, new InterfaceConfigContext(player, 371, 25, true));
|
|
||||||
TutorialStage.load(player, getStage(), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If the player has finished tutorial island.
|
|
||||||
* @return {@code True} if so.
|
|
||||||
*/
|
|
||||||
public boolean finished() {
|
|
||||||
return getStage() >= MAX_STAGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method used to return the instance of the tutorial session.
|
|
||||||
* @param player the player.
|
|
||||||
* @return the session.
|
|
||||||
*/
|
|
||||||
public static TutorialSession getExtension(Player player) {
|
|
||||||
if (player.getExtension(TutorialSession.class) == null) {
|
|
||||||
extend(player);
|
|
||||||
}
|
|
||||||
return player.getExtension(TutorialSession.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method used to return the stage of the tutorial, the stage is saved in
|
|
||||||
* the {@link Player#getGameAttributes()} since it's a single piece of data
|
|
||||||
* to save, the stage should never be reset after the tutorial is finished.
|
|
||||||
* @return the value of the stage.
|
|
||||||
*/
|
|
||||||
public int getStage() {
|
|
||||||
if (player.isArtificial()) {
|
|
||||||
return MAX_STAGE + 1;
|
|
||||||
}
|
|
||||||
return player.getSavedData().getGlobalData().getTutorialStage();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the delay pulse.
|
|
||||||
* @return the delay pulse.
|
|
||||||
*/
|
|
||||||
public DelayPulse getDelayPulse() {
|
|
||||||
return delayPulse == null ? new DelayPulse() : delayPulse;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method used to set the stage of the tutorial.
|
|
||||||
*/
|
|
||||||
public void setStage(int stage) {
|
|
||||||
getDelayPulse().reset();
|
|
||||||
getDelayPulse().hide();
|
|
||||||
player.getSavedData().getGlobalData().setTutorialStage(stage);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the player.
|
|
||||||
* @return the player.
|
|
||||||
*/
|
|
||||||
public Player getPlayer() {
|
|
||||||
return player;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the player.
|
|
||||||
* @param player the player to set.
|
|
||||||
*/
|
|
||||||
public void setPlayer(Player player) {
|
|
||||||
this.player = player;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the maximum stage.
|
|
||||||
* @return the max stage.
|
|
||||||
*/
|
|
||||||
public int getMaxStage() {
|
|
||||||
return MAX_STAGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the pulse used to inform a player to go to the next stage.
|
|
||||||
* @author 'Vexia
|
|
||||||
* @version 1.0
|
|
||||||
*/
|
|
||||||
public final class DelayPulse extends Pulse {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the delay.
|
|
||||||
*/
|
|
||||||
private int delay;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code DelayPulse} {@code Object}.
|
|
||||||
*/
|
|
||||||
public DelayPulse() {
|
|
||||||
super(1, player);
|
|
||||||
reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean pulse() {
|
|
||||||
if (delay < GameWorld.getTicks()) {
|
|
||||||
show();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method used to reset the delay.
|
|
||||||
*/
|
|
||||||
public void reset() {
|
|
||||||
delay = GameWorld.getTicks() + 20000;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method used to hide the arrow.
|
|
||||||
*/
|
|
||||||
public void hide() {
|
|
||||||
PacketRepository.send(InterfaceConfig.class, new InterfaceConfigContext(player, 371, 24, true));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method used to show the arrow.
|
|
||||||
*/
|
|
||||||
public void show() {
|
|
||||||
reset();
|
|
||||||
PacketRepository.send(InterfaceConfig.class, new InterfaceConfigContext(player, 371, 24, false));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -4,7 +4,6 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import core.cache.def.impl.ItemDefinition;
|
import core.cache.def.impl.ItemDefinition;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.ImpactHandler.HitsplatType;
|
import core.game.node.entity.combat.ImpactHandler.HitsplatType;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
|
@ -178,7 +177,7 @@ public final class DesertZone extends MapZone implements Plugin<Object> {
|
||||||
public boolean enter(Entity e) {
|
public boolean enter(Entity e) {
|
||||||
if (e instanceof Player) {
|
if (e instanceof Player) {
|
||||||
Player p = (Player) e;
|
Player p = (Player) e;
|
||||||
if (TutorialSession.getExtension(p).getStage() < TutorialSession.MAX_STAGE) {
|
if (p.getAttribute("tutorial:stage", 0) > 71) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
p.setAttribute("desert-delay", GameWorld.getTicks() + getDelay(p));
|
p.setAttribute("desert-delay", GameWorld.getTicks() + getDelay(p));
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@ import core.game.content.dialogue.DialogueAction;
|
||||||
import core.game.content.dialogue.DialoguePlugin;
|
import core.game.content.dialogue.DialoguePlugin;
|
||||||
import core.game.content.dialogue.FacialExpression;
|
import core.game.content.dialogue.FacialExpression;
|
||||||
import core.game.content.global.action.DoorActionHandler;
|
import core.game.content.global.action.DoorActionHandler;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.skill.SkillPulse;
|
import core.game.node.entity.skill.SkillPulse;
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
import core.game.node.entity.skill.gather.SkillingResource;
|
import core.game.node.entity.skill.gather.SkillingResource;
|
||||||
|
|
@ -190,9 +188,6 @@ public class WildernessAreaZone extends MapZone implements Plugin<Object> {
|
||||||
if (resource == null) {
|
if (resource == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (TutorialSession.getExtension(player).getStage() == 35) {
|
|
||||||
TutorialStage.load(player, 36, false);
|
|
||||||
}
|
|
||||||
super.start();
|
super.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package core.game.interaction;
|
package core.game.interaction;
|
||||||
|
|
||||||
|
import api.events.UsedWithEvent;
|
||||||
import core.cache.def.impl.SceneryDefinition;
|
import core.cache.def.impl.SceneryDefinition;
|
||||||
import core.game.node.Node;
|
import core.game.node.Node;
|
||||||
import core.game.node.entity.npc.NPC;
|
import core.game.node.entity.npc.NPC;
|
||||||
|
|
@ -143,6 +144,7 @@ public abstract class UseWithHandler implements Plugin<Object> {
|
||||||
event.getPlayer().getPulseManager().run(new Pulse(1, event.getPlayer(), event.getUsed(), event.getUsedWith()) {
|
event.getPlayer().getPulseManager().run(new Pulse(1, event.getPlayer(), event.getUsed(), event.getUsedWith()) {
|
||||||
@Override
|
@Override
|
||||||
public boolean pulse() {
|
public boolean pulse() {
|
||||||
|
event.getPlayer().dispatch(new UsedWithEvent(event.getUsed().getId(), event.getUsedWith().getId()));
|
||||||
boolean handled = false;
|
boolean handled = false;
|
||||||
if (event.getPlayer() != null) {
|
if (event.getPlayer() != null) {
|
||||||
event.getPlayer().getInterfaceManager().close();
|
event.getPlayer().getInterfaceManager().close();
|
||||||
|
|
@ -168,6 +170,7 @@ public abstract class UseWithHandler implements Plugin<Object> {
|
||||||
event.getPlayer().getPulseManager().run(new MovementPulse(event.getPlayer(), event.getUsedWith(), handler.get(0)) {
|
event.getPlayer().getPulseManager().run(new MovementPulse(event.getPlayer(), event.getUsedWith(), handler.get(0)) {
|
||||||
@Override
|
@Override
|
||||||
public boolean pulse() {
|
public boolean pulse() {
|
||||||
|
event.getPlayer().dispatch(new UsedWithEvent(event.getUsed().getId(), event.getUsedWith().getId()));
|
||||||
event.getPlayer().faceLocation(FaceLocationFlag.getFaceLocation(event.getPlayer(), event.getUsedWith()));
|
event.getPlayer().faceLocation(FaceLocationFlag.getFaceLocation(event.getPlayer(), event.getUsedWith()));
|
||||||
boolean handled = false;
|
boolean handled = false;
|
||||||
Item used = (Item) event.getUsed();
|
Item used = (Item) event.getUsed();
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,11 @@ import core.game.component.Component;
|
||||||
import core.game.component.ComponentDefinition;
|
import core.game.component.ComponentDefinition;
|
||||||
import core.game.component.ComponentPlugin;
|
import core.game.component.ComponentPlugin;
|
||||||
import core.plugin.Initializable;
|
import core.plugin.Initializable;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.combat.equipment.WeaponInterface;
|
import core.game.node.entity.combat.equipment.WeaponInterface;
|
||||||
import core.game.node.entity.combat.equipment.WeaponInterface.WeaponInterfaces;
|
import core.game.node.entity.combat.equipment.WeaponInterface.WeaponInterfaces;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.player.info.Rights;
|
import core.game.node.entity.player.info.Rights;
|
||||||
import rs09.game.world.GameWorld;
|
import rs09.game.world.GameWorld;
|
||||||
import core.game.world.map.RegionManager;
|
|
||||||
import core.plugin.Plugin;
|
import core.plugin.Plugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -52,65 +49,33 @@ public final class GameInterface extends ComponentPlugin {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case 548:
|
case 548:
|
||||||
int tut_stage = TutorialSession.getExtension(player).getStage();
|
|
||||||
if (button >= 38 && button<= 44 || button >= 20 && button <= 26) {
|
if (button >= 38 && button<= 44 || button >= 20 && button <= 26) {
|
||||||
player.getInterfaceManager().setCurrentTabIndex(getTabIndex(button));
|
player.getInterfaceManager().setCurrentTabIndex(getTabIndex(button));
|
||||||
}
|
}
|
||||||
//Interface buttons that advance the Tutorial Island stages
|
//Interface buttons that advance the Tutorial Island stages
|
||||||
switch (button) {
|
switch (button) {
|
||||||
case 21://Friends Tab
|
case 21://Friends Tab
|
||||||
if (tut_stage == 63) {
|
|
||||||
player.getConfigManager().set(1021, 0);
|
|
||||||
TutorialStage.load(player, 64, false);
|
|
||||||
}
|
|
||||||
player.getPacketDispatch().sendString("Friends List -" + GameWorld.getSettings().getName() + " " + GameWorld.getSettings().getWorldId(), 550, 3);
|
player.getPacketDispatch().sendString("Friends List -" + GameWorld.getSettings().getName() + " " + GameWorld.getSettings().getWorldId(), 550, 3);
|
||||||
break;
|
break;
|
||||||
case 22://Ignore Tab
|
case 22://Ignore Tab
|
||||||
if (tut_stage == 64) {
|
|
||||||
player.getConfigManager().set(1021, 0);
|
|
||||||
TutorialStage.load(player, 65, false);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 24://Settings Tab
|
case 24://Settings Tab
|
||||||
if (tut_stage == 1) {
|
|
||||||
TutorialStage.load(player, 2, false);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 25://Emotes Tab
|
case 25://Emotes Tab
|
||||||
if (tut_stage == 23) {
|
|
||||||
TutorialStage.load(player, 24, false);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 26://Music Tab
|
case 26://Music Tab
|
||||||
if (tut_stage == 21) {
|
|
||||||
TutorialStage.load(player, 22, false);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 38://Attack Tab
|
case 38://Attack Tab
|
||||||
if (tut_stage == 49) {
|
|
||||||
player.getConfigManager().set(1021, 0);
|
|
||||||
TutorialStage.load(player, 50, false);
|
|
||||||
} else {
|
|
||||||
if (TutorialSession.getExtension(player).getStage() > TutorialSession.MAX_STAGE) {
|
|
||||||
if (player.getExtension(WeaponInterface.class) == WeaponInterfaces.STAFF) {
|
if (player.getExtension(WeaponInterface.class) == WeaponInterfaces.STAFF) {
|
||||||
final Component c = new Component(WeaponInterfaces.STAFF.getInterfaceId());
|
final Component c = new Component(WeaponInterfaces.STAFF.getInterfaceId());
|
||||||
player.getInterfaceManager().openTab(0, c);
|
player.getInterfaceManager().openTab(0, c);
|
||||||
final WeaponInterface inter = player.getExtension(WeaponInterface.class);
|
final WeaponInterface inter = player.getExtension(WeaponInterface.class);
|
||||||
inter.updateInterface();
|
inter.updateInterface();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 39://Skill Tab
|
case 39://Skill Tab
|
||||||
if (tut_stage == 10) {
|
|
||||||
player.getConfigManager().set(1021, 0);
|
|
||||||
TutorialStage.load(player, 11, false);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 40://Quest Tab
|
case 40://Quest Tab
|
||||||
if (tut_stage == 27) {
|
|
||||||
TutorialStage.load(player, 28, false);
|
|
||||||
}
|
|
||||||
/*if (GameWorld.isEconomyWorld()) {
|
/*if (GameWorld.isEconomyWorld()) {
|
||||||
player.getQuestRepository().syncronizeTab(player);
|
player.getQuestRepository().syncronizeTab(player);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -120,30 +85,13 @@ public final class GameInterface extends ComponentPlugin {
|
||||||
player.getQuestRepository().syncronizeTab(player);
|
player.getQuestRepository().syncronizeTab(player);
|
||||||
break;
|
break;
|
||||||
case 41://Inventory Tab
|
case 41://Inventory Tab
|
||||||
if (tut_stage == 5) {
|
|
||||||
player.getConfigManager().set(1021, 0);
|
|
||||||
TutorialStage.load(player, 6, false);
|
|
||||||
}
|
|
||||||
player.getInventory().refresh();
|
player.getInventory().refresh();
|
||||||
break;
|
break;
|
||||||
case 42://Worn Equipment Tab
|
case 42://Worn Equipment Tab
|
||||||
if (tut_stage == 45) {
|
|
||||||
player.getConfigManager().set(1021, 0);
|
|
||||||
TutorialStage.load(player, 46, false);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 43://Prayer Tab
|
case 43://Prayer Tab
|
||||||
if (tut_stage == 61) {
|
|
||||||
player.getConfigManager().set(1021, 0);
|
|
||||||
TutorialStage.load(player, 62, false);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 44://Magic Tab
|
case 44://Magic Tab
|
||||||
if (tut_stage == 68) {
|
|
||||||
player.getConfigManager().set(1021, 0);
|
|
||||||
TutorialStage.load(player, 69, false);
|
|
||||||
player.getDialogueInterpreter().open(946, RegionManager.getNpc(player, 946));
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 66://World map
|
case 66://World map
|
||||||
case 110:
|
case 110:
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ package core.game.interaction.inter;
|
||||||
import core.game.component.Component;
|
import core.game.component.Component;
|
||||||
import core.game.component.ComponentDefinition;
|
import core.game.component.ComponentDefinition;
|
||||||
import core.game.component.ComponentPlugin;
|
import core.game.component.ComponentPlugin;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.player.link.diary.AchievementDiary;
|
import core.game.node.entity.player.link.diary.AchievementDiary;
|
||||||
import core.game.node.entity.player.link.diary.DiaryType;
|
import core.game.node.entity.player.link.diary.DiaryType;
|
||||||
|
|
@ -28,9 +27,6 @@ public class QuestTabInterface extends ComponentPlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(Player p, Component component, int opcode, int button, int slot, int itemId) {
|
public boolean handle(Player p, Component component, int opcode, int button, int slot, int itemId) {
|
||||||
if (TutorialSession.getExtension(p).getStage() < TutorialSession.MAX_STAGE) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
p.getPulseManager().clear();
|
p.getPulseManager().clear();
|
||||||
switch (component.getId()) {
|
switch (component.getId()) {
|
||||||
case 274:
|
case 274:
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,8 @@ import core.game.component.Component;
|
||||||
import core.game.component.ComponentDefinition;
|
import core.game.component.ComponentDefinition;
|
||||||
import core.game.component.ComponentPlugin;
|
import core.game.component.ComponentPlugin;
|
||||||
import core.plugin.Initializable;
|
import core.plugin.Initializable;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.plugin.Plugin;
|
import core.plugin.Plugin;
|
||||||
import org.rs09.consts.Items;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 'Vexia
|
* @author 'Vexia
|
||||||
|
|
@ -77,15 +74,9 @@ public class SettingTabInterface extends ComponentPlugin {
|
||||||
p.getSettings().toggleAcceptAid();
|
p.getSettings().toggleAcceptAid();
|
||||||
break;
|
break;
|
||||||
case 3:// run
|
case 3:// run
|
||||||
if (TutorialSession.getExtension(p).getStage() == 25) {
|
|
||||||
TutorialStage.load(p, 26, false);
|
|
||||||
}
|
|
||||||
p.getSettings().toggleRun();
|
p.getSettings().toggleRun();
|
||||||
break;
|
break;
|
||||||
case 8:// house
|
case 8:// house
|
||||||
if (!TutorialSession.getExtension(p).finished()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
p.getInterfaceManager().close();
|
p.getInterfaceManager().close();
|
||||||
p.getConfigManager().set(261, p.getConfigManager().get(261) & 0x1);
|
p.getConfigManager().set(261, p.getConfigManager().get(261) & 0x1);
|
||||||
p.getInterfaceManager().openSingleTab(new Component(398));
|
p.getInterfaceManager().openSingleTab(new Component(398));
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ public final class LampPlugin extends OptionHandler {
|
||||||
player.unlock();
|
player.unlock();
|
||||||
return true;
|
return true;
|
||||||
}));
|
}));
|
||||||
player.getInterfaceManager().hideTabs(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13);
|
player.getInterfaceManager().removeTabs(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ public class MorphItemPlugin implements Plugin<Object> {
|
||||||
int morphId = item.getId() == 6583 ? 2626 : EASTER_EGG_IDS[RandomFunction.random(EASTER_EGG_IDS.length)];
|
int morphId = item.getId() == 6583 ? 2626 : EASTER_EGG_IDS[RandomFunction.random(EASTER_EGG_IDS.length)];
|
||||||
player.getInterfaceManager().close();
|
player.getInterfaceManager().close();
|
||||||
player.getAppearance().transformNPC(morphId);
|
player.getAppearance().transformNPC(morphId);
|
||||||
player.getInterfaceManager().hideTabs(0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
|
player.getInterfaceManager().removeTabs(0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
|
||||||
player.getLocks().lockMovement(GameWorld.getTicks() + 900000000);
|
player.getLocks().lockMovement(GameWorld.getTicks() + 900000000);
|
||||||
player.getLocks().lockInteractions(GameWorld.getTicks() + 90000000);
|
player.getLocks().lockInteractions(GameWorld.getTicks() + 90000000);
|
||||||
player.getLocks().lockTeleport(GameWorld.getTicks() + 900000000);
|
player.getLocks().lockTeleport(GameWorld.getTicks() + 900000000);
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ public final class SmithingPlugin extends UseWithHandler {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (player.getSkills().getLevel(Skills.SMITHING) < bar.getLevel()) {
|
if (player.getSkills().getLevel(Skills.SMITHING) < bar.getLevel()) {
|
||||||
player.getDialogueInterpreter().sendDialogue("You need a smithing level of at leat " + bar.getLevel() + " to work " + bar.getProduct().getName().toLowerCase() + "s.");
|
player.getDialogueInterpreter().sendDialogue("You need a smithing level of at least " + bar.getLevel() + " to work " + bar.getProduct().getName().toLowerCase() + "s.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
final SmithingBuilder builder = new SmithingBuilder(item);
|
final SmithingBuilder builder = new SmithingBuilder(item);
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
package core.game.interaction.item.withobject;
|
package core.game.interaction.item.withobject;
|
||||||
|
|
||||||
|
import api.events.ResourceGatheredEvent;
|
||||||
import core.plugin.Initializable;
|
import core.plugin.Initializable;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
import core.game.node.entity.skill.smithing.smelting.Bar;
|
import core.game.node.entity.skill.smithing.smelting.Bar;
|
||||||
import core.game.interaction.NodeUsageEvent;
|
import core.game.interaction.NodeUsageEvent;
|
||||||
|
|
@ -18,8 +17,8 @@ import core.plugin.Plugin;
|
||||||
* @author 'Vexia
|
* @author 'Vexia
|
||||||
*/
|
*/
|
||||||
@Initializable
|
@Initializable
|
||||||
public class TutorialItemHandler extends UseWithHandler {
|
public class TutorialFurnaceHandler extends UseWithHandler {
|
||||||
public TutorialItemHandler() {
|
public TutorialFurnaceHandler() {
|
||||||
super(438, 436);
|
super(438, 436);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -41,9 +40,7 @@ public class TutorialItemHandler extends UseWithHandler {
|
||||||
player.getInventory().remove(new Item(436, 1));
|
player.getInventory().remove(new Item(436, 1));
|
||||||
player.getInventory().add(Bar.BRONZE.getProduct());
|
player.getInventory().add(Bar.BRONZE.getProduct());
|
||||||
player.getSkills().addExperience(Skills.SMITHING, Bar.BRONZE.getExperience());
|
player.getSkills().addExperience(Skills.SMITHING, Bar.BRONZE.getExperience());
|
||||||
if (TutorialSession.getExtension(player).getStage() == 39) {
|
player.dispatch(new ResourceGatheredEvent(Bar.BRONZE.getProduct().getId(), 1, player));
|
||||||
TutorialStage.load(player, 40, false);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2,7 +2,7 @@ package core.game.interaction.object;
|
||||||
|
|
||||||
import static api.ContentAPIKt.*;
|
import static api.ContentAPIKt.*;
|
||||||
|
|
||||||
import api.Container;
|
import api.events.InteractionEvent;
|
||||||
import core.cache.def.impl.NPCDefinition;
|
import core.cache.def.impl.NPCDefinition;
|
||||||
import core.cache.def.impl.SceneryDefinition;
|
import core.cache.def.impl.SceneryDefinition;
|
||||||
import core.game.component.CloseEvent;
|
import core.game.component.CloseEvent;
|
||||||
|
|
@ -13,8 +13,6 @@ import core.game.container.access.InterfaceContainer;
|
||||||
import core.game.content.dialogue.DialogueAction;
|
import core.game.content.dialogue.DialogueAction;
|
||||||
import core.game.content.dialogue.DialoguePlugin;
|
import core.game.content.dialogue.DialoguePlugin;
|
||||||
import core.game.content.dialogue.FacialExpression;
|
import core.game.content.dialogue.FacialExpression;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.interaction.OptionHandler;
|
import core.game.interaction.OptionHandler;
|
||||||
import core.game.node.Node;
|
import core.game.node.Node;
|
||||||
import core.game.node.entity.npc.AbstractNPC;
|
import core.game.node.entity.npc.AbstractNPC;
|
||||||
|
|
@ -70,6 +68,8 @@ public final class BankingPlugin extends OptionHandler {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (object.getName().contains("Bank") || object.getName().contains("Deposit")) {
|
if (object.getName().contains("Bank") || object.getName().contains("Deposit")) {
|
||||||
|
//TODO: REPLACE THIS ALL WITH A LISTENER. I DONT FEEL LIKE IT RIGHT NOW.
|
||||||
|
player.dispatch(new InteractionEvent(object, option));
|
||||||
switch (option) {
|
switch (option) {
|
||||||
case "use":
|
case "use":
|
||||||
// final Location l = object.getLocation();
|
// final Location l = object.getLocation();
|
||||||
|
|
@ -116,7 +116,7 @@ public final class BankingPlugin extends OptionHandler {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//player.getInterfaceManager().closeDefaultTabs();
|
//player.getInterfaceManager().closeDefaultTabs();
|
||||||
player.getInterfaceManager().hideTabs(0, 1, 2, 3, 4, 5, 6);
|
player.getInterfaceManager().removeTabs(0, 1, 2, 3, 4, 5, 6);
|
||||||
InterfaceContainer.generateItems(player, player.getInventory().toArray(), new String[]{"Examine", "Deposit-X", "Deposit-All", "Deposit-10", "Deposit-5", "Deposit-1",}, 11, 15, 5, 7);
|
InterfaceContainer.generateItems(player, player.getInventory().toArray(), new String[]{"Examine", "Deposit-X", "Deposit-All", "Deposit-10", "Deposit-5", "Deposit-1",}, 11, 15, 5, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -168,11 +168,6 @@ public final class BankingPlugin extends OptionHandler {
|
||||||
} else {
|
} else {
|
||||||
setId((int) args[0]);
|
setId((int) args[0]);
|
||||||
}
|
}
|
||||||
if (TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE) {
|
|
||||||
Component.setUnclosable(player, interpreter.sendDialogues(id, FacialExpression.HALF_GUILTY, "Good day, would you like to access your bank account?"));
|
|
||||||
stage = 999;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
interpreter.sendDialogues(id, FacialExpression.HALF_GUILTY, "Good day, How may I help you?");
|
interpreter.sendDialogues(id, FacialExpression.HALF_GUILTY, "Good day, How may I help you?");
|
||||||
for (GrandExchangeRecords.OfferRecord r : player.getExchangeRecords().getOfferRecords()) {
|
for (GrandExchangeRecords.OfferRecord r : player.getExchangeRecords().getOfferRecords()) {
|
||||||
GrandExchangeOffer o = player.getExchangeRecords().getOffer(r);
|
GrandExchangeOffer o = player.getExchangeRecords().getOffer(r);
|
||||||
|
|
@ -305,17 +300,9 @@ public final class BankingPlugin extends OptionHandler {
|
||||||
switch (buttonId) {
|
switch (buttonId) {
|
||||||
case 1:
|
case 1:
|
||||||
end();
|
end();
|
||||||
if (TutorialSession.getExtension(player).getStage() == 56) {
|
|
||||||
player.getBank().add(new Item(995, 25));
|
|
||||||
}
|
|
||||||
player.getBank().open();
|
|
||||||
if (TutorialSession.getExtension(player).getStage() == 56) {
|
|
||||||
TutorialStage.load(player, 57, false);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
end();
|
end();
|
||||||
TutorialStage.load(player, TutorialSession.getExtension(player).getStage(), false);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ public final class DoorManagingPlugin extends OptionHandler {
|
||||||
SceneryDefinition.setOptionHandler("open", this);
|
SceneryDefinition.setOptionHandler("open", this);
|
||||||
SceneryDefinition.setOptionHandler("close", this);
|
SceneryDefinition.setOptionHandler("close", this);
|
||||||
SceneryDefinition.setOptionHandler("shut", this);
|
SceneryDefinition.setOptionHandler("shut", this);
|
||||||
|
SceneryDefinition.setOptionHandler("go-through", this);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -38,6 +39,7 @@ public final class DoorManagingPlugin extends OptionHandler {
|
||||||
if (name.contains("drawers") || name.contains("wardrobe") || name.contains("cupboard")) {
|
if (name.contains("drawers") || name.contains("wardrobe") || name.contains("cupboard")) {
|
||||||
switch(option) {
|
switch(option) {
|
||||||
case "open":
|
case "open":
|
||||||
|
case "go-through":
|
||||||
if (object.isActive()) {
|
if (object.isActive()) {
|
||||||
SceneryBuilder.replace(object, object.transform(object.getId() + 1), 80);
|
SceneryBuilder.replace(object, object.transform(object.getId() + 1), 80);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,82 +0,0 @@
|
||||||
package core.game.interaction.object;
|
|
||||||
|
|
||||||
import core.cache.def.impl.ItemDefinition;
|
|
||||||
import core.cache.def.impl.SceneryDefinition;
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.skill.gather.SkillingResource;
|
|
||||||
import core.game.interaction.OptionHandler;
|
|
||||||
import core.game.node.Node;
|
|
||||||
import core.game.node.entity.player.Player;
|
|
||||||
import core.game.node.scenery.Scenery;
|
|
||||||
import core.game.system.task.Pulse;
|
|
||||||
import rs09.game.world.GameWorld;
|
|
||||||
import core.plugin.Plugin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the prospecting of an ore.
|
|
||||||
* @author 'Vexia
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public class ProspectOrePlugin extends OptionHandler {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(final Player player, Node node, String option) {
|
|
||||||
final Scenery object = (Scenery) node;
|
|
||||||
int tut_stage = TutorialSession.getExtension(player).getStage();
|
|
||||||
if (tut_stage == 31 && object.getId() == 3043) {
|
|
||||||
GameWorld.getPulser().submit(new Pulse(1) {
|
|
||||||
int count = 0;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean pulse() {
|
|
||||||
if (count == 1) {
|
|
||||||
TutorialStage.load(player, 32, false);
|
|
||||||
} else if (count >= 2) {
|
|
||||||
TutorialStage.load(player, 33, false);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
count++;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (tut_stage == 33 && object.getId() == 3042) {
|
|
||||||
GameWorld.getPulser().submit(new Pulse(1) {
|
|
||||||
int count = 0;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean pulse() {
|
|
||||||
if (count == 1) {
|
|
||||||
TutorialStage.load(player, 34, false);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
count++;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
final SkillingResource rock = SkillingResource.forId(object.getId());
|
|
||||||
if (rock == null) {
|
|
||||||
player.getPacketDispatch().sendMessage("There is no ore currently available in this rock.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
player.getPacketDispatch().sendMessage("You examine the rock for ores...");
|
|
||||||
player.getPulseManager().run(new Pulse(3, player, object) {
|
|
||||||
@Override
|
|
||||||
public boolean pulse() {
|
|
||||||
player.getPacketDispatch().sendMessage("This rock contains " + ItemDefinition.forId(rock.getReward()).getName().toLowerCase() + ".");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
|
||||||
SceneryDefinition.setOptionHandler("prospect", this);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -19,9 +19,6 @@ public final class AttackOptionPlugin extends OptionHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(Player player, Node node, String option) {
|
public boolean handle(Player player, Node node, String option) {
|
||||||
//Makes sure player uses correct attack styles for lumbridge dummies
|
|
||||||
if (node.getId() == 4474 && !(player.getSwingHandler(false).getType() == CombatStyle.MAGIC)){ player.sendMessage("You can only attack this with magic."); return true; }
|
|
||||||
if (node.getId() == 7891 && !(player.getSwingHandler(false).getType() == CombatStyle.MELEE)){ player.sendMessage("You must use the training sword to attack this."); return true; }
|
|
||||||
player.attack(node);
|
player.attack(node);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -34,7 +31,6 @@ public final class AttackOptionPlugin extends OptionHandler {
|
||||||
@Override
|
@Override
|
||||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||||
Option._P_ATTACK.setHandler(this);
|
Option._P_ATTACK.setHandler(this);
|
||||||
NPCDefinition.setOptionHandler("attack", this);
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@ import rs09.game.world.update.UpdateMasks;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.locks.Lock;
|
||||||
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An entity is a movable node, such as players and NPCs.
|
* An entity is a movable node, such as players and NPCs.
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@ package core.game.node.entity.combat;
|
||||||
|
|
||||||
import core.game.container.Container;
|
import core.game.container.Container;
|
||||||
import core.game.container.ContainerType;
|
import core.game.container.ContainerType;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.Node;
|
import core.game.node.Node;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.impl.Animator;
|
import core.game.node.entity.impl.Animator;
|
||||||
|
|
@ -69,14 +67,6 @@ public final class DeathTask extends NodeTask {
|
||||||
if (ticks < 1 || ticks > 30) {
|
if (ticks < 1 || ticks > 30) {
|
||||||
ticks = 6;
|
ticks = 6;
|
||||||
}
|
}
|
||||||
if (node instanceof Player) {
|
|
||||||
if (TutorialSession.getExtension(((Player) node)).getStage() == 52) {
|
|
||||||
TutorialStage.load(((Player) node), 53, false);
|
|
||||||
}
|
|
||||||
if (TutorialSession.getExtension(((Player) node)).getStage() == 54) {
|
|
||||||
TutorialStage.load(((Player) node), 55, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return e.getAttribute("tick:death", -1) <= GameWorld.getTicks() - ticks;
|
return e.getAttribute("tick:death", -1) <= GameWorld.getTicks() - ticks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ package core.game.node.entity.combat;
|
||||||
|
|
||||||
import rs09.ServerConstants;
|
import rs09.ServerConstants;
|
||||||
import core.game.container.impl.EquipmentContainer;
|
import core.game.container.impl.EquipmentContainer;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
import core.game.node.entity.skill.summoning.familiar.Familiar;
|
import core.game.node.entity.skill.summoning.familiar.Familiar;
|
||||||
import core.game.node.entity.skill.summoning.pet.Pet;
|
import core.game.node.entity.skill.summoning.pet.Pet;
|
||||||
|
|
@ -145,7 +144,7 @@ public final class ImpactHandler {
|
||||||
if (disabledTicks > GameWorld.getTicks()) {
|
if (disabledTicks > GameWorld.getTicks()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (entity instanceof Player && TutorialSession.getExtension((Player) entity).getStage() < TutorialSession.MAX_STAGE) {
|
if (entity instanceof Player && !(entity.getAttribute("tutorial:complete",false))) {
|
||||||
Impact impact = new Impact(source, 0, style, HitsplatType.MISS);
|
Impact impact = new Impact(source, 0, style, HitsplatType.MISS);
|
||||||
impactQueue.add(impact);
|
impactQueue.add(impact);
|
||||||
return impact;
|
return impact;
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ public class BorkNPC extends AbstractNPC {
|
||||||
player.lock();
|
player.lock();
|
||||||
cutscene.wizard.clear();
|
cutscene.wizard.clear();
|
||||||
cutscene.wizard.lock();
|
cutscene.wizard.lock();
|
||||||
player.getInterfaceManager().hideTabs(0, 1, 2, 3, 4, 5, 6, 11, 12);
|
player.getInterfaceManager().removeTabs(0, 1, 2, 3, 4, 5, 6, 11, 12);
|
||||||
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, 2));
|
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, 2));
|
||||||
player.getInterfaceManager().open(new Component(693));
|
player.getInterfaceManager().open(new Component(693));
|
||||||
if (player.getDialogueInterpreter().getDialogue() != null) {
|
if (player.getDialogueInterpreter().getDialogue() != null) {
|
||||||
|
|
@ -183,7 +183,7 @@ public class BorkNPC extends AbstractNPC {
|
||||||
* Spawns the legion.
|
* Spawns the legion.
|
||||||
*/
|
*/
|
||||||
private void spawnLegion() {
|
private void spawnLegion() {
|
||||||
player.getInterfaceManager().hideTabs(0, 1, 2, 3, 4, 5, 6, 11, 12);
|
player.getInterfaceManager().removeTabs(0, 1, 2, 3, 4, 5, 6, 11, 12);
|
||||||
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, 2));
|
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, 2));
|
||||||
spawnedLegion = true;
|
spawnedLegion = true;
|
||||||
player.lock();
|
player.lock();
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
package core.game.node.entity.npc.other;
|
package core.game.node.entity.npc.other;
|
||||||
|
|
||||||
import core.plugin.Initializable;
|
import core.plugin.Initializable;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.npc.AbstractNPC;
|
import core.game.node.entity.npc.AbstractNPC;
|
||||||
|
|
@ -66,12 +64,6 @@ public class RatTutorialNPC extends AbstractNPC {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Player p = ((Player) killer);
|
final Player p = ((Player) killer);
|
||||||
if (TutorialSession.getExtension(p).getStage() == 52) {
|
|
||||||
TutorialStage.load(p, 53, false);
|
|
||||||
}
|
|
||||||
if (TutorialSession.getExtension(p).getStage() == 54) {
|
|
||||||
TutorialStage.load(p, 55, false);
|
|
||||||
}
|
|
||||||
if (killer instanceof Player) {
|
if (killer instanceof Player) {
|
||||||
if (p.getQuestRepository().getQuest("Witch's Potion").isStarted(p)) {
|
if (p.getQuestRepository().getQuest("Witch's Potion").isStarted(p)) {
|
||||||
GroundItemManager.create(new Item(300), getLocation(), p);
|
GroundItemManager.create(new Item(300), getLocation(), p);
|
||||||
|
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
package core.game.node.entity.npc.other;
|
|
||||||
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.Entity;
|
|
||||||
import core.game.node.entity.combat.BattleState;
|
|
||||||
import core.game.node.entity.combat.CombatStyle;
|
|
||||||
import core.game.node.entity.npc.AbstractNPC;
|
|
||||||
import core.game.node.entity.player.Player;
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
import core.game.world.map.Location;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the tutorial chicken npc.
|
|
||||||
* @author 'Vexia
|
|
||||||
* @version 1.0
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public final class TutorialChickenNPC extends AbstractNPC {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code TutorialChickenNPC} {@code Object}.
|
|
||||||
* @param id the id.
|
|
||||||
* @param location the location.
|
|
||||||
*/
|
|
||||||
public TutorialChickenNPC(int id, Location location) {
|
|
||||||
super(id, location, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code TutorialChickenNPC} {@code Object}.
|
|
||||||
*/
|
|
||||||
public TutorialChickenNPC() {
|
|
||||||
super(0, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AbstractNPC construct(int id, Location location, Object... objects) {
|
|
||||||
return new TutorialChickenNPC(id, location);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onImpact(Entity entity, BattleState state) {
|
|
||||||
super.onImpact(entity, state);
|
|
||||||
if (state.getStyle() == CombatStyle.MAGIC) {
|
|
||||||
final Player player = (Player) entity;
|
|
||||||
if (TutorialSession.getExtension(player).getStage() == 70) {
|
|
||||||
TutorialStage.load(player, 71, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void finalizeDeath(Entity killer) {
|
|
||||||
super.finalizeDeath(killer);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int[] getIds() {
|
|
||||||
return new int[] { 41 };
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -9,7 +9,6 @@ import core.game.container.impl.InventoryListener;
|
||||||
import core.game.content.activity.pyramidplunder.PlunderObjectManager;
|
import core.game.content.activity.pyramidplunder.PlunderObjectManager;
|
||||||
import core.game.content.dialogue.DialogueInterpreter;
|
import core.game.content.dialogue.DialogueInterpreter;
|
||||||
import core.game.content.quest.miniquest.barcrawl.BarcrawlManager;
|
import core.game.content.quest.miniquest.barcrawl.BarcrawlManager;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.ttrail.TreasureTrailManager;
|
import core.game.content.ttrail.TreasureTrailManager;
|
||||||
import core.game.interaction.Interaction;
|
import core.game.interaction.Interaction;
|
||||||
import core.game.interaction.item.brawling_gloves.BrawlingGlovesManager;
|
import core.game.interaction.item.brawling_gloves.BrawlingGlovesManager;
|
||||||
|
|
@ -646,7 +645,6 @@ public class Player extends Entity {
|
||||||
String gender = this.isMale() ? "man " : "woman ";
|
String gender = this.isMale() ? "man " : "woman ";
|
||||||
if (getAttributes().containsKey("permadeath")) {
|
if (getAttributes().containsKey("permadeath")) {
|
||||||
Repository.sendNews("Permadeath Hardcore Iron" + gender + " " + this.getUsername() + " has fallen. Total Level: " + this.getSkills().getTotalLevel()); // Not enough room for XP
|
Repository.sendNews("Permadeath Hardcore Iron" + gender + " " + this.getUsername() + " has fallen. Total Level: " + this.getSkills().getTotalLevel()); // Not enough room for XP
|
||||||
TutorialSession.getExtension(this).setStage(0);
|
|
||||||
equipment.clear();
|
equipment.clear();
|
||||||
inventory.clear();
|
inventory.clear();
|
||||||
bank.clear();
|
bank.clear();
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ package core.game.node.entity.player.info.login;
|
||||||
|
|
||||||
import core.game.component.CloseEvent;
|
import core.game.component.CloseEvent;
|
||||||
import core.game.component.Component;
|
import core.game.component.Component;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.player.link.emote.Emotes;
|
import core.game.node.entity.player.link.emote.Emotes;
|
||||||
import core.game.world.map.RegionManager;
|
import core.game.world.map.RegionManager;
|
||||||
|
|
@ -75,7 +74,7 @@ public final class LoginConfiguration {
|
||||||
*/
|
*/
|
||||||
public static void configureLobby(Player player) {
|
public static void configureLobby(Player player) {
|
||||||
player.updateSceneGraph(true);
|
player.updateSceneGraph(true);
|
||||||
if (!player.isArtificial() && TutorialSession.getExtension(player).getStage() >= TutorialSession.MAX_STAGE && player.getAttribute("login_type", LoginType.NORMAL_LOGIN) != LoginType.RECONNECT_TYPE) {
|
if (!player.isArtificial() && player.getAttribute("tutorial:complete",false) && player.getAttribute("login_type", LoginType.NORMAL_LOGIN) != LoginType.RECONNECT_TYPE) {
|
||||||
sendLobbyScreen(player);
|
sendLobbyScreen(player);
|
||||||
} else {
|
} else {
|
||||||
configureGameWorld(player);
|
configureGameWorld(player);
|
||||||
|
|
@ -148,8 +147,6 @@ public final class LoginConfiguration {
|
||||||
/*if (GameWorld.getSettings().isPvp()) {
|
/*if (GameWorld.getSettings().isPvp()) {
|
||||||
player.getPacketDispatch().sendString("", 226, 1);
|
player.getPacketDispatch().sendString("", 226, 1);
|
||||||
}*/
|
}*/
|
||||||
TutorialSession.extend(player);
|
|
||||||
TutorialSession.getExtension(player).init();
|
|
||||||
/*if (TutorialSession.getExtension(player).getStage() != 73) {
|
/*if (TutorialSession.getExtension(player).getStage() != 73) {
|
||||||
TutorialStage.load(player, TutorialSession.getExtension(player).getStage(), true);
|
TutorialStage.load(player, TutorialSession.getExtension(player).getStage(), true);
|
||||||
}*/
|
}*/
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ package core.game.node.entity.player.link;
|
||||||
|
|
||||||
import core.game.component.Component;
|
import core.game.component.Component;
|
||||||
import core.game.component.InterfaceType;
|
import core.game.component.InterfaceType;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.node.entity.combat.equipment.WeaponInterface;
|
import core.game.node.entity.combat.equipment.WeaponInterface;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.net.packet.PacketRepository;
|
import core.net.packet.PacketRepository;
|
||||||
|
|
@ -12,6 +11,7 @@ import core.net.packet.out.CloseInterface;
|
||||||
import core.net.packet.out.Interface;
|
import core.net.packet.out.Interface;
|
||||||
import core.net.packet.out.WindowsPane;
|
import core.net.packet.out.WindowsPane;
|
||||||
import org.rs09.consts.Components;
|
import org.rs09.consts.Components;
|
||||||
|
import rs09.game.content.tutorial.TutorialStage;
|
||||||
import rs09.game.system.SystemLogger;
|
import rs09.game.system.SystemLogger;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -283,53 +283,10 @@ public final class InterfaceManager {
|
||||||
return singleTab;
|
return singleTab;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Hides the tabs.
|
|
||||||
* @param tabs The tab indexes.
|
|
||||||
*/
|
|
||||||
public void hideTabs(int... tabs) {
|
|
||||||
if (true) {
|
|
||||||
removeTabs(tabs);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
boolean changeViewedTab = false;
|
|
||||||
for (int slot : tabs) {
|
|
||||||
if (slot == currentTabIndex) {
|
|
||||||
changeViewedTab = true;
|
|
||||||
}
|
|
||||||
Component tab = this.tabs[slot];
|
|
||||||
if (tab != null && !tab.isHidden()) {
|
|
||||||
int child = (slot < 7 ? 38 : 13) + slot;
|
|
||||||
boolean resize = isResizable();
|
|
||||||
player.getPacketDispatch().sendInterfaceConfig(getWindowPaneId(), child, true);
|
|
||||||
player.getPacketDispatch().sendInterfaceConfig(getWindowPaneId(), child + 7, true);
|
|
||||||
tab.setHidden(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (changeViewedTab) {
|
|
||||||
int currentIndex = -1;
|
|
||||||
if (this.tabs[3] == null) {
|
|
||||||
for (int i = 0; i < this.tabs.length; i++) {
|
|
||||||
if (this.tabs[i] != null) {
|
|
||||||
currentIndex = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
currentIndex = 3;
|
|
||||||
}
|
|
||||||
if (currentIndex > -1) {
|
|
||||||
setViewedTab(currentIndex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the tabs.
|
* Removes the tabs.
|
||||||
* @param tabs The tab indexes.
|
* @param tabs The tab indexes.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public void removeTabs(int... tabs) {
|
public void removeTabs(int... tabs) {
|
||||||
boolean changeViewedTab = false;
|
boolean changeViewedTab = false;
|
||||||
for (int slot : tabs) {
|
for (int slot : tabs) {
|
||||||
|
|
@ -532,9 +489,6 @@ public final class InterfaceManager {
|
||||||
}
|
}
|
||||||
chatbox.open(player);
|
chatbox.open(player);
|
||||||
}
|
}
|
||||||
if (TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE) {
|
|
||||||
Component.setUnclosable(player, getChatbox());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -545,7 +499,13 @@ public final class InterfaceManager {
|
||||||
if (windowMode != player.getSession().getClientInfo().getWindowMode()) {
|
if (windowMode != player.getSession().getClientInfo().getWindowMode()) {
|
||||||
player.getSession().getClientInfo().setWindowMode(windowMode);
|
player.getSession().getClientInfo().setWindowMode(windowMode);
|
||||||
openWindowsPane(new Component(isResizable() ? Components.TOPLEVEL_FULLSCREEN_746 : Components.TOPLEVEL_548));
|
openWindowsPane(new Component(isResizable() ? Components.TOPLEVEL_FULLSCREEN_746 : Components.TOPLEVEL_548));
|
||||||
|
if(!player.getAttribute("tutorial:complete", false)) {
|
||||||
|
TutorialStage.hideTabs(player, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
openDefaultTabs();
|
openDefaultTabs();
|
||||||
|
}
|
||||||
openInfoBars();
|
openInfoBars();
|
||||||
PacketRepository.send(Interface.class, new InterfaceContext(player, getWindowPaneId(), isResizable() ? 23 : 14, Components.FILTERBUTTONS_751, true));
|
PacketRepository.send(Interface.class, new InterfaceContext(player, getWindowPaneId(), isResizable() ? 23 : 14, Components.FILTERBUTTONS_751, true));
|
||||||
PacketRepository.send(Interface.class, new InterfaceContext(player, getWindowPaneId(), isResizable() ? 70 : 75, Components.CHATTOP_752, true));
|
PacketRepository.send(Interface.class, new InterfaceContext(player, getWindowPaneId(), isResizable() ? 70 : 75, Components.CHATTOP_752, true));
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package core.game.node.entity.player.link;
|
package core.game.node.entity.player.link;
|
||||||
|
|
||||||
import rs09.game.Varp;
|
import rs09.game.Varp;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.scenery.Scenery;
|
import core.game.node.scenery.Scenery;
|
||||||
import rs09.game.system.SystemLogger;
|
import rs09.game.system.SystemLogger;
|
||||||
|
|
@ -58,7 +57,7 @@ public final class PacketDispatch {
|
||||||
* @param message The game message.
|
* @param message The game message.
|
||||||
*/
|
*/
|
||||||
public void sendMessage(String message) {
|
public void sendMessage(String message) {
|
||||||
if (message == null || TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE) {
|
if (message == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player.getAttribute("chat_filter") != null && !message.contains("<col=CC6600>") && !message.contains("<col=FFFF00>")) {
|
if (player.getAttribute("chat_filter") != null && !message.contains("<col=CC6600>") && !message.contains("<col=FFFF00>")) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package core.game.node.entity.player.link;
|
package core.game.node.entity.player.link;
|
||||||
|
|
||||||
import rs09.ServerConstants;
|
import rs09.ServerConstants;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.impl.Animator.Priority;
|
import core.game.node.entity.impl.Animator.Priority;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
|
@ -355,10 +354,6 @@ public class TeleportManager {
|
||||||
@Override
|
@Override
|
||||||
public void start() {
|
public void start() {
|
||||||
player = ((Player) entity);
|
player = ((Player) entity);
|
||||||
if (TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE) {
|
|
||||||
stop();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/*if (player.getSavedData().getGlobalData().getHomeTeleportDelay() > System.currentTimeMillis() && !player.isDonator()) {
|
/*if (player.getSavedData().getGlobalData().getHomeTeleportDelay() > System.currentTimeMillis() && !player.isDonator()) {
|
||||||
long milliseconds = player.getSavedData().getGlobalData().getHomeTeleportDelay() - System.currentTimeMillis();
|
long milliseconds = player.getSavedData().getGlobalData().getHomeTeleportDelay() - System.currentTimeMillis();
|
||||||
int minutes = (int) Math.round(milliseconds / 120000);
|
int minutes = (int) Math.round(milliseconds / 120000);
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,6 @@ import core.game.world.map.Direction;
|
||||||
import core.game.world.map.Location;
|
import core.game.world.map.Location;
|
||||||
import core.game.world.map.RegionManager;
|
import core.game.world.map.RegionManager;
|
||||||
import org.rs09.consts.Items;
|
import org.rs09.consts.Items;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.player.link.diary.DiaryType;
|
import core.game.node.entity.player.link.diary.DiaryType;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
|
|
@ -339,9 +337,6 @@ public enum Emotes {
|
||||||
}
|
}
|
||||||
player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 1, 6, good);
|
player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 1, 6, good);
|
||||||
}
|
}
|
||||||
if (TutorialSession.getExtension(player).getStage() == 24) {
|
|
||||||
TutorialStage.load(player, 25, false);
|
|
||||||
}
|
|
||||||
player.getPulseManager().clear();
|
player.getPulseManager().clear();
|
||||||
emote.play(player);
|
emote.play(player);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package core.game.node.entity.player.link.request;
|
package core.game.node.entity.player.link.request;
|
||||||
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import rs09.game.world.GameWorld;
|
import rs09.game.world.GameWorld;
|
||||||
|
|
||||||
|
|
@ -58,9 +57,6 @@ public final class RequestManager {
|
||||||
if (target == player) {
|
if (target == player) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!TutorialSession.getExtension(player).finished() || !TutorialSession.getExtension(target).finished()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!target.getLocation().withinDistance(player.getLocation(), 15)) {
|
if (!target.getLocation().withinDistance(player.getLocation(), 15)) {
|
||||||
player.getPacketDispatch().sendMessage("Unable to find " + target.getUsername() + ".");
|
player.getPacketDispatch().sendMessage("Unable to find " + target.getUsername() + ".");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ package core.game.node.entity.skill;
|
||||||
|
|
||||||
import core.game.component.Component;
|
import core.game.component.Component;
|
||||||
import core.game.content.global.Skillcape;
|
import core.game.content.global.Skillcape;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.player.link.emote.Emotes;
|
import core.game.node.entity.player.link.emote.Emotes;
|
||||||
import rs09.game.world.repository.Repository;
|
import rs09.game.world.repository.Repository;
|
||||||
|
|
@ -113,10 +112,7 @@ public final class LevelUp {
|
||||||
* @param amount The amount of levels gained.
|
* @param amount The amount of levels gained.
|
||||||
*/
|
*/
|
||||||
public static void levelup(Player player, int slot, int amount) {
|
public static void levelup(Player player, int slot, int amount) {
|
||||||
if (player.getAttribute("tut-island") != null) {
|
if (!player.getAttribute("tutorial:complete", false)) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int soundId = SOUND_EFFECTS[slot];
|
int soundId = SOUND_EFFECTS[slot];
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package core.game.node.entity.skill;
|
package core.game.node.entity.skill;
|
||||||
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.interaction.item.brawling_gloves.BrawlingGloves;
|
import core.game.interaction.item.brawling_gloves.BrawlingGloves;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.ImpactHandler;
|
import core.game.node.entity.combat.ImpactHandler;
|
||||||
|
|
@ -247,7 +246,7 @@ public final class Skills {
|
||||||
this.experience[slot] = 200000000;
|
this.experience[slot] = 200000000;
|
||||||
}
|
}
|
||||||
if (entity instanceof Player && this.experience[slot] > 175) {
|
if (entity instanceof Player && this.experience[slot] > 175) {
|
||||||
if (player.getSavedData().getGlobalData().getTutorialStage() < TutorialSession.MAX_STAGE && slot != HITPOINTS) {
|
if (!player.getAttribute("tutorial:complete",false) && slot != HITPOINTS) {
|
||||||
this.experience[slot] = 175;
|
this.experience[slot] = 175;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ public final class FaladorGrapplePlugin extends OptionHandler {
|
||||||
tab = player.getInterfaceManager().getSingleTab();
|
tab = player.getInterfaceManager().getSingleTab();
|
||||||
player.getInterfaceManager().openOverlay(new Component(115));
|
player.getInterfaceManager().openOverlay(new Component(115));
|
||||||
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, 2));
|
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, 2));
|
||||||
player.getInterfaceManager().hideTabs(0, 1, 2, 3, 4, 5, 6, 11, 12);
|
player.getInterfaceManager().removeTabs(0, 1, 2, 3, 4, 5, 6, 11, 12);
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
player.getProperties().setTeleportLocation(destination);
|
player.getProperties().setTeleportLocation(destination);
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ public class YanilleGrapple extends OptionHandler {
|
||||||
tab = player.getInterfaceManager().getSingleTab();
|
tab = player.getInterfaceManager().getSingleTab();
|
||||||
player.getInterfaceManager().openOverlay(new Component(115));
|
player.getInterfaceManager().openOverlay(new Component(115));
|
||||||
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, 2));
|
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, 2));
|
||||||
player.getInterfaceManager().hideTabs(0, 1, 2, 3, 4, 5, 6, 11, 12);
|
player.getInterfaceManager().removeTabs(0, 1, 2, 3, 4, 5, 6, 11, 12);
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
player.getProperties().setTeleportLocation(destination);
|
player.getProperties().setTeleportLocation(destination);
|
||||||
|
|
|
||||||
|
|
@ -1,197 +0,0 @@
|
||||||
package core.game.node.entity.skill.cooking;
|
|
||||||
|
|
||||||
import core.game.content.dialogue.DialoguePlugin;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.interaction.NodeUsageEvent;
|
|
||||||
import core.game.interaction.UseWithHandler;
|
|
||||||
import core.game.node.entity.player.Player;
|
|
||||||
import core.game.node.item.Item;
|
|
||||||
import core.game.system.task.Pulse;
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
import core.plugin.Plugin;
|
|
||||||
import rs09.game.content.dialogue.SkillDialogueHandler.SkillDialogue;
|
|
||||||
import rs09.game.content.dialogue.SkillDialogueHandler;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the plugin used to make dough.
|
|
||||||
* @author 'Vexia
|
|
||||||
* @version 1.0
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public final class MakeDoughPlugin extends UseWithHandler {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the water sources.
|
|
||||||
*/
|
|
||||||
private static final Item[][] SOURCES = new Item[][] { { new Item(1929), new Item(1925) }, { new Item(1921), new Item(1923) }, { new Item(1937), new Item(1935) } };
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code MakeDoughPlugin} {@code Object}.
|
|
||||||
*/
|
|
||||||
public MakeDoughPlugin() {
|
|
||||||
super(1933);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
|
||||||
for (int i = 0; i < SOURCES.length; i++) {
|
|
||||||
addHandler(SOURCES[i][0].getId(), ITEM_TYPE, this);
|
|
||||||
}
|
|
||||||
new MakeDoughDialogue().init();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(NodeUsageEvent event) {
|
|
||||||
final Player player = event.getPlayer();
|
|
||||||
if (player.getAttributes().containsKey("tut-island")) {
|
|
||||||
return handleTutorialIsland(player, event);
|
|
||||||
}
|
|
||||||
Item[] data = null;
|
|
||||||
for (int i = 0; i < SOURCES.length; i++) {
|
|
||||||
if (SOURCES[i][0].getId() == event.getUsedItem().getId() || SOURCES[i][0].getId() == event.getBaseItem().getId()) {
|
|
||||||
data = SOURCES[i];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
player.getDialogueInterpreter().open(59 << 16 | 1, (Object) data);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method used to handle the tutorial isalnd making dough.
|
|
||||||
* @param player the player.
|
|
||||||
* @param event the event.
|
|
||||||
*/
|
|
||||||
private boolean handleTutorialIsland(final Player player, final NodeUsageEvent event) {
|
|
||||||
if (player.getInventory().freeSlots() == 0) {
|
|
||||||
player.getPacketDispatch().sendMessage("You don't have enough inventory space.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
player.lock(3);
|
|
||||||
player.getInventory().remove(event.getBaseItem(), new Item(1933, 1));
|
|
||||||
player.getInventory().add(new Item(3727, 1), new Item(1931, 1), new Item(2307, 1));
|
|
||||||
if (TutorialSession.getExtension(player).getStage() == 19) {
|
|
||||||
TutorialStage.load(player, 20, false);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the plugin used to make dough..
|
|
||||||
* @author 'Vexia
|
|
||||||
* @version 1.0
|
|
||||||
*/
|
|
||||||
public static final class MakeDoughDialogue extends DialoguePlugin {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the dough items to make.
|
|
||||||
*/
|
|
||||||
private static final Item[] DOUGHS = new Item[] { new Item(2307), new Item(1953), new Item(2283), new Item(1863) };
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the pot of flour item.
|
|
||||||
*/
|
|
||||||
private static final Item FLOUR = new Item(1933);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the water source data.
|
|
||||||
*/
|
|
||||||
private Item[] waterData;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code MakeDoughDialogue} {@code Object}.
|
|
||||||
*/
|
|
||||||
public MakeDoughDialogue() {
|
|
||||||
/**
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code MakeDoughDialogue} {@code Object}.
|
|
||||||
* @param player the player.
|
|
||||||
*/
|
|
||||||
public MakeDoughDialogue(Player player) {
|
|
||||||
super(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DialoguePlugin newInstance(Player player) {
|
|
||||||
return new MakeDoughDialogue(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean open(Object... args) {
|
|
||||||
waterData = (Item[]) args[0];
|
|
||||||
interpreter.sendOptions("What do you wish to make?", "Bread dough.", "Pastry dough.", "Pizza dough.", "Pitta dough.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(int interfaceId, int buttonId) {
|
|
||||||
switch (stage) {
|
|
||||||
case 0:
|
|
||||||
makeDoughPulse(DOUGHS[buttonId - 1]);
|
|
||||||
end();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void makeDoughPulse(final Item dough) {
|
|
||||||
SkillDialogueHandler handler = new SkillDialogueHandler(player, SkillDialogue.ONE_OPTION, dough) {
|
|
||||||
@Override
|
|
||||||
public void create(final int amount, int index) {
|
|
||||||
player.getPulseManager().run(new Pulse(2) {
|
|
||||||
int count = 0;
|
|
||||||
@Override
|
|
||||||
public boolean pulse() {
|
|
||||||
makeDough(dough);
|
|
||||||
return ++count >= amount;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getAll(int index) {
|
|
||||||
return player.getInventory().getAmount(waterData[0]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
if (player.getInventory().getAmount(waterData[0]) == 1) {
|
|
||||||
makeDough(dough);
|
|
||||||
} else {
|
|
||||||
// Defer the creation of the SkillDialogueHandler creation to a pulse since otherwise the dialogue doesn't open (is this dialogue in the way?)
|
|
||||||
player.getPulseManager().run(new Pulse(0) {
|
|
||||||
@Override
|
|
||||||
public boolean pulse() {
|
|
||||||
handler.open();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
end();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method used to make a dough item.
|
|
||||||
* @param dough the dough.
|
|
||||||
*/
|
|
||||||
private void makeDough(final Item dough) {
|
|
||||||
if (player.getInventory().remove(waterData[0]) && player.getInventory().remove(FLOUR)) {
|
|
||||||
player.getInventory().add(waterData[1]);
|
|
||||||
player.getInventory().add(dough);
|
|
||||||
player.getInventory().add(new Item(1931), player);
|
|
||||||
player.getPacketDispatch().sendMessage("You mix the flower and water to make some " + dough.getName().toLowerCase() + ".");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int[] getIds() {
|
|
||||||
return new int[] { 59 << 16 | 1 };
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
package core.game.node.entity.skill.cooking;
|
package core.game.node.entity.skill.cooking;
|
||||||
|
|
||||||
|
import api.events.ResourceGatheredEvent;
|
||||||
import core.game.container.impl.EquipmentContainer;
|
import core.game.container.impl.EquipmentContainer;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.impl.Animator;
|
import core.game.node.entity.impl.Animator;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.player.link.audio.Audio;
|
import core.game.node.entity.player.link.audio.Audio;
|
||||||
|
|
@ -99,12 +98,6 @@ public class StandardCookingPulse extends Pulse {
|
||||||
setDelay(object.getName().toLowerCase().equals("range") ? 5 : 4);
|
setDelay(object.getName().toLowerCase().equals("range") ? 5 : 4);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//handle tutorial stuff
|
|
||||||
if (!TutorialSession.getExtension(player).finished()) {
|
|
||||||
updateTutorial(player);
|
|
||||||
amount--;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cook(player, object, burned, initial, product)) {
|
if (cook(player, object, burned, initial, product)) {
|
||||||
amount--;
|
amount--;
|
||||||
|
|
@ -169,6 +162,7 @@ public class StandardCookingPulse extends Pulse {
|
||||||
if (player.getInventory().remove(initialItem)) {
|
if (player.getInventory().remove(initialItem)) {
|
||||||
if (!burned) {
|
if (!burned) {
|
||||||
player.getInventory().add(productItem);
|
player.getInventory().add(productItem);
|
||||||
|
player.dispatch(new ResourceGatheredEvent(productItem.getId(), 1, object));
|
||||||
player.getSkills().addExperience(Skills.COOKING, experience, true);
|
player.getSkills().addExperience(Skills.COOKING, experience, true);
|
||||||
|
|
||||||
int playerRegion = player.getViewport().getRegion().getId();
|
int playerRegion = player.getViewport().getRegion().getId();
|
||||||
|
|
@ -202,6 +196,7 @@ public class StandardCookingPulse extends Pulse {
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
player.dispatch(new ResourceGatheredEvent(CookableItems.getBurnt(initial).getId(), 1, object));
|
||||||
player.getInventory().add(CookableItems.getBurnt(initial));
|
player.getInventory().add(CookableItems.getBurnt(initial));
|
||||||
}
|
}
|
||||||
player.getPacketDispatch().sendMessage(getMessage(initialItem, productItem, burned));
|
player.getPacketDispatch().sendMessage(getMessage(initialItem, productItem, burned));
|
||||||
|
|
@ -229,17 +224,6 @@ public class StandardCookingPulse extends Pulse {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean updateTutorial(Player player) {
|
public boolean updateTutorial(Player player) {
|
||||||
if (TutorialSession.getExtension(player).getStage() == 14) {
|
|
||||||
TutorialStage.load(player, 15, false);
|
|
||||||
return cook(player, object, true, initial, product);
|
|
||||||
} else if (TutorialSession.getExtension(player).getStage() == 15) {
|
|
||||||
TutorialStage.load(player, 16, false);
|
|
||||||
return cook(player, object, false, initial, product);
|
|
||||||
}
|
|
||||||
if (TutorialSession.getExtension(player).getStage() == 20) {
|
|
||||||
TutorialStage.load(player, 21, false);
|
|
||||||
return cook(player, object, false, initial, product);
|
|
||||||
}
|
|
||||||
return cook(player, object, burned, initial, product);
|
return cook(player, object, burned, initial, product);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
package core.game.node.entity.skill.firemaking;
|
|
||||||
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.interaction.NodeUsageEvent;
|
|
||||||
import core.game.interaction.UseWithHandler;
|
|
||||||
import core.game.node.entity.player.Player;
|
|
||||||
import core.game.node.item.Item;
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
import core.plugin.Plugin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the plugin used to handle the lighting of a fire.
|
|
||||||
* @author 'Vexia
|
|
||||||
* @version 1.0
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public final class FireMakingOptionPlugin extends UseWithHandler {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a new {@code FireMakingOptionPlugin} {@code Object}.
|
|
||||||
*/
|
|
||||||
public FireMakingOptionPlugin() {
|
|
||||||
super(1511, 1521, 1513, 1515, 1517, 1519, 1521, 2862, 3438, 3440, 3442, 3444, 3446, 3448, 6211, 6213, 6332, 6333, 7404, 7405, 7406, 8934, 9067, 10328, 10329, 10808, 10810, 10812, 11035, 12581, 12583, 3125);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
|
||||||
addHandler(590, ITEM_TYPE, this);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(NodeUsageEvent event) {
|
|
||||||
Item item = event.getUsedItem();
|
|
||||||
if (item == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
Player player = event.getPlayer();
|
|
||||||
if (TutorialSession.getExtension(player).getStage() == 8) {
|
|
||||||
TutorialStage.load(player, 9, false);
|
|
||||||
}
|
|
||||||
player.getPulseManager().run(new FireMakingPulse(player, item, null));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
package core.game.node.entity.skill.firemaking
|
||||||
|
|
||||||
|
import org.rs09.consts.Items
|
||||||
|
import rs09.game.interaction.InteractionListener
|
||||||
|
|
||||||
|
class FiremakingListener : InteractionListener()
|
||||||
|
{
|
||||||
|
val logs = intArrayOf(1511, 1521, 1513, 1515, 1517, 1519, 1521, 2862, 3438, 3440, 3442, 3444, 3446, 3448, 6211, 6213, 6332, 6333, 7404, 7405, 7406, 8934, 9067, 10328, 10329, 10808, 10810, 10812, 11035, 12581, 12583, 3125)
|
||||||
|
|
||||||
|
override fun defineListeners() {
|
||||||
|
onUseWith(ITEM, Items.TINDERBOX_590, *logs) { player, _, with ->
|
||||||
|
player.pulseManager.run(FireMakingPulse(player, with.asItem(), null))
|
||||||
|
return@onUseWith true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
package core.game.node.entity.skill.firemaking;
|
package core.game.node.entity.skill.firemaking;
|
||||||
|
|
||||||
import api.events.LitFireEvent;
|
import api.events.LitFireEvent;
|
||||||
import core.game.world.map.zone.ZoneBorders;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.skill.SkillPulse;
|
import core.game.node.entity.skill.SkillPulse;
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.player.link.diary.DiaryType;
|
|
||||||
import core.game.node.item.GroundItem;
|
import core.game.node.item.GroundItem;
|
||||||
import core.game.node.item.GroundItemManager;
|
import core.game.node.item.GroundItemManager;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
|
|
@ -134,9 +130,6 @@ public final class FireMakingPulse extends SkillPulse<Item> {
|
||||||
GroundItemManager.destroy(groundItem);
|
GroundItemManager.destroy(groundItem);
|
||||||
player.moveStep();
|
player.moveStep();
|
||||||
player.faceLocation(FaceLocationFlag.getFaceLocation(player, object));
|
player.faceLocation(FaceLocationFlag.getFaceLocation(player, object));
|
||||||
if (TutorialSession.getExtension(player).getStage() == 9) {
|
|
||||||
TutorialStage.load(player, 10, false);
|
|
||||||
}
|
|
||||||
player.getSkills().addExperience(Skills.FIREMAKING,fire.getXp());
|
player.getSkills().addExperience(Skills.FIREMAKING,fire.getXp());
|
||||||
|
|
||||||
int playerRegion = player.getViewport().getRegion().getId();
|
int playerRegion = player.getViewport().getRegion().getId();
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,6 @@ import core.game.container.impl.EquipmentContainer;
|
||||||
import core.game.content.dialogue.FacialExpression;
|
import core.game.content.dialogue.FacialExpression;
|
||||||
import core.game.content.global.BirdNest;
|
import core.game.content.global.BirdNest;
|
||||||
import core.game.content.global.SkillingPets;
|
import core.game.content.global.SkillingPets;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.impl.Projectile;
|
import core.game.node.entity.impl.Projectile;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.skill.SkillPulse;
|
import core.game.node.entity.skill.SkillPulse;
|
||||||
|
|
@ -78,9 +76,6 @@ public final class GatheringSkillPulse extends SkillPulse<Scenery> {
|
||||||
if (resource == null) {
|
if (resource == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (TutorialSession.getExtension(player).getStage() == 35) {
|
|
||||||
TutorialStage.load(player, 36, false);
|
|
||||||
}
|
|
||||||
isMining = resource.getSkillId() == Skills.MINING;
|
isMining = resource.getSkillId() == Skills.MINING;
|
||||||
isMiningEssence = resource == SkillingResource.RUNE_ESSENCE;
|
isMiningEssence = resource == SkillingResource.RUNE_ESSENCE;
|
||||||
isMiningGems = resource.getReward() == SkillingResource.GEM_ROCK_0.getReward();
|
isMiningGems = resource.getReward() == SkillingResource.GEM_ROCK_0.getReward();
|
||||||
|
|
@ -126,17 +121,6 @@ public final class GatheringSkillPulse extends SkillPulse<Scenery> {
|
||||||
if (!checkReward()) {
|
if (!checkReward()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
int tutorialStage = TutorialSession.getExtension(player).getStage();
|
|
||||||
if (tutorialStage == 36 && node.getId() == 3042) {
|
|
||||||
TutorialStage.load(player, 38, false);
|
|
||||||
} else if (tutorialStage == 36 && node.getId() == 3043) {
|
|
||||||
TutorialStage.load(player, 37, false);
|
|
||||||
}
|
|
||||||
if (tutorialStage == 38 && node.getId() == 3043) {
|
|
||||||
TutorialStage.load(player, 39, false);
|
|
||||||
} else if (tutorialStage == 37 && node.getId() == 3042) {
|
|
||||||
TutorialStage.load(player, 39, false);
|
|
||||||
}
|
|
||||||
// 20% chance to auto burn logs when using "inferno adze" item
|
// 20% chance to auto burn logs when using "inferno adze" item
|
||||||
if (isWoodcutting && tool.getId() == 13661 && RandomFunction.random(100) < 20){
|
if (isWoodcutting && tool.getId() == 13661 && RandomFunction.random(100) < 20){
|
||||||
player.sendMessage("Your chop some logs. The heat of the inferno adze incinerates them.");
|
player.sendMessage("Your chop some logs. The heat of the inferno adze incinerates them.");
|
||||||
|
|
@ -201,10 +185,6 @@ public final class GatheringSkillPulse extends SkillPulse<Scenery> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Tutorial stuff, maybe?
|
|
||||||
if (tutorialStage == 7) {
|
|
||||||
TutorialStage.load(player, 8, false);
|
|
||||||
}
|
|
||||||
// not sure what this is exactly
|
// not sure what this is exactly
|
||||||
if (resource.getRespawnRate() != 0) {
|
if (resource.getRespawnRate() != 0) {
|
||||||
int charge = 1000 / resource.getRewardAmount();
|
int charge = 1000 / resource.getRewardAmount();
|
||||||
|
|
@ -340,10 +320,6 @@ public final class GatheringSkillPulse extends SkillPulse<Scenery> {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0:
|
case 0:
|
||||||
player.getPacketDispatch().sendMessage("You swing your " + (isMining ? "pickaxe at the rock..." : "axe at the tree..."));
|
player.getPacketDispatch().sendMessage("You swing your " + (isMining ? "pickaxe at the rock..." : "axe at the tree..."));
|
||||||
if (TutorialSession.getExtension(player).getStage() == 6) {
|
|
||||||
player.lock(7);
|
|
||||||
TutorialStage.load(player, 7, false);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ public enum WoodcuttingNode {
|
||||||
|
|
||||||
int full,empty,reward,respawnRate,level, rewardAmount;
|
int full,empty,reward,respawnRate,level, rewardAmount;
|
||||||
double experience,rate;
|
double experience,rate;
|
||||||
byte identifier;
|
public byte identifier;
|
||||||
boolean farming;
|
boolean farming;
|
||||||
double baseLow = 64;
|
double baseLow = 64;
|
||||||
double baseHigh = 200;
|
double baseHigh = 200;
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,6 @@ import core.game.container.impl.EquipmentContainer;
|
||||||
import core.game.content.dialogue.FacialExpression;
|
import core.game.content.dialogue.FacialExpression;
|
||||||
import core.game.content.global.BirdNest;
|
import core.game.content.global.BirdNest;
|
||||||
import core.game.content.global.SkillingPets;
|
import core.game.content.global.SkillingPets;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.impl.Animator;
|
import core.game.node.entity.impl.Animator;
|
||||||
import core.game.node.entity.impl.Projectile;
|
import core.game.node.entity.impl.Projectile;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
|
@ -24,7 +22,6 @@ import core.tools.RandomFunction;
|
||||||
import rs09.game.node.entity.skill.farming.FarmingPatch;
|
import rs09.game.node.entity.skill.farming.FarmingPatch;
|
||||||
import rs09.game.node.entity.skill.farming.Patch;
|
import rs09.game.node.entity.skill.farming.Patch;
|
||||||
import rs09.game.node.entity.skill.skillcapeperks.SkillcapePerks;
|
import rs09.game.node.entity.skill.skillcapeperks.SkillcapePerks;
|
||||||
import org.rs09.consts.Items;
|
|
||||||
|
|
||||||
import static rs09.game.node.entity.player.info.stats.StatAttributeKeysKt.STATS_BASE;
|
import static rs09.game.node.entity.player.info.stats.StatAttributeKeysKt.STATS_BASE;
|
||||||
import static rs09.game.node.entity.player.info.stats.StatAttributeKeysKt.STATS_LOGS;
|
import static rs09.game.node.entity.player.info.stats.StatAttributeKeysKt.STATS_LOGS;
|
||||||
|
|
@ -52,10 +49,6 @@ public class WoodcuttingSkillPulse extends Pulse {
|
||||||
public void message(int type) {
|
public void message(int type) {
|
||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
player.getPacketDispatch().sendMessage("You swing your axe at the tree...");
|
player.getPacketDispatch().sendMessage("You swing your axe at the tree...");
|
||||||
if (TutorialSession.getExtension(player).getStage() == 6) {
|
|
||||||
player.lock(7);
|
|
||||||
TutorialStage.load(player, 7, false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -121,8 +114,6 @@ public class WoodcuttingSkillPulse extends Pulse {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int tutorialStage = TutorialSession.getExtension(player).getStage();
|
|
||||||
|
|
||||||
|
|
||||||
// If player is in donator zone
|
// If player is in donator zone
|
||||||
/* if (player.getLocation().getRegionId() == 12102) {
|
/* if (player.getLocation().getRegionId() == 12102) {
|
||||||
|
|
@ -177,11 +168,6 @@ public class WoodcuttingSkillPulse extends Pulse {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// Tutorial stuff, maybe?
|
|
||||||
if (tutorialStage == 7) {
|
|
||||||
TutorialStage.load(player, 8, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
//transform to depleted version
|
//transform to depleted version
|
||||||
if (resource.getRespawnRate() != 0) {
|
if (resource.getRespawnRate() != 0) {
|
||||||
int charge = 1000 / resource.getRewardAmount();
|
int charge = 1000 / resource.getRewardAmount();
|
||||||
|
|
|
||||||
|
|
@ -64,14 +64,14 @@ public enum Tasks {
|
||||||
JELLIES(57, new int[] { 1637, 1638, 1639, 1640, 1641, 1642 }, new String[] { "Jellies are nasty cube-like gelatinous creatures which", "absorb everything they come across into themselves." }, 52, false),
|
JELLIES(57, new int[] { 1637, 1638, 1639, 1640, 1641, 1642 }, new String[] { "Jellies are nasty cube-like gelatinous creatures which", "absorb everything they come across into themselves." }, 52, false),
|
||||||
JUNGLE_HORRORS(65, new int[] { 4348, 4349, 4350, 4351, 4352 }, new String[] { "Jungle Horrors can be found all over Mos Le'Harmless.", "They are strong and aggressive, so watch out!" }, 1, false),
|
JUNGLE_HORRORS(65, new int[] { 4348, 4349, 4350, 4351, 4352 }, new String[] { "Jungle Horrors can be found all over Mos Le'Harmless.", "They are strong and aggressive, so watch out!" }, 1, false),
|
||||||
KALPHITES(15, new int[] { 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161 }, new String[] { "Kalaphite are large insects which live in great hives under the desert sands." }, 1, false),
|
KALPHITES(15, new int[] { 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161 }, new String[] { "Kalaphite are large insects which live in great hives under the desert sands." }, 1, false),
|
||||||
KURASKS(65, new int[] { 1608, 1609, 4229 }, new String[] { "A kurask is a very quick creature." }, 70, false),
|
KURASKS(65, new int[] { 1608, 1609, 4229, 7805, 7797 }, new String[] { "A kurask is a very quick creature." }, 70, false),
|
||||||
LESSER_DEMONS(60, new int[] { 82, 6203, 3064, 4694, 4695, 6208, 6204, 6206, 3064, 4696, 4697, 6101 }, new String[] { "Lesser Demons are magic creatures so they are weak to magical attacks." }, 1, false),
|
LESSER_DEMONS(60, new int[] { 82, 6203, 3064, 4694, 4695, 6208, 6204, 6206, 3064, 4696, 4697, 6101 }, new String[] { "Lesser Demons are magic creatures so they are weak to magical attacks." }, 1, false),
|
||||||
MITHRIL_DRAGON(60, new int[] { 5363 }, new String[] { "Mithril dragons aren't as strong as other dragons but they're still", "very powerful, watch out for their firey breath." }, 1, false, 5 | 9 << 16),
|
MITHRIL_DRAGON(60, new int[] { 5363 }, new String[] { "Mithril dragons aren't as strong as other dragons but they're still", "very powerful, watch out for their firey breath." }, 1, false, 5 | 9 << 16),
|
||||||
MINOTAURS(7, new int[] { 4404, 4405, 4406 }, new String[] { "Minotaurs are large manlike creatures but you'll", "want to be careful of their horns." }, 1, false),
|
MINOTAURS(7, new int[] { 4404, 4405, 4406 }, new String[] { "Minotaurs are large manlike creatures but you'll", "want to be careful of their horns." }, 1, false),
|
||||||
MONKEYS(1, new int[] { 132, 1463, 1464, 2301, 4344, 4363, 6943, 7211, 7213, 7215, 7217, 7219, 7221, 7223, 7225, 7227, 1455, 1459, 1460, 1456, 1457, 1458 }, new String[] { "Small agile creatures, watch out they pinch!" }, 1, false),
|
MONKEYS(1, new int[] { 132, 1463, 1464, 2301, 4344, 4363, 6943, 7211, 7213, 7215, 7217, 7219, 7221, 7223, 7225, 7227, 1455, 1459, 1460, 1456, 1457, 1458 }, new String[] { "Small agile creatures, watch out they pinch!" }, 1, false),
|
||||||
MOSS_GIANTS(40, new int[] { 112, 1587, 1588, 1681, 4534, 4688, 4706 }, new String[] { "They are known to carry large sticks." }, 1, false),
|
MOSS_GIANTS(40, new int[] { 112, 1587, 1588, 1681, 4534, 4688, 4706 }, new String[] { "They are known to carry large sticks." }, 1, false),
|
||||||
NECHRYAELS(85, new int[] { 1613 }, new String[] { "Nechryael are demons of decay which summon small winged beings which", "help them fight their victems." }, 80, false),
|
NECHRYAELS(85, new int[] { 1613 }, new String[] { "Nechryael are demons of decay which summon small winged beings which", "help them fight their victems." }, 80, false),
|
||||||
OGRES(40, new int[] { 115, 114, 374, 3587, 6267 }, new String[] { "Ogres are brutal creatures, favouring large blunt maces and clubs", "they often attack without warning." }, 1, false),
|
OGRES(40, new int[] { 374, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 3587, 6267, 7078, 7079, 7080, 7081, 7082 }, new String[] { "Ogres are brutal creatures, favouring large blunt maces and clubs", "they often attack without warning." }, 1, false),
|
||||||
OTHERWORDLY_BEING(40, new int[] { 126 }, new String[] { "A creature filled with everlasting power." }, 1, false),
|
OTHERWORDLY_BEING(40, new int[] { 126 }, new String[] { "A creature filled with everlasting power." }, 1, false),
|
||||||
PYREFIENDS(25, new int[] { 1633, 1634, 1635, 1636, 6216, 6631, 6641, 6660, 6668, 6683, 6709, 6721, }, new String[] { "A scorching hot creature, watch out!" }, 30, false),
|
PYREFIENDS(25, new int[] { 1633, 1634, 1635, 1636, 6216, 6631, 6641, 6660, 6668, 6683, 6709, 6721, }, new String[] { "A scorching hot creature, watch out!" }, 30, false),
|
||||||
RATS(1, new int[] { 2682, 2980, 2981, 3007, 88, 224, 4928, 4929, 4936, 4937, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 4396, 4415, 7202, 7204, 7417, 7461, 87, 446, 950, 4395, 4922, 4923, 4924, 4925, 4926, 4927, 4942, 4943, 4944, 4945, 86, 87, 446, 950, 4395, 4922, 4923, 4924, 4925, 4926, 4927, 4942, 4943, 4944, 4945 }, new String[] { "Quick little rodents!" }, 1, false),
|
RATS(1, new int[] { 2682, 2980, 2981, 3007, 88, 224, 4928, 4929, 4936, 4937, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 4396, 4415, 7202, 7204, 7417, 7461, 87, 446, 950, 4395, 4922, 4923, 4924, 4925, 4926, 4927, 4942, 4943, 4944, 4945, 86, 87, 446, 950, 4395, 4922, 4923, 4924, 4925, 4926, 4927, 4942, 4943, 4944, 4945 }, new String[] { "Quick little rodents!" }, 1, false),
|
||||||
|
|
@ -106,10 +106,11 @@ public enum Tasks {
|
||||||
static{
|
static{
|
||||||
Arrays.stream(Tasks.values()).forEach(entry -> Arrays.stream(entry.ids).forEach(id -> taskMap.putIfAbsent(id,entry)));
|
Arrays.stream(Tasks.values()).forEach(entry -> Arrays.stream(entry.ids).forEach(id -> taskMap.putIfAbsent(id,entry)));
|
||||||
}
|
}
|
||||||
public int levelReq, combatCheck;
|
public final int levelReq;
|
||||||
public String[] info;
|
public final int combatCheck;
|
||||||
public int[] ids;
|
public final String[] info;
|
||||||
public boolean undead;
|
public final int[] ids;
|
||||||
|
public final boolean undead;
|
||||||
public int amtHash;
|
public int amtHash;
|
||||||
Tasks(int combatCheck, int[] ids, String[] info, int levelReq, boolean undead){
|
Tasks(int combatCheck, int[] ids, String[] info, int levelReq, boolean undead){
|
||||||
this.levelReq = levelReq;
|
this.levelReq = levelReq;
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ public final class AncientCavern extends MapZone implements Plugin<Object> {
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, 2));
|
PacketRepository.send(MinimapState.class, new MinimapStateContext(player, 2));
|
||||||
player.getInterfaceManager().hideTabs(0, 1, 2, 3, 4, 5, 6, 11, 12);
|
player.getInterfaceManager().removeTabs(0, 1, 2, 3, 4, 5, 6, 11, 12);
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
player.getProperties().setTeleportLocation(Location.create(2532, 3412, 0));
|
player.getProperties().setTeleportLocation(Location.create(2532, 3412, 0));
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
package core.game.node.entity.skill.smithing;
|
package core.game.node.entity.skill.smithing;
|
||||||
|
|
||||||
import core.cache.def.impl.SceneryDefinition;
|
import core.cache.def.impl.SceneryDefinition;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
import core.game.node.entity.skill.smithing.smelting.Bar;
|
import core.game.node.entity.skill.smithing.smelting.Bar;
|
||||||
import core.game.interaction.NodeUsageEvent;
|
import core.game.interaction.NodeUsageEvent;
|
||||||
|
|
@ -12,7 +10,6 @@ import core.game.node.Node;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.player.link.diary.DiaryType;
|
import core.game.node.entity.player.link.diary.DiaryType;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.node.scenery.Scenery;
|
|
||||||
import core.game.system.task.Pulse;
|
import core.game.system.task.Pulse;
|
||||||
import rs09.game.world.GameWorld;
|
import rs09.game.world.GameWorld;
|
||||||
import core.game.world.map.Location;
|
import core.game.world.map.Location;
|
||||||
|
|
@ -52,11 +49,6 @@ public final class FurnaceOptionPlugin extends OptionHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(final Player player, Node node, String option) {
|
public boolean handle(final Player player, Node node, String option) {
|
||||||
switch (((Scenery) node).getId()) {
|
|
||||||
case 3044:
|
|
||||||
handleTutorialIsland(player);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (node.getId() == 26814 && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(0)) {
|
if (node.getId() == 26814 && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(0)) {
|
||||||
player.sendMessage("You need to have completed the easy tasks in the Varrock Diary in order to use this.");
|
player.sendMessage("You need to have completed the easy tasks in the Varrock Diary in order to use this.");
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -98,9 +90,6 @@ public final class FurnaceOptionPlugin extends OptionHandler {
|
||||||
player.getInventory().remove(ITEMS);
|
player.getInventory().remove(ITEMS);
|
||||||
player.getInventory().add(Bar.BRONZE.getProduct());
|
player.getInventory().add(Bar.BRONZE.getProduct());
|
||||||
player.getSkills().addExperience(Skills.SMITHING, Bar.BRONZE.getExperience());
|
player.getSkills().addExperience(Skills.SMITHING, Bar.BRONZE.getExperience());
|
||||||
if (TutorialSession.getExtension(player).getStage() == 39) {
|
|
||||||
TutorialStage.load(player, 40, false);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@ package core.game.node.entity.skill.smithing;
|
||||||
|
|
||||||
import core.game.component.Component;
|
import core.game.component.Component;
|
||||||
import core.game.container.access.InterfaceContainer;
|
import core.game.container.access.InterfaceContainer;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
import core.game.node.entity.skill.smithing.smelting.Bar;
|
import core.game.node.entity.skill.smithing.smelting.Bar;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
|
@ -83,9 +81,6 @@ public final class SmithingBuilder {
|
||||||
}
|
}
|
||||||
player.getPacketDispatch().sendString(type.getBarName(), 300, 15);
|
player.getPacketDispatch().sendString(type.getBarName(), 300, 15);
|
||||||
player.getInterfaceManager().open(new Component(300));
|
player.getInterfaceManager().open(new Component(300));
|
||||||
if (TutorialSession.getExtension(player).getStage() == 41) {
|
|
||||||
TutorialStage.load(player, 42, false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
package core.game.node.entity.skill.smithing;
|
package core.game.node.entity.skill.smithing;
|
||||||
|
|
||||||
|
import api.events.ResourceGatheredEvent;
|
||||||
import core.cache.def.impl.ItemDefinition;
|
import core.cache.def.impl.ItemDefinition;
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialSession;
|
|
||||||
import core.game.content.quest.tutorials.tutorialisland.TutorialStage;
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.player.link.diary.DiaryType;
|
import core.game.node.entity.player.link.diary.DiaryType;
|
||||||
import core.game.node.entity.skill.SkillPulse;
|
import core.game.node.entity.skill.SkillPulse;
|
||||||
|
|
@ -69,7 +68,8 @@ public class SmithingPulse extends SkillPulse<Item> {
|
||||||
player.getDialogueInterpreter().sendDialogue("You need to complete Tourist Trap to smith dart tips.");
|
player.getDialogueInterpreter().sendDialogue("You need to complete Tourist Trap to smith dart tips.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE && node.getId() != Bars.BRONZE_DAGGER.getProduct()) {
|
if (!player.getQuestRepository().isComplete("Death Plateau") && bar.getSmithingType() == SmithingType.TYPE_CLAWS) {
|
||||||
|
player.getDialogueInterpreter().sendDialogue("You need to complete Death Plateau to smith claws.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -93,12 +93,10 @@ public class SmithingPulse extends SkillPulse<Item> {
|
||||||
player.getInventory().remove(new Item(bar.getBarType().getBarType(), bar.getSmithingType().getRequired()));
|
player.getInventory().remove(new Item(bar.getBarType().getBarType(), bar.getSmithingType().getRequired()));
|
||||||
final Item item = new Item(node.getId(), bar.getSmithingType().getProductAmount());
|
final Item item = new Item(node.getId(), bar.getSmithingType().getProductAmount());
|
||||||
player.getInventory().add(item);
|
player.getInventory().add(item);
|
||||||
|
player.dispatch(new ResourceGatheredEvent(item.getId(), 1, player));
|
||||||
player.getSkills().addExperience(Skills.SMITHING, bar.getBarType().getExperience() * bar.getSmithingType().getRequired(), true);
|
player.getSkills().addExperience(Skills.SMITHING, bar.getBarType().getExperience() * bar.getSmithingType().getRequired(), true);
|
||||||
String message = StringUtils.isPlusN(ItemDefinition.forId(bar.getProduct()).getName().toLowerCase()) ? "an" : "a";
|
String message = StringUtils.isPlusN(ItemDefinition.forId(bar.getProduct()).getName().toLowerCase()) ? "an" : "a";
|
||||||
player.getPacketDispatch().sendMessage("You hammer the " + bar.getBarType().getBarName().toLowerCase().replace("smithing", "") + "and make " + message + " " + ItemDefinition.forId(bar.getProduct()).getName().toLowerCase() + ".");
|
player.getPacketDispatch().sendMessage("You hammer the " + bar.getBarType().getBarName().toLowerCase().replace("smithing", "") + "and make " + message + " " + ItemDefinition.forId(bar.getProduct()).getName().toLowerCase() + ".");
|
||||||
if (TutorialSession.getExtension(player).getStage() == 42) {
|
|
||||||
TutorialStage.load(player, 43, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bar == Bars.BLURITE_CROSSBOW_LIMBS
|
if (bar == Bars.BLURITE_CROSSBOW_LIMBS
|
||||||
&& player.getLocation().withinDistance(new Location(3000, 3145, 0), 10)) { // near Thurgo's anvil
|
&& player.getLocation().withinDistance(new Location(3000, 3145, 0), 10)) { // near Thurgo's anvil
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package core.game.node.entity.skill.smithing.smelting;
|
||||||
|
|
||||||
import static api.ContentAPIKt.*;
|
import static api.ContentAPIKt.*;
|
||||||
import api.EquipmentSlot;
|
import api.EquipmentSlot;
|
||||||
|
import api.events.ResourceGatheredEvent;
|
||||||
import core.game.container.impl.EquipmentContainer;
|
import core.game.container.impl.EquipmentContainer;
|
||||||
import org.rs09.consts.Items;
|
import org.rs09.consts.Items;
|
||||||
import core.game.world.map.Location;
|
import core.game.world.map.Location;
|
||||||
|
|
@ -142,6 +143,7 @@ public class SmeltingPulse extends SkillPulse<Item> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
player.getInventory().add(new Item(bar.getProduct().getId(), amt));
|
player.getInventory().add(new Item(bar.getProduct().getId(), amt));
|
||||||
|
player.dispatch(new ResourceGatheredEvent(bar.getProduct().getId(), 1, player));
|
||||||
double xp = bar.getExperience() * amt;
|
double xp = bar.getExperience() * amt;
|
||||||
// Goldsmith gauntlets
|
// Goldsmith gauntlets
|
||||||
if (((player.getEquipment().get(EquipmentContainer.SLOT_HANDS) != null
|
if (((player.getEquipment().get(EquipmentContainer.SLOT_HANDS) != null
|
||||||
|
|
|
||||||
|
|
@ -595,7 +595,7 @@ public abstract class Familiar extends NPC implements Plugin<Object> {
|
||||||
public void dismiss() {
|
public void dismiss() {
|
||||||
clear();
|
clear();
|
||||||
getPulseManager().clear();
|
getPulseManager().clear();
|
||||||
owner.getInterfaceManager().hideTabs(7);
|
owner.getInterfaceManager().removeTabs(7);
|
||||||
owner.getFamiliarManager().setFamiliar(null);
|
owner.getFamiliarManager().setFamiliar(null);
|
||||||
owner.getConfigManager().set(448, -1);
|
owner.getConfigManager().set(448, -1);
|
||||||
owner.getConfigManager().set(1176, 0);
|
owner.getConfigManager().set(1176, 0);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package core.net.packet.in;
|
package core.net.packet.in;
|
||||||
|
|
||||||
|
import api.events.ButtonClickedEvent;
|
||||||
import core.game.component.Component;
|
import core.game.component.Component;
|
||||||
import core.game.component.ComponentPlugin;
|
import core.game.component.ComponentPlugin;
|
||||||
import core.game.container.Container;
|
import core.game.container.Container;
|
||||||
|
|
@ -61,6 +62,7 @@ public class ActionButtonPacket implements IncomingPacket {
|
||||||
}
|
}
|
||||||
int cOpcode = buffer.opcode();
|
int cOpcode = buffer.opcode();
|
||||||
ComponentPlugin plugin = c.getPlugin();
|
ComponentPlugin plugin = c.getPlugin();
|
||||||
|
player.dispatch(new ButtonClickedEvent(c.getId(), buttonId));
|
||||||
if (plugin != null) {
|
if (plugin != null) {
|
||||||
player.debug("Component plugin = " + plugin.getClass().getSimpleName());
|
player.debug("Component plugin = " + plugin.getClass().getSimpleName());
|
||||||
plugin.handle(player, c, cOpcode, buttonId, slot, itemId);
|
plugin.handle(player, c, cOpcode, buttonId, slot, itemId);
|
||||||
|
|
|
||||||
|
|
@ -44,9 +44,7 @@ public class AIPlayer extends Player {
|
||||||
*/
|
*/
|
||||||
private static int currentUID = 0x1;
|
private static int currentUID = 0x1;
|
||||||
|
|
||||||
private static List<String> botNames = new ArrayList<String>();
|
private static final List<String> botNames = new ArrayList<String>();
|
||||||
|
|
||||||
private static List<String> usedNames = new ArrayList<String>();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The active Artificial intelligent players mapping.
|
* The active Artificial intelligent players mapping.
|
||||||
|
|
@ -205,11 +203,7 @@ public class AIPlayer extends Player {
|
||||||
public static String getRandomName(){
|
public static String getRandomName(){
|
||||||
int index = (RandomFunction.random(botNames.size()));
|
int index = (RandomFunction.random(botNames.size()));
|
||||||
String name = botNames.get(index);
|
String name = botNames.get(index);
|
||||||
while(usedNames.contains(name)){
|
botNames.remove(index);
|
||||||
index = (RandomFunction.random(botNames.size()));
|
|
||||||
name = botNames.get(index);
|
|
||||||
}
|
|
||||||
usedNames.add(name);
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,6 @@ import core.game.container.impl.EquipmentContainer
|
||||||
import core.game.content.dialogue.FacialExpression
|
import core.game.content.dialogue.FacialExpression
|
||||||
import core.game.content.global.action.SpecialLadders
|
import core.game.content.global.action.SpecialLadders
|
||||||
import core.game.node.Node
|
import core.game.node.Node
|
||||||
import core.game.node.scenery.Scenery
|
|
||||||
import core.game.node.scenery.SceneryBuilder
|
|
||||||
import core.game.node.entity.Entity
|
import core.game.node.entity.Entity
|
||||||
import core.game.node.entity.combat.ImpactHandler
|
import core.game.node.entity.combat.ImpactHandler
|
||||||
import core.game.node.entity.impl.Animator
|
import core.game.node.entity.impl.Animator
|
||||||
|
|
@ -19,12 +17,15 @@ import core.game.node.entity.player.Player
|
||||||
import core.game.node.entity.player.link.TeleportManager
|
import core.game.node.entity.player.link.TeleportManager
|
||||||
import core.game.node.entity.player.link.audio.Audio
|
import core.game.node.entity.player.link.audio.Audio
|
||||||
import core.game.node.entity.player.link.emote.Emotes
|
import core.game.node.entity.player.link.emote.Emotes
|
||||||
|
import core.game.node.entity.player.link.quest.Quest
|
||||||
import core.game.node.entity.player.link.quest.QuestRepository
|
import core.game.node.entity.player.link.quest.QuestRepository
|
||||||
import core.game.node.entity.skill.Skills
|
import core.game.node.entity.skill.Skills
|
||||||
import core.game.node.entity.skill.gather.SkillingTool
|
import core.game.node.entity.skill.gather.SkillingTool
|
||||||
import core.game.node.item.GroundItem
|
import core.game.node.item.GroundItem
|
||||||
import core.game.node.item.GroundItemManager
|
import core.game.node.item.GroundItemManager
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
|
import core.game.node.scenery.Scenery
|
||||||
|
import core.game.node.scenery.SceneryBuilder
|
||||||
import core.game.system.task.Pulse
|
import core.game.system.task.Pulse
|
||||||
import core.game.world.map.Direction
|
import core.game.world.map.Direction
|
||||||
import core.game.world.map.Location
|
import core.game.world.map.Location
|
||||||
|
|
@ -39,10 +40,10 @@ import core.game.world.update.flag.context.Animation
|
||||||
import core.game.world.update.flag.context.Graphics
|
import core.game.world.update.flag.context.Graphics
|
||||||
import rs09.game.content.dialogue.DialogueFile
|
import rs09.game.content.dialogue.DialogueFile
|
||||||
import rs09.game.content.dialogue.SkillDialogueHandler
|
import rs09.game.content.dialogue.SkillDialogueHandler
|
||||||
import rs09.game.content.global.GlobalKillCounter;
|
import rs09.game.content.global.GlobalKillCounter
|
||||||
import rs09.game.interaction.InteractionListeners
|
import rs09.game.interaction.InteractionListeners
|
||||||
import rs09.game.system.SystemLogger
|
import rs09.game.system.SystemLogger
|
||||||
import rs09.game.system.config.ItemConfigParser;
|
import rs09.game.system.config.ItemConfigParser
|
||||||
import rs09.game.world.GameWorld
|
import rs09.game.world.GameWorld
|
||||||
import rs09.game.world.GameWorld.Pulser
|
import rs09.game.world.GameWorld.Pulser
|
||||||
import rs09.game.world.repository.Repository
|
import rs09.game.world.repository.Repository
|
||||||
|
|
@ -1289,6 +1290,7 @@ fun questStage(player: Player, quest: String): Int{
|
||||||
|
|
||||||
fun setQuestStage(player: Player, quest: String, stage: Int) {
|
fun setQuestStage(player: Player, quest: String, stage: Int) {
|
||||||
player.questRepository.setStage(QuestRepository.getQuests()[quest]!!, stage)
|
player.questRepository.setStage(QuestRepository.getQuests()[quest]!!, stage)
|
||||||
|
player.questRepository.syncronizeTab(player)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -9,3 +9,5 @@ data class NPCKillEvent(val npc: NPC) : Event
|
||||||
data class TeleportEvent(val type: TeleportType, val source: Int = -1) : Event
|
data class TeleportEvent(val type: TeleportType, val source: Int = -1) : Event
|
||||||
data class LitFireEvent(val logId: Int) : Event
|
data class LitFireEvent(val logId: Int) : Event
|
||||||
data class InteractionEvent(val target: Node, val option: String) : Event
|
data class InteractionEvent(val target: Node, val option: String) : Event
|
||||||
|
data class ButtonClickedEvent(val iface: Int, val buttonId: Int) : Event
|
||||||
|
data class UsedWithEvent(val used: Int, val with: Int) : Event
|
||||||
|
|
@ -169,8 +169,10 @@ class ServerConstants {
|
||||||
arrayOf(Location.create(2711, 10132, 0), "brine rats"),
|
arrayOf(Location.create(2711, 10132, 0), "brine rats"),
|
||||||
arrayOf(Location.create(2328, 3677, 0), "piscatoris"),
|
arrayOf(Location.create(2328, 3677, 0), "piscatoris"),
|
||||||
arrayOf(Location.create(2660, 3158, 0), "fishing trawler", "trawler"),
|
arrayOf(Location.create(2660, 3158, 0), "fishing trawler", "trawler"),
|
||||||
arrayOf(Location.create(2800, 3667, 0), "mountain camp")
|
arrayOf(Location.create(2800, 3667, 0), "mountain camp"),
|
||||||
|
arrayOf(Location.create(2575, 3250, 0), "clocktower")
|
||||||
)
|
)
|
||||||
|
//arrayOf(Location.create(0, 0, 0), ""),
|
||||||
|
|
||||||
@JvmField
|
@JvmField
|
||||||
var DATABASE: Database? = null
|
var DATABASE: Database? = null
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,6 @@ object Event {
|
||||||
val Teleport = TeleportEvent::class.java
|
val Teleport = TeleportEvent::class.java
|
||||||
val FireLit = LitFireEvent::class.java
|
val FireLit = LitFireEvent::class.java
|
||||||
val Interaction = InteractionEvent::class.java
|
val Interaction = InteractionEvent::class.java
|
||||||
|
val ButtonClicked = ButtonClickedEvent::class.java
|
||||||
|
val UsedWith = UsedWithEvent::class.java
|
||||||
}
|
}
|
||||||
|
|
@ -23,7 +23,7 @@ class WGuildListeners : InteractionListener() {
|
||||||
return@onEquip false
|
return@onEquip false
|
||||||
}
|
}
|
||||||
|
|
||||||
player.interfaceManager.hideTabs(2, 3, 5, 6, 7, 11, 12)
|
player.interfaceManager.removeTabs(2, 3, 5, 6, 7, 11, 12)
|
||||||
player.interfaceManager.openTab(4, Component(411))
|
player.interfaceManager.openTab(4, Component(411))
|
||||||
player.interfaceManager.setViewedTab(4)
|
player.interfaceManager.setViewedTab(4)
|
||||||
player.interfaceManager.open(Component(410))
|
player.interfaceManager.open(Component(410))
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package rs09.game.content.ame
|
package rs09.game.content.ame
|
||||||
|
|
||||||
|
import api.getAttribute
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.world.map.zone.ZoneRestriction
|
import core.game.world.map.zone.ZoneRestriction
|
||||||
import core.tools.RandomFunction
|
import core.tools.RandomFunction
|
||||||
|
|
@ -17,7 +18,7 @@ class RandomEventManager(val player: Player) {
|
||||||
|
|
||||||
fun tick() {
|
fun tick() {
|
||||||
if (player.isArtificial) return
|
if (player.isArtificial) return
|
||||||
if (GameWorld.ticks > nextSpawn) fireEvent()
|
if (GameWorld.ticks > nextSpawn && getAttribute(player, "tutorial:complete", false)) fireEvent()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun fireEvent() {
|
fun fireEvent() {
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ class LostTribeCutscene(val pl: Player? = null) : CutscenePlugin("Lost Tribe Cut
|
||||||
override fun open() {
|
override fun open() {
|
||||||
player.setAttribute("cutscene:original-loc",player.location)
|
player.setAttribute("cutscene:original-loc",player.location)
|
||||||
player.setAttribute("real-end",Location.create(3207, 3221, 0))
|
player.setAttribute("real-end",Location.create(3207, 3221, 0))
|
||||||
player.interfaceManager.hideTabs(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14)
|
player.interfaceManager.removeTabs(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14)
|
||||||
if(player.settings.isRunToggled){
|
if(player.settings.isRunToggled){
|
||||||
player.settings.toggleRun()
|
player.settings.toggleRun()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,163 @@
|
||||||
|
package rs09.game.content.quest.members.tribaltotem
|
||||||
|
|
||||||
|
import core.game.content.dialogue.book.BookLine
|
||||||
|
import core.game.content.dialogue.DialoguePlugin
|
||||||
|
import core.game.content.dialogue.book.Book
|
||||||
|
import core.game.content.dialogue.book.Page
|
||||||
|
import core.game.content.dialogue.book.PageSet
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.plugin.Initializable
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This was some code for a post-tutorial RSPS guide book a long ass
|
||||||
|
* time ago, but it was using the ID for the guide book for Tribal Totem
|
||||||
|
* and I kind of need that, bro
|
||||||
|
*
|
||||||
|
* @author Splinter
|
||||||
|
* @author Phil
|
||||||
|
*/
|
||||||
|
@Initializable
|
||||||
|
class ArdougneGuideBook : Book {
|
||||||
|
/**
|
||||||
|
* Constructs a new `ShieldofArravBook` `Object`.
|
||||||
|
*/
|
||||||
|
constructor(player: Player?) : super(player, "Ardougne Guide Book", 1856, *PAGES) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a new `ShieldofArravBook` `Object`.
|
||||||
|
*/
|
||||||
|
constructor() {
|
||||||
|
/**
|
||||||
|
* empty.
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun finish() {}
|
||||||
|
override fun display(set: Array<Page>) {
|
||||||
|
player.lock()
|
||||||
|
player.interfaceManager.open(getInterface())
|
||||||
|
player.packetDispatch.sendString("Previous", getInterface().id, 77)
|
||||||
|
player.packetDispatch.sendString("Next", getInterface().id, 78)
|
||||||
|
for (i in 55..76) {
|
||||||
|
player.packetDispatch.sendString("", getInterface().id, i)
|
||||||
|
}
|
||||||
|
player.packetDispatch.sendString(getName(), getInterface().id, 6)
|
||||||
|
for (page in set) {
|
||||||
|
for (line in page.lines) {
|
||||||
|
player.packetDispatch.sendString(line.message, getInterface().id, line.child)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val lastPage = index == sets.size - 1
|
||||||
|
if (lastPage) {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
player.unlock()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun newInstance(player: Player): DialoguePlugin {
|
||||||
|
return ArdougneGuideBook(player)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray {
|
||||||
|
return intArrayOf(ID)
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
/**
|
||||||
|
* Represents the book id
|
||||||
|
*/
|
||||||
|
var ID = 387454
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents the array of pages for this book.
|
||||||
|
*/
|
||||||
|
private val PAGES = arrayOf(
|
||||||
|
PageSet(
|
||||||
|
Page(
|
||||||
|
BookLine("Introduction", 57),
|
||||||
|
BookLine("This book is your guide to", 59),
|
||||||
|
BookLine("the vibrant city of Ardougne.", 60),
|
||||||
|
BookLine("Ardougne is known as an", 61),
|
||||||
|
BookLine("exciting modern city located", 62),
|
||||||
|
BookLine("on the sun drenched southern", 63),
|
||||||
|
BookLine("coast of Kandarin", 64),
|
||||||
|
),
|
||||||
|
Page(
|
||||||
|
BookLine("Ardougne: City of Shopping!", 66),
|
||||||
|
BookLine("Come sample the delights of", 67),
|
||||||
|
BookLine("the Ardougne market - the", 68),
|
||||||
|
BookLine("biggest in the known world!", 69),
|
||||||
|
BookLine("From spices to silk, there", 70),
|
||||||
|
BookLine("is something here for", 71),
|
||||||
|
BookLine("everybody! Other popular", 72),
|
||||||
|
BookLine("shopping destinations in", 73),
|
||||||
|
BookLine("the area include the Armoury", 74),
|
||||||
|
BookLine("and the ever popular", 75),
|
||||||
|
BookLine("Adventurers' supply store.", 76)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
PageSet(
|
||||||
|
Page(
|
||||||
|
BookLine("Ardougne: City of Fun!", 55),
|
||||||
|
BookLine("If you're looking for", 56),
|
||||||
|
BookLine("entertainment in Ardougne,", 57),
|
||||||
|
BookLine("why not pay a visit to the", 58),
|
||||||
|
BookLine("Ardougne City zoo? Or relax", 59),
|
||||||
|
BookLine("with a drink in the ever", 60),
|
||||||
|
BookLine("popular Flying Horse Inn?", 61),
|
||||||
|
BookLine("And for the adventurous,", 62),
|
||||||
|
BookLine("there are always rats to be", 63),
|
||||||
|
BookLine("slaughtered in the expansive", 64),
|
||||||
|
BookLine("and vermin-ridden sewers", 65)
|
||||||
|
),
|
||||||
|
Page(
|
||||||
|
BookLine("There is something truly",66),
|
||||||
|
BookLine("for everybody here!",67)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
PageSet(
|
||||||
|
Page(
|
||||||
|
BookLine("Ardougne: City of History!", 55),
|
||||||
|
BookLine("Ardougne is renowned as an", 56),
|
||||||
|
BookLine("important city of historical", 57),
|
||||||
|
BookLine("interest. One historic building", 58),
|
||||||
|
BookLine("is the magnificent Handelmort", 59),
|
||||||
|
BookLine("Mansion, currently owned by", 60),
|
||||||
|
BookLine("Lord Francis Kurt Handelmort.", 61),
|
||||||
|
BookLine("Also of historical interest is", 62),
|
||||||
|
BookLine("Ardougne Castle in the east of", 63),
|
||||||
|
BookLine("the city recently opened to the", 64),
|
||||||
|
BookLine("public. And of course the Holy", 65)
|
||||||
|
),
|
||||||
|
Page(
|
||||||
|
BookLine("Order of Paladins still wander",66),
|
||||||
|
BookLine("the streets of Ardougne, and",67),
|
||||||
|
BookLine("are often of interest to",68),
|
||||||
|
BookLine("tourists.",69)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
PageSet(
|
||||||
|
Page(
|
||||||
|
BookLine("Further Fields", 55),
|
||||||
|
BookLine("", 56),
|
||||||
|
BookLine("The area surrounding Ardougne", 57),
|
||||||
|
BookLine("is also of great interest to", 58),
|
||||||
|
BookLine("the cultural tourist. If you", 59),
|
||||||
|
BookLine("want to go further afield, why", 60),
|
||||||
|
BookLine("not have a look at the ominous", 61),
|
||||||
|
BookLine("Pillars of Zanash, the", 62),
|
||||||
|
BookLine("mysterious marble pillars", 63),
|
||||||
|
BookLine("located just West of the city?", 64),
|
||||||
|
BookLine("Or perhaps the town of Brimhaven,", 65)
|
||||||
|
),
|
||||||
|
Page(
|
||||||
|
BookLine("on the exotic island of Karamja?", 66),
|
||||||
|
BookLine("It's only a short boat trip with", 67),
|
||||||
|
BookLine("regular transport leaving from", 68),
|
||||||
|
BookLine("Ardougne harbor at all times", 69),
|
||||||
|
BookLine("of the day, all year round.", 70)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,134 @@
|
||||||
|
package rs09.game.content.quest.members.tribaltotem
|
||||||
|
|
||||||
|
import api.findNPC
|
||||||
|
import core.game.content.dialogue.DialoguePlugin
|
||||||
|
import core.game.content.dialogue.FacialExpression
|
||||||
|
import core.game.node.entity.impl.Projectile
|
||||||
|
import core.game.node.entity.npc.NPC
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.game.system.task.Pulse
|
||||||
|
import core.game.world.map.Location
|
||||||
|
import core.game.world.update.flag.context.Animation
|
||||||
|
import core.game.world.update.flag.context.Graphics
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import org.rs09.consts.NPCs
|
||||||
|
import rs09.game.content.global.travel.EssenceTeleport
|
||||||
|
import rs09.game.world.GameWorld
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class CrompertyDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
|
||||||
|
override fun open(vararg args: Any?): Boolean {
|
||||||
|
npc = args[0] as NPC
|
||||||
|
npcl(FacialExpression.HAPPY,"Hello ${player.name}, I'm Cromperty. Sedridor has told me about you. As a wizard and an inventor he has aided me in my great invention!")
|
||||||
|
stage = 0
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||||
|
when(stage){
|
||||||
|
0 -> options("Two jobs? that's got to be tough","So what have you invented?","Can you teleport me to the Rune Essence?").also { stage++ }
|
||||||
|
1 ->when(buttonId){
|
||||||
|
1 -> playerl(FacialExpression.HAPPY,"Two jobs? That's got to be tough.").also { stage = 5 }
|
||||||
|
2 -> playerl(FacialExpression.ASKING,"So, what have you invented?").also { stage = 10 }
|
||||||
|
3 -> playerl(FacialExpression.HAPPY,"Can you teleport me to the Rune Essence?").also {
|
||||||
|
if(player.questRepository.isComplete("Rune Mysteries")){
|
||||||
|
EssenceTeleport.teleport(npc,player)
|
||||||
|
end()
|
||||||
|
}
|
||||||
|
else stage = 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
2 -> npcl(FacialExpression.THINKING,"I have no idea what you're talking about.")
|
||||||
|
5 -> npcl(FacialExpression.HAPPY,"Not when you combine them it isn't! Invent MAGIC things!").also { stage++ }
|
||||||
|
6 -> options("So what have you invented?","Well I shall leave you to your inventing").also { stage++ }
|
||||||
|
7 -> when(buttonId){
|
||||||
|
1 -> playerl(FacialExpression.ASKING,"So, what have you invented?").also { stage = 10 }
|
||||||
|
2 -> playerl(FacialExpression.HAPPY,"Well I shall leave you to your inventing").also { stage++ }
|
||||||
|
}
|
||||||
|
8 -> npcl(FacialExpression.HAPPY,"Thanks for dropping by! Stop again anytime!").also { stage = 1000 }
|
||||||
|
|
||||||
|
10 -> npcl(FacialExpression.HAPPY,"Ah! My latest invention is my patent pending teleportation block! It emits a low level magical signal,").also { stage++ }
|
||||||
|
11 -> npcl(FacialExpression.HAPPY,"that will allow me to locate it anywhere in the world, and teleport anything directly to it! I hope to revolutionize the entire teleportation system!").also { stage++ }
|
||||||
|
12 -> npcl(FacialExpression.HAPPY,"Don't you think I'm great? Uh, I mean it's great?").also { stage++ }
|
||||||
|
13 -> options("So where is the other block?","Can I be teleported please?").also { stage++ }
|
||||||
|
14 -> when(buttonId){
|
||||||
|
1 -> playerl(FacialExpression.ASKING,"So where is the other block?").also { stage = 15 }
|
||||||
|
2 -> playerl(FacialExpression.ASKING,"Can I be teleported please?").also { stage = 25 }
|
||||||
|
}
|
||||||
|
|
||||||
|
15 -> npcl(FacialExpression.THINKING,"Well...Hmm. I would guess somewhere between here and the Wizards' Tower in Misthalin.").also { stage++ }
|
||||||
|
16 -> npcl(FacialExpression.HAPPY,"All I know is that it hasn't got there yet as the wizards there would have contacted me.").also { stage++ }
|
||||||
|
17 -> npcl(FacialExpression.THINKING,"I'm using the GPDT for delivery. They assured me it would be delivered promptly.").also { stage++ }
|
||||||
|
18 -> playerl(FacialExpression.ASKING,"Who are the GPDT?").also { stage++ }
|
||||||
|
19 -> npcl(FacialExpression.HAPPY,"The Gielinor Parcel Delivery Team. They come very highly recommended.").also { stage++ }
|
||||||
|
20 -> npcl(FacialExpression.HAPPY,"Their motto is: \"We aim to deliver your stuff at some point after you have paid us!\"").also { stage = 1000 }
|
||||||
|
|
||||||
|
25 -> npcl(FacialExpression.HAPPY,"By all means! I'm afraid I can't give you any specifics as to where you will come out however. Presumably wherever the other block is located.").also { stage++ }
|
||||||
|
26 -> options("Yes, that sounds good. Teleport me!","That sounds dangerous. Leave me here.").also { stage++ }
|
||||||
|
27 -> when(buttonId){
|
||||||
|
1 -> playerl(FacialExpression.HAPPY,"Yes, that sounds good. Teleport me!").also { stage = 30 }
|
||||||
|
2 -> playerl(FacialExpression.THINKING,"That sounds dangerous. Leave me here.").also { stage++ }
|
||||||
|
}
|
||||||
|
28 -> npcl(FacialExpression.HAPPY,"As you wish.").also { stage = 1000 }
|
||||||
|
|
||||||
|
30 -> npcl(FacialExpression.HAPPY,"Okey dokey! Ready?").also {
|
||||||
|
stage = if(player.questRepository.hasStarted("Tribal Totem") && player.questRepository.getStage("Tribal Totem") < 50) {
|
||||||
|
35
|
||||||
|
}
|
||||||
|
else 31
|
||||||
|
}
|
||||||
|
31 -> npcl(FacialExpression.THINKING,"Hmmm... that's odd... I can't seem to get a signal...").also { stage++ }
|
||||||
|
32 -> playerl(FacialExpression.SAD,"Oh well, never mind.").also { stage = 1000 }
|
||||||
|
|
||||||
|
35 -> npcl(FacialExpression.HAPPY,"Okay, I got a signal. Get ready!").also {
|
||||||
|
TribalTotemTeleport(player, npc)
|
||||||
|
end()
|
||||||
|
}
|
||||||
|
|
||||||
|
1000 -> end()
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun newInstance(player: Player?): DialoguePlugin {
|
||||||
|
return CrompertyDialogue(player)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray {
|
||||||
|
return intArrayOf(844,NPCs.WIZARD_CROMPERTY_2328)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun TribalTotemTeleport(player : Player, npc: NPC) {
|
||||||
|
val LOCATIONS = arrayOf(Location.create(2649, 3272, 0),Location.create(2642, 3321, 0))
|
||||||
|
npc.animate(Animation(437))
|
||||||
|
npc.faceTemporary(player, 1)
|
||||||
|
npc.graphics(Graphics(108))
|
||||||
|
player.lock()
|
||||||
|
player.audioManager.send(125)
|
||||||
|
Projectile.create(npc, player, 109).send()
|
||||||
|
npc.sendChat("Dipsolum sententa sententi!")
|
||||||
|
GameWorld.Pulser.submit(object : Pulse(1) {
|
||||||
|
var counter = 0
|
||||||
|
var delivered = player.questRepository.getStage("Tribal Totem") >= 25
|
||||||
|
override fun pulse(): Boolean {
|
||||||
|
when(counter++){
|
||||||
|
2 -> {
|
||||||
|
if(delivered) {
|
||||||
|
player.questRepository.getQuest("Tribal Totem").setStage(player,30)
|
||||||
|
player.properties.teleportLocation = LOCATIONS[1]
|
||||||
|
}
|
||||||
|
else player.properties.teleportLocation = LOCATIONS[0]
|
||||||
|
}
|
||||||
|
3 ->{
|
||||||
|
player.graphics(Graphics(110))
|
||||||
|
player.unlock()
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
package rs09.game.content.quest.members.tribaltotem
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class GPDTEmployeeDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
override fun open(vararg args: Any?): Boolean {
|
||||||
|
npcl(FacialExpression.HAPPY,"Welcome to G.P.D.T.!")
|
||||||
|
stage = if(player.questRepository.getStage("Tribal Totem") == 20){
|
||||||
|
5
|
||||||
|
}else 0
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||||
|
when(stage){
|
||||||
|
0 -> playerl(FacialExpression.HAPPY,"Thank you very much.").also { stage = 1000 }
|
||||||
|
|
||||||
|
5 -> playerl(FacialExpression.ASKING,"So, when are you going to deliver this crate?").also { stage++ }
|
||||||
|
6 -> npcl(FacialExpression.THINKING,"Well... I guess we could do it now...").also {
|
||||||
|
player.questRepository.getQuest("Tribal Totem").setStage(player,25)
|
||||||
|
stage = 1000
|
||||||
|
}
|
||||||
|
|
||||||
|
1000 -> end()
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun newInstance(player: Player?): DialoguePlugin {
|
||||||
|
return GPDTEmployeeDialogue(player)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray {
|
||||||
|
return intArrayOf(NPCs.RPDT_EMPLOYEE_843)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package rs09.game.content.quest.members.tribaltotem
|
||||||
|
|
||||||
|
import core.game.content.dialogue.DialoguePlugin
|
||||||
|
import core.game.content.dialogue.FacialExpression
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.plugin.Initializable
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class HoracioDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
|
||||||
|
override fun open(vararg args: Any?): Boolean {
|
||||||
|
if(player.questRepository.hasStarted("Tribal Totem")){
|
||||||
|
npcl(FacialExpression.HAPPY,"It's a fine day to be out in a garden, isn't it? ")
|
||||||
|
stage = 5
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
npcl(FacialExpression.HAPPY,"It's a fine day to be out in a garden, isn't it? ")
|
||||||
|
stage = 0
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||||
|
when(stage){
|
||||||
|
0 -> playerl(FacialExpression.HAPPY,"Yes it's very nice.").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.HAPPY,"Days like these make me glad to be alive!").also { stage = 1000 }
|
||||||
|
|
||||||
|
5 -> playerl(FacialExpression.ASKING,"So... who are you?").also { stage++ }
|
||||||
|
6 -> npcl(FacialExpression.HAPPY,"My name is Horacio Dobson. I'm a gardener to Lord Handlemort.").also { stage++ }
|
||||||
|
7 -> npcl(FacialExpression.HAPPY,"Take a look around this beautiful garden, all of this is my handiwork.").also { stage++ }
|
||||||
|
8 -> options("So... do you garden round the back too?","Do you need any help?").also { stage++ }
|
||||||
|
9 -> when(buttonId){
|
||||||
|
1 -> playerl(FacialExpression.THINKING,"So... do you garden round the back, too?").also { stage = 10 }
|
||||||
|
2 -> playerl(FacialExpression.ASKING,"Do you need any help?").also { stage = 20 }
|
||||||
|
}
|
||||||
|
|
||||||
|
10 -> npcl(FacialExpression.HAPPY,"That I do!").also { stage++ }
|
||||||
|
11 -> playerl(FacialExpression.ASKING,"Doesn't all of the security around the house get in your way then?").also { stage++ }
|
||||||
|
12 -> npcl(FacialExpression.HAPPY,"Ah. I'm used to all that. I have my keys, the guard dogs know me, and I know the combination to the door lock.").also { stage++ }
|
||||||
|
13 -> npcl(FacialExpression.HAPPY,"It's rather easy, it's his middle name.").also { stage++ }
|
||||||
|
14 -> playerl(FacialExpression.ASKING,"Whose middle name?").also { stage++ }
|
||||||
|
15 -> npcl(FacialExpression.ANNOYED,"Hum. I probably shouldn't have said that. Forget I mentioned it.").also { stage = 1000 }
|
||||||
|
|
||||||
|
20 -> npcl(FacialExpression.ANNOYED,"Trying to muscle in on my job, eh? I'm more than happy to do this all by myself!").also { stage = 1000 }
|
||||||
|
|
||||||
|
1000 -> end()
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun newInstance(player: Player?): DialoguePlugin {
|
||||||
|
return HoracioDialogue(player)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray {
|
||||||
|
return intArrayOf(845)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
package rs09.game.content.quest.members.tribaltotem
|
||||||
|
|
||||||
|
import api.removeItem
|
||||||
|
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.Items
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class KangaiMauDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
|
||||||
|
override fun open(vararg args: Any?): Boolean {
|
||||||
|
if(!player.questRepository.hasStarted("Tribal Totem")){
|
||||||
|
npcl(FacialExpression.HAPPY,"Hello. I'm Kangai Mau of the Rantuki Tribe.")
|
||||||
|
stage = 0
|
||||||
|
}
|
||||||
|
else if(player.inventory.containsAtLeastOneItem(Items.TOTEM_1857)){
|
||||||
|
npcl(FacialExpression.ASKING,"Have you got our totem back?")
|
||||||
|
stage = 35
|
||||||
|
}
|
||||||
|
else if(player.questRepository.hasStarted("Tribal Totem")){
|
||||||
|
npcl(FacialExpression.ASKING,"Have you got our totem back?")
|
||||||
|
stage = 30
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||||
|
when(stage){
|
||||||
|
0 -> options("And what are you doing here in Brimhaven?","I'm in search of adventure!","Who are the Rantuki tribe?").also { stage++ }
|
||||||
|
1 -> when(buttonId){
|
||||||
|
1 -> playerl(FacialExpression.ASKING,"And what are you doing here in Brimhaven?").also { stage = 5 }
|
||||||
|
2 -> playerl(FacialExpression.HAPPY,"I'm in search of adventure!").also { stage = 15 }
|
||||||
|
3 -> playerl(FacialExpression.ASKING,"Who are the Rantuki Tribe?").also { stage = 10 }
|
||||||
|
}
|
||||||
|
|
||||||
|
5 -> npcl(FacialExpression.HAPPY,"I'm looking for someone brave to go on important mission. Someone skilled in thievery and sneaking about.").also { stage++ }
|
||||||
|
6 -> npcl(FacialExpression.HAPPY,"I am told I can find such people in Brimhaven.").also { stage++ }
|
||||||
|
7 -> playerl(FacialExpression.HAPPY,"Yep. I have heard there are many of that type here.").also { stage++ }
|
||||||
|
8 -> npcl(FacialExpression.THINKING,"Let's hope I find them.").also { stage = 1000 }
|
||||||
|
|
||||||
|
10 -> npcl(FacialExpression.HAPPY,"A proud and noble tribe of Karamja.").also { stage++ }
|
||||||
|
11 -> npcl(FacialExpression.ANGRY,"But now we are few, as men come from across, steal our land, and settle on our hunting grounds").also { stage = 1000 }
|
||||||
|
|
||||||
|
15 -> npcl(FacialExpression.HAPPY,"Adventure is something I may be able to give. I need someone to go on a mission to the city of Ardougne.").also { stage++ }
|
||||||
|
16 -> npcl(FacialExpression.HAPPY,"There you will find the house of Lord Handlemort. In his house he has our tribal totem. We need it back.").also { stage++ }
|
||||||
|
17 -> playerl(FacialExpression.ASKING,"Why does he have it?").also { stage++ }
|
||||||
|
18 -> npcl(FacialExpression.ANGRY,"Lord Handlemort is an Ardougnese explorer which means he think he have the right to come to my tribal home,").also { stage++ }
|
||||||
|
19 -> npcl(FacialExpression.ANGRY,"steal our stuff and put in his private museum.").also { stage++ }
|
||||||
|
20 -> playerl(FacialExpression.THINKING,"How can I find Handlemoret's house? Ardougne IS a big place...").also { stage++ }
|
||||||
|
21 -> npcl(FacialExpression.ANNOYED,"I don't know Ardougne. You tell me.").also { stage++ }
|
||||||
|
22 -> playerl(FacialExpression.HAPPY,"Ok, I will get it back.").also {
|
||||||
|
player.questRepository.getQuest("Tribal Totem").start(player)
|
||||||
|
player.questRepository.getQuest("Tribal Totem").setStage(player, 10)
|
||||||
|
stage++
|
||||||
|
}
|
||||||
|
23 -> npcl(FacialExpression.HAPPY,"Best of luck with that adventurer").also { stage = 1000 }
|
||||||
|
|
||||||
|
30 -> playerl(FacialExpression.SAD,"Not yet, sorry.").also { stage = 1000 }
|
||||||
|
|
||||||
|
35 -> playerl(FacialExpression.HAPPY,"Yes I have.").also { stage++ }
|
||||||
|
36 -> npcl(FacialExpression.HAPPY,"You have??? Many thanks brave adventurer! Here, have some freshly cooked Karamjan fish, caught specially by my tribe.").also { stage++ }
|
||||||
|
37 -> sendDialogue("You hand over the totem").also {
|
||||||
|
removeItem(player,Items.TOTEM_1857)
|
||||||
|
player.questRepository.getQuest("Tribal Totem").finish(player)
|
||||||
|
stage = 1000
|
||||||
|
}
|
||||||
|
|
||||||
|
1000 -> end()
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun newInstance(player: Player?): DialoguePlugin {
|
||||||
|
return KangaiMauDialogue(player)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray {
|
||||||
|
return intArrayOf(846)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,207 @@
|
||||||
|
package rs09.game.content.quest.members.tribaltotem
|
||||||
|
|
||||||
|
import api.closeInterface
|
||||||
|
import api.sendMessage
|
||||||
|
import api.setInterfaceText
|
||||||
|
import core.game.world.map.Location
|
||||||
|
import rs09.game.interaction.InterfaceListener
|
||||||
|
|
||||||
|
class TTDoorCodeInterfaceListener : InterfaceListener() {
|
||||||
|
|
||||||
|
override fun defineListeners() {
|
||||||
|
val LETTERONEBACK = 10
|
||||||
|
val LETTERONEFORWARD = 11
|
||||||
|
val LETTERTWOBACK = 12
|
||||||
|
val LETTERTWOFORWARD = 13
|
||||||
|
val LETTERTHREEBACK = 14
|
||||||
|
val LETTERTHREEFORWARD = 15
|
||||||
|
val LETTERFOURBACK = 16
|
||||||
|
val LETTERFOURFORWARD = 17
|
||||||
|
val ENTER = 18
|
||||||
|
val DOORLOCKINTERFACE = 285
|
||||||
|
val LETTERS = arrayOf(
|
||||||
|
"A",
|
||||||
|
"B",
|
||||||
|
"C",
|
||||||
|
"D",
|
||||||
|
"E",
|
||||||
|
"F",
|
||||||
|
"G",
|
||||||
|
"H",
|
||||||
|
"I",
|
||||||
|
"J",
|
||||||
|
"K",
|
||||||
|
"L",
|
||||||
|
"M",
|
||||||
|
"N",
|
||||||
|
"O",
|
||||||
|
"P",
|
||||||
|
"Q",
|
||||||
|
"R",
|
||||||
|
"S",
|
||||||
|
"T",
|
||||||
|
"U",
|
||||||
|
"V",
|
||||||
|
"W",
|
||||||
|
"X",
|
||||||
|
"Y",
|
||||||
|
"Z"
|
||||||
|
)
|
||||||
|
|
||||||
|
onOpen(DOORLOCKINTERFACE) { player, component ->
|
||||||
|
player.setAttribute("tt-letter-one", 0)
|
||||||
|
player.setAttribute("tt-letter-two", 0)
|
||||||
|
player.setAttribute("tt-letter-three", 0)
|
||||||
|
player.setAttribute("tt-letter-four", 0)
|
||||||
|
return@onOpen true
|
||||||
|
}
|
||||||
|
onClose(DOORLOCKINTERFACE) { player, component ->
|
||||||
|
player.removeAttribute("tt-letter-one")
|
||||||
|
player.removeAttribute("tt-letter-two")
|
||||||
|
player.removeAttribute("tt-letter-three")
|
||||||
|
player.removeAttribute("tt-letter-four")
|
||||||
|
return@onClose true
|
||||||
|
}
|
||||||
|
on(DOORLOCKINTERFACE) { player, component, opcode, buttonID, slot, itemID ->
|
||||||
|
when (buttonID) {
|
||||||
|
LETTERONEBACK -> {
|
||||||
|
if (player.getAttribute("tt-letter-one", 0) == 0) {
|
||||||
|
player.setAttribute("tt-letter-one", 25)
|
||||||
|
setInterfaceText(player, LETTERS[player.getAttribute("tt-letter-one", 0)], DOORLOCKINTERFACE, 6)
|
||||||
|
} else {
|
||||||
|
(player.incrementAttribute("tt-letter-one", -1))
|
||||||
|
setInterfaceText(player, LETTERS[player.getAttribute("tt-letter-one", 0)], DOORLOCKINTERFACE, 6)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LETTERONEFORWARD -> {
|
||||||
|
if (player.getAttribute("tt-letter-one", 0) == 25) {
|
||||||
|
player.setAttribute("tt-letter-one", 0)
|
||||||
|
setInterfaceText(player, LETTERS[player.getAttribute("tt-letter-one", 0)], DOORLOCKINTERFACE, 6)
|
||||||
|
} else {
|
||||||
|
(player.incrementAttribute("tt-letter-one", 1))
|
||||||
|
setInterfaceText(
|
||||||
|
player,
|
||||||
|
LETTERS[player.getAttribute("tt-letter-one", 0)],
|
||||||
|
DOORLOCKINTERFACE,
|
||||||
|
6
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LETTERTWOBACK -> {
|
||||||
|
if (player.getAttribute("tt-letter-two", 0) == 0) {
|
||||||
|
player.setAttribute("tt-letter-two", 25)
|
||||||
|
setInterfaceText(player, LETTERS[player.getAttribute("tt-letter-two", 0)], DOORLOCKINTERFACE, 7)
|
||||||
|
} else {
|
||||||
|
(player.incrementAttribute("tt-letter-two", -1))
|
||||||
|
setInterfaceText(player, LETTERS[player.getAttribute("tt-letter-two", 0)], DOORLOCKINTERFACE, 7)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LETTERTWOFORWARD -> {
|
||||||
|
if (player.getAttribute("tt-letter-two", 0) == 25) {
|
||||||
|
player.setAttribute("tt-letter-two", 0)
|
||||||
|
setInterfaceText(player, LETTERS[player.getAttribute("tt-letter-two", 0)], DOORLOCKINTERFACE, 7)
|
||||||
|
} else {
|
||||||
|
(player.incrementAttribute("tt-letter-two", 1))
|
||||||
|
setInterfaceText(player, LETTERS[player.getAttribute("tt-letter-two", 0)], DOORLOCKINTERFACE, 7)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LETTERTHREEBACK -> {
|
||||||
|
if (player.getAttribute("tt-letter-three", 0) == 0) {
|
||||||
|
player.setAttribute("tt-letter-three", 25)
|
||||||
|
setInterfaceText(
|
||||||
|
player,
|
||||||
|
LETTERS[player.getAttribute("tt-letter-three", 0)],
|
||||||
|
DOORLOCKINTERFACE,
|
||||||
|
8
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
(player.incrementAttribute("tt-letter-three", -1))
|
||||||
|
setInterfaceText(
|
||||||
|
player,
|
||||||
|
LETTERS[player.getAttribute("tt-letter-three", 0)],
|
||||||
|
DOORLOCKINTERFACE,
|
||||||
|
8
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LETTERTHREEFORWARD -> {
|
||||||
|
if (player.getAttribute("tt-letter-three", 0) == 25) {
|
||||||
|
player.setAttribute("tt-letter-three", 0)
|
||||||
|
setInterfaceText(
|
||||||
|
player,
|
||||||
|
LETTERS[player.getAttribute("tt-letter-three", 0)],
|
||||||
|
DOORLOCKINTERFACE,
|
||||||
|
8
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
(player.incrementAttribute("tt-letter-three", 1))
|
||||||
|
setInterfaceText(
|
||||||
|
player,
|
||||||
|
LETTERS[player.getAttribute("tt-letter-three", 0)],
|
||||||
|
DOORLOCKINTERFACE,
|
||||||
|
8
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LETTERFOURBACK -> {
|
||||||
|
if (player.getAttribute("tt-letter-four", 0) == 0) {
|
||||||
|
player.setAttribute("tt-letter-four", 25)
|
||||||
|
setInterfaceText(
|
||||||
|
player,
|
||||||
|
LETTERS[player.getAttribute("tt-letter-four", 0)],
|
||||||
|
DOORLOCKINTERFACE,
|
||||||
|
9
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
(player.incrementAttribute("tt-letter-four", -1))
|
||||||
|
setInterfaceText(
|
||||||
|
player,
|
||||||
|
LETTERS[player.getAttribute("tt-letter-four", 0)],
|
||||||
|
DOORLOCKINTERFACE,
|
||||||
|
9
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LETTERFOURFORWARD -> {
|
||||||
|
if (player.getAttribute("tt-letter-four", 0) == 25) {
|
||||||
|
player.setAttribute("tt-letter-four", 0)
|
||||||
|
setInterfaceText(
|
||||||
|
player,
|
||||||
|
LETTERS[player.getAttribute("tt-letter-four", 0)],
|
||||||
|
DOORLOCKINTERFACE,
|
||||||
|
9
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
(player.incrementAttribute("tt-letter-four", 1))
|
||||||
|
setInterfaceText(
|
||||||
|
player,
|
||||||
|
LETTERS[player.getAttribute("tt-letter-four", 0)],
|
||||||
|
DOORLOCKINTERFACE,
|
||||||
|
9
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ENTER -> {
|
||||||
|
val letterOne = LETTERS[player.getAttribute("tt-letter-one", 0)]
|
||||||
|
val letterTwo = LETTERS[player.getAttribute("tt-letter-two", 0)]
|
||||||
|
val letterThree = LETTERS[player.getAttribute("tt-letter-three", 0)]
|
||||||
|
val letterFour = LETTERS[player.getAttribute("tt-letter-four", 0)]
|
||||||
|
|
||||||
|
if (letterOne == "K" && letterTwo == "U" && letterThree == "R" && letterFour == "T") {
|
||||||
|
player.setAttribute("/save:TT:DoorUnlocked",true)
|
||||||
|
sendMessage(player, "You hear a satisfying click, signifying that the door has been unlocked")
|
||||||
|
closeInterface(player)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sendMessage(player,"You hear a satisfying click, and then a worrying thunk.")
|
||||||
|
sendMessage(player,"The floor opens up beneath you sending you plummeting down")
|
||||||
|
sendMessage(player,"to the sewers.")
|
||||||
|
player.teleport(Location.create(2641, 9721, 0))
|
||||||
|
closeInterface(player)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,108 @@
|
||||||
|
package rs09.game.content.quest.members.tribaltotem
|
||||||
|
|
||||||
|
import api.*
|
||||||
|
import core.game.content.global.action.ClimbActionHandler
|
||||||
|
import core.game.content.global.action.DoorActionHandler
|
||||||
|
import core.game.node.entity.skill.Skills
|
||||||
|
import core.game.node.scenery.SceneryBuilder
|
||||||
|
import core.game.world.map.Location
|
||||||
|
import core.game.world.update.flag.context.Animation
|
||||||
|
import org.rs09.consts.Items
|
||||||
|
import rs09.game.interaction.InteractionListener
|
||||||
|
|
||||||
|
class TribalTotemListeners : InteractionListener(){
|
||||||
|
|
||||||
|
val frontDoor = 2706
|
||||||
|
val wizCrate = 2707
|
||||||
|
val realCrate = 2708
|
||||||
|
val label = Items.ADDRESS_LABEL_1858
|
||||||
|
val lockedDoor = 2705
|
||||||
|
val stairs = 2711
|
||||||
|
val closedChest = 2709
|
||||||
|
val openChest = 2710
|
||||||
|
|
||||||
|
override fun defineListeners() {
|
||||||
|
on(frontDoor, SCENERY,"Open"){ player, door ->
|
||||||
|
if(player.questRepository.getStage("Tribal Totem") >= 35){
|
||||||
|
DoorActionHandler.handleAutowalkDoor(player,door.asScenery())
|
||||||
|
}
|
||||||
|
sendMessage(player,"The door is locked shut.")
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
on(realCrate, SCENERY,"Investigate"){ player, node ->
|
||||||
|
if(player.questRepository.getStage("Tribal Totem") in 1..19 && !player.inventory.containsAtLeastOneItem(Items.ADDRESS_LABEL_1858)){
|
||||||
|
sendDialogue(player,"There is a label on this crate. It says; To Lord Handelmort, Handelmort Mansion Ardogune.You carefully peel it off and take it.")
|
||||||
|
addItem(player,Items.ADDRESS_LABEL_1858,1)
|
||||||
|
}
|
||||||
|
else if(player.questRepository.getStage("Tribal Totem") in 1..19 && player.inventory.containsAtLeastOneItem(Items.ADDRESS_LABEL_1858)){
|
||||||
|
sendDialogue(player,"There was a label on this crate, but it's gone now since you took it!")
|
||||||
|
}
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
on(wizCrate, SCENERY,"Investigate"){ player, node ->
|
||||||
|
sendDialogue(player,"There is a label on this crate: Senior Patents Clerk, Chamber of Invention, The Wizards' Tower, Misthalin. The crate is securely fastened shut and ready for delivery.")
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
onUseWith(SCENERY,label,wizCrate){ player, used, with ->
|
||||||
|
sendDialogue(player,"You carefully place the delivery address label over the existing label, covering it completely.")
|
||||||
|
removeItem(player,label)
|
||||||
|
player.questRepository.getQuest("Tribal Totem").setStage(player,20)
|
||||||
|
return@onUseWith true
|
||||||
|
}
|
||||||
|
|
||||||
|
on(lockedDoor, SCENERY,"Open"){ player, node ->
|
||||||
|
if(player.getAttribute("TT:DoorUnlocked",false) == true){
|
||||||
|
DoorActionHandler.handleAutowalkDoor(player,node.asScenery())
|
||||||
|
}else{
|
||||||
|
openInterface(player,285)
|
||||||
|
}
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
on(stairs,SCENERY,"Climb-up"){ player, node ->
|
||||||
|
if(player.getAttribute("TT:StairsChecked",false)){
|
||||||
|
ClimbActionHandler.climb(player, Animation(828), Location.create(2629, 3324, 1))
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
sendMessage(player,"You set off a trap and the stairs give way under you, dropping you into the sewers.")
|
||||||
|
player.teleport(Location.create(2641, 9721, 0))
|
||||||
|
}
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
on(stairs, SCENERY,"Investigate"){ player, node ->
|
||||||
|
if(player.getSkills().getStaticLevel(Skills.THIEVING) >= 21){
|
||||||
|
sendDialogue(player,"Your trained senses as a thief enable you to see that there is a trap in these stairs. You make a note of its location for future reference when using these stairs")
|
||||||
|
player.setAttribute("/save:TT:StairsChecked",true)
|
||||||
|
}else{
|
||||||
|
sendDialogue(player,"You don't see anything out of place on these stairs.")
|
||||||
|
}
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
on(closedChest, SCENERY,"Open"){ player, node ->
|
||||||
|
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(2710))
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
on(openChest,SCENERY,"Close"){ player, node ->
|
||||||
|
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(2709))
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
on(openChest, SCENERY,"Search"){ player, node ->
|
||||||
|
if(!player.inventory.containsAtLeastOneItem(Items.TOTEM_1857)){
|
||||||
|
sendDialogue(player,"Inside the chest you find the tribal totem.")
|
||||||
|
addItem(player,Items.TOTEM_1857)
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
sendDialogue(player,"Inside the chest you don't find anything because you already took the totem!")
|
||||||
|
}
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
package rs09.game.content.quest.members.tribaltotem
|
||||||
|
|
||||||
|
import api.rewardXP
|
||||||
|
import core.game.content.quest.fremtrials.FremennikTrials
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.game.node.entity.player.link.quest.Quest
|
||||||
|
import core.game.node.entity.skill.Skills
|
||||||
|
import core.game.node.item.GroundItemManager
|
||||||
|
import core.game.node.item.Item
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import org.rs09.consts.Items
|
||||||
|
|
||||||
|
@Initializable
|
||||||
|
class TribalTotem : Quest("Tribal Totem",26,125,1,200,0,1,5){
|
||||||
|
|
||||||
|
class SkillRequirement(val skill: Int?, val level: Int?)
|
||||||
|
|
||||||
|
val requirements = arrayListOf<TribalTotem.SkillRequirement>()
|
||||||
|
|
||||||
|
override fun drawJournal(player: Player?, stage: Int) {
|
||||||
|
super.drawJournal(player, stage)
|
||||||
|
var line = 11
|
||||||
|
|
||||||
|
if(stage == 0){
|
||||||
|
line(player,"I can start this quest by speaking to !!Kangai Mau?? in",line++)
|
||||||
|
line(player,"!!Shrimp & Parrot?? restaurant in Brimhaven.",line++)
|
||||||
|
line += 1
|
||||||
|
line(player,"To complete this quest I need:",line++)
|
||||||
|
line(player,"!!Level 21 Theiving??",line++, player?.skills?.getStaticLevel(Skills.THIEVING)!! >= 21)
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(stage >= 10){
|
||||||
|
line(player,"I agreed to help !!Kangai Mau?? on Brimhaven recover",line++,stage>15&&stage!=100)
|
||||||
|
line(player,"the tribal totem stolen from his village by",line++,stage>15&&stage!=100)
|
||||||
|
line(player,"!!Lord Handelmort??.",line++,stage>10)
|
||||||
|
}
|
||||||
|
if(stage >= 20){
|
||||||
|
line(player,"I found a package due for delivery to !!Lord Handelmort??",line++,stage>25&&stage!=100)
|
||||||
|
line(player,"at the !!G.P.D.T. Depot??, and swapped the label for the",line++,stage>25&&stage!=100)
|
||||||
|
line(player,"!!Wizard Cromperty's?? experimental teleport block.",line++,stage>25&&stage!=100)
|
||||||
|
}
|
||||||
|
if(stage >= 30){
|
||||||
|
line(player,"I got the !!G.P.D.T.?? men to deliver the teleport block to",line++,stage>35&&stage!=100)
|
||||||
|
line(player,"!!Lord Handelmort?? and teleported myself inside.",line++,stage>35&&stage!=100)
|
||||||
|
}
|
||||||
|
if(stage == 100){
|
||||||
|
line(player,"After bypassing the traps and security inside the mansion I was able",line++)
|
||||||
|
line(player,"to reclaim the totem, and take it back to !!Kangai Mau??, who rewarded",line++)
|
||||||
|
line(player,"me for all of my help.",line++)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun finish(player: Player?) {
|
||||||
|
super.finish(player)
|
||||||
|
player ?: return
|
||||||
|
var ln = 10
|
||||||
|
player.packetDispatch.sendItemZoomOnInterface(Items.TOTEM_1857,230,277,5)
|
||||||
|
drawReward(player,"1 Quest point",ln++)
|
||||||
|
drawReward(player,"1,775 Thieving XP",ln++)
|
||||||
|
drawReward(player,"5 Swordfish",ln++)
|
||||||
|
rewardXP(player,Skills.THIEVING,1775.0)
|
||||||
|
if(!player.inventory.add(Item(Items.SWORDFISH_373,5))){
|
||||||
|
GroundItemManager.create(Item(Items.SWORDFISH_373,5),player)
|
||||||
|
}
|
||||||
|
cleanTTAttributes(player)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun newInstance(`object`: Any?): Quest {
|
||||||
|
requirements.add(TribalTotem.SkillRequirement(Skills.THIEVING, 21))
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun cleanTTAttributes(player: Player){
|
||||||
|
player.removeAttribute("TT:StairsChecked")
|
||||||
|
player.removeAttribute("TT:DoorUnlocked")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package rs09.game.content.tutorial
|
||||||
|
|
||||||
|
import api.setAttribute
|
||||||
|
import api.teleport
|
||||||
|
import core.game.content.dialogue.DialoguePlugin
|
||||||
|
import core.game.content.dialogue.FacialExpression
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.game.world.map.Location
|
||||||
|
import core.plugin.Initializable
|
||||||
|
import org.rs09.consts.NPCs
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles Skippy's skip tutorial dialogue
|
||||||
|
* @author Ceikry
|
||||||
|
*/
|
||||||
|
@Initializable
|
||||||
|
class SkipTutorialDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
override fun newInstance(player: Player?): DialoguePlugin {
|
||||||
|
return SkipTutorialDialogue(player)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun open(vararg args: Any?): Boolean {
|
||||||
|
npcl(FacialExpression.FRIENDLY, "Hey, would you like to skip to the end? Choose wisely! This is the only time you get this choice.")
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||||
|
when(stage){
|
||||||
|
0 -> options("Yes, I'd like to skip the tutorial.", "No thanks.").also { stage++ }
|
||||||
|
1 -> when(buttonId)
|
||||||
|
{
|
||||||
|
1 -> {
|
||||||
|
end()
|
||||||
|
setAttribute(player, "/save:tutorial:stage", 71)
|
||||||
|
TutorialStage.load(player, 71)
|
||||||
|
teleport(player, Location.create(3141, 3089, 0))
|
||||||
|
}
|
||||||
|
2 -> end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray {
|
||||||
|
return intArrayOf(NPCs.SKIPPY_2796)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
package rs09.game.content.tutorial
|
||||||
|
|
||||||
|
import api.addItem
|
||||||
|
import api.inInventory
|
||||||
|
import api.setAttribute
|
||||||
|
import core.game.component.Component
|
||||||
|
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.Items
|
||||||
|
import org.rs09.consts.NPCs
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles the survival expert's dialogue
|
||||||
|
* @author Ceikry
|
||||||
|
*/
|
||||||
|
@Initializable
|
||||||
|
class SurvivalExpertDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
override fun newInstance(player: Player?): DialoguePlugin {
|
||||||
|
return SurvivalExpertDialogue(player)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun open(vararg args: Any?): Boolean {
|
||||||
|
npc = args[0] as NPC
|
||||||
|
val tutStage = player?.getAttribute("tutorial:stage", 0) ?: 0
|
||||||
|
when(tutStage)
|
||||||
|
{
|
||||||
|
4 -> Component.setUnclosable(
|
||||||
|
player,
|
||||||
|
interpreter.sendDialogues(
|
||||||
|
npc,
|
||||||
|
FacialExpression.FRIENDLY,
|
||||||
|
"Hello there, newcomer. My name is Brynna. My job is",
|
||||||
|
"to teach you a few suvival tips and tricks. First off",
|
||||||
|
"we're going to start with the most basic skill of",
|
||||||
|
"all: making a fire."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
11 -> Component.setUnclosable(
|
||||||
|
player,
|
||||||
|
interpreter.sendDialogues(
|
||||||
|
npc,
|
||||||
|
FacialExpression.FRIENDLY,
|
||||||
|
"Well done! Next we need to get some food in our",
|
||||||
|
"bellies. We'd need something to cook. There are shrimp",
|
||||||
|
"in the pond there. So let's catch and cook some."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
5, 14, 15 -> {
|
||||||
|
if(!inInventory(player, Items.BRONZE_AXE_1351))
|
||||||
|
{
|
||||||
|
player.dialogueInterpreter.sendItemMessage(Items.BRONZE_AXE_1351, "The Survival Expert gives you a spare bronze axe.")
|
||||||
|
addItem(player, Items.BRONZE_AXE_1351)
|
||||||
|
}
|
||||||
|
if(!inInventory(player, Items.TINDERBOX_590))
|
||||||
|
{
|
||||||
|
player.dialogueInterpreter.sendItemMessage(Items.TINDERBOX_590, "The Survival Expert gives you a spare tinderbox.")
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||||
|
when(player?.getAttribute("tutorial:stage", 0))
|
||||||
|
{
|
||||||
|
4 -> when(stage)
|
||||||
|
{
|
||||||
|
0 -> {
|
||||||
|
Component.setUnclosable(
|
||||||
|
player,
|
||||||
|
interpreter.sendDoubleItemMessage(
|
||||||
|
Items.TINDERBOX_590,
|
||||||
|
Items.BRONZE_AXE_1351,
|
||||||
|
"The Surivival Guide gives you a <col=08088A>tinderbox</col> and a <col=08088A>bronze axe</col>!"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
addItem(player, Items.TINDERBOX_590)
|
||||||
|
addItem(player, Items.BRONZE_AXE_1351)
|
||||||
|
stage++
|
||||||
|
}
|
||||||
|
1 -> {
|
||||||
|
end()
|
||||||
|
setAttribute(player, "tutorial:stage", 5)
|
||||||
|
TutorialStage.load(player, 5)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
11 -> when(stage){
|
||||||
|
0 -> {
|
||||||
|
Component.setUnclosable(
|
||||||
|
player,
|
||||||
|
interpreter.sendItemMessage(303, "The Survival Guide gives you a <col=08088A>net</col>!")
|
||||||
|
)
|
||||||
|
addItem(player, Items.SMALL_FISHING_NET_303)
|
||||||
|
stage++
|
||||||
|
}
|
||||||
|
1 -> {
|
||||||
|
end()
|
||||||
|
setAttribute(player, "tutorial:stage", 12)
|
||||||
|
TutorialStage.load(player, 12)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray {
|
||||||
|
return intArrayOf(NPCs.SURVIVAL_EXPERT_943)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,94 @@
|
||||||
|
package rs09.game.content.tutorial
|
||||||
|
|
||||||
|
import api.*
|
||||||
|
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.Items
|
||||||
|
import org.rs09.consts.NPCs
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles the combat instructor's dialogue
|
||||||
|
* @author Ceikry
|
||||||
|
*/
|
||||||
|
@Initializable
|
||||||
|
class TutorialCombatInstructorDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||||
|
override fun newInstance(player: Player?): DialoguePlugin {
|
||||||
|
return TutorialCombatInstructorDialogue(player)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun open(vararg args: Any?): Boolean {
|
||||||
|
npc = args[0] as NPC
|
||||||
|
|
||||||
|
when(getAttribute(player, "tutorial:stage", 0))
|
||||||
|
{
|
||||||
|
44 -> playerl(FacialExpression.FRIENDLY, "Hi! My name's ${player.username}.")
|
||||||
|
47 -> npcl(FacialExpression.FRIENDLY, "Very good, but that little butter knife isn't going to protect you much. Here, take these.")
|
||||||
|
53 -> playerl(FacialExpression.FRIENDLY, "I did it! I killed a giant rat!")
|
||||||
|
54 -> {
|
||||||
|
player.dialogueInterpreter.sendDoubleItemMessage(Items.SHORTBOW_841, Items.BRONZE_ARROW_882, "The Combat Guide gives you some bronze arrows and a shortbow!")
|
||||||
|
if(!inInventory(player, Items.SHORTBOW_841) && !inEquipment(player, Items.SHORTBOW_841))
|
||||||
|
addItem(player, Items.SHORTBOW_841)
|
||||||
|
if(!inInventory(player, Items.BRONZE_ARROW_882) && !inEquipment(player, Items.BRONZE_ARROW_882))
|
||||||
|
addItem(player, Items.BRONZE_ARROW_882, 30)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||||
|
when(getAttribute(player, "tutorial:stage", 0))
|
||||||
|
{
|
||||||
|
44 -> when(stage){
|
||||||
|
0 -> npcl(FacialExpression.ANGRY, "Do I look like I care? To me you're just another newcomer who thinks they're ready to fight.").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.FRIENDLY, "I'm Vannaka, the greatest swordsman alive.").also { stage++ }
|
||||||
|
2 -> npcl(FacialExpression.FRIENDLY, "Let's get started by teaching you to wield a weapon.").also { stage++ }
|
||||||
|
3 -> {
|
||||||
|
end()
|
||||||
|
setAttribute(player, "tutorial:stage", 45)
|
||||||
|
TutorialStage.load(player, 45)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
47 -> when(stage){
|
||||||
|
0 -> {
|
||||||
|
addItemOrDrop(player, Items.BRONZE_SWORD_1277)
|
||||||
|
addItemOrDrop(player, Items.WOODEN_SHIELD_1171)
|
||||||
|
sendDoubleItemDialogue(player, Items.BRONZE_SWORD_1277, Items.WOODEN_SHIELD_1171, "The Combat Guide gives you a bronze sword and a wooden shield!")
|
||||||
|
stage++
|
||||||
|
}
|
||||||
|
1 -> {
|
||||||
|
end()
|
||||||
|
setAttribute(player, "tutorial:stage", 48)
|
||||||
|
TutorialStage.load(player, 48)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
53 -> when(stage){
|
||||||
|
0 -> npcl(FacialExpression.FRIENDLY, "I saw, ${player.username}. You seem better at this than I thought. Now that you have grasped basic swordplay, let's move on.").also { stage++ }
|
||||||
|
1 -> npcl(FacialExpression.FRIENDLY, "Let's try some ranged attacking, with this you can kill foes from a distance. Also, foes unable to reach you are as good as dead. You'll be able to attack the rats, without entering the pit.").also { stage++ }
|
||||||
|
2 -> {
|
||||||
|
sendDoubleItemDialogue(player, Items.SHORTBOW_841, Items.BRONZE_ARROW_882, "The Combat Guide gives you some bronze arrows and a shortbow!")
|
||||||
|
if(!inInventory(player, Items.SHORTBOW_841) && !inEquipment(player, Items.SHORTBOW_841))
|
||||||
|
addItem(player, Items.SHORTBOW_841)
|
||||||
|
if(!inInventory(player, Items.BRONZE_ARROW_882) && !inEquipment(player, Items.BRONZE_ARROW_882))
|
||||||
|
addItem(player, Items.BRONZE_ARROW_882, 30)
|
||||||
|
stage++
|
||||||
|
}
|
||||||
|
3 -> {
|
||||||
|
end()
|
||||||
|
setAttribute(player, "tutorial:stage", 54)
|
||||||
|
TutorialStage.load(player, 54)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getIds(): IntArray {
|
||||||
|
return intArrayOf(NPCs.COMBAT_INSTRUCTOR_944)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,327 @@
|
||||||
|
package rs09.game.content.tutorial
|
||||||
|
|
||||||
|
import api.events.*
|
||||||
|
import api.getAttribute
|
||||||
|
import api.setAttribute
|
||||||
|
import core.game.node.entity.Entity
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.game.node.entity.skill.fishing.FishingSpot
|
||||||
|
import core.game.node.entity.skill.gather.mining.MiningNode
|
||||||
|
import core.game.node.entity.skill.gather.woodcutting.WoodcuttingNode
|
||||||
|
import org.rs09.consts.Items
|
||||||
|
import org.rs09.consts.NPCs
|
||||||
|
import rs09.game.system.SystemLogger
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event receivers for tutorial island
|
||||||
|
* @author Ceikry
|
||||||
|
*/
|
||||||
|
object TutorialButtonReceiver : EventHook<ButtonClickedEvent>
|
||||||
|
{
|
||||||
|
override fun process(entity: Entity, event: ButtonClickedEvent) {
|
||||||
|
if(entity !is Player) return
|
||||||
|
|
||||||
|
when(getAttribute(entity, "tutorial:stage", 0))
|
||||||
|
{
|
||||||
|
//character design interface, confirm button
|
||||||
|
0 -> if(event.iface == 771 && event.buttonId == 362) {
|
||||||
|
setAttribute(entity, "/save:tutorial:stage", 1)
|
||||||
|
TutorialStage.load(entity, 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
//click settings tab SD: 548,24 HD: 746,52
|
||||||
|
1 -> if((event.iface == 548 && event.buttonId == 24) || (event.iface == 746 && event.buttonId == 52)) {
|
||||||
|
setAttribute(entity, "/save:tutorial:stage", 2)
|
||||||
|
TutorialStage.load(entity, 2)
|
||||||
|
}
|
||||||
|
|
||||||
|
//click inventory tab SD: 548,41 HD: 746,44
|
||||||
|
5 -> if((event.iface == 548 && event.buttonId == 41) || (event.iface == 746 && event.buttonId == 44)) {
|
||||||
|
setAttribute(entity, "tutorial:stage", 6)
|
||||||
|
TutorialStage.load(entity, 6)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Click skills tab SD: 548,39 HD: 746,42
|
||||||
|
10 -> if((event.iface == 548 && event.buttonId == 39) || (event.iface == 746 && event.buttonId == 42)) {
|
||||||
|
setAttribute(entity, "tutorial:stage", 11)
|
||||||
|
TutorialStage.load(entity, 11)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Click music tab SD: 548,26 HD: 746,54
|
||||||
|
21 -> if((event.iface == 548 && event.buttonId == 26) || (event.iface == 746 && event.buttonId == 54)) {
|
||||||
|
setAttribute(entity, "tutorial:stage", 22)
|
||||||
|
TutorialStage.load(entity, 22)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Click emote tab SD: 548,25 HD: 746,53
|
||||||
|
23 -> if((event.iface == 548 && event.buttonId == 25) || (event.iface == 746 && event.buttonId == 53)){
|
||||||
|
setAttribute(entity, "tutorial:stage", 24)
|
||||||
|
TutorialStage.load(entity, 24)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Click any emote
|
||||||
|
24 -> if(event.iface == 464){
|
||||||
|
setAttribute(entity, "tutorial:stage", 25)
|
||||||
|
TutorialStage.load(entity, 25)
|
||||||
|
}
|
||||||
|
|
||||||
|
//click run button
|
||||||
|
25 -> if(event.iface == 261 && event.buttonId == 3){
|
||||||
|
setAttribute(entity, "tutorial:stage", 26)
|
||||||
|
TutorialStage.load(entity, 26)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Open quest journal tab SD:548,40 HD:746,43
|
||||||
|
27 -> if((event.iface == 548 && event.buttonId == 40) || (event.iface == 746 && event.buttonId == 43)){
|
||||||
|
setAttribute(entity, "tutorial:stage", 28)
|
||||||
|
TutorialStage.load(entity, 28)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Open equipment tab SD:548,42 HD:746,45
|
||||||
|
45 -> if((event.iface == 548 && event.buttonId == 42) || (event.iface == 746 && event.buttonId == 45)){
|
||||||
|
setAttribute(entity, "tutorial:stage", 46)
|
||||||
|
TutorialStage.load(entity, 46)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Open weapon interface SD:548,38 HD:746,41
|
||||||
|
49 -> if((event.iface == 548 && event.buttonId == 38) || (event.iface == 746 && event.buttonId == 41)) {
|
||||||
|
setAttribute(entity, "tutorial:stage", 50)
|
||||||
|
TutorialStage.load(entity, 50)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Open prayer interface SD:548,43 HD:746,46
|
||||||
|
61 -> if((event.iface == 548 && event.buttonId == 43) || (event.iface == 746 && event.buttonId == 46)){
|
||||||
|
setAttribute(entity, "tutorial:stage", 62)
|
||||||
|
TutorialStage.load(entity, 62)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Open friends tab SD:548,21 HD:746,49
|
||||||
|
63 -> if((event.iface == 548 && event.buttonId == 21) || (event.iface == 746 && event.buttonId == 49)){
|
||||||
|
setAttribute(entity, "tutorial:stage", 64)
|
||||||
|
TutorialStage.load(entity, 64)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Open ignore list tab SD:548,22 HD:746,50
|
||||||
|
64 -> if((event.iface == 548 && event.buttonId == 22) || (event.iface == 746 && event.buttonId == 50)){
|
||||||
|
setAttribute(entity, "tutorial:stage", 65)
|
||||||
|
TutorialStage.load(entity, 65)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Open magic tab SD:548,44 HD:746,47
|
||||||
|
68 -> if((event.iface == 548 && event.buttonId == 44) || (event.iface == 746 && event.buttonId == 47)){
|
||||||
|
setAttribute(entity, "tutorial:stage", 69)
|
||||||
|
TutorialStage.load(entity, 69)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
object TutorialInteractionReceiver : EventHook<InteractionEvent>
|
||||||
|
{
|
||||||
|
override fun process(entity: Entity, event: InteractionEvent) {
|
||||||
|
if(entity !is Player) return
|
||||||
|
|
||||||
|
when(getAttribute(entity, "tutorial:stage", 0))
|
||||||
|
{
|
||||||
|
//Click on tree and start chopping
|
||||||
|
6 -> if((WoodcuttingNode.forId(event.target.id)?.identifier ?: -1) == 1.toByte())
|
||||||
|
{
|
||||||
|
setAttribute(entity, "tutorial:stage", 7)
|
||||||
|
TutorialStage.load(entity, 7)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Click on fishing spot to start fishing
|
||||||
|
12 -> if(FishingSpot.forId(event.target.id) != null)
|
||||||
|
{
|
||||||
|
setAttribute(entity, "tutorial:stage", 13)
|
||||||
|
TutorialStage.load(entity, 13)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Prospect rock - Tin
|
||||||
|
31 -> if(MiningNode.forId(event.target.id).identifier == 2.toByte() && event.option == "prospect"){
|
||||||
|
setAttribute(entity, "tutorial:stage", 32)
|
||||||
|
TutorialStage.load(entity, 32)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Prospect rock- Copper
|
||||||
|
33 -> if(MiningNode.forId(event.target.id).identifier == 1.toByte() && event.option == "prospect"){
|
||||||
|
setAttribute(entity, "tutorial:stage", 34)
|
||||||
|
TutorialStage.load(entity, 34)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Mine rock - Tin
|
||||||
|
35 -> if(MiningNode.forId(event.target.id).identifier == 2.toByte() && event.option == "mine"){
|
||||||
|
setAttribute(entity, "tutorial:stage", 36)
|
||||||
|
TutorialStage.load(entity, 36)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Equip bronze dagger
|
||||||
|
46 -> if(event.target.id == Items.BRONZE_DAGGER_1205 && event.option == "equip"){
|
||||||
|
setAttribute(entity, "tutorial:stage", 47)
|
||||||
|
TutorialStage.load(entity, 47)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Equip sword and shield
|
||||||
|
48 -> {
|
||||||
|
if(event.target.id == Items.BRONZE_SWORD_1277 && event.option == "equip"){
|
||||||
|
setAttribute(entity, "/save:tutorial:sword", true)
|
||||||
|
}
|
||||||
|
else if(event.target.id == Items.WOODEN_SHIELD_1171 && event.option == "equip"){
|
||||||
|
setAttribute(entity, "/save:tutorial:shield", true)
|
||||||
|
}
|
||||||
|
if(getAttribute(entity, "tutorial:shield",false) && getAttribute(entity, "tutorial:sword",false))
|
||||||
|
{
|
||||||
|
setAttribute(entity, "tutorial:stage", 49)
|
||||||
|
TutorialStage.load(entity, 49)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Attack rat
|
||||||
|
51 -> if(event.target.id == NPCs.GIANT_RAT_86 && event.option == "attack") {
|
||||||
|
setAttribute(entity, "tutorial:stage", 52)
|
||||||
|
TutorialStage.load(entity, 52)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Open bank
|
||||||
|
56 -> if(event.target.name.contains("booth", true) && event.option == "use"){
|
||||||
|
setAttribute(entity, "tutorial:stage", 57)
|
||||||
|
TutorialStage.load(entity, 57)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
object TutorialResourceReceiver : EventHook<ResourceGatheredEvent>
|
||||||
|
{
|
||||||
|
override fun process(entity: Entity, event: ResourceGatheredEvent) {
|
||||||
|
if(entity !is Player) return
|
||||||
|
|
||||||
|
when(getAttribute(entity, "tutorial:stage", 0))
|
||||||
|
{
|
||||||
|
//Gather some logs
|
||||||
|
7 -> if(event.itemId == Items.LOGS_1511)
|
||||||
|
{
|
||||||
|
setAttribute(entity, "tutorial:stage", 8)
|
||||||
|
TutorialStage.load(entity, 8)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Catch some raw shrimp
|
||||||
|
13 -> if(event.itemId == Items.RAW_SHRIMPS_317)
|
||||||
|
{
|
||||||
|
setAttribute(entity, "tutorial:stage", 14)
|
||||||
|
TutorialStage.load(entity, 14)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Cook a shrimp
|
||||||
|
14,15 -> if(event.itemId == Items.BURNT_SHRIMP_7954)
|
||||||
|
{
|
||||||
|
setAttribute(entity, "tutorial:stage", 15)
|
||||||
|
TutorialStage.load(entity, 15)
|
||||||
|
}
|
||||||
|
else if(event.itemId == Items.SHRIMPS_315)
|
||||||
|
{
|
||||||
|
setAttribute(entity, "tutorial:stage", 16)
|
||||||
|
TutorialStage.load(entity, 16)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Make some bread dough
|
||||||
|
19 -> if(event.itemId == Items.BREAD_DOUGH_2307) {
|
||||||
|
setAttribute(entity, "tutorial:stage", 20)
|
||||||
|
TutorialStage.load(entity, 20)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Bake some bread
|
||||||
|
20 -> if(event.itemId == Items.BREAD_2309 || event.itemId == Items.BURNT_BREAD_2311) {
|
||||||
|
setAttribute(entity, "tutorial:stage", 21)
|
||||||
|
TutorialStage.load(entity, 21)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Mine some tin ore
|
||||||
|
36 -> if(event.itemId == Items.TIN_ORE_438){
|
||||||
|
setAttribute(entity, "tutorial:stage", 37)
|
||||||
|
TutorialStage.load(entity, 37)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Mine some copper ore
|
||||||
|
37 -> if(event.itemId == Items.COPPER_ORE_436){
|
||||||
|
setAttribute(entity, "tutorial:stage", 38)
|
||||||
|
TutorialStage.load(entity, 38)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Make a bronze bar
|
||||||
|
38 -> if(event.itemId == Items.BRONZE_BAR_2349){
|
||||||
|
setAttribute(entity, "tutorial:stage", 40)
|
||||||
|
TutorialStage.load(entity, 40)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Make a bronze dagger
|
||||||
|
42 -> if(event.itemId == Items.BRONZE_DAGGER_1205){
|
||||||
|
setAttribute(entity, "tutorial:stage", 43)
|
||||||
|
TutorialStage.load(entity, 43)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
object TutorialFireReceiver : EventHook<LitFireEvent>
|
||||||
|
{
|
||||||
|
override fun process(entity: Entity, event: LitFireEvent) {
|
||||||
|
if(entity !is Player) return
|
||||||
|
|
||||||
|
when(getAttribute(entity, "tutorial:stage", 0))
|
||||||
|
{
|
||||||
|
9 -> {
|
||||||
|
setAttribute(entity, "tutorial:stage", 10)
|
||||||
|
TutorialStage.load(entity, 10)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
object TutorialUseWithReceiver : EventHook<UsedWithEvent>
|
||||||
|
{
|
||||||
|
override fun process(entity: Entity, event: UsedWithEvent) {
|
||||||
|
if(entity !is Player) return
|
||||||
|
|
||||||
|
|
||||||
|
when(getAttribute(entity, "tutorial:stage", 0))
|
||||||
|
{
|
||||||
|
//Start lighting a fire
|
||||||
|
8 -> if(event.used == Items.TINDERBOX_590 && event.with == Items.LOGS_1511) {
|
||||||
|
setAttribute(entity, "tutorial:stage", 9)
|
||||||
|
TutorialStage.load(entity, 9)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Use bar on anvil
|
||||||
|
41 -> if(event.used == Items.BRONZE_BAR_2349 && event.with == 2783) {
|
||||||
|
setAttribute(entity, "tutorial:stage", 42)
|
||||||
|
TutorialStage.load(entity, 42)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
object TutorialKillReceiver : EventHook<NPCKillEvent>
|
||||||
|
{
|
||||||
|
override fun process(entity: Entity, event: NPCKillEvent) {
|
||||||
|
if(entity !is Player) return
|
||||||
|
|
||||||
|
when(getAttribute(entity, "tutorial:stage", 0))
|
||||||
|
{
|
||||||
|
52 -> if(event.npc.id == NPCs.GIANT_RAT_86){
|
||||||
|
setAttribute(entity, "tutorial:stage", 53)
|
||||||
|
TutorialStage.load(entity, 53)
|
||||||
|
}
|
||||||
|
|
||||||
|
54 -> if(event.npc.id == NPCs.GIANT_RAT_86){
|
||||||
|
setAttribute(entity, "tutorial:stage", 55)
|
||||||
|
TutorialStage.load(entity, 55)
|
||||||
|
}
|
||||||
|
|
||||||
|
70 -> if(event.npc.id == NPCs.CHICKEN_41){
|
||||||
|
setAttribute(entity, "tutorial:stage", 71)
|
||||||
|
TutorialStage.load(entity, 71)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue