Merge remote-tracking branch '2009scape/master'

This commit is contained in:
philliam
2021-07-18 16:43:21 -04:00
466 changed files with 283383 additions and 37239 deletions
+2 -1
View File
@@ -42,4 +42,5 @@ gradle
.idea
.idea/
Server/worldprops/
Management-Server/managementprops/
Management-Server/managementprops/
/Development-Client/
View File
+8
View File
@@ -0,0 +1,8 @@
### Description of issue
Describe in detail what exactly happened. No "it no workie" will be accepted. Clear and concise definitions of what *exactly* the problem is.
### What should have happened
Write out what the expected behavior/etc is.
### Reproduction steps (if applicable)
Inform us how to reproduce this issue so we can effectively debug it.
+8
View File
@@ -0,0 +1,8 @@
### What is being proposed
Write a clear and verbose description here of what exactly is being proposed.
### Pros
* List out bullet points here of pros
### Cons
* List out bullet points here of potential cons
+7 -1
View File
@@ -4,11 +4,17 @@ archivesBaseName = 'managementserver'
mainClassName = 'ms.Management'
repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.guava:guava:29.0-jre'
implementation "com.github.ajalt.mordant:mordant:2.0.0-alpha2"
implementation "org.jetbrains:markdown-jvm:0.2.0"
implementation 'mysql:mysql-connector-java:8.0.21'
}
jar {
manifest {
attributes 'Main-Class': 'ms.Management'
@@ -1,5 +1,8 @@
package ms.net;
import ms.world.WorldDatabase;
import ms09.MSLogger;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.ClosedChannelException;
@@ -8,6 +11,7 @@ import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.util.Arrays;
import java.util.concurrent.ExecutorService;
/**
@@ -63,7 +67,10 @@ public final class IoEventHandler {
ByteBuffer buffer = ByteBuffer.allocate(100_000);
IoSession session = (IoSession) key.attachment();
if (channel.read(buffer) == -1) {
System.out.println("Existing session disconnected - likely portscanner or server status checker.");
if(session.getGameServer() != null){
WorldDatabase.unRegister(session.getGameServer());
}
session.disconnect();
key.cancel();
return;
}
@@ -47,7 +47,6 @@ public final class RegistryReadEvent extends IoReadEvent {
boolean quickChat = buffer.get() == 1;
boolean lootshare = buffer.get() == 1;
String activity = ByteBufferUtils.getString(buffer);
System.out.println("["+ revision + "], country = " + country + ", members = " + members + ", pvp = " + pvp + ", quickChat = " + quickChat + ", lootShare = " + lootshare + ", activity = " + activity);
for (int i = 0; i < CHECK.length(); i++) {
if ((char) buffer.get() != CHECK.charAt(i)) {
session.write(3);
@@ -7,6 +7,7 @@ import ms.net.IoSession;
import ms.net.packet.IoBuffer;
import ms.world.info.CountryFlag;
import ms.world.info.WorldInfo;
import ms09.MSLogger;
/**
* Holds all the world servers.
@@ -148,9 +149,25 @@ public class WorldDatabase {
throw new IllegalStateException("World " + info.getWorldId() + " is already registered!");
}
flagUpdate();
System.out.println("Registered world - [id=" + info.getWorldId() + ", ip=" + info.getAddress() + ", country=" + info.getCountry().name().toLowerCase() + ", revision=" + info.getRevision() + "]!");
MSLogger.logInfo("Registered world - [id=" + info.getWorldId() + ", ip=" + info.getAddress() + ", country=" + info.getCountry().name().toLowerCase() + ", revision=" + info.getRevision() + "]!");
return DATABASE[info.getWorldId()] = new GameServer(info);
}
public static void unRegister(GameServer server){
int index = -1;
for(int i = 0; i < DATABASE.length; i++){
GameServer s = DATABASE[i];
if(s == server){
index = i;
break;
}
}
if(index != -1){
DATABASE[index] = null;
WorldInfo info = server.getInfo();
MSLogger.logInfo("Unregistered world - [id=" + info.getWorldId() + ", ip=" + info.getAddress() + ", country=" + info.getCountry().name().toLowerCase() + ", revision=" + info.getRevision() + "]!");
}
}
/**
* Gets the world id of the player.
@@ -0,0 +1,37 @@
package ms09
import com.github.ajalt.mordant.rendering.TextColors
import com.github.ajalt.mordant.terminal.Terminal
import java.io.BufferedWriter
import java.io.Writer
import java.text.SimpleDateFormat
import java.util.*
object MSLogger {
val t = Terminal()
val formatter = SimpleDateFormat("HH:mm:ss")
var tradeLog: Writer? = null
var tradeLogWriter: BufferedWriter? = null
fun getTime(): String{
return "[" + formatter.format(Date(System.currentTimeMillis())) +"]"
}
@JvmStatic
fun logInfo(vararg messages: String){
for(m in messages){
if(m.isNotBlank()) t.println("${getTime()}: [INFO] $m")
}
}
@JvmStatic
fun logErr(message: String){
if(message.isNotBlank()) t.println("${getTime()}: ${TextColors.brightRed("[ ERR] $message")}")
}
@JvmStatic
fun logWarn(message: String){
if(message.isNotBlank()) t.println("${getTime()}: ${TextColors.yellow("[WARN] $message")}")
}
}
+9 -1
View File
@@ -18,6 +18,7 @@
·
<a href="https://github.com/2009scape/2009Scape/projects">Bug Board</a>
</p>
<h3>NOTE: Do not report issues if you are running your own server. Chances are, the fault lies in your misconfiguration of the server or the issue has already long been fixed on live. Essentially: Your server. Your issues. We have enough to worry about with our own server.</h3>
<h3>ATTENTION: Starting October 5th, 2020 the development team will no longer be providing support for setting up your own server. Do not ping or private message Developers asking how to build the project. This in-depth guide will be continually updated if the building process changes. We are focusing all of our efforts on the development of features and bugfixes for the live server.</h3>
</p>
@@ -28,6 +29,7 @@
* [About the Project](#about-the-project)
* [Contributing](#contributing)
* [Contributing without Building](#contributing-without-building)
* [Video Setup Tutorial](#video-setup-tutorial)
* [Getting Started](#getting-started)
* [Github Setup](#github-setup)
* [Prerequisites](#prerequisites)
@@ -220,7 +222,7 @@ First follow the [Github-Setup](#github-setup). After you have forked over your
1. Navigate to the right hand side of Intellij where it says "Gradle"
* Gradle is very useful when it comes to running and compiling the project
* The only tabs we are concerned about are "Client", "Management-Server", and "Server"
* Each of these have a "Tasks" folder and an "application" folder
* Each of these have a "Tasks" folder and an "application" folder inside of "Tasks"
<br>
2. Click on the "application" folder for the Management-Server and double-click "run"
* The management server is used for things such as player data(not saves), highscores, and world information
@@ -251,6 +253,12 @@ We use the AGPL 3.0 license, which can be found <a href="https://www.gnu.org/lic
<h4>Reminder: Developer support for setting up your own server ended October 5th, 2020. Do not ping/dm developers about setting up your server.</h4>
### Video Setup Tutorial
Occexe made a nice video showing you how to set it up if you'd prefer that. Check it out here:
[![View Tutorial](http://img.youtube.com/vi/3oQcsZdrRcE/0.jpg)](http://www.youtube.com/watch?v=3oQcsZdrRcE "2009Scape Setup")
[license-shield]: https://img.shields.io/badge/license-AGPL--3.0-informational
[license-url]: https://www.gnu.org/licenses/agpl-3.0.en.html
+3 -3
View File
@@ -17,18 +17,18 @@ compileKotlin {
}
repositories {
maven { url "https://dl.bintray.com/jetbrains/markdown" }
mavenCentral()
}
dependencies {
implementation("com.github.ajalt.mordant:mordant:2.0.0-alpha2")
implementation "org.jetbrains:markdown-jvm:0.2.0.pre-55"
implementation "org.jetbrains:markdown-jvm:0.2.0"
implementation 'com.google.guava:guava:29.0-jre'
implementation 'mysql:mysql-connector-java:8.0.21'
implementation 'io.github.classgraph:classgraph:4.8.98'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
implementation files("libs/ConstLib-1.0.jar")
implementation files("libs/ConstLib-1.2.jar")
implementation files("libs/PrimitiveExtensions-1.0.jar")
}
+18 -15
View File
@@ -1,25 +1,28 @@
<RDT>
<item id="995" minAmt="3000" maxAmt="3000" weight="12"/>
<item id="2363" minAmt="1" maxAmt="1" weight="7"/>
<item id="1615" minAmt="1" maxAmt="1" weight="7"/>
<item id="1452" minAmt="1" maxAmt="1" weight="7"/>
<item id="1462" minAmt="1" maxAmt="1" weight="7"/>
<item id="886" minAmt="150" maxAmt="150" weight="10"/>
<item id="443" minAmt="100" maxAmt="100" weight="7"/>
<item id="561" minAmt="1" maxAmt="67" weight="7"/>
<item id="892" minAmt="1" maxAmt="20" weight="7"/>
<item id="886" minAmt="150" maxAmt="150" weight="7"/>
<item id="2363" minAmt="1" maxAmt="1" weight="7"/>
<item id="1623" minAmt="1" maxAmt="1" weight="12"/>
<item id="1621" minAmt="1" maxAmt="1" weight="10"/>
<item id="1619" minAmt="1" maxAmt="1" weight="8"/>
<item id="1617" minAmt="1" maxAmt="1" weight="7"/>
<item id="1615" minAmt="1" maxAmt="1" weight="5"/>
<item id="560" minAmt="45" maxAmt="45" weight="6"/>
<item id="563" minAmt="45" maxAmt="45" weight="6"/>
<item id="561" minAmt="67" maxAmt="67" weight="6"/>
<item id="892" minAmt="42" maxAmt="42" weight="6"/>
<item id="1319" minAmt="1" maxAmt="1" weight="7"/>
<item id="1373" minAmt="1" maxAmt="1" weight="7"/>
<item id="1185" minAmt="1" maxAmt="1" weight="7"/>
<item id="1623" minAmt="1" maxAmt="1" weight="12"/>
<item id="1621" minAmt="1" maxAmt="1" weight="12"/>
<item id="1619" minAmt="1" maxAmt="1" weight="12"/>
<item id="1452" minAmt="1" maxAmt="1" weight="7"/>
<item id="1462" minAmt="1" maxAmt="1" weight="7"/>
<item id="1601" minAmt="1" maxAmt="1" weight="7"/>
<item id="830" minAmt="5" maxAmt="5" weight="3"/>
<item id="987" minAmt="1" maxAmt="1" weight="3"/>
<item id="985" minAmt="1" maxAmt="1" weight="3"/>
<item id="829" minAmt="20" maxAmt="20" weight="6"/>
<item id="830" minAmt="5" maxAmt="5" weight="4"/>
<item id="987" minAmt="1" maxAmt="1" weight="7"/>
<item id="985" minAmt="1" maxAmt="1" weight="7"/>
<item id="1149" minAmt="1" maxAmt="1" weight="3"/>
<item id="1201" minAmt="1" maxAmt="1" weight="3"/>
<item id="1201" minAmt="1" maxAmt="1" weight="4"/>
<item id="1247" minAmt="1" maxAmt="1" weight="1"/>
<item id="2366" minAmt="1" maxAmt="1" weight="1"/>
<item id="1249" minAmt="1" maxAmt="1" weight="1"/>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+18
View File
@@ -2254,5 +2254,23 @@
"name": "Too Many Cooks...",
"indexId": "398",
"borders": "{2944,9856,3007,9919}"
},
{
"id": "222",
"name": "Major Miner",
"indexId": "437",
"borders": "{2403,10186,2409,10192}"
},
{
"id": "223",
"name": "Norse Code",
"indexId": "439",
"borders": "{2404,3797,2421,3820}"
},
{
"id": "225",
"name": "Volcanic Vikings",
"indexId": "440",
"borders": "{2304,3785,2635,3818}"
}
]
File diff suppressed because it is too large Load Diff
+77 -6
View File
@@ -1469,7 +1469,7 @@
},
{
"npc_id": "558",
"loc_data": "{3013,3221,0,1,6}"
"loc_data": "{3013,3225,0,1,1}"
},
{
"npc_id": "559",
@@ -6081,7 +6081,7 @@
},
{
"npc_id": "4250",
"loc_data": "{3302,3492,0,1,3}"
"loc_data": "{3302,3492,0,1,6}"
},
{
"npc_id": "4251",
@@ -7637,7 +7637,7 @@
},
{
"npc_id": "5488",
"loc_data": "{2416,3800,0,0,0}"
"loc_data": "{2416,3799,0,0,1}"
},
{
"npc_id": "5489",
@@ -7745,7 +7745,7 @@
},
{
"npc_id": "5529",
"loc_data": "{2323,3790,0,1,1}-{2323,3795,0,1,0}-{2322,3795,0,1,0}-{2317,3794,0,1,6}-{2317,3790,0,1,3}-{2321,3792,0,1,6}-{2327,3796,0,1,7}-{2319,3791,0,1,6}"
"loc_data": "{2323,3790,0,1,1}-{2323,3795,0,1,0}-{2322,3795,0,1,0}-{2317,3794,0,1,6}-{2317,3790,0,1,3}-{2321,3792,0,1,6}"
},
{
"npc_id": "5531",
@@ -10646,6 +10646,77 @@
{
"npc_id": "2352",
"loc_data": "{2334,3183,0,1,0}"
},
{
"npc_id": "5497",
"loc_data": "{2376,10198,0,1,0}-{2384,10202,0,1,0}-{2390,10207,0,1,0}-{2385,10193,0,1,0}-{2419,10192,0,1,0}-{2412,10200,0,1,0}"
},
{
"npc_id": "5498",
"loc_data": "{2412,3818,0,1,0}-{2412,3801,0,1,0}-{2392,3802,0,1,0}"
},
{
"npc_id": "5474",
"loc_data": "{2390,10216,0,1,0}-{2417,10228,0,1,0}-{2385,10227,0,1,0}"
},
{
"npc_id": "5475",
"loc_data": "{2396,10232,0,1,0}-{2402,10225,0,1,0}-{2420,10221,0,1,0}"
},
{
"npc_id": "5473",
"loc_data": "{2377,10212,0,1,0}-{2392,10226,0,1,0}-{2407,10228,0,1,0}-{2406,10214,0,1,0}-{2420,10214,0,1,0}"
},
{
"npc_id": "5491",
"loc_data": "{2387,3800,0,0,3}-{2411,3795,0,0,6}-{2417,3825,0,0,1}"
},
{
"npc_id": "5492",
"loc_data": "{2387,3797,0,0,3}-{2414,3825,0,0,1}-{2414,3795,0,0,6}"
},
{
"npc_id": "5481",
"loc_data": "{2644,3709,0,1,0}"
},
{
"npc_id": "5482",
"loc_data": "{2422,3781,0,1,0}"
},
{
"npc_id": "5463",
"loc_data": "{2324,3809,0,1,0}-{2317,3802,0,1,0}"
},
{
"npc_id": "5521",
"loc_data": "{2324,3832,0,1,0}-{2350,3859,0,1,0}-{2375,3892,0,1,0}-{2388,3867,0,1,0}-{2384,3863,0,1,0}-{2387,3859,0,1,0}-{2350,3862,0,1,0}-{2352,3857,0,1,0}"
},
{
"npc_id": "5523",
"loc_data": "{2367,3832,0,1,0}-{2319,3854,0,1,0}-{2324,3891,0,1,0}-{2406,3854,0,1,0}-{2405,3863,0,1,0}-{2400,3856,0,1,0}"
},
{
"npc_id": "5522",
"loc_data": "{2362,3893,0,1,0}-{2390,3861,0,1,0}-{2395,3859,0,1,0}-{2323,3857,0,1,0}-{2331,3860,0,1,0}"
},
{
"npc_id": "5524",
"loc_data": "{2340,3830,0,1,0}-{2338,3860,0,1,0}-{2339,3895,0,1,0}-{2411,3886,0,1,0}-{2396,3854,0,1,0}"
},
{
"npc_id": "5514",
"loc_data": "{2337,3831,0,1,0}-{2399,3852,0,1,0}-{2321,3833,0,1,0}"
},
{
"npc_id": "5515",
"loc_data": "{2327,3858,0,1,0}-{2321,3860,0,1,0}-{2343,3862,0,1,0}"
},
{
"npc_id": "5516",
"loc_data": "{2393,3861,0,1,0}-{2347,3890,0,1,0}-{2347,3890,0,1,0}"
},
{
"npc_id": "5517",
"loc_data": "{2403,3853,0,1,0}-{2328,3830,0,1,0}-{2405,3860,0,1,0}-{2335,3894,0,1,0}"
}
]
]
File diff suppressed because it is too large Load Diff
+80 -53
View File
@@ -55,7 +55,7 @@
},
{
"npcs": "591",
"high_alch": "1",
"high_alch": "0",
"currency": "995",
"general_store": "true",
"id": "7",
@@ -312,7 +312,7 @@
"general_store": "true",
"id": "36",
"title": "Obli's General Store",
"stock": "{1931,30}-{1935,30}-{1735,10}-{1925,10}-{1923,10}-{1887,10}-{590,10}-{1755,10}-{2347,10}-{550,10}-{9003,10}"
"stock": "{590,2}-{229,10}-{233,3}-{1931,3}-{1351,3}-{1265,2}-{1349,5}-{1129,12}-{1059,10}-{1061,10}-{2142,2}-{2309,10}-{2349,10}-{952,10}-{36,10}-{596,10}-{1755,10}-{2347,10}-{970,50}-{973,50}-{227,50}-{975,50}-{954,10}"
},
{
"npcs": "560",
@@ -321,7 +321,7 @@
"general_store": "true",
"id": "37",
"title": "Jiminua's Jungle Store",
"stock": "{590,2}-{36,10}-{596,10}-{1931,3}-{954,10}-{1129,12}-{1059,10}-{1061,10}-{2142,2}-{2309,8}-{227,10}-{227,300}-{233,300}-{175,10}-{970,10}-{973,10}-{946,10}-{2347,10}-{975,10}-{1755,10}-{952,10}-{1351,10}-{1265,10}-{1349,10}"
"stock": "{590,2}-{36,10}-{596,10}-{1931,3}-{954,10}-{1129,12}-{1059,10}-{1061,10}-{2142,10}-{2309,10}-{227,10}-{227,300}-{233,300}-{175,10}-{970,10}-{973,10}-{946,10}-{2347,10}-{975,10}-{1755,10}-{952,10}-{1351,10}-{1265,10}-{1349,10}"
},
{
"npcs": "471",
@@ -357,7 +357,7 @@
"general_store": "true",
"id": "41",
"title": "Trader Stan's Trading Post",
"stock": "{1931,5}-{1935,2}-{1735,2}-{1925,3}-{1923,2}-{1887,2}-{590,2}-{1755,2}-{2347,5}-{550,5}-{9003,5}-{954,2}-{946,2}-{2114,inf}-{1963,15}-{2108,10}-{4286,10}-{1785,15}-{1783,inf}-{401,inf}-{1781,10}-{301,20}-{307,20}-{1941,30}-{9629,25}-{3226,20}-{1025,5}"
"stock": "{1931,5}-{1935,2}-{1735,2}-{1925,3}-{1923,2}-{1887,2}-{590,2}-{1755,2}-{2347,5}-{550,5}-{9003,5}-{954,2}-{946,2}-{2114,0}-{1963,15}-{2108,10}-{4286,10}-{1785,15}-{1783,inf}-{401,inf}-{1781,10}-{301,20}-{307,20}-{1941,30}-{9629,25}-{3226,20}-{1025,5}"
},
{
"npcs": "534",
@@ -375,7 +375,7 @@
"general_store": "false",
"id": "43",
"title": "Davon's Amulet Store",
"stock": "{1718,0}-{1727,1}-{1729,0}-{1725,0}-{1731,0}"
"stock": "{1718,0}-{1727,0}-{1729,0}-{1725,0}-{1731,0}"
},
{
"npcs": "2356",
@@ -397,12 +397,12 @@
},
{
"npcs": "1860",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "46",
"title": "Brian's Archery Supplies",
"stock": "{886,100}-{888,30}-{890,0}-{843,10}-{849,10}-{853,10}"
"stock": "{886,100}-{888,30}-{890,0}-{843,10}-{845,10}-{849,10}-{847,10}-{853,10}-{851,10}"
},
{
"npcs": "550",
@@ -478,12 +478,12 @@
},
{
"npcs": "559",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "55",
"title": "Brian's Battleaxe Bazaar",
"stock": "{1375,10}-{1363,10}-{1365,10}-{1367,10}-{1369,10}-{1371,10}"
"stock": "{1375,4}-{1363,3}-{1365,2}-{1367,1}-{1369,1}-{1371,1}"
},
{
"npcs": "562",
@@ -510,7 +510,7 @@
"general_store": "false",
"id": "58",
"title": "Wayne's Chains",
"stock": "{1103,10}-{1101,10}-{1105,10}-{1107,10}-{1109,10}-{1111,10}"
"stock": "{1103,3}-{1101,2}-{1105,1}-{1107,1}-{1109,1}-{1111,1}"
},
{
"npcs": "554",
@@ -622,7 +622,7 @@
},
{
"npcs": "585",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "71",
@@ -658,12 +658,12 @@
},
{
"npcs": "2304",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "75",
"title": "Sarah's Farming Shop",
"stock": "{5376,10}-{6032,300}-{5418,10}-{5376,10}-{6036,10}-{5354,100}-{5341,10}-{5329,10}-{5343,10}-{952,10}-{5325,10}-{1925,100}-{5331,30}-{12622,10}-{5996,0}-{6006,0}-{1965,0}-{5994,0}-{5931,0}-{6000,0}-{1957,0}-{5504,0}-{5986,0}-{1982,0}-{5982,0}-{6002,0}-{5998,0}"
"stock": "{5376,10}-{6032,300}-{5418,10}-{6036,10}-{5354,100}-{5341,10}-{5329,10}-{5343,10}-{952,10}-{5325,10}-{1925,100}-{5331,30}-{12622,10}-{5996,0}-{6006,0}-{1965,0}-{5994,0}-{5931,0}-{6000,0}-{1957,0}-{5504,0}-{5986,0}-{1982,0}-{5982,0}-{6002,0}-{5998,0}"
},
{
"npcs": "1783",
@@ -676,11 +676,11 @@
},
{
"npcs": "557",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "77",
"title": "Wydin's Consumables Store",
"title": "Wydin's Food Store",
"stock": "{1933,500}-{2132,10}-{2138,10}-{1965,10}-{1963,0}-{1951,0}-{2309,10}-{1973,10}-{1985,10}-{1982,10}-{1550,10}"
},
{
@@ -721,11 +721,11 @@
},
{
"npcs": "5487",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "82",
"title": "Keepa Kettilon's Store",
"title": "Keepa Kettilon's store",
"stock": "{361,20}-{329,20}-{339,20}-{379,10}-{373,0}-{385,0}"
},
{
@@ -748,11 +748,11 @@
},
{
"npcs": "4293",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "85",
"title": "Warriors' Guild Consumables Shop",
"title": "Warriors' Guild Food Shop",
"stock": "{333,10}-{365,10}-{2289,10}-{6705,10}-{2003,10}"
},
{
@@ -766,11 +766,11 @@
},
{
"npcs": "584",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "87",
"title": "Herquin's Gem",
"title": "Herquin's Gems",
"stock": "{1623,0}-{1621,0}-{1619,0}-{1617,0}-{1607,0}-{1605,0}-{1603,0}-{1601,0}"
},
{
@@ -932,8 +932,8 @@
"currency": "995",
"general_store": "false",
"id": "106",
"title": "Jewellery Shop",
"stock": "{1635,0}-{1637,0}-{1639,0}-{1641,0}-{1643,0}-{1654,0}-{1656,0}-{1658,0}-{1660,0}-{1662,0}-{1673,0}-{1675,0}-{1696,0}-{1698,0}-{1700,0}-{11069,0}-{11072,0}-{11076,0}-{11085,0}-{11092,0}"
"title": "Grum's Gold Exchange",
"stock": "{1635,0}-{1637,0}-{1639,0}-{1641,0}-{1643,0}-{1654,0}-{1656,0}-{1658,0}-{1660,0}-{1662,0}-{1692,0}-{1694,0}-{1696,0}-{1698,0}-{1700,0}-{11069,0}-{11072,0}-{11076,0}-{11085,0}-{11092,0}"
},
{
"npcs": "1862",
@@ -977,8 +977,8 @@
"currency": "995",
"general_store": "false",
"id": "111",
"title": "Mace Shop",
"stock": "{1422,10}-{1420,10}-{1424,10}-{1428,10}-{1430,10}"
"title": "Flynn's Mace Market",
"stock": "{1422,5}-{1420,4}-{1424,4}-{1428,3}-{1430,2}"
},
{
"npcs": "1862",
@@ -991,12 +991,12 @@
},
{
"npcs": "583",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "113",
"title": "Betty's Magic Emporium",
"stock": "{554,3000}-{555,3000}-{556,3000}-{557,3000}-{558,100}-{559,100}-{562,30}-{560,10}-{221,150}-{579,10}-{1017,10}"
"stock": "{554,300}-{555,300}-{556,300}-{557,300}-{558,100}-{559,100}-{562,30}-{560,10}-{221,100}-{579,10}-{1017,10}"
},
{
"npcs": "553",
@@ -1144,12 +1144,12 @@
},
{
"npcs": "5485",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "130",
"title": "Armour Shop",
"stock": "{1109,4}-{1159,4}-{1181,4}-{1197,4}-{1071,4}-{1085,4}-{1121,4}"
"stock": "{1109,4}-{1143,4}-{1159,4}-{1181,4}-{1197,4}-{1071,4}-{1085,4}-{1121,4}"
},
{
"npcs": "542",
@@ -1207,12 +1207,12 @@
},
{
"npcs": "577",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "137",
"title": "Shield Shop",
"stock": "{1171,10}-{1173,10}-{1189,10}-{1175,10}-{1191,10}-{1177,10}-{1193,10}-{1181,10}"
"title": "Cassie's Shield Shop",
"stock": "{1171,5}-{1173,3}-{1189,3}-{1175,2}-{1191,0}-{1177,0}-{1193,0}-{1181,0}"
},
{
"npcs": "209",
@@ -1275,7 +1275,7 @@
"general_store": "false",
"id": "144",
"title": "Gerrant's Fishy Business",
"stock": "{303,10}-{307,10}-{309,10}-{311,1000}-{301,10}-{313,1000}-{314,1000}-{317,0}-{327,10}-{345,0}-{321,0}-{335,0}-{349,0}-{331,0}-{359,0}-{377,0}-{371,0}"
"stock": "{303,10}-{307,10}-{309,10}-{311,30}-{301,10}-{13431,10}-{313,1000}-{314,1000}-{317,0}-{327,10}-{345,0}-{321,0}-{335,0}-{349,0}-{331,0}-{359,0}-{377,0}-{371,0}"
},
{
"npcs": "576",
@@ -1284,7 +1284,7 @@
"general_store": "false",
"id": "145",
"title": "Harry's Fishing Shop",
"stock": "{303,10}-{307,10}-{311,1000}-{301,10}-{313,1000}-{305,10}-{317,0}-{327,0}-{345,0}-{353,0}-{341,0}-{321,0}-{359,0}-{377,0}-{363,0}-{371,0}-{383,0}-{7810,1000}"
"stock": "{303,10}-{307,10}-{311,1000}-{301,10}-{313,100}-{305,10}-{317,0}-{327,0}-{345,0}-{353,0}-{341,0}-{321,0}-{359,0}-{377,0}-{363,0}-{371,0}-{383,0}-{7810,1000}"
},
{
"npcs": "5266",
@@ -1459,12 +1459,12 @@
},
{
"npcs": "5486",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "165",
"title": "Weapons Galore",
"stock": "{1315,10}-{1343,10}-{1369,10}-{1299,10}"
"title": "Weapons galore",
"stock": "{1299,4}-{1343,4}-{1369,4}-{3099,4}-{1315,4}"
},
{
"npcs": "4250",
@@ -1473,7 +1473,7 @@
"general_store": "false",
"id": "166",
"title": "Construction supplies",
"stock": "{8794,1000}-{8790,1000}-{4819,1000}-{4820,1000}-{1539,1000}"
"stock": "{8794,10}-{8790,300}-{4819,300}-{4820,300}-{1539,300}"
},
{
"npcs": "1079",
@@ -1508,8 +1508,8 @@
"currency": "995",
"general_store": "false",
"id": "170",
"title": "The Shrimps and Parrot",
"stock": "{347,5}-{339,5}-{379,5}-{373,6}-{3144,0}"
"title": "The Shrimp and Parrot",
"stock": "{347,5}-{339,5}-{379,3}-{373,2}-{3144,3}"
},
{
"npcs": "747",
@@ -1652,8 +1652,8 @@
"currency": "995",
"general_store": "false",
"id": "186",
"title": "Neitiznot Supplies",
"stock": "{946,10}-{2347,10}-{1734,10}-{1733,10}-{1351,10}-{1759,100}"
"title": "Neitiznot supplies.",
"stock": "{946,inf}-{2347,inf}-{1734,inf}-{1733,inf}-{1351,inf}-{1759,inf}"
},
{
"npcs": "1778",
@@ -1882,12 +1882,12 @@
},
{
"npcs": "4251",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "213",
"title": "The Garden Centre",
"stock": "{8417,1000}-{8419,1000}-{8421,1000}-{8423,1000}-{8425,1000}-{8427,1000}-{8429,1000}-{8431,1000}-{8433,1000}-{8435,1000}-{8451,1000}-{8453,1000}-{8455,1000}-{8457,1000}-{8459,1000}-{8461,1000}-{8437,1000}-{8439,1000}-{8441,1000}-{8443,1000}-{8445,1000}-{8447,1000}-{8449,1000}"
"stock": "{8417,10}-{8419,10}-{8421,10}-{8423,10}-{8425,10}-{8427,10}-{8429,10}-{8431,1000}-{8433,10}-{8435,10}-{8451,10}-{8453,10}-{8455,10}-{8457,10}-{8459,10}-{8461,10}-{8437,10}-{8439,10}-{8441,10}-{8443,10}-{8445,10}-{8447,10}-{8449,10}"
},
{
"npcs": "1972",
@@ -1909,7 +1909,7 @@
},
{
"npcs": "5483",
"high_alch": "0",
"high_alch": "1",
"currency": "995",
"general_store": "false",
"id": "216",
@@ -1963,7 +1963,7 @@
},
{
"npcs": "2564",
"high_alch": "1",
"high_alch": "0",
"currency": "995",
"general_store": "false",
"id": "222",
@@ -1981,7 +1981,7 @@
},
{
"npcs": "578",
"high_alch": "1",
"high_alch": "0",
"currency": "995",
"general_store": "false",
"id": "224",
@@ -2053,7 +2053,7 @@
},
{
"npcs": "1282",
"high_alch": "1",
"high_alch": "0",
"currency": "995",
"general_store": "false",
"id": "232",
@@ -2062,7 +2062,7 @@
},
{
"npcs": "1315",
"high_alch": "1",
"high_alch": "0",
"currency": "995",
"general_store": "false",
"id": "233",
@@ -2080,7 +2080,7 @@
},
{
"npcs": "7420",
"high_alch": "1",
"high_alch": "0",
"currency": "995",
"general_store": "false",
"id": "235",
@@ -2088,12 +2088,39 @@
"stock": "{1931,inf}-{1929,inf}-{1937,inf}-{2313,inf}-{1887,inf}-{590,inf}-{1735,inf}-{1951,inf}-{1969,inf}-{1949,inf}"
},
{
"npcs": "4856",
"high_alch": "1",
"npcs": "4248",
"high_alch": "0",
"currency": "995",
"general_store": "false",
"id": "236",
"title": "Keldagrim Stonemason",
"stock": "{3420,500}-{8786,30}-{8784,30}-{8788,30}"
},
{
"npcs": "4856",
"high_alch": "0",
"currency": "995",
"general_store": "false",
"id": "237",
"title": "Lovecraft's Tackle",
"stock": "{303,10}-{307,10}-{309,10}-{311,1000}-{301,10}-{313,1000}-{314,1000}-{317,0}-{327,10}-{345,0}-{321,0}-{335,0}-{349,0}-{331,0}-{359,0}-{377,0}-{371,0}"
}
},
{
"npcs": "5484",
"high_alch": "0",
"currency": "995",
"general_store": "false",
"id": "238",
"title": "Flosi's Fishmongers",
"stock": "{377,5}-{359,20}-{331,20}-{341,20}-{383,0}"
},
{
"npcs": "5495",
"high_alch": "0",
"currency": "995",
"general_store": "false",
"id": "239",
"title": "Contraband yak produce.",
"stock": "{10818,25}-{10816,50}-{10814,50}-{10820,10}"
}
]
+3 -3
View File
@@ -9,7 +9,7 @@ import core.cache.def.impl.AnimationDefinition;
import core.cache.def.impl.GraphicDefinition;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import rs09.game.system.SystemLogger;
/**
@@ -67,7 +67,7 @@ public final class Cache {
}
}
ItemDefinition.parse();
ObjectDefinition.parse();
SceneryDefinition.parse();
}
/**
@@ -216,7 +216,7 @@ public final class Cache {
}
/**
* Method used to return the {@link ObjectDefinition} size.
* Method used to return the {@link SceneryDefinition} size.
*
* @return the size.
*/
@@ -17,12 +17,12 @@ import java.util.Map;
* Represents an object's definition.
* @author Emperor
*/
public class ObjectDefinition extends Definition<Scenery> {
public class SceneryDefinition extends Definition<Scenery> {
/**
* The item definitions mapping.
*/
private static final Map<Integer, ObjectDefinition> DEFINITIONS = new HashMap<Integer, ObjectDefinition>();
private static final Map<Integer, SceneryDefinition> DEFINITIONS = new HashMap<Integer, SceneryDefinition>();
/**
* The default option handlers.
@@ -447,7 +447,7 @@ public class ObjectDefinition extends Definition<Scenery> {
/**
* Construct a new {@code ObjectDefinition} {@code Object}.
*/
public ObjectDefinition() {
public SceneryDefinition() {
anInt3835 = -1;
anInt3860 = -1;
configFileId = -1;
@@ -572,16 +572,16 @@ public class ObjectDefinition extends Definition<Scenery> {
for (int objectId = 0; objectId < Cache.getObjectDefinitionsSize(); objectId++) {
byte[] data = Cache.getIndexes()[16].getFileData(getContainerId(objectId), objectId & 0xff);
if (data == null) {
ObjectDefinition.getDefinitions().put(objectId, new ObjectDefinition());
SceneryDefinition.getDefinitions().put(objectId, new SceneryDefinition());
//SystemLogger.logErr("Could not load object definitions for id " + objectId + " - no data!");
continue;
}
ObjectDefinition def = ObjectDefinition.parseDefinition(objectId, ByteBuffer.wrap(data));
SceneryDefinition def = SceneryDefinition.parseDefinition(objectId, ByteBuffer.wrap(data));
if (def == null) {
// SystemLogger.logErr("Could not load object definitions for id " + objectId + " - no definitions found!");
return;
}
ObjectDefinition.getDefinitions().put(objectId, def);
SceneryDefinition.getDefinitions().put(objectId, def);
data = null;
}
}
@@ -591,12 +591,12 @@ public class ObjectDefinition extends Definition<Scenery> {
* @param objectId The object's id.
* @return The object definition.
*/
public static ObjectDefinition forId(int objectId) {
ObjectDefinition def = DEFINITIONS.get(objectId);
public static SceneryDefinition forId(int objectId) {
SceneryDefinition def = DEFINITIONS.get(objectId);
if (def != null) {
return def;
}
DEFINITIONS.put(objectId, def = new ObjectDefinition());
DEFINITIONS.put(objectId, def = new SceneryDefinition());
def.id = objectId;
return def;
}
@@ -609,8 +609,8 @@ public class ObjectDefinition extends Definition<Scenery> {
* @param buffer The buffer.
* @return The object definition.
*/
public static ObjectDefinition parseDefinition(int objectId, ByteBuffer buffer) {
ObjectDefinition def = new ObjectDefinition();
public static SceneryDefinition parseDefinition(int objectId, ByteBuffer buffer) {
SceneryDefinition def = new SceneryDefinition();
def.id = objectId;
// SystemLogger.logErr("----------------------------------------------------\n\n\n");
while (true) {
@@ -852,7 +852,7 @@ public class ObjectDefinition extends Definition<Scenery> {
}
for (int i = 0; i < childrenIds.length; i++) {
if (childrenIds[i] != -1) {
ObjectDefinition def = forId(childrenIds[i]);
SceneryDefinition def = forId(childrenIds[i]);
if (def.hasOptions(false)) {
return true;
}
@@ -866,7 +866,7 @@ public class ObjectDefinition extends Definition<Scenery> {
* @param player The player to get it for.
* @return The object definition.
*/
public ObjectDefinition getChildObject(Player player) {
public SceneryDefinition getChildObject(Player player) {
if (childrenIds == null || childrenIds.length < 1) {
return this;
}
@@ -1586,7 +1586,7 @@ public class ObjectDefinition extends Definition<Scenery> {
* Get the definitions.
* @return the definitions
*/
public static Map<Integer, ObjectDefinition> getDefinitions() {
public static Map<Integer, SceneryDefinition> getDefinitions() {
return DEFINITIONS;
}
@@ -1598,7 +1598,7 @@ public class ObjectDefinition extends Definition<Scenery> {
* option handler.
*/
public static OptionHandler getOptionHandler(int nodeId, String name) {
ObjectDefinition def = forId(nodeId);
SceneryDefinition def = forId(nodeId);
OptionHandler handler = def.getConfiguration("option:" + name);
if (handler != null) {
return handler;
@@ -1,6 +1,6 @@
package core.game.content.activity.bountyhunter;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.activity.ActivityManager;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -19,13 +19,13 @@ public final class BHOptionHandler extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(28110).getHandlers().put("option:exit", this);
ObjectDefinition.forId(28119).getHandlers().put("option:enter", this);
ObjectDefinition.forId(28120).getHandlers().put("option:enter", this);
ObjectDefinition.forId(28121).getHandlers().put("option:enter", this);
ObjectDefinition.forId(28122).getHandlers().put("option:exit", this);
ObjectDefinition.forId(28115).getHandlers().put("option:view", this);
ObjectDefinition.forId(28116).getHandlers().put("option:view", this);
SceneryDefinition.forId(28110).getHandlers().put("option:exit", this);
SceneryDefinition.forId(28119).getHandlers().put("option:enter", this);
SceneryDefinition.forId(28120).getHandlers().put("option:enter", this);
SceneryDefinition.forId(28121).getHandlers().put("option:enter", this);
SceneryDefinition.forId(28122).getHandlers().put("option:exit", this);
SceneryDefinition.forId(28115).getHandlers().put("option:view", this);
SceneryDefinition.forId(28116).getHandlers().put("option:view", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.activity.duel;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.container.Container;
import core.game.container.impl.EquipmentContainer;
import core.game.content.dialogue.DialogueAction;
@@ -570,7 +570,7 @@ public class DuelArea extends MapZone {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(3203).getHandlers().put("option:forfeit", this);
SceneryDefinition.forId(3203).getHandlers().put("option:forfeit", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.activity.fog;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.activity.ActivityPlugin;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -55,7 +55,7 @@ public class FOGActivityPlugin extends ActivityPlugin {
PluginManager.definePlugin(new OptionHandler() {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(30204).getHandlers().put("option:enter", this);
SceneryDefinition.forId(30204).getHandlers().put("option:enter", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.activity.guild;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.DialoguePlugin;
import core.game.content.global.Skillcape;
import core.game.content.global.action.DoorActionHandler;
@@ -32,7 +32,7 @@ public final class CraftingGuildPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2647).getHandlers().put("option:open", this);
SceneryDefinition.forId(2647).getHandlers().put("option:open", this);
NPCDefinition.forId(804).getHandlers().put("option:trade", this);
new MasterCrafterDialogue().init();
new TannerDialogue().init();
@@ -1,6 +1,6 @@
package core.game.content.activity.guild;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.plugin.Initializable;
import core.game.content.dialogue.DialoguePlugin;
import core.game.content.global.Skillcape;
@@ -23,7 +23,7 @@ public final class FishingGuild extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2025).getHandlers().put("option:open", this);
SceneryDefinition.forId(2025).getHandlers().put("option:open", this);
new MasterFisherDialogue().init();
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.activity.guild;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.EnchantedJewellery;
import core.game.content.global.action.DoorActionHandler;
import core.game.node.entity.skill.summoning.familiar.Familiar;
@@ -26,8 +26,8 @@ public final class HeroGuildPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2624).getHandlers().put("option:open", this);
ObjectDefinition.forId(2625).getHandlers().put("option:open", this);
SceneryDefinition.forId(2624).getHandlers().put("option:open", this);
SceneryDefinition.forId(2625).getHandlers().put("option:open", this);
PluginManager.definePlugin(new JewelleryRechargePlugin());
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.activity.guild;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.ClimbActionHandler;
import core.game.content.global.action.DoorActionHandler;
import core.game.node.entity.skill.Skills;
@@ -24,9 +24,9 @@ public final class MiningGuildPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2113).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(30941).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(2112).getHandlers().put("option:open", this);
SceneryDefinition.forId(2113).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(30941).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(2112).getHandlers().put("option:open", this);
return this;
}
@@ -2,7 +2,7 @@ package core.game.content.activity.guild;
import java.util.List;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -46,10 +46,10 @@ public final class RangingGuildPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2514).getHandlers().put("option:open", this);
ObjectDefinition.forId(2511).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(2512).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(2513).getHandlers().put("option:fire-at", this);
SceneryDefinition.forId(2514).getHandlers().put("option:open", this);
SceneryDefinition.forId(2511).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(2512).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(2513).getHandlers().put("option:fire-at", this);
new RangingGuildDoorman().init();
new GuardDialogue().init();
new LeatherWorkerDialogue().init();
@@ -1,7 +1,7 @@
package core.game.content.activity.guild;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.DialoguePlugin;
import core.game.content.global.Skillcape;
import core.game.content.global.action.ClimbActionHandler;
@@ -27,12 +27,12 @@ public final class WizardGuildPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(1600).getHandlers().put("option:open", this);
ObjectDefinition.forId(1601).getHandlers().put("option:open", this);
SceneryDefinition.forId(1600).getHandlers().put("option:open", this);
SceneryDefinition.forId(1601).getHandlers().put("option:open", this);
NPCDefinition.forId(462).getHandlers().put("option:teleport", this);
ObjectDefinition.forId(2154).getHandlers().put("option:open", this);
ObjectDefinition.forId(2155).getHandlers().put("option:open", this);
ObjectDefinition.forId(1722).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(2154).getHandlers().put("option:open", this);
SceneryDefinition.forId(2155).getHandlers().put("option:open", this);
SceneryDefinition.forId(1722).getHandlers().put("option:climb-up", this);
new WizardDistentorDialogue().init();
new ZavisticRarveDialogue().init();
new ProfessorImblewynDialogue().init();
@@ -1,6 +1,6 @@
package core.game.content.activity.gwd;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.plugin.Initializable;
import core.game.content.dialogue.FacialExpression;
import core.game.node.entity.skill.Skills;
@@ -26,10 +26,10 @@ public final class GodwarsEntranceHandler extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(26340).getHandlers().put("option:tie-rope", this);
ObjectDefinition.forId(26341).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(26338).getHandlers().put("option:move", this);
ObjectDefinition.forId(26305).getHandlers().put("option:crawl-through", this);
SceneryDefinition.forId(26340).getHandlers().put("option:tie-rope", this);
SceneryDefinition.forId(26341).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(26338).getHandlers().put("option:move", this);
SceneryDefinition.forId(26305).getHandlers().put("option:crawl-through", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.activity.gwd;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.container.impl.EquipmentContainer;
import core.game.content.global.action.DoorActionHandler;
@@ -331,7 +331,7 @@ public final class GodwarsMapzone extends MapZone implements Plugin<Object> {
@Override
public boolean pulse() {
object.getDefinition().getOptions()[1] = "open";
ObjectDefinition.getOptionHandler(object.getId(), "open").handle(player, object, "open");
SceneryDefinition.getOptionHandler(object.getId(), "open").handle(player, object, "open");
return true;
}
});
@@ -1,7 +1,7 @@
package core.game.content.activity.magearena;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.DialogueAction;
import core.game.content.global.GodType;
import core.game.interaction.OptionHandler;
@@ -53,11 +53,11 @@ public final class MageArenaPlugin extends OptionHandler {
ItemDefinition.forId(2412).getHandlers().put("option:take", this);
ItemDefinition.forId(2413).getHandlers().put("option:take", this);
ItemDefinition.forId(2414).getHandlers().put("option:take", this);
ObjectDefinition.forId(2873).getHandlers().put("option:pray at", this);
ObjectDefinition.forId(2874).getHandlers().put("option:pray at", this);
ObjectDefinition.forId(2875).getHandlers().put("option:pray at", this);
ObjectDefinition.forId(2878).getHandlers().put("option:step-into", this);
ObjectDefinition.forId(2879).getHandlers().put("option:step-into", this);
SceneryDefinition.forId(2873).getHandlers().put("option:pray at", this);
SceneryDefinition.forId(2874).getHandlers().put("option:pray at", this);
SceneryDefinition.forId(2875).getHandlers().put("option:pray at", this);
SceneryDefinition.forId(2878).getHandlers().put("option:step-into", this);
SceneryDefinition.forId(2879).getHandlers().put("option:step-into", this);
return this;
}
@@ -2,7 +2,7 @@ package core.game.content.activity.mta;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.activity.mta.impl.TelekineticZone;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -41,13 +41,13 @@ public class MageTrainingArenaPlugin extends OptionHandler {
public Plugin<Object> newInstance(Object arg) throws Throwable {
ItemDefinition.forId(6885).getHandlers().put("option:destroy", this);
ItemDefinition.forId(6885).getHandlers().put("option:talk-to", this);
ObjectDefinition.forId(10721).getHandlers().put("option:enter", this);
SceneryDefinition.forId(10721).getHandlers().put("option:enter", this);
NPCDefinition.forId(3103).getHandlers().put("option:trade-with", this);
for (MTAType type : MTAType.values()) {
if (type.getZone() != null) {
ZoneBuilder.configure(type.getZone());
}
ObjectDefinition.forId(type.getObjectId()).getHandlers().put("option:enter", this);
SceneryDefinition.forId(type.getObjectId()).getHandlers().put("option:enter", this);
}
ItemDefinition.forId(TelekineticZone.STATUE).getHandlers().put("option:observe", this);
ItemDefinition.forId(TelekineticZone.STATUE).getHandlers().put("option:reset", this);
@@ -143,7 +143,7 @@ public class AlchemistZone extends MTAZone {
player.getDialogueInterpreter().sendDialogue("This item isn't yours to wield, it belongs to the arena!");
return true;
} else if (target.getName().equals("Cupboard")) {
search(player, target.asObject());
search(player, target.asScenery());
return true;
}
}
@@ -140,7 +140,7 @@ public class EnchantingZone extends MTAZone {
if (e instanceof Player) {
Player player = e.asPlayer();
if (target.getId() >= 10799 && target.getId() <= 10802) {
Shapes.forId(target.getId()).take(player, target.asObject());
Shapes.forId(target.getId()).take(player, target.asScenery());
return true;
}
if (target.getId() == 10803) {
@@ -135,7 +135,7 @@ public class GraveyardZone extends MTAZone {
deposit(player);
return true;
} else if (target.getId() >= 10725 && target.getId() <= 10728) {
BoneType.forObject(target.getId()).grab(player, target.asObject());
BoneType.forObject(target.getId()).grab(player, target.asScenery());
return true;
}
}
@@ -3,7 +3,7 @@ package core.game.content.activity.partyroom;
import java.util.ArrayList;
import java.util.List;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.npc.NPC;
@@ -50,7 +50,7 @@ public final class BalloonManager extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
for (PartyBalloon balloon : PartyBalloon.values()) {
ObjectDefinition.forId(balloon.getBalloonId()).getHandlers().put("option:burst", this);
SceneryDefinition.forId(balloon.getBalloonId()).getHandlers().put("option:burst", this);
}
return this;
}
@@ -59,7 +59,7 @@ public final class BalloonManager extends OptionHandler {
public boolean handle(Player player, Node node, String option) {
switch (option) {
case "burst":
PartyBalloon.forId(node.getId()).burst(player, node.asObject());
PartyBalloon.forId(node.getId()).burst(player, node.asScenery());
return true;
}
return true;
@@ -6,7 +6,7 @@ import java.util.List;
import java.util.Map;
import api.ContentAPI;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -17,7 +17,6 @@ import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.RunScript;
import core.game.node.item.Item;
import core.game.node.object.Scenery;
import core.game.node.object.SceneryBuilder;
@@ -69,10 +68,10 @@ public final class PartyRoomPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(CLOSED_CHEST).getHandlers().put("option:open", this);
ObjectDefinition.forId(OPEN_CHEST).getHandlers().put("option:deposit", this);
ObjectDefinition.forId(OPEN_CHEST).getHandlers().put("option:shut", this);
ObjectDefinition.forId(LEVER).getHandlers().put("option:pull", this);
SceneryDefinition.forId(CLOSED_CHEST).getHandlers().put("option:open", this);
SceneryDefinition.forId(OPEN_CHEST).getHandlers().put("option:deposit", this);
SceneryDefinition.forId(OPEN_CHEST).getHandlers().put("option:shut", this);
SceneryDefinition.forId(LEVER).getHandlers().put("option:pull", this);
PluginManager.definePlugin(new DepositInterfaceHandler());
PluginManager.definePlugin(new BalloonManager());
return this;
@@ -83,7 +82,7 @@ public final class PartyRoomPlugin extends OptionHandler {
switch (node.getId()) {
case CLOSED_CHEST:
player.animate(Animation.create(536));
SceneryBuilder.replace(node.asObject(), node.asObject().transform(OPEN_CHEST));
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(OPEN_CHEST));
break;
case OPEN_CHEST:
switch (option) {
@@ -92,12 +91,12 @@ public final class PartyRoomPlugin extends OptionHandler {
break;
case "shut":
player.animate(Animation.create(535));
SceneryBuilder.replace(node.asObject(), node.asObject().transform(CLOSED_CHEST));
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(CLOSED_CHEST));
break;
}
break;
case LEVER:
handleLever(player, node.asObject());
handleLever(player, node.asScenery());
break;
}
return true;
@@ -1,6 +1,6 @@
package core.game.content.activity.pestcontrol;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import rs09.game.world.GameWorld;
import core.game.content.activity.ActivityManager;
import core.game.interaction.OptionHandler;
@@ -33,47 +33,47 @@ public final class PCObjectHandler extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
// Barricades
ObjectDefinition.forId(14227).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14228).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14229).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14230).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14231).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14232).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14227).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14228).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14229).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14230).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14231).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14232).getHandlers().put("option:repair", this);
// Gates
ObjectDefinition.forId(14233).getHandlers().put("option:open", this);
ObjectDefinition.forId(14234).getHandlers().put("option:close", this);
ObjectDefinition.forId(14235).getHandlers().put("option:open", this);
ObjectDefinition.forId(14236).getHandlers().put("option:close", this);
ObjectDefinition.forId(14237).getHandlers().put("option:open", this);
ObjectDefinition.forId(14237).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14238).getHandlers().put("option:close", this);
ObjectDefinition.forId(14238).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14239).getHandlers().put("option:open", this);
ObjectDefinition.forId(14239).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14240).getHandlers().put("option:close", this);
ObjectDefinition.forId(14240).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14241).getHandlers().put("option:open", this);
ObjectDefinition.forId(14241).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14242).getHandlers().put("option:close", this);
ObjectDefinition.forId(14242).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14243).getHandlers().put("option:open", this);
ObjectDefinition.forId(14243).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14244).getHandlers().put("option:close", this);
ObjectDefinition.forId(14244).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14245).getHandlers().put("option:open", this);
ObjectDefinition.forId(14245).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14246).getHandlers().put("option:close", this);
ObjectDefinition.forId(14246).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14247).getHandlers().put("option:open", this);
ObjectDefinition.forId(14247).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14248).getHandlers().put("option:close", this);
ObjectDefinition.forId(14248).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14233).getHandlers().put("option:open", this);
SceneryDefinition.forId(14234).getHandlers().put("option:close", this);
SceneryDefinition.forId(14235).getHandlers().put("option:open", this);
SceneryDefinition.forId(14236).getHandlers().put("option:close", this);
SceneryDefinition.forId(14237).getHandlers().put("option:open", this);
SceneryDefinition.forId(14237).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14238).getHandlers().put("option:close", this);
SceneryDefinition.forId(14238).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14239).getHandlers().put("option:open", this);
SceneryDefinition.forId(14239).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14240).getHandlers().put("option:close", this);
SceneryDefinition.forId(14240).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14241).getHandlers().put("option:open", this);
SceneryDefinition.forId(14241).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14242).getHandlers().put("option:close", this);
SceneryDefinition.forId(14242).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14243).getHandlers().put("option:open", this);
SceneryDefinition.forId(14243).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14244).getHandlers().put("option:close", this);
SceneryDefinition.forId(14244).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14245).getHandlers().put("option:open", this);
SceneryDefinition.forId(14245).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14246).getHandlers().put("option:close", this);
SceneryDefinition.forId(14246).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14247).getHandlers().put("option:open", this);
SceneryDefinition.forId(14247).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14248).getHandlers().put("option:close", this);
SceneryDefinition.forId(14248).getHandlers().put("option:repair", this);
// Towers
ObjectDefinition.forId(14296).getHandlers().put("option:climb", this);
SceneryDefinition.forId(14296).getHandlers().put("option:climb", this);
// Lander crossing plank
ObjectDefinition.forId(14315).getHandlers().put("option:cross", this);
ObjectDefinition.forId(25631).getHandlers().put("option:cross", this);
ObjectDefinition.forId(25632).getHandlers().put("option:cross", this);
SceneryDefinition.forId(14315).getHandlers().put("option:cross", this);
SceneryDefinition.forId(25631).getHandlers().put("option:cross", this);
SceneryDefinition.forId(25632).getHandlers().put("option:cross", this);
return this;
}
@@ -5,7 +5,7 @@ import java.util.List;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.plugin.Initializable;
import core.game.node.entity.skill.Skills;
@@ -241,7 +241,7 @@ public final class PuroPuroPlugin extends MapZone implements Plugin<Object> {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
NPCDefinition.forId(6070).getHandlers().put("option:trade", this);
ObjectDefinition.forId(24991).getHandlers().put("option:enter", this);
SceneryDefinition.forId(24991).getHandlers().put("option:enter", this);
ItemDefinition.forId(11273).getHandlers().put("option:toggle-view", this);
ItemDefinition.forId(11258).getHandlers().put("option:butterfly-jar", this);
ItemDefinition.forId(11258).getHandlers().put("option:impling-jar", this);
@@ -197,7 +197,7 @@ public class PlunderZones implements Plugin<Object> {
}
return true;
}
PlunderObject object = target instanceof NPC ? null : new PlunderObject(target.asObject()); //PlunderObject(target.getId(),target.getLocation());
PlunderObject object = target instanceof NPC ? null : new PlunderObject(target.asScenery()); //PlunderObject(target.getId(),target.getLocation());
PlunderObjectManager manager = player.getPlunderObjectManager();
boolean alreadyOpened = manager.openedMap.getOrDefault(object.getLocation(),false);
boolean charmed = manager.charmedMap.getOrDefault(object.getLocation(),false);
@@ -243,7 +243,7 @@ public class PlunderZones implements Plugin<Object> {
if (!alreadyOpened && (success || charmed)) {
player.getPacketDispatch().sendMessage("You successfully search the urn...");
SceneryBuilder.replace(target.asObject(), target.asObject().transform(object.openId), 5);
SceneryBuilder.replace(target.asScenery(), target.asScenery().transform(object.openId), 5);
manager.registerOpened(object);
reward(player,object.getId());
} else {
@@ -255,7 +255,7 @@ public class PlunderZones implements Plugin<Object> {
player.getPacketDispatch().sendMessage("You already checked for snakes.");
} else {
player.getPacketDispatch().sendMessage("You check the urn for snakes...");
SceneryBuilder.replace(target.asObject(), target.asObject().transform(object.snakeId), 5);
SceneryBuilder.replace(target.asScenery(), target.asScenery().transform(object.snakeId), 5);
}
}
break;
@@ -1,7 +1,8 @@
package core.game.content.activity.pyramidplunder;
import api.ContentAPI;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.ClimbActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -9,6 +10,7 @@ import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
import core.game.node.object.Scenery;
import core.game.system.task.Pulse;
import kotlin.Unit;
import rs09.game.world.GameWorld;
import core.game.world.map.Location;
import core.game.world.update.flag.context.Animation;
@@ -43,16 +45,16 @@ public final class PyramidOptionHandler extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(16484).getHandlers().put("option:search", this);
ObjectDefinition.forId(16485).getHandlers().put("option:search", this);
ObjectDefinition.forId(16487).getHandlers().put("option:search", this);
ObjectDefinition.forId(16488).getHandlers().put("option:search", this);
ObjectDefinition.forId(16490).getHandlers().put("option:search", this);
ObjectDefinition.forId(16491).getHandlers().put("option:search", this);
ObjectDefinition.forId(16493).getHandlers().put("option:search", this);
ObjectDefinition.forId(16494).getHandlers().put("option:enter", this);
ObjectDefinition.forId(16458).getHandlers().put("option:leave tomb", this);
ObjectDefinition.forId(16459).getHandlers().put("option:leave tomb", this);
SceneryDefinition.forId(16484).getHandlers().put("option:search", this);
SceneryDefinition.forId(16485).getHandlers().put("option:search", this);
SceneryDefinition.forId(16487).getHandlers().put("option:search", this);
SceneryDefinition.forId(16488).getHandlers().put("option:search", this);
SceneryDefinition.forId(16490).getHandlers().put("option:search", this);
SceneryDefinition.forId(16491).getHandlers().put("option:search", this);
SceneryDefinition.forId(16493).getHandlers().put("option:search", this);
SceneryDefinition.forId(16494).getHandlers().put("option:enter", this);
SceneryDefinition.forId(16458).getHandlers().put("option:leave tomb", this);
SceneryDefinition.forId(16459).getHandlers().put("option:leave tomb", this);
NPCDefinition.forId(4476).getHandlers().put("option:start-minigame", this);
NPCDefinition.forId(4476).getHandlers().put("option:talk-to",this);
return null;
@@ -84,12 +86,10 @@ public final class PyramidOptionHandler extends OptionHandler {
if(entrance == currentEntrance && willBePushed){
player.lock();
player.animate(new Animation(7299));
player.getImpactHandler().setDisabledTicks(4);
GameWorld.getPulser().submit(new Pulse(4, player) {
ContentAPI.submitWorldPulse(new Pulse(4, player){
@Override
public boolean pulse() {
player.unlock();
player.getAnimator().reset();
return true;
}
});
@@ -48,7 +48,10 @@ public final class PyramidPlunderActivity extends ActivityPlugin {
public boolean leave(Entity e, boolean logout) {
if (e instanceof Player) {
((Player) e).getInterfaceManager().closeOverlay();
((PlunderSession) ((Player) e).getAttribute("plunder-session",null)).setActive(false);
PlunderSession session = (PlunderSession) e.asPlayer().getAttribute("plunder-session",null);
if(session != null){
session.setActive(false);
}
((Player) e).removeAttribute("plunder-session");
}
return super.leave(e, logout);
@@ -1,6 +1,6 @@
package core.game.content.activity.stronghold;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentPlugin;
import core.game.content.dialogue.DialogueInterpreter;
@@ -59,7 +59,7 @@ public final class StrongHoldSecurityPlugin extends MapZone implements Plugin<Ob
PluginManager.definePlugin(new OptionHandler() {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(16154).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(16154).getHandlers().put("option:climb-down", this);
return this;
}
@@ -12,7 +12,7 @@ import static core.game.content.activity.stronghold.playersafety.StrongHoldOfPla
import static core.game.content.activity.stronghold.playersafety.StrongHoldOfPlayerSafetyPlugin.forId;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.DialogueAction;
import core.game.content.global.action.DoorActionHandler;
import core.game.interaction.OptionHandler;
@@ -34,23 +34,23 @@ public class PSOptionHandler extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(JAIL_ENTRANCE_ID_ENTER).getHandlers().put("option:use", this);
ObjectDefinition.forId(JAIL_ENTRANCE_LEAVE).getHandlers().put("option:leave", this);
ObjectDefinition.forId(JAIL_STAIRS_UP).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(JAIL_STAIRS_DOWN).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(29732).getHandlers().put("option:open", this);
ObjectDefinition.forId(29624).getHandlers().put("option:open", this);
ObjectDefinition.forId(29728).getHandlers().put("option:enter", this);
ObjectDefinition.forId(29735).getHandlers().put("option:pull-back", this);
ObjectDefinition.forId(29623).getHandlers().put("option:use", this);
ObjectDefinition.forId(29730).getHandlers().put("option:pull", this);
ObjectDefinition.forId(29731).getHandlers().put("option:pull", this);
ObjectDefinition.forId(29577).getHandlers().put("option:open", this);
ObjectDefinition.forId(29578).getHandlers().put("option:search", this);
SceneryDefinition.forId(JAIL_ENTRANCE_ID_ENTER).getHandlers().put("option:use", this);
SceneryDefinition.forId(JAIL_ENTRANCE_LEAVE).getHandlers().put("option:leave", this);
SceneryDefinition.forId(JAIL_STAIRS_UP).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(JAIL_STAIRS_DOWN).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(29732).getHandlers().put("option:open", this);
SceneryDefinition.forId(29624).getHandlers().put("option:open", this);
SceneryDefinition.forId(29728).getHandlers().put("option:enter", this);
SceneryDefinition.forId(29735).getHandlers().put("option:pull-back", this);
SceneryDefinition.forId(29623).getHandlers().put("option:use", this);
SceneryDefinition.forId(29730).getHandlers().put("option:pull", this);
SceneryDefinition.forId(29731).getHandlers().put("option:pull", this);
SceneryDefinition.forId(29577).getHandlers().put("option:open", this);
SceneryDefinition.forId(29578).getHandlers().put("option:search", this);
ItemDefinition.forId(TEST_PAPER_ITEM_ID).getHandlers().put("option:take exam", this);
ObjectDefinition.forId(29729).getHandlers().put("option:climb", this);
SceneryDefinition.forId(29729).getHandlers().put("option:climb", this);
for (JailPlaques plaque : JailPlaques.values()) {
ObjectDefinition.forId(plaque.getObjectId()).getHandlers().put("option:read-plaque on", this);
SceneryDefinition.forId(plaque.getObjectId()).getHandlers().put("option:read-plaque on", this);
}
return this;
}
@@ -61,7 +61,7 @@ public class PSOptionHandler extends OptionHandler {
boolean locked = config == (1 << 29) || config == (0 << 26);
switch (node.getId()) {
case 29577:// chest
SceneryBuilder.replace(node.asObject(), node.asObject().transform(29578), 60);
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(29578), 60);
return true;
case 29578:
switch (option) {
@@ -127,7 +127,7 @@ public class PSOptionHandler extends OptionHandler {
if (!player.getSavedData().getGlobalData().hasReadPlaques()) {
player.sendMessage("This door is locked.");
} else {
DoorActionHandler.handleAutowalkDoor(player, node.asObject());
DoorActionHandler.handleAutowalkDoor(player, node.asScenery());
}
return true;
case 29728:
@@ -1,7 +1,7 @@
package core.game.content.activity.wguild;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.DialogueInterpreter;
import core.game.content.dialogue.DialoguePlugin;
import core.game.content.global.action.DoorActionHandler;
@@ -31,8 +31,8 @@ public final class WarriorsGuild extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(15653).getHandlers().put("option:open", this);
ObjectDefinition.forId(1530).getHandlers().put("option:open", this);
SceneryDefinition.forId(15653).getHandlers().put("option:open", this);
SceneryDefinition.forId(1530).getHandlers().put("option:open", this);
NPCDefinition.forId(4287).getHandlers().put("option:claim-shield", this);
NPCDefinition.setOptionHandler("claim-tokens", this);
PluginManager.definePlugin(new ClaimTokenDialogue());
@@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.container.impl.EquipmentContainer;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -89,7 +89,7 @@ public final class BarrelRoom extends MapZone implements Plugin<Object> {
PluginManager.definePlugin(new OptionHandler() {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(15668).getHandlers().put("option:pick-up", this);
SceneryDefinition.forId(15668).getHandlers().put("option:pick-up", this);
return this;
}
@@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -167,7 +167,7 @@ public final class CatapultRoom extends MapZone implements Plugin<Object> {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ItemDefinition.forId(SHIELD_ID).getHandlers().put("option:wield", this);
ObjectDefinition.forId(15657).getHandlers().put("option:view", this);
SceneryDefinition.forId(15657).getHandlers().put("option:view", this);
return this;
}
@@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.container.impl.EquipmentContainer;
import core.plugin.Initializable;
import core.game.content.dialogue.DialogueInterpreter;
@@ -135,8 +135,8 @@ public final class CyclopesRoom extends MapZone implements Plugin<Object> {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(15641).getHandlers().put("option:open", this);
ObjectDefinition.forId(15644).getHandlers().put("option:open", this);
SceneryDefinition.forId(15641).getHandlers().put("option:open", this);
SceneryDefinition.forId(15644).getHandlers().put("option:open", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.activity.wguild.dummy;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.plugin.Initializable;
import core.game.node.entity.skill.Skills;
@@ -97,9 +97,9 @@ public final class DummyRoom extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(15656).getHandlers().put("option:view", this);
SceneryDefinition.forId(15656).getHandlers().put("option:view", this);
for (Dummy dummy : Dummy.values()) {
ObjectDefinition.forId(dummy.getObject().getId()).getHandlers().put("option:hit", this);
SceneryDefinition.forId(dummy.getObject().getId()).getHandlers().put("option:hit", this);
}
GameWorld.getPulser().submit(new Pulse(10) {
boolean activeDummy;
@@ -1,7 +1,7 @@
package core.game.content.activity.wguild.shot;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.container.impl.EquipmentContainer;
import core.plugin.Initializable;
import core.game.content.dialogue.DialogueInterpreter;
@@ -73,8 +73,8 @@ public final class ShotPutRoom extends DialoguePlugin {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(15664).getHandlers().put("option:throw", this);
ObjectDefinition.forId(15665).getHandlers().put("option:throw", this);
SceneryDefinition.forId(15664).getHandlers().put("option:throw", this);
SceneryDefinition.forId(15665).getHandlers().put("option:throw", this);
ItemDefinition.forId(8858).getHandlers().put("option:take", this);
ItemDefinition.forId(8859).getHandlers().put("option:take", this);
return this;
@@ -1,90 +1,90 @@
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 dialogue plugin for the npc alfonse the waiter.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class AlfonseWaiterDialogue extends DialoguePlugin {
/**
* Constructs a new {@code AlfonseWaiterDialogue} {@code Object}.
*/
public AlfonseWaiterDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code AlfonseWaiterDialogue} {@code Object}.
* @param player the player.
*/
public AlfonseWaiterDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new AlfonseWaiterDialogue(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Welcome to the Shrimps and Parrot.", "Would you like to order, sir?");
stage = 0;
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 0:
interpreter.sendOptions("Select an Option", "Yes, please.", "No, thank you.", "Where do you get your Karambwan from?");
stage = 1;
break;
case 1:
switch (buttonId) {
case 1:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes, please.");
stage = 10;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "No, thank you.");
stage = 20;
break;
case 3:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Where do you get your Karambwan from?");
stage = 30;
break;
}
break;
case 10:
end();
npc.openShop(player);
break;
case 20:
end();
break;
case 30:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "We buy directly off Lubufu, a local fisherman. He", "seems to have a monopoly over Karambwan sale.");
stage = 31;
break;
case 31:
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 793 };
}
}
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 dialogue plugin for the npc alfonse the waiter.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class AlfonseWaiterDialogue extends DialoguePlugin {
/**
* Constructs a new {@code AlfonseWaiterDialogue} {@code Object}.
*/
public AlfonseWaiterDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code AlfonseWaiterDialogue} {@code Object}.
* @param player the player.
*/
public AlfonseWaiterDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new AlfonseWaiterDialogue(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Welcome to the Shrimp and Parrot.", "Would you like to order, sir?");
stage = 0;
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 0:
interpreter.sendOptions("Select an Option", "Yes, please.", "No, thank you.", "Where do you get your Karambwan from?");
stage = 1;
break;
case 1:
switch (buttonId) {
case 1:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes, please.");
stage = 10;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "No, thank you.");
stage = 20;
break;
case 3:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Where do you get your Karambwan from?");
stage = 30;
break;
}
break;
case 10:
end();
npc.openShop(player);
break;
case 20:
end();
break;
case 30:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "We buy directly off Lubufu, a local fisherman. He", "seems to have a monopoly over Karambwan sales.");
stage = 31;
break;
case 31:
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 793 };
}
}
@@ -1,276 +1,276 @@
package core.game.content.dialogue;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.diary.DiaryType;
import core.game.node.item.GroundItem;
import core.game.node.item.GroundItemManager;
import core.plugin.Initializable;
import core.game.node.item.Item;
/**
* Represents the dialogue plugin used for the apothecary npc.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class ApothecaryDialogue extends DialoguePlugin {
/**
* Represents the potion requirements.
*/
private static final Item[] POTION_ITEMS = new Item[] { new Item(223), new Item(225), new Item(995, 5) };
/**
* Represents the potion item.
*/
private static final Item POTION = new Item(115);
/**
* Represents the unkown potion.
*/
private static final Item UNKNOWN_POTION = new Item(195, 1);
/**
* Represents the cadava berries item.
*/
private static final Item CADAVA_BERRIES = new Item(753);
/**
* Represents the cadava potion item.
*/
private static final Item CADAVA_POTION = new Item(756);
/**
* Constructs a new {@code ApothecaryDialogue} {@code Object}.
*/
public ApothecaryDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code ApothecaryDialogue} {@code Object}.
* @param player the player.
*/
public ApothecaryDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new ApothecaryDialogue(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
if (player.getQuestRepository().getQuest("Romeo & Juliet").getStage(player) == 40) {
interpreter.sendDialogues(player, null, "Apothecary. Father Lawrence sent me.");
stage = 500;
return true;
}
if (player.getQuestRepository().getQuest("Romeo & Juliet").getStage(player) == 50) {
if (!player.getInventory().contains(753, 1)) {
npc("Keep searching for those Cadavaberries. They're needed", "for the potion.");
stage = 507;
return true;
} else {
npc("Well done. You have the berries.");
stage = 637;
return true;
}
}
if (player.getQuestRepository().getQuest("Romeo & Juliet").getStage(player) == 60) {
if (!player.getInventory().contains(756, 1) && !player.getBank().contains(756, 1)) {
if (player.getInventory().contains(753, 1)) {
npc("Well done. You have the berries.");
stage = 637;
return true;
} else {
npc("Keep searching for those Cadavaberries. They're needed", "for the potion.");
stage = 507;
return true;
}
} else {
npc("I am the Apothecary. I brew potions.", "Do you need anything specific?");
}
}
npc("I am the Apothecary. I brew potions.", "Do you need anything specific?");
stage = 1;
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 1:
options("Can you make a strength potion?", "Do you know a potion to mame hair fall out?", "Have you got any good potions to give away?", "Can you make a potion that makes it seem like I'm dead?");
stage = 2;
break;
case 2:
switch (buttonId) {
case 1:
player("Can you make a strength potion?");
stage = 10;
break;
case 2:
player("Do you know a potion to make hair fall out?");
stage = 20;
break;
case 3:
player("Have you got any good potions to give away?");
stage = 140;
break;
case 4:
player("Can you make a potion that makes it seems like I'm dead?");
stage = 40;
break;
}
break;
case 10:
if (player.getInventory().containItems(223, 225)) {
npc("Certainly, just hand over the ingredients and 5 coins.");
stage = 50;
return true;
}
npc("Yes, but the ingredients are a little hard to find. If you", "ever get them I will make it for you, for a fee.");
stage = 11;
break;
case 50:
if (!player.getInventory().contains(995, 5)) {
end();
player.getPacketDispatch().sendMessage("You need 5 gold coins to do that.");
return true;
}
interpreter.sendDialogue("You hand over the ingredients and money.");
stage = 51;
break;
case 51:
if (player.getInventory().remove(POTION_ITEMS)) {
player.getInventory().add(POTION);
end();
player.getAchievementDiaryManager().finishTask(player, DiaryType.VARROCK, 1, 0);
}
break;
case 11:
player("So what are the ingredients?");
stage = 12;
break;
case 12:
npc("You'll need to find the eggs of the deadly red spider and a", "limpwurt root.");
stage = 13;
break;
case 13:
npc("Oh and you'll have to pay me 5 coins.");
stage = 14;
break;
case 14:
player("Ok, I'll look out for them.");
stage = 15;
break;
case 15:
end();
break;
case 20:
npc("I do indeed. I gave it to my mother. That's why I now live", "alone.");
stage = 21;
break;
case 21:
end();
break;
case 30:
npc("Ok then. Try this potion.");
player.getInventory().add(UNKNOWN_POTION);
stage = 31;
break;
case 31:
end();
break;
case 40:
npc("What a strange and morbid request! I can as it happens.", "The berry of the cadava bush, prepared properly, will", "induce a coma so deep that you will seem to be dead. It's", "very dangerous.");
stage = 41;
break;
case 41:
npc("I have the other ingredients, but I'll need you to bring me", "one bunch of cadava berries.");
stage = 42;
break;
case 42:
player("I'll bear that in mind.");
stage = 43;
break;
case 43:
end();
break;
case 140:
npc("Sorry, charity is not my strong point.");
stage = 141;
break;
case 141:
end();
break;
case 500:
interpreter.sendDialogues(player, null, "I need a Cadava potion to help Romeo and Juliet.");
stage = 501;
break;
case 501:
interpreter.sendDialogues(npc, null, "Cadava potion. It's pretty nasty. And hard to make.");
stage = 502;
break;
case 502:
interpreter.sendDialogues(npc, null, "Wing of rat, tail of frog.", "Ear of snake and horn of dog.");
stage = 503;
break;
case 503:
interpreter.sendDialogues(npc, null, "I have all that, but i need some Cadava berries.");
stage = 504;
break;
case 504:
interpreter.sendDialogues(npc, null, "You will have to find them while I get the rest ready.");
stage = 505;
break;
case 505:
interpreter.sendDialogues(npc, null, "Bring them here when you have them. But be careful.", "They are nasty.");
stage = 506;
break;
case 506:
player.getQuestRepository().getQuest("Romeo & Juliet").setStage(player, 50);
interpreter.sendDialogues(player, null, "Ok, thanks.");
stage = 507;
break;
case 507:
end();
break;
case 637:
interpreter.sendItemMessage(753, "You hand over the berries.");
stage = 638;
break;
case 638:
if (player.getInventory().remove(CADAVA_BERRIES)) {
npc("Phew! Here is what you need.");
}
stage = 639;
break;
case 639:
if (!player.getInventory().add(CADAVA_POTION)) {
GroundItemManager.create(new GroundItem(CADAVA_POTION, player.getLocation(), player));
}
interpreter.sendItemMessage(756, "The Apothecary gives you a Cavada potion.");
stage = 640;
break;
case 640:
player.getQuestRepository().getQuest("Romeo & Juliet").setStage(player, 60);
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 638 };
}
}
package core.game.content.dialogue;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.diary.DiaryType;
import core.game.node.item.GroundItem;
import core.game.node.item.GroundItemManager;
import core.plugin.Initializable;
import core.game.node.item.Item;
/**
* Represents the dialogue plugin used for the apothecary npc.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class ApothecaryDialogue extends DialoguePlugin {
/**
* Represents the potion requirements.
*/
private static final Item[] POTION_ITEMS = new Item[] { new Item(223), new Item(225), new Item(995, 5) };
/**
* Represents the potion item.
*/
private static final Item POTION = new Item(115);
/**
* Represents the unkown potion.
*/
private static final Item UNKNOWN_POTION = new Item(195, 1);
/**
* Represents the cadava berries item.
*/
private static final Item CADAVA_BERRIES = new Item(753);
/**
* Represents the cadava potion item.
*/
private static final Item CADAVA_POTION = new Item(756);
/**
* Constructs a new {@code ApothecaryDialogue} {@code Object}.
*/
public ApothecaryDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code ApothecaryDialogue} {@code Object}.
* @param player the player.
*/
public ApothecaryDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new ApothecaryDialogue(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
if (player.getQuestRepository().getQuest("Romeo & Juliet").getStage(player) == 40) {
interpreter.sendDialogues(player, null, "Apothecary. Father Lawrence sent me.");
stage = 500;
return true;
}
if (player.getQuestRepository().getQuest("Romeo & Juliet").getStage(player) == 50) {
if (!player.getInventory().contains(753, 1)) {
npc("Keep searching for those Cadava berries. They're needed", "for the potion.");
stage = 507;
return true;
} else {
npc("Well done. You have the berries.");
stage = 637;
return true;
}
}
if (player.getQuestRepository().getQuest("Romeo & Juliet").getStage(player) == 60) {
if (!player.getInventory().contains(756, 1) && !player.getBank().contains(756, 1)) {
if (player.getInventory().contains(753, 1)) {
npc("Well done. You have the berries.");
stage = 637;
return true;
} else {
npc("Keep searching for those Cadava berries. They're needed", "for the potion.");
stage = 507;
return true;
}
} else {
npc("I am the Apothecary. I brew potions.", "Do you need anything specific?");
}
}
npc("I am the Apothecary. I brew potions.", "Do you need anything specific?");
stage = 1;
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 1:
options("Can you make a strength potion?", "Do you know a potion to make hair fall out?", "Have you got any good potions to give away?", "Can you make a potion that makes it seem like I'm dead?");
stage = 2;
break;
case 2:
switch (buttonId) {
case 1:
player("Can you make a strength potion?");
stage = 10;
break;
case 2:
player("Do you know a potion to make hair fall out?");
stage = 20;
break;
case 3:
player("Have you got any good potions to give away?");
stage = 140;
break;
case 4:
player("Can you make a potion that makes it seems like I'm dead?");
stage = 40;
break;
}
break;
case 10:
if (player.getInventory().containItems(223, 225)) {
npc("Certainly, just hand over the ingredients and 5 coins.");
stage = 50;
return true;
}
npc("Yes, but the ingredients are a little hard to find. If you", "ever get them I will make it for you, for a fee.");
stage = 11;
break;
case 50:
if (!player.getInventory().contains(995, 5)) {
end();
player.getPacketDispatch().sendMessage("You need 5 gold coins to do that.");
return true;
}
interpreter.sendDialogue("You hand over the ingredients and money.");
stage = 51;
break;
case 51:
if (player.getInventory().remove(POTION_ITEMS)) {
player.getInventory().add(POTION);
end();
player.getAchievementDiaryManager().finishTask(player, DiaryType.VARROCK, 1, 0);
}
break;
case 11:
player("So what are the ingredients?");
stage = 12;
break;
case 12:
npc("You'll need to find the eggs of the deadly red spider and a", "limpwurt root.");
stage = 13;
break;
case 13:
npc("Oh and you'll have to pay me 5 coins.");
stage = 14;
break;
case 14:
player("Ok, I'll look out for them.");
stage = 15;
break;
case 15:
end();
break;
case 20:
npc("I do indeed. I gave it to my mother. That's why I now live", "alone.");
stage = 21;
break;
case 21:
end();
break;
case 30:
npc("Ok then. Try this potion.");
player.getInventory().add(UNKNOWN_POTION);
stage = 31;
break;
case 31:
end();
break;
case 40:
npc("What a strange and morbid request! I can as it happens.", "The berry of the cadava bush, prepared properly, will", "induce a coma so deep that you will seem to be dead. It's", "very dangerous.");
stage = 41;
break;
case 41:
npc("I have the other ingredients, but I'll need you to bring me", "one bunch of cadava berries.");
stage = 42;
break;
case 42:
player("I'll bear that in mind.");
stage = 43;
break;
case 43:
end();
break;
case 140:
npc("Sorry, charity is not my strong point.");
stage = 141;
break;
case 141:
end();
break;
case 500:
interpreter.sendDialogues(player, null, "I need a Cadava potion to help Romeo and Juliet.");
stage = 501;
break;
case 501:
interpreter.sendDialogues(npc, null, "Cadava potion. It's pretty nasty. And hard to make.");
stage = 502;
break;
case 502:
interpreter.sendDialogues(npc, null, "Wing of rat, tail of frog.", "Ear of snake and horn of dog.");
stage = 503;
break;
case 503:
interpreter.sendDialogues(npc, null, "I have all that, but I need some Cadava berries.");
stage = 504;
break;
case 504:
interpreter.sendDialogues(npc, null, "You will have to find them while I get the rest ready.");
stage = 505;
break;
case 505:
interpreter.sendDialogues(npc, null, "Bring them here when you have them. But be careful.", "They are nasty.");
stage = 506;
break;
case 506:
player.getQuestRepository().getQuest("Romeo & Juliet").setStage(player, 50);
interpreter.sendDialogues(player, null, "Ok, thanks.");
stage = 507;
break;
case 507:
end();
break;
case 637:
interpreter.sendItemMessage(753, "You hand over the berries.");
stage = 638;
break;
case 638:
if (player.getInventory().remove(CADAVA_BERRIES)) {
npc("Phew! Here is what you need.");
}
stage = 639;
break;
case 639:
if (!player.getInventory().add(CADAVA_POTION)) {
GroundItemManager.create(new GroundItem(CADAVA_POTION, player.getLocation(), player));
}
interpreter.sendItemMessage(756, "The Apothecary gives you a Cadava potion.");
stage = 640;
break;
case 640:
player.getQuestRepository().getQuest("Romeo & Juliet").setStage(player, 60);
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 638 };
}
}
@@ -1,6 +1,6 @@
package core.game.content.dialogue;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
@@ -17,11 +17,11 @@ public final class DairyChurnOptionPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(10093).getHandlers().put("option:churn", this);
ObjectDefinition.forId(10094).getHandlers().put("option:churn", this);
ObjectDefinition.forId(25720).getHandlers().put("option:churn", this);
ObjectDefinition.forId(34800).getHandlers().put("option:churn", this);
ObjectDefinition.forId(35931).getHandlers().put("option:churn", this);
SceneryDefinition.forId(10093).getHandlers().put("option:churn", this);
SceneryDefinition.forId(10094).getHandlers().put("option:churn", this);
SceneryDefinition.forId(25720).getHandlers().put("option:churn", this);
SceneryDefinition.forId(34800).getHandlers().put("option:churn", this);
SceneryDefinition.forId(35931).getHandlers().put("option:churn", this);
return this;
}
@@ -311,4 +311,22 @@ public abstract class DialoguePlugin implements Plugin<Player> {
}
}
/**
* Use the automatic linesplitting feature in DialUtils to produce npc dialogues
* @param expr the FacialExpression to use, located in the FacialExpression enum.
* @param msg the message for the NPC to say
*/
public Component npcl(FacialExpression expr, String msg){
return npc(expr, api.DialUtils.splitLines(msg));
}
/**
* Use the automatic linesplitting feature in DialUtils to produce player dialogues
* @param expr the FacialExpression to use, located in the FacialExpression enum.
* @param msg the message for the player to say
*/
public Component playerl(FacialExpression expr, String msg){
return player(expr, api.DialUtils.splitLines(msg));
}
}
@@ -1,181 +1,181 @@
package core.game.content.dialogue;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
import core.plugin.Initializable;
import core.game.node.entity.player.link.quest.Quest;
/**
* Represents the father lawrence dialogue plugin.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class FatherLawrenceDialogue extends DialoguePlugin {
/**
* Constructs a new {@code FatherLawrenceDialogue} {@code Object}.
*/
public FatherLawrenceDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code FatherLawrenceDialogu} {@code Object}.
* @param player the player.
*/
public FatherLawrenceDialogue(Player player) {
super(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
final Quest quest = player.getQuestRepository().getQuest("Romeo & Juliet");
if (quest.getStage(player) < 30) {
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Oh to be a father in the times of whiskey.");
stage = 0;
}
switch (quest.getStage(player)) {
case 30:
interpreter.sendDialogues(npc, null, "\"...and let Saradomin light the way for you... \"", "Urgh!");
stage = 41;
break;
case 40:
interpreter.sendDialogues(npc, null, "Ah, have you found the Apothecary yet? Remember,", "Cadava potion, for Juliet.");
stage = 30;
break;
case 50:
interpreter.sendDialogues(npc, null, "Did you find the Apothecary?");
stage = 820;
break;
case 60:
case 70:
interpreter.sendDialogues(npc, null, "Did you find the Apothecary?");
stage = 820;
break;
case 100:
player("Hi again!");
stage = 0;
break;
}
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
final Quest quest = player.getQuestRepository().getQuest("Romeo & Juliet");
switch (stage) {
case 0:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I sing and I drink and I wake up in gutters.");
stage = 1;
break;
case 1:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Top of the morning to you.");
stage = 2;
break;
case 2:
end();
break;
case 41:
interpreter.sendDialogues(npc, null, "Can't you see that I'm in the middle of a Sermon?!");
stage = 42;
break;
case 42:
interpreter.sendDialogues(player, null, "But Romeo sent me!");
stage = 43;
break;
case 43:
interpreter.sendDialogues(npc, null, "But I'm busy delivering a sermon to my congregation!");
stage = 44;
break;
case 44:
interpreter.sendDialogues(player, null, "Yes well it certainly seems like you have a captive", "audience!");
stage = 45;
break;
case 45:
interpreter.sendDialogues(npc, null, "Ok, ok...what do you want so I can get rid of you and", "continue with my sermon?");
stage = 46;
break;
case 46:
interpreter.sendDialogues(player, null, "Romeo sent me. He says you may be able to help.");
stage = 47;
break;
case 47:
interpreter.sendDialogues(npc, null, "Ah Romeo, yes. A fine lad, but a little bit confused.");
stage = 48;
break;
case 48:
interpreter.sendDialogues(player, null, "Yes, very confused...Anyway, Romeo wishes to be", "married to Juliet! She must be rescued from her", "father's control!");
stage = 49;
break;
case 49:
interpreter.sendDialogues(npc, null, "I agree, and I think I have an idea! A potion to make", "her appear dead...");
stage = 50;
break;
case 50:
interpreter.sendDialogues(player, null, "Dead! Sounds a bit creepy to me...but please, continue.");
stage = 51;
break;
case 51:
interpreter.sendDialogues(npc, null, "The potion will only make Juliet 'appear' dead...then", "she'll be taken to the crypt...");
stage = 52;
break;
case 52:
interpreter.sendDialogues(player, null, "Crypt! Again...very creepy! You must have some", "strange hobbies.");
stage = 53;
break;
case 53:
interpreter.sendDialogues(npc, null, "Then Romeo can collect her from the crypt! Go to the", "Apothercary, tell him I sent you and that you'll need a", "'Cadava' potion.");
stage = 54;
break;
case 54:
interpreter.sendDialogues(player, null, "Apart from the strong overtones of death, this is", "turning out to be a real love story.");
stage = 55;
break;
case 55:
quest.setStage(player, 40);
end();
break;
case 30:
end();
break;
case 820:
interpreter.sendDialogues(player, null, "Yes I did. He's told me I must find some Cadava", "berries.");
stage = 821;
break;
case 821:
interpreter.sendDialogues(npc, null, "Well, good luck with that...they're quite tricky to find.");
stage = 822;
break;
case 822:
interpreter.sendDialogues(player, null, "Any clues where I can start to look?");
stage = 823;
break;
case 823:
interpreter.sendDialogues(npc, null, "I heard some kids saying they saw some the other day.", "They were visiting the mining place to the south east", "Varrock.");
stage = 824;
break;
case 824:
interpreter.sendDialogues(player, null, "Ok, that's as good a place to start looking as any.");
stage = 825;
break;
case 825:
end();
break;
}
return true;
}
@Override
public DialoguePlugin newInstance(Player player) {
return new FatherLawrenceDialogue(player);
}
@Override
public int[] getIds() {
return new int[] { 640 };
}
}
package core.game.content.dialogue;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
import core.plugin.Initializable;
import core.game.node.entity.player.link.quest.Quest;
/**
* Represents the father lawrence dialogue plugin.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class FatherLawrenceDialogue extends DialoguePlugin {
/**
* Constructs a new {@code FatherLawrenceDialogue} {@code Object}.
*/
public FatherLawrenceDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code FatherLawrenceDialogu} {@code Object}.
* @param player the player.
*/
public FatherLawrenceDialogue(Player player) {
super(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
final Quest quest = player.getQuestRepository().getQuest("Romeo & Juliet");
if (quest.getStage(player) < 30) {
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Oh to be a father in the times of whiskey.");
stage = 0;
}
switch (quest.getStage(player)) {
case 30:
interpreter.sendDialogues(npc, null, "\"...and let Saradomin light the way for you... \"", "Urgh!");
stage = 41;
break;
case 40:
interpreter.sendDialogues(npc, null, "Ah, have you found the Apothecary yet? Remember,", "Cadava potion, for Juliet.");
stage = 30;
break;
case 50:
interpreter.sendDialogues(npc, null, "Did you find the Apothecary?");
stage = 820;
break;
case 60:
case 70:
interpreter.sendDialogues(npc, null, "Did you find the Apothecary?");
stage = 820;
break;
case 100:
player("Hi again!");
stage = 0;
break;
}
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
final Quest quest = player.getQuestRepository().getQuest("Romeo & Juliet");
switch (stage) {
case 0:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "I sing and I drink and I wake up in gutters.");
stage = 1;
break;
case 1:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Top of the morning to you.");
stage = 2;
break;
case 2:
end();
break;
case 41:
interpreter.sendDialogues(npc, null, "Can't you see that I'm in the middle of a sermon?!");
stage = 42;
break;
case 42:
interpreter.sendDialogues(player, null, "But Romeo sent me!");
stage = 43;
break;
case 43:
interpreter.sendDialogues(npc, null, "But I'm busy delivering a sermon to my congregation!");
stage = 44;
break;
case 44:
interpreter.sendDialogues(player, null, "Yes well it certainly seems like you have a captive", "audience!");
stage = 45;
break;
case 45:
interpreter.sendDialogues(npc, null, "Ok, ok...what do you want so I can get rid of you and", "continue with my sermon?");
stage = 46;
break;
case 46:
interpreter.sendDialogues(player, null, "Romeo sent me. He says you may be able to help.");
stage = 47;
break;
case 47:
interpreter.sendDialogues(npc, null, "Ah Romeo, yes. A fine lad, but a little bit confused.");
stage = 48;
break;
case 48:
interpreter.sendDialogues(player, null, "Yes, very confused...Anyway, Romeo wishes to be", "married to Juliet! She must be rescued from her", "father's control!");
stage = 49;
break;
case 49:
interpreter.sendDialogues(npc, null, "I agree, and I think I have an idea! A potion to make", "her appear dead...");
stage = 50;
break;
case 50:
interpreter.sendDialogues(player, null, "Dead! Sounds a bit creepy to me...but please, continue.");
stage = 51;
break;
case 51:
interpreter.sendDialogues(npc, null, "The potion will only make Juliet 'appear' dead...then", "she'll be taken to the crypt...");
stage = 52;
break;
case 52:
interpreter.sendDialogues(player, null, "Crypt! Again...very creepy! You must have some", "strange hobbies.");
stage = 53;
break;
case 53:
interpreter.sendDialogues(npc, null, "Then Romeo can collect her from the crypt! Go to the", "Apothercary, tell him I sent you and that you'll need a", "'Cadava' potion.");
stage = 54;
break;
case 54:
interpreter.sendDialogues(player, null, "Apart from the strong overtones of death, this is", "turning out to be a real love story.");
stage = 55;
break;
case 55:
quest.setStage(player, 40);
end();
break;
case 30:
end();
break;
case 820:
interpreter.sendDialogues(player, null, "Yes I did. He's told me I must find some Cadava", "berries.");
stage = 821;
break;
case 821:
interpreter.sendDialogues(npc, null, "Well, good luck with that...they're quite tricky to find.");
stage = 822;
break;
case 822:
interpreter.sendDialogues(player, null, "Any clues where I can start to look?");
stage = 823;
break;
case 823:
interpreter.sendDialogues(npc, null, "I heard some kids saying they saw some the other day.", "They were visiting the mining place to the south east", "Varrock.");
stage = 824;
break;
case 824:
interpreter.sendDialogues(player, null, "Ok, that's as good a place to start looking as any.");
stage = 825;
break;
case 825:
end();
break;
}
return true;
}
@Override
public DialoguePlugin newInstance(Player player) {
return new FatherLawrenceDialogue(player);
}
@Override
public int[] getIds() {
return new int[] { 640 };
}
}
@@ -137,7 +137,7 @@ public final class HansDialoguePlugin extends DialoguePlugin {
case 12:
switch(buttonId){
case 1:
options("2.5x","5x","10x","20x");
options("1.0x","2.5x","10x","20x");
stage++;
break;
case 2:
@@ -150,7 +150,7 @@ public final class HansDialoguePlugin extends DialoguePlugin {
switch(buttonId){
case 1:
if(player.newPlayer) {
player.getSkills().experienceMutiplier = 2.5;
player.getSkills().experienceMutiplier = 1.0;
stage = 14;
} else {
stage = 15;
@@ -159,7 +159,7 @@ public final class HansDialoguePlugin extends DialoguePlugin {
break;
case 2:
if(player.newPlayer){
player.getSkills().experienceMutiplier = 5.0;
player.getSkills().experienceMutiplier = 2.5;
stage = 14;
} else {
stage = 15;
@@ -1,224 +1,224 @@
package core.game.content.dialogue;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.quest.Quest;
import core.plugin.Initializable;
import core.game.node.item.Item;
/**
* Represents the dialogue plugin used for the hetty npc.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class HettyDialogue extends DialoguePlugin {
/**
* Constructs a new {@code HettyDialogue} {@code Object}.
*/
public HettyDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code HettyDialogue} {@code Object}.
* @param player the player.
*/
public HettyDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new HettyDialogue(player);
}
@Override
public boolean open(Object... args) {
Quest quest = player.getQuestRepository().getQuest("Witch's Potion");
if (quest.isCompleted(player)) {
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "How's your magic coming along?");
stage = 0;
}
switch (quest.getStage(player)) {
case 0:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "What could you want with an old woman like me?");
stage = 11;
break;
case 20:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "So have you found the things for the potion?");
stage = 100;
break;
case 40:
if (args.length == 2) {
interpreter.sendDialogue("You drink from the cauldron, it tastes horrible! You feel yourself", "imbued with power.");
stage = 41;
} else {
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Well are you going to drink the potion or not?");
stage = 500;
}
break;
}
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
Quest quest = player.getQuestRepository().getQuest("Witch's Potion");
switch (stage) {
case 0:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm practicing and slowly getting better.");
stage = 1;
break;
case 1:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Good, good.");
stage = 2;
break;
case 2:
end();
break;
case 11:
interpreter.sendOptions("Select an Option", "I am in search of a quest.", "I've heard that you are a witch.");
stage = 12;
break;
case 12:
switch (buttonId) {
case 1:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I am in search of a quest.");
stage = 13;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I've heard that you are a witch.");
stage = 20;
break;
}
break;
case 13:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Hmmm... Maybe I can think of something for you.");
stage = 14;
break;
case 14:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Would you like to become more proficient in the dark", "arts?");
stage = 15;
break;
case 15:
interpreter.sendOptions("Select an Option", "Yes help me become one with my darker side.", "No I have my prinicples and honour.");
stage = 16;
break;
case 16:
switch (buttonId) {
case 1:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes help me become one with my darker side.");
stage = 30;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "No I have m principles and honour.");
stage = 17;
break;
}
break;
case 17:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Suit yourself, but you're missing out.");
stage = 18;
break;
case 18:
end();
break;
case 20:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Yes it does seem to be getting fairly common", "knowledge.");
stage = 21;
break;
case 21:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "I fear I may get a visit from the witch hunter of", "Falador before long.");
stage = 22;
break;
case 22:
end();
break;
case 30:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Ok I'm going to make a potion to help bring out your", "darker self.");
stage = 31;
break;
case 31:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "You will need certain ingredients.");
stage = 32;
break;
case 32:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "What do i need?");
stage = 33;
break;
case 33:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "You need an eye of newt, a rat's tail, and onion... Oh", "and a piece of burnt meat.");
stage = 34;
break;
case 34:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Great, I'll go get them.");
stage = 35;
break;
case 35:
quest.start(player);
quest.setStage(player, 20);
end();
break;
case 100:
// Her:Well I can't make the potion without them!
// Remember.../You
// need an eye of newt, a rat's tail, an onion, and a/piece of
// burnt
// meat. Off you go dear! Me:end();
if (!player.getInventory().containItems(1957, 300, 2146, 221)) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm afraid I don't have all of them yet.");
stage = 101;
} else {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes I have everything!");
stage = 110;
}
break;
case 110:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Excellent, can I have them then?");
stage = 111;
break;
case 111:
interpreter.sendDialogue("You pass the ingredients to Hetty and she puts them all into her", "cauldron. Hetty closes her eyes and begins to chant. The cauldron", "bubbles mysteriously.");
stage = 112;
break;
case 112:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Well, is it ready?");
stage = 113;
break;
case 113:
if (player.getInventory().remove(new Item(1957), new Item(300), new Item(2146), new Item(221))) {
quest.setStage(player, 40);
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Ok, now drink from the cauldron.");
stage = 114;
}
break;
case 114:
end();
break;
case 101:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Well I can't make the potion without them! Remember...", "You need an eye of newt, a rat's tail, an onion, and a", "You need an eye of newt, a rat's tail, an onion, and a", "piece of burnt meat. Off you go dear!");
stage = 102;
break;
case 102:
end();
break;
case 500:
end();
break;
case 41:
end();
quest.finish(player);
player.getQuestRepository().syncronizeTab(player);
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 307 };
}
}
package core.game.content.dialogue;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.quest.Quest;
import core.plugin.Initializable;
import core.game.node.item.Item;
/**
* Represents the dialogue plugin used for the hetty npc.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class HettyDialogue extends DialoguePlugin {
/**
* Constructs a new {@code HettyDialogue} {@code Object}.
*/
public HettyDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code HettyDialogue} {@code Object}.
* @param player the player.
*/
public HettyDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new HettyDialogue(player);
}
@Override
public boolean open(Object... args) {
Quest quest = player.getQuestRepository().getQuest("Witch's Potion");
if (quest.isCompleted(player)) {
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "How's your magic coming along?");
stage = 0;
}
switch (quest.getStage(player)) {
case 0:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "What could you want with an old woman like me?");
stage = 11;
break;
case 20:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "So have you found the things for the potion?");
stage = 100;
break;
case 40:
if (args.length == 2) {
interpreter.sendDialogue("You drink from the cauldron, it tastes horrible! You feel yourself", "imbued with power.");
stage = 41;
} else {
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Well are you going to drink the potion or not?");
stage = 500;
}
break;
}
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
Quest quest = player.getQuestRepository().getQuest("Witch's Potion");
switch (stage) {
case 0:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm practicing and slowly getting better.");
stage = 1;
break;
case 1:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Good, good.");
stage = 2;
break;
case 2:
end();
break;
case 11:
interpreter.sendOptions("Select an Option", "I am in search of a quest.", "I've heard that you are a witch.");
stage = 12;
break;
case 12:
switch (buttonId) {
case 1:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I am in search of a quest.");
stage = 13;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I've heard that you are a witch.");
stage = 20;
break;
}
break;
case 13:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Hmmm... Maybe I can think of something for you.");
stage = 14;
break;
case 14:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Would you like to become more proficient in the dark", "arts?");
stage = 15;
break;
case 15:
interpreter.sendOptions("Select an Option", "Yes help me become one with my darker side.", "No I have my prinicples and honour.");
stage = 16;
break;
case 16:
switch (buttonId) {
case 1:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes help me become one with my darker side.");
stage = 30;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "No I have m principles and honour.");
stage = 17;
break;
}
break;
case 17:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Suit yourself, but you're missing out.");
stage = 18;
break;
case 18:
end();
break;
case 20:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Yes it does seem to be getting fairly common", "knowledge.");
stage = 21;
break;
case 21:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "I fear I may get a visit from the witch hunter of", "Falador before long.");
stage = 22;
break;
case 22:
end();
break;
case 30:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Ok I'm going to make a potion to help bring out your", "darker self.");
stage = 31;
break;
case 31:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "You will need certain ingredients.");
stage = 32;
break;
case 32:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "What do I need?");
stage = 33;
break;
case 33:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "You need an eye of newt, a rat's tail, and onion... Oh", "and a piece of burnt meat.");
stage = 34;
break;
case 34:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Great, I'll go get them.");
stage = 35;
break;
case 35:
quest.start(player);
quest.setStage(player, 20);
end();
break;
case 100:
// Her:Well I can't make the potion without them!
// Remember.../You
// need an eye of newt, a rat's tail, an onion, and a/piece of
// burnt
// meat. Off you go dear! Me:end();
if (!player.getInventory().containItems(1957, 300, 2146, 221)) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm afraid I don't have all of them yet.");
stage = 101;
} else {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes I have everything!");
stage = 110;
}
break;
case 110:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Excellent, can I have them then?");
stage = 111;
break;
case 111:
interpreter.sendDialogue("You pass the ingredients to Hetty and she puts them all into her", "cauldron. Hetty closes her eyes and begins to chant. The cauldron", "bubbles mysteriously.");
stage = 112;
break;
case 112:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Well, is it ready?");
stage = 113;
break;
case 113:
if (player.getInventory().remove(new Item(1957), new Item(300), new Item(2146), new Item(221))) {
quest.setStage(player, 40);
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Ok, now drink from the cauldron.");
stage = 114;
}
break;
case 114:
end();
break;
case 101:
interpreter.sendDialogues(307, FacialExpression.HALF_GUILTY, "Well I can't make the potion without them! Remember...", "You need an eye of newt, a rat's tail, an onion, and a", "You need an eye of newt, a rat's tail, an onion, and a", "piece of burnt meat. Off you go dear!");
stage = 102;
break;
case 102:
end();
break;
case 500:
end();
break;
case 41:
end();
quest.finish(player);
player.getQuestRepository().syncronizeTab(player);
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 307 };
}
}
@@ -1,152 +0,0 @@
package core.game.content.global;
import core.game.node.item.Item;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
* Represents the type of bones.
* @author Apache Ah64
*/
public enum Bones {
BONES(2530, 4.5),
BONES_2(526,4.5),
WOLF_BONES(2859, 4.5),
BURNST_BONES(528, 4.5),
MONKEY_BONES(3183, 5),
MONKEY_BONES2(3179, 5),
BAT_BONES(530, 5.3),
BIG_BONES(532, 15),
JOGRE_BONES(3125, 15),
ZOGRE_BONES(4812, 12.5),
SHAIKAHAN_BONES(3123, 25),
BABY_DRAGON_BONES(534, 30),
WYVERN_BONES(6812, 50),
DRAGON_BONES(536, 72),
FAYRG(4830, 84),
RAURG_BONES(4832, 96),
DAGANNOTH(6729, 125),
OURG_BONES(4834, 140),
LAVA_DRAGON_BONES(14693, 85);
/**
* Holds all bones.
*/
private static HashMap<Integer, Bones> bones = new HashMap<Integer, Bones>();
/**
* The bone item id.
*/
private int itemId;
/**
* The experience given by burying the bone.
*/
private double experience;
/**
* Construct a new {@code Bones} {@code Object}.
* @param itemId The item id.
* @param experience The experience given by burying the bone.
*/
private Bones(int itemId, double experience) {
this.itemId = itemId;
this.experience = experience;
}
/**
* Gets the bone meal item.
* @return the item.
*/
public Item getBoneMeal() {
return new Item(4255 + ordinal());
}
/**
* Get the bone experience given when you bury the bone.
* @return The experience.
*/
public double getExperience() {
return experience;
}
public int getItemId() {
return itemId;
}
/**
* Gets the bones for the bone meal.
* @param itemId the item.
* @return the bones.
*/
public static Bones forBoneMeal(int itemId) {
for (Bones bone : Bones.values()) {
if (bone.getBoneMeal().getId() == itemId) {
return bone;
}
}
return null;
}
/**
* Gets the config value for the bone.
* @param value the value.
* @param hopper hopper.
* @return {@code True} if so.
*/
public static Bones forConfigValue(int value, boolean hopper) {
for (Bones bone : Bones.values()) {
if (bone.getConfigValue(hopper) == value) {
return bone;
}
}
return null;
}
/**
* Gets the config value for the bone type.
* @param hopper the hopper.
* @return the value.
*/
public int getConfigValue(boolean hopper) {
return (this == BONES_2 ? ordinal() : ordinal() - 1) | (hopper ? 4 : 8) << 16;
}
/**
* Gets the bone ids.
* @return the ids.
*/
public static int[] getArray() {
List<Integer> list = new ArrayList<>(20);
for (int i : bones.keySet()) {
list.add(i);
}
int[] array = new int[list.size()];
for (int i = 0; i < list.size(); i++) {
array[i] = list.get(i);
}
return array;
}
/**
* Get the bone.
* @param itemId The item id.
* @return The bone.
*/
public static Bones forId(int itemId) {
return bones.get(itemId);
}
/**
* Construct the bones.
*/
static {
for (Bones bone : Bones.values()) {
bones.put(bone.itemId, bone);
}
}
}
@@ -0,0 +1,146 @@
package core.game.content.global
import core.game.content.global.Bones
import core.game.node.item.Item
import java.util.ArrayList
import java.util.HashMap
/**
* Represents the type of bones.
* @author Apache Ah64
*/
enum class Bones
/**
* Construct a new `Bones` `Object`.
* @param itemId The item id.
* @param experience The experience given by burying the bone.
*/(
/**
* The bone item id.
*/
val itemId: Int,
/**
* The experience given by burying the bone.
*/
val experience: Double) {
BONES(2530, 4.5),
BONES_2(526, 4.5),
WOLF_BONES(2859, 4.5),
BURNST_BONES(528, 4.5),
MONKEY_BONES(3183, 5.0),
MONKEY_BONES2(3179, 5.0),
BAT_BONES(530, 5.3),
BIG_BONES(532, 15.0),
JOGRE_BONES(3125, 15.0),
ZOGRE_BONES(4812, 12.5),
SHAIKAHAN_BONES(3123, 25.0),
BABY_DRAGON_BONES(534, 30.0),
WYVERN_BONES(6812, 50.0),
DRAGON_BONES(536, 72.0),
FAYRG(4830, 84.0),
RAURG_BONES(4832, 96.0),
DAGANNOTH(6729, 125.0),
OURG_BONES(4834, 140.0),
LAVA_DRAGON_BONES(14693, 85.0);
/**
* Get the bone experience given when you bury the bone.
* @return The experience.
*/
/**
* Gets the bone meal item.
* @return the item.
*/
val boneMeal: Item
get() {
return when(this){
FAYRG -> Item(4852)
RAURG_BONES -> Item(4853)
OURG_BONES -> Item(4854)
else -> Item(4255 + ordinal)
}
}
/**
* Gets the config value for the bone type.
* @param hopper the hopper.
* @return the value.
*/
fun getConfigValue(hopper: Boolean): Int {
return (if (this == BONES_2) ordinal else ordinal - 1) or (if (hopper) 4 else 8) shl 16
}
companion object {
/**
* Holds all bones.
*/
private val bones = HashMap<Int, Bones>()
/**
* Gets the bones for the bone meal.
* @param itemId the item.
* @return the bones.
*/
@JvmStatic
fun forBoneMeal(itemId: Int): Bones? {
for (bone in values()) {
if (bone.boneMeal.id == itemId) {
return bone
}
}
return null
}
/**
* Gets the config value for the bone.
* @param value the value.
* @param hopper hopper.
* @return `True` if so.
*/
@JvmStatic
fun forConfigValue(value: Int, hopper: Boolean): Bones? {
for (bone in values()) {
if (bone.getConfigValue(hopper) == value) {
return bone
}
}
return null
}
/**
* Gets the bone ids.
* @return the ids.
*/
val array: IntArray
@JvmStatic get() {
val list: MutableList<Int> = ArrayList(20)
for (i in bones.keys) {
list.add(i)
}
val array = IntArray(list.size)
for (i in list.indices) {
array[i] = list[i]
}
return array
}
/**
* Get the bone.
* @param itemId The item id.
* @return The bone.
*/
@JvmStatic
fun forId(itemId: Int): Bones? {
return bones[itemId]
}
/**
* Construct the bones.
*/
init {
for (bone in values()) {
bones[bone.itemId] = bone
}
}
}
}
@@ -73,7 +73,9 @@ public final class ClimbActionHandler {
if (SpecialLadders.getDestination(startLadder.getLocation()) != null) {
Location destination = SpecialLadders.getDestination(startLadder.getLocation());
climb(player, animation, destination);
SpecialLadders.getSpecialLadder(startLadder.getLocation()).checkAchievement(player);
if(SpecialLadders.getSpecialLadder(startLadder.getLocation()) != null) {
SpecialLadders.getSpecialLadder(startLadder.getLocation()).checkAchievement(player);
}
return true;
}
switch (option) {
@@ -273,9 +273,6 @@ public final class DoorActionHandler {
* closed again.
*/
public static void open(Scenery object, Scenery second, int replaceId, int secondReplaceId, boolean clip, int restoreTicks, boolean fence) {
if(GameWorld.getSettings().getIncreased_door_time()){
restoreTicks *= 5;
}
object = object.getWrapper();
int mod = object.getType() == 9 ? -1 : 1;
int firstDir = (object.getRotation() + ((mod + 4) % 4)) % 4;
@@ -0,0 +1,9 @@
package core.game.content.global.action;
import core.game.node.entity.player.Player;
interface LadderAchievementCheck {
default void checkAchievement(Player player) {
return;
}
}
@@ -19,6 +19,10 @@ public enum SpecialLadders implements LadderAchievementCheck {
FOG_ENTER(Location.create(3240,3575,0),Location.create(1675,5599,0)),
FOG_LEAVE(Location.create(1673,5598,0),Location.create(3242, 3574, 0)),
INTRO_LEAVE(Location.create(2522, 4999, 0),Location.create(3230, 3240, 0)),
JATIZSO_MINE_UP(Location.create(2406,10188,0),Location.create(2397, 3811, 0)),
JATIZSO_MINE_DOWN(Location.create(2397, 3812, 0), Location.create(2405, 10188, 0)),
JATIZSO_SHOUT_TOWER_UP(Location.create(2373, 3800, 2),Location.create(2374, 3800, 0)),
JATIZSO_SHOUT_TOWER_DOWN(Location.create(2373, 3800, 0),Location.create(2374, 3800, 2)),
DRAYNOR_SEWER_SOUTHEAST_DOWN(new Location(3118, 3244, 0), new Location(3118, 9643, 0)),
DRAYNOR_SEWER_SOUTHEAST_UP(new Location(3118, 9643, 0), new Location(3118, 3243, 0)),
@@ -62,6 +66,10 @@ public enum SpecialLadders implements LadderAchievementCheck {
this.destLoc = destLoc;
}
public static void add(Location from, Location to){
destinationMap.put(from,to);
}
public static Location getDestination(Location loc){
return destinationMap.get(loc);
}
@@ -69,10 +77,4 @@ public enum SpecialLadders implements LadderAchievementCheck {
return ladderMap.get(loc);
}
}
interface LadderAchievementCheck {
default void checkAchievement(Player player) {
return;
}
}
@@ -1,5 +1,6 @@
package core.game.content.global.shop;
import api.ContentAPI;
import core.cache.def.impl.ItemDefinition;
import core.game.container.Container;
import core.game.container.ContainerType;
@@ -7,6 +8,7 @@ import org.rs09.consts.Items;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.diary.DiaryType;
import core.game.node.item.Item;
import rs09.game.system.SystemLogger;
import rs09.game.system.config.ItemConfigParser;
import rs09.game.world.GameWorld;
@@ -602,27 +604,14 @@ public class Shop {
*/
public int getSellingValue(Item item, Player player) {
if (!item.getDefinition().isUnnoted()) {
player.setAttribute("shop:originalId",item.getId());
item = new Item(item.getNoteChange(), item.getAmount());
}
int amount = getContainer(1).getAmount(item);
/*if (getCurrency() == TOKKUL) {
for (Item i : items) {
if (i.getId() == item.getId()) {
amount = i.getAmount();
}
}
}*/
if (amount < 1) {
amount = getContainer(0).getAmount(item);
}
int value = getSellValue(player, amount, item);
if (getCurrency() == TOKKUL) {
int tokkul = item.getDefinition().getConfiguration("tokkul_price", -1);
if (tokkul > 0) {
value = tokkul /= 10;
}
value = value * item.getAmount();
}
return value;
}
@@ -634,6 +623,11 @@ public class Shop {
* @return the selling value.
*/
private int getSellValue(Player player, int amount, Item item) {
int id = player.getAttribute("shop:originalId",item.getId());
if(item.getAmount() > ContentAPI.amountInInventory(player, id)){
item.setAmount(ContentAPI.amountInInventory(player, id));
player.removeAttribute("shop:originalId");
}
double diff = item.getDefinition().isStackable() ? 0.005 : 0.05;
double maxMod = 1.0 - (amount * diff);
if (maxMod < 0.25) {
@@ -644,6 +638,7 @@ public class Shop {
minMod = 0.25;
}
double mod = (maxMod + minMod) / 2;
SystemLogger.logInfo("" + item.getDefinition().getAlchemyValue(highAlch) + " " + mod + " " + item.getAmount());
int value = (int) (item.getDefinition().getAlchemyValue(highAlch) * mod * item.getAmount());
if(item.getId() == 12183){
value = 25 * item.getAmount();
@@ -1,6 +1,6 @@
package core.game.content.global.worldevents.shootingstar;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
@@ -24,7 +24,7 @@ public class ScoreboardHandler extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(38669).getHandlers().put("option:read",this);
SceneryDefinition.forId(38669).getHandlers().put("option:read",this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.global.worldevents.shootingstar;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -39,12 +39,12 @@ public class StarChartPlugin extends ComponentPlugin {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(25582).getHandlers().put("option:look-at",this);
ObjectDefinition.forId(25581).getHandlers().put("option:look-at",this);
ObjectDefinition.forId(25580).getHandlers().put("option:look-at",this);
ObjectDefinition.forId(25583).getHandlers().put("option:look-at",this);
ObjectDefinition.forId(25579).getHandlers().put("option:look-at",this);
ObjectDefinition.forId(25578).getHandlers().put("option:look-at",this);
SceneryDefinition.forId(25582).getHandlers().put("option:look-at",this);
SceneryDefinition.forId(25581).getHandlers().put("option:look-at",this);
SceneryDefinition.forId(25580).getHandlers().put("option:look-at",this);
SceneryDefinition.forId(25583).getHandlers().put("option:look-at",this);
SceneryDefinition.forId(25579).getHandlers().put("option:look-at",this);
SceneryDefinition.forId(25578).getHandlers().put("option:look-at",this);
return this;
}
}
@@ -3,7 +3,7 @@ import java.util.List;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -240,10 +240,10 @@ public class ChristmasEvent extends HolidayEvent {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(28296).getHandlers().put("option:collect", this);
SceneryDefinition.forId(28296).getHandlers().put("option:collect", this);
ItemDefinition.forId(BALL_OF_SNOW.getId()).getHandlers().put("option:build", this);
for (int i = 28266; i < 28296; i++) {
ObjectDefinition.forId(i).getHandlers().put("option:add-to", this);
SceneryDefinition.forId(i).getHandlers().put("option:add-to", this);
}
ItemDefinition.forId(SNOWGLOBE.getId()).getHandlers().put("option:shake", this);
return this;
@@ -276,7 +276,7 @@ public class ChristmasEvent extends HolidayEvent {
}
break;
case "add-to":
if (node.asObject().getId() == 28295) {
if (node.asScenery().getId() == 28295) {
player.sendMessage("You need a " + (player.getZoneMonitor().isInZone(getName()) ? "weapon or hat " : "hat") + " to complete this snowman.");
return true;
}
@@ -291,9 +291,9 @@ public class ChristmasEvent extends HolidayEvent {
}
player.sendMessage("You add some snow to the snowman.");
player.lock(1);
player.animate(Animation.create(node.asObject().getId() <= 28278 ? 7532 : 7533));
SceneryBuilder.replace(node.asObject(), node.asObject().transform(node.asObject().getId() + 1));
if (node.asObject().getId() + 1 >= 28295) {
player.animate(Animation.create(node.asScenery().getId() <= 28278 ? 7532 : 7533));
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(node.asScenery().getId() + 1));
if (node.asScenery().getId() + 1 >= 28295) {
if (player.getZoneMonitor().isInZone(getName())) {
player.sendMessages("The snowman is almsot complete! Talk to a snow imp to get a hat or weapon to", "complete it.");
} else {
@@ -433,7 +433,7 @@ public class ChristmasEvent extends HolidayEvent {
id = 6748;
}
final int npcId = id;
SceneryBuilder.remove(event.getUsedWith().asObject());
SceneryBuilder.remove(event.getUsedWith().asScenery());
final NPC snowman = NPC.create(npcId, event.getUsedWith().getLocation());
snowman.init();
snowman.faceTemporary(player, 2);
@@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import rs09.ServerConstants;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.plugin.Initializable;
import core.game.content.dialogue.DialogueAction;
@@ -223,10 +223,10 @@ public class DeathMansionEvent extends HolidayEvent {
player.teleport(PORTAL_LOCATION);
return true;
case 27276:
handlePassageWay(player, target.asObject());
handlePassageWay(player, target.asScenery());
return true;
case 27266:
passSpiderWeb(player, target.asObject());
passSpiderWeb(player, target.asScenery());
return true;
case 27242:
case 27243:
@@ -304,7 +304,7 @@ public class DeathMansionEvent extends HolidayEvent {
@Override
public void handle(Player player, int buttonId) {
if (buttonId == 2) {
item.search(player, target.asObject());
item.search(player, target.asScenery());
} else {
player.animate(Animation.create(7271));
player.getDialogueInterpreter().sendDialogues(player, FacialExpression.SUSPICIOUS, "Arrghhh! My eyes!");
@@ -318,9 +318,9 @@ public class DeathMansionEvent extends HolidayEvent {
@Override
public void handle(Player player, int buttonId) {
if (buttonId == 1) {
item.search(player, target.asObject());
item.search(player, target.asScenery());
} else {
player.getPacketDispatch().sendSceneryAnimation(target.asObject(), Animation.create(7278));
player.getPacketDispatch().sendSceneryAnimation(target.asScenery(), Animation.create(7278));
player.animate(Animation.create(7272));
player.getDialogueInterpreter().sendDialogues(player, FacialExpression.DISGUSTED, "That wasn't such a good idea.");
}
@@ -328,7 +328,7 @@ public class DeathMansionEvent extends HolidayEvent {
});
return true;
}
item.search(player, target.asObject());
item.search(player, target.asScenery());
return true;
case 27278:
final Location end = target.getLocation().equals(new Location(1633, 4824, 0)) ? new Location(1630, 4824, 0) : target.getLocation().equals(new Location(1627, 4819, 0)) ? new Location(1627, 4819, 0) : target.getLocation().equals(new Location(1630, 4819, 0)) ? new Location(1627, 4819, 0) : target.getLocation().equals(1624, 4822, 0) ? new Location(1624, 4828, 0) : new Location(1637, 4820, 0);
@@ -359,7 +359,7 @@ public class DeathMansionEvent extends HolidayEvent {
});
}
player.getPacketDispatch().sendSceneryAnimation(target.asObject(), Animation.create(7296));
player.getPacketDispatch().sendSceneryAnimation(target.asScenery(), Animation.create(7296));
AgilityHandler.walk(player, -1, player.getLocation(), target.getLocation(), null, 0.0, null);
GameWorld.getPulser().submit(new Pulse(1, player) {
@@ -749,7 +749,7 @@ public class DeathMansionEvent extends HolidayEvent {
if (item == null || event.getUsedItem().getId() != item.getItem().getId()) {
return false;
}
item.useWithEvent(player, event.getUsedWith().asObject());
item.useWithEvent(player, event.getUsedWith().asScenery());
return true;
}
@@ -1478,7 +1478,7 @@ public class DeathMansionEvent extends HolidayEvent {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
PluginManager.definePlugin(new DarkPortalDialogue());
ObjectDefinition.forId(DEATH_PORTAL).getHandlers().put("option:enter", this);
SceneryDefinition.forId(DEATH_PORTAL).getHandlers().put("option:enter", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.quest.free.blackknightsfortress;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
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;
@@ -52,15 +52,15 @@ public final class BKFortressPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ItemDefinition.forId(9589).getHandlers().put("option:read", this);
ObjectDefinition.forId(74).getHandlers().put("option:open", this);
ObjectDefinition.forId(73).getHandlers().put("option:open", this);
ObjectDefinition.forId(2337).getHandlers().put("option:open", this);
ObjectDefinition.forId(2338).getHandlers().put("option:open", this);
ObjectDefinition.forId(2341).getHandlers().put("option:push", this);
ObjectDefinition.forId(17148).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(17149).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(17160).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(2342).getHandlers().put("option:listen-at", this);
SceneryDefinition.forId(74).getHandlers().put("option:open", this);
SceneryDefinition.forId(73).getHandlers().put("option:open", this);
SceneryDefinition.forId(2337).getHandlers().put("option:open", this);
SceneryDefinition.forId(2338).getHandlers().put("option:open", this);
SceneryDefinition.forId(2341).getHandlers().put("option:push", this);
SceneryDefinition.forId(17148).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(17149).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(17160).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(2342).getHandlers().put("option:listen-at", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.quest.free.demonslayer;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.ClimbActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -34,11 +34,11 @@ public final class DemonSlayerPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(881).getHandlers().put("option:open", this);
ObjectDefinition.forId(882).getHandlers().put("option:close", this);
ObjectDefinition.forId(882).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(DRAIN_ID).getHandlers().put("option:search", this);
ObjectDefinition.forId(17429).getHandlers().put("option:take", this);
SceneryDefinition.forId(881).getHandlers().put("option:open", this);
SceneryDefinition.forId(882).getHandlers().put("option:close", this);
SceneryDefinition.forId(882).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(DRAIN_ID).getHandlers().put("option:search", this);
SceneryDefinition.forId(17429).getHandlers().put("option:take", this);
NPCDefinition.forId(DemonSlayerCutscene.DELRITH).getHandlers().put("option:attack", this);
NPCDefinition.forId(DemonSlayerCutscene.WEAKENED_DELRITH).getHandlers().put("option:banish", this);
return this;
@@ -2,7 +2,7 @@ package core.game.content.quest.free.dragonslayer;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
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;
@@ -40,63 +40,63 @@ public final class DragonSlayerPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(25115).getHandlers().put("option:open", this);// magic
SceneryDefinition.forId(25115).getHandlers().put("option:open", this);// magic
// door.
NPCDefinition.forId(747).getHandlers().put("option:trade", this);// oziach.
ObjectDefinition.forId(2595).getHandlers().put("option:open", this);// maze
SceneryDefinition.forId(2595).getHandlers().put("option:open", this);// maze
// main
// door.
// maze first floor.
ObjectDefinition.forId(32968).getHandlers().put("option:open", this);
ObjectDefinition.forId(2602).getHandlers().put("option:open", this);
ObjectDefinition.forId(2596).getHandlers().put("option:open", this);// red
SceneryDefinition.forId(32968).getHandlers().put("option:open", this);
SceneryDefinition.forId(2602).getHandlers().put("option:open", this);
SceneryDefinition.forId(2596).getHandlers().put("option:open", this);// red
// door.
ObjectDefinition.forId(1752).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(25038).getHandlers().put("option:climb-up", this);// trapdoor
SceneryDefinition.forId(1752).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(25038).getHandlers().put("option:climb-up", this);// trapdoor
// ladder
ObjectDefinition.forId(25214).getHandlers().put("option:open", this);// trapdoor
ObjectDefinition.forId(1746).getHandlers().put("option:climb-down", this);// ladder
ObjectDefinition.forId(2605).getHandlers().put("option:climb-down", this);// ladder
SceneryDefinition.forId(25214).getHandlers().put("option:open", this);// trapdoor
SceneryDefinition.forId(1746).getHandlers().put("option:climb-down", this);// ladder
SceneryDefinition.forId(2605).getHandlers().put("option:climb-down", this);// ladder
// maze second floor.
ObjectDefinition.forId(2597).getHandlers().put("option:open", this);// orange
SceneryDefinition.forId(2597).getHandlers().put("option:open", this);// orange
// door.
ObjectDefinition.forId(1747).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(25045).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(1747).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(25045).getHandlers().put("option:climb-down", this);
// maze third floor
ObjectDefinition.forId(2598).getHandlers().put("option:open", this);// yellow
SceneryDefinition.forId(2598).getHandlers().put("option:open", this);// yellow
// door.
// basement floor
ObjectDefinition.forId(2599).getHandlers().put("option:open", this);// blue
SceneryDefinition.forId(2599).getHandlers().put("option:open", this);// blue
// door.
ObjectDefinition.forId(2600).getHandlers().put("option:open", this);// purple
SceneryDefinition.forId(2600).getHandlers().put("option:open", this);// purple
// door.
ObjectDefinition.forId(2601).getHandlers().put("option:open", this);// green
SceneryDefinition.forId(2601).getHandlers().put("option:open", this);// green
// door.
ObjectDefinition.forId(2603).getHandlers().put("option:open", this);// closed
SceneryDefinition.forId(2603).getHandlers().put("option:open", this);// closed
// chest.
ObjectDefinition.forId(2604).getHandlers().put("option:search", this);// search
SceneryDefinition.forId(2604).getHandlers().put("option:search", this);// search
// chest.
ObjectDefinition.forId(2604).getHandlers().put("option:close", this);// search
SceneryDefinition.forId(2604).getHandlers().put("option:close", this);// search
// chest.
ObjectDefinition.forId(1755).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(1755).getHandlers().put("option:climb-up", this);
// map parts
ItemDefinition.forId(DragonSlayer.MAZE_PIECE.getId()).getHandlers().put("option:study", this);
ItemDefinition.forId(DragonSlayer.MAGIC_PIECE.getId()).getHandlers().put("option:study", this);
ItemDefinition.forId(DragonSlayer.WORMBRAIN_PIECE.getId()).getHandlers().put("option:study", this);
ItemDefinition.forId(DragonSlayer.CRANDOR_MAP.getId()).getHandlers().put("option:study", this);
// dwarv mine
ObjectDefinition.forId(2587).getHandlers().put("option:open", this);
SceneryDefinition.forId(2587).getHandlers().put("option:open", this);
NPCDefinition.forId(745).getHandlers().put("option:talk-to", this);
// lady lumby
ObjectDefinition.forId(25036).getHandlers().put("option:repair", this);
ObjectDefinition.forId(2589).getHandlers().put("option:repair", this);
SceneryDefinition.forId(25036).getHandlers().put("option:repair", this);
SceneryDefinition.forId(2589).getHandlers().put("option:repair", this);
// crandor
ObjectDefinition.forId(25154).getHandlers().put("option:enter", this);
ObjectDefinition.forId(2606).getHandlers().put("option:open", this);
ObjectDefinition.forId(25213).getHandlers().put("option:climb", this);
ObjectDefinition.forId(25161).getHandlers().put("option:climb-over", this);
SceneryDefinition.forId(25154).getHandlers().put("option:enter", this);
SceneryDefinition.forId(2606).getHandlers().put("option:open", this);
SceneryDefinition.forId(25213).getHandlers().put("option:climb", this);
SceneryDefinition.forId(25161).getHandlers().put("option:climb-over", this);
NPCDefinition.forId(742).getHandlers().put("option:attack", this);
NPCDefinition.forId(745).getHandlers().put("option:attack", this);
// reward items
@@ -106,9 +106,9 @@ public final class DragonSlayerPlugin extends OptionHandler {
ItemDefinition.forId(2669).getHandlers().put("option:wear", this);
ItemDefinition.forId(2661).getHandlers().put("option:wear", this);
// guild
ObjectDefinition.forId(24357).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(10558).getHandlers().put("option:open", this);
ObjectDefinition.forId(10560).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(24357).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(10558).getHandlers().put("option:open", this);
SceneryDefinition.forId(10560).getHandlers().put("option:climb-up", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.quest.free.goblindiplomacy;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.NodeUsageEvent;
import core.game.interaction.OptionHandler;
import core.game.interaction.UseWithHandler;
@@ -37,7 +37,7 @@ public final class GoblinDiplomacyPlugin extends OptionHandler {
public Plugin<Object> newInstance(Object arg) throws Throwable {
ItemDefinition.forId(288).getHandlers().put("option:wear", this);
for (int object : CRATES) {
ObjectDefinition.forId(object).getHandlers().put("option:search", this);
SceneryDefinition.forId(object).getHandlers().put("option:search", this);
}
for (GoblinMailPlugin.GoblinMail mail : GoblinMailPlugin.GoblinMail.values()) {
ItemDefinition.forId(mail.getProduct().getId()).getHandlers().put("option:wear", this);
@@ -1,7 +1,7 @@
package core.game.content.quest.free.piratestreasure;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.DigAction;
import core.game.content.global.action.DigSpadeHandler;
import core.game.interaction.OptionHandler;
@@ -30,7 +30,7 @@ public final class PiratesTreasurePlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2079).getHandlers().put("option:open", this);// blue
SceneryDefinition.forId(2079).getHandlers().put("option:open", this);// blue
// moon
// chest(pirates
// treasure
@@ -1,7 +1,7 @@
package core.game.content.quest.free.princealirescue;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.DoorActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -24,9 +24,9 @@ public class PrinceAliRescuePlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2881).getHandlers().put("option:open", this);// prison
SceneryDefinition.forId(2881).getHandlers().put("option:open", this);// prison
// door.
ObjectDefinition.forId(4639).getHandlers().put("option:open", this);// door
SceneryDefinition.forId(4639).getHandlers().put("option:open", this);// door
// to
// jail
NPCDefinition.forId(925).getHandlers().put("option:talk-to", this);
@@ -1,7 +1,7 @@
package core.game.content.quest.free.shieldofarrav;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.content.global.action.ClimbActionHandler;
import core.game.content.global.action.DoorActionHandler;
@@ -38,19 +38,19 @@ public final class ShieldArravPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2402).getHandlers().put("option:search", this);
ObjectDefinition.forId(2397).getHandlers().put("option:open", this);
ObjectDefinition.forId(2399).getHandlers().put("option:open", this);
ObjectDefinition.forId(2398).getHandlers().put("option:open", this);
SceneryDefinition.forId(2402).getHandlers().put("option:search", this);
SceneryDefinition.forId(2397).getHandlers().put("option:open", this);
SceneryDefinition.forId(2399).getHandlers().put("option:open", this);
SceneryDefinition.forId(2398).getHandlers().put("option:open", this);
ItemDefinition.forId(761).getHandlers().put("option:read", this);
ObjectDefinition.forId(2403).getHandlers().put("option:open", this);
ObjectDefinition.forId(2404).getHandlers().put("option:close", this);
ObjectDefinition.forId(2404).getHandlers().put("option:search", this);
SceneryDefinition.forId(2403).getHandlers().put("option:open", this);
SceneryDefinition.forId(2404).getHandlers().put("option:close", this);
SceneryDefinition.forId(2404).getHandlers().put("option:search", this);
ItemDefinition.forId(767).getHandlers().put("option:take", this);
ObjectDefinition.forId(24356).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(2400).getHandlers().put("option:open", this);
ObjectDefinition.forId(2401).getHandlers().put("option:search", this);
ObjectDefinition.forId(2401).getHandlers().put("option:shut", this);
SceneryDefinition.forId(24356).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(2400).getHandlers().put("option:open", this);
SceneryDefinition.forId(2401).getHandlers().put("option:search", this);
SceneryDefinition.forId(2401).getHandlers().put("option:shut", this);
ItemDefinition.forId(ShieldofArrav.PHOENIX_CERTIFICATE.getId()).getHandlers().put("option:read", this);
ItemDefinition.forId(ShieldofArrav.BLACKARM_CERTIFICATE.getId()).getHandlers().put("option:read", this);
ItemDefinition.forId(769).getHandlers().put("option:read", this);
@@ -1,6 +1,6 @@
package core.game.content.quest.free.therestlessghost;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.Entity;
@@ -61,7 +61,7 @@ public final class RestlessGhostPlugin extends OptionHandler {
public Plugin<Object> newInstance(Object arg) throws Throwable {
for (int coffin : COFFIN_IDS) {
for (String option : OPTIONS) {
ObjectDefinition.forId(coffin).getHandlers().put("option:" + option, this);
SceneryDefinition.forId(coffin).getHandlers().put("option:" + option, this);
}
}
new RestlessGhostNPC().newInstance(arg);
@@ -5,7 +5,7 @@ import java.util.Map;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -48,7 +48,7 @@ public final class AnimalMagnetismPlugin extends OptionHandler {
ItemDefinition.forId(4251).getHandlers().put("option:drop", this);
ItemDefinition.forId(4252).getHandlers().put("option:drop", this);
NPCDefinition.forId(5198).getHandlers().put("option:trade", this);
ObjectDefinition.forId(5167).getHandlers().put("option:push", this);
SceneryDefinition.forId(5167).getHandlers().put("option:push", this);
AnimalMagnetism.RESEARCH_NOTES.getDefinition().getHandlers().put("option:translate", this);
ItemDefinition.forId(AnimalMagnetism.CRONE_AMULET.getId()).getHandlers().put("option:wear", this);
ItemDefinition.forId(AnimalMagnetism.CRONE_AMULET.getId()).getHandlers().put("option:equip", this);
@@ -1,6 +1,6 @@
package core.game.content.quest.members.dwarfcannon;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -37,16 +37,16 @@ public class DwarfCannonPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(3).getHandlers().put("option:open", this);
ObjectDefinition.forId(5).getHandlers().put("option:inspect", this);
ObjectDefinition.forId(2).getHandlers().put("option:enter", this);
ObjectDefinition.forId(13).getHandlers().put("option:climb-over", this);
ObjectDefinition.forId(15601).getHandlers().put("option:inspect", this);
SceneryDefinition.forId(3).getHandlers().put("option:open", this);
SceneryDefinition.forId(5).getHandlers().put("option:inspect", this);
SceneryDefinition.forId(2).getHandlers().put("option:enter", this);
SceneryDefinition.forId(13).getHandlers().put("option:climb-over", this);
SceneryDefinition.forId(15601).getHandlers().put("option:inspect", this);
for (int i = 15; i < 21; i++) {
ObjectDefinition.forId(i).getHandlers().put("option:inspect", this);
SceneryDefinition.forId(i).getHandlers().put("option:inspect", this);
}
ObjectDefinition.forId(15596).getHandlers().put("option:take", this);
ObjectDefinition.forId(1).getHandlers().put("option:search", this);
SceneryDefinition.forId(15596).getHandlers().put("option:take", this);
SceneryDefinition.forId(1).getHandlers().put("option:search", this);
UseWithHandler.addHandler(5, UseWithHandler.OBJECT_TYPE, new UseWithHandler(1) {
@Override
@@ -85,13 +85,13 @@ public class DwarfCannonPlugin extends OptionHandler {
switch (node.getId()) {
case 3:
if (!node.getLocation().equals(new Location(3015, 3453, 0))) {
return DoorActionHandler.handleAutowalkDoor(player, node.asObject());
return DoorActionHandler.handleAutowalkDoor(player, node.asScenery());
}
if (quest.getStage(player) < 70) {
player.sendMessage("The door is locked.");
break;
}
return DoorActionHandler.handleAutowalkDoor(player, node.asObject());
return DoorActionHandler.handleAutowalkDoor(player, node.asScenery());
case 5:
if (quest.getStage(player) == 50) {
player.getDialogueInterpreter().sendDialogues(player, null, "I guess I'd better fix it with the toolkit I was given.");
@@ -110,7 +110,7 @@ public class DwarfCannonPlugin extends OptionHandler {
ClimbActionHandler.climb(player, new Animation(828), new Location(2623, 3391, 0));
break;
case 15601:
if (node.getId() != node.asObject().getWrapper().getId()) {
if (node.getId() != node.asScenery().getWrapper().getId()) {
player.getDialogueInterpreter().sendDialogues(player, null, "I think I've already fixed this one.");
}
return true;
@@ -245,7 +245,7 @@ public class DwarfCannonPlugin extends OptionHandler {
@Override
public Location getDestination(Node node, Node n) {
if (n.getId() == 3) {
return DoorActionHandler.getDestination(node.asPlayer(), n.asObject());
return DoorActionHandler.getDestination(node.asPlayer(), n.asScenery());
} else if (n.getId() == 15601) {
if (n.getLocation().equals(new Location(2565, 3456, 0))) {
return new Location(2566, 3456, 0);
@@ -23,7 +23,7 @@ public class FenceInteraction extends PluginInteraction {
@Override
public boolean handle(Player player, Node node) {
player.getPulseManager().run(new MovementPulse(player, node.asObject().getLocation().transform(player.getLocation().getX() == node.getLocation().getX() ? 0 : -1, 0, 0)) {
player.getPulseManager().run(new MovementPulse(player, node.asScenery().getLocation().transform(player.getLocation().getX() == node.getLocation().getX() ? 0 : -1, 0, 0)) {
@Override
public boolean pulse() {
GameWorld.getPulser().submit(new SqueezePulse(player));
@@ -27,7 +27,7 @@ public class GarlicPipeInteraction extends PluginInteraction {
public boolean handle(Player player, NodeUsageEvent event) {
System.out.println("Trying to handle it");
if(event.getUsed() instanceof Item && event.getUsedWith() instanceof Scenery){
Scenery usedWith = event.getUsedWith().asObject();
Scenery usedWith = event.getUsedWith().asScenery();
Item used = event.getUsedItem();
if(used.getId() == Items.GARLIC_1550 && usedWith.getId() == 41 && usedWith.getLocation().equals(Location.create(2638, 3446, 0)) && player.getQuestRepository().getStage("Fishing Contest") > 0){
@@ -49,7 +49,7 @@ public class GarlicPipeInteraction extends PluginInteraction {
@Override
public boolean handle(Player player, Node node) {
if(node instanceof Scenery){
Scenery object = node.asObject();
Scenery object = node.asScenery();
if(object.getId() == 41 && object.getLocation().equals(Location.create(2638, 3446, 0)) && player.getAttribute("fishing_contest:garlic",false)){
player.getPulseManager().run(new MovementPulse(player, object.getLocation().transform(0, -1, 0)) {
@Override
@@ -27,7 +27,7 @@ public class GateInteraction extends PluginInteraction {
public boolean handleGate(Player player, Node node){
if(!player.getAttribute("fishing_contest:pass-shown",false) || player.getQuestRepository().getStage("Fishing Contest") < 10) {
player.getPulseManager().run(new MovementPulse(player, node.asObject().getLocation().transform(1, 0, 0)) {
player.getPulseManager().run(new MovementPulse(player, node.asScenery().getLocation().transform(1, 0, 0)) {
@Override
public boolean pulse() {
if(player.getQuestRepository().getStage("Fishing Contest") >= 10){
@@ -49,7 +49,7 @@ public class GateInteraction extends PluginInteraction {
public boolean handleGruborGate(Player player, Node node){
if(node.getLocation().withinDistance(Location.create(2650, 3469, 0),4)) {
player.getPulseManager().run(new MovementPulse(player, node.asObject().getLocation().transform(0,-1 , 0)) {
player.getPulseManager().run(new MovementPulse(player, node.asScenery().getLocation().transform(0,-1 , 0)) {
@Override
public boolean pulse() {
player.getDialogueInterpreter().sendDialogue("This gate is locked.");
@@ -15,7 +15,7 @@ public class StairInteraction extends PluginInteraction {
@Override
public boolean handle(Player player, Node node) {
if(!player.getQuestRepository().isComplete("Fishing Contest")) {
Scenery object = node.asObject();
Scenery object = node.asScenery();
switch (object.getId()) {
case 57:
handleStairs(player,232,object);
@@ -23,9 +23,9 @@ public class VineInteraction extends PluginInteraction {
@Override
public boolean handle(Player player, Node node) {
if(node instanceof Scenery){
Scenery obj = node.asObject();
Scenery obj = node.asScenery();
if(player.getQuestRepository().getStage("Fishing Contest") > 0 && player.getQuestRepository().getStage("Fishing Contest") < 100){
player.getPulseManager().run(new MovementPulse(player, node.asObject().getLocation().transform(0, 0, 0)) {
player.getPulseManager().run(new MovementPulse(player, node.asScenery().getLocation().transform(0, 0, 0)) {
@Override
public boolean pulse() {
if(player.getInventory().containsItem(FishingContest.SPADE)) {
@@ -1,6 +1,6 @@
package core.game.content.quest.members.junglepotion;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.DialogueInterpreter;
import core.game.content.dialogue.DialoguePlugin;
import core.game.interaction.OptionHandler;
@@ -22,10 +22,10 @@ public final class JunglePotionPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2584).getHandlers().put("option:search", this);
ObjectDefinition.forId(2585).getHandlers().put("option:climb", this);
SceneryDefinition.forId(2584).getHandlers().put("option:search", this);
SceneryDefinition.forId(2585).getHandlers().put("option:climb", this);
for (JungleObjective s : JungleObjective.values()) {
ObjectDefinition.forId(s.getObjectId()).getHandlers().put("option:search", this);
SceneryDefinition.forId(s.getObjectId()).getHandlers().put("option:search", this);
}
SceneryBuilder.add(new Scenery(2585, Location.create(2828, 9522, 0), 8, 0));
return this;
@@ -1,7 +1,7 @@
package core.game.content.quest.members.lostcity;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.FacialExpression;
import core.game.content.global.action.DoorActionHandler;
import core.game.interaction.OptionHandler;
@@ -42,9 +42,9 @@ public final class LostCityPlugin extends OptionHandler {
ItemDefinition.forId(1215).getHandlers().put("option:wield", this);
ItemDefinition.forId(1231).getHandlers().put("option:wield", this);
ItemDefinition.forId(5680).getHandlers().put("option:wield", this);
ObjectDefinition.forId(2409).getHandlers().put("option:chop", this);
ObjectDefinition.forId(2406).getHandlers().put("option:open", this);
ObjectDefinition.forId(1292).getHandlers().put("option:chop down", this);
SceneryDefinition.forId(2409).getHandlers().put("option:chop", this);
SceneryDefinition.forId(2406).getHandlers().put("option:open", this);
SceneryDefinition.forId(1292).getHandlers().put("option:chop down", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.quest.members.merlinscrystal;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.activity.ActivityManager;
import core.game.content.activity.CutscenePlugin;
import core.game.content.dialogue.DialogueInterpreter;
@@ -61,14 +61,14 @@ public final class MerlinCrystalPlugin extends OptionHandler {
public Plugin<Object> newInstance(Object arg) throws Throwable {
PluginManager.definePlugin(new MerlinCrystalDialogue());
PluginManager.definePlugin(new MerlinCrystalItemHandler());
ObjectDefinition.forId(63).getHandlers().put("option:hide-in", this);
ObjectDefinition.forId(40026).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(72).getHandlers().put("option:open", this);
ObjectDefinition.forId(71).getHandlers().put("option:open", this);
ObjectDefinition.forId(71).getHandlers().put("option:knock-at", this);
ObjectDefinition.forId(72).getHandlers().put("option:knock-at", this);
SceneryDefinition.forId(63).getHandlers().put("option:hide-in", this);
SceneryDefinition.forId(40026).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(72).getHandlers().put("option:open", this);
SceneryDefinition.forId(71).getHandlers().put("option:open", this);
SceneryDefinition.forId(71).getHandlers().put("option:knock-at", this);
SceneryDefinition.forId(72).getHandlers().put("option:knock-at", this);
ItemDefinition.forId(530).getHandlers().put("option:drop", this);
ObjectDefinition.forId(62).getHandlers().put("option:smash", this);
SceneryDefinition.forId(62).getHandlers().put("option:smash", this);
return this;
}
@@ -82,7 +82,7 @@ public final class MerlinCrystalPlugin extends OptionHandler {
player.sendMessages("You attempt to smash the crystal...", "... and it shatters under the force of Excalibur!");
player.animate(Animation.create(390));
player.lock();
SceneryBuilder.remove(node.asObject(), 60);
SceneryBuilder.remove(node.asScenery(), 60);
quest.setStage(player, 99);
final NPC merlin = NPC.create(249, Location.create(2767, 3493, 2));
merlin.init();
@@ -125,7 +125,7 @@ public final class MerlinCrystalPlugin extends OptionHandler {
break;
}
} else {
DoorActionHandler.handleAutowalkDoor(player, node.asObject());
DoorActionHandler.handleAutowalkDoor(player, node.asScenery());
}
return true;
case 530:
@@ -1,6 +1,6 @@
package core.game.content.quest.members.rovingelves;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.node.entity.skill.agility.AgilityHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -21,14 +21,14 @@ public final class RovingElvesObstacles extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(3999).getHandlers().put("option:enter", this);
ObjectDefinition.forId(3939).getHandlers().put("option:enter", this);
ObjectDefinition.forId(3998).getHandlers().put("option:enter", this);
ObjectDefinition.forId(3938).getHandlers().put("option:enter", this);
ObjectDefinition.forId(3937).getHandlers().put("option:enter", this);
ObjectDefinition.forId(3924).getHandlers().put("option:jump", this);
ObjectDefinition.forId(3925).getHandlers().put("option:jump", this);
ObjectDefinition.forId(8742).getHandlers().put("option:pass", this);
SceneryDefinition.forId(3999).getHandlers().put("option:enter", this);
SceneryDefinition.forId(3939).getHandlers().put("option:enter", this);
SceneryDefinition.forId(3998).getHandlers().put("option:enter", this);
SceneryDefinition.forId(3938).getHandlers().put("option:enter", this);
SceneryDefinition.forId(3937).getHandlers().put("option:enter", this);
SceneryDefinition.forId(3924).getHandlers().put("option:jump", this);
SceneryDefinition.forId(3925).getHandlers().put("option:jump", this);
SceneryDefinition.forId(8742).getHandlers().put("option:pass", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.quest.members.rovingelves;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
@@ -21,7 +21,7 @@ public final class RovingElvesPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(5252).getHandlers().put("option:search", this);
SceneryDefinition.forId(5252).getHandlers().put("option:search", this);
ItemDefinition.forId(RovingElves.CONSECRATION_SEED_CHARGED.getId()).getHandlers().put("option:plant", this);
return this;
}
@@ -2,7 +2,7 @@ package core.game.content.quest.members.thetouristrap;
import core.cache.def.impl.AnimationDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.content.activity.ActivityManager;
import core.game.content.activity.ActivityPlugin;
@@ -48,66 +48,66 @@ public final class TouristTrapPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2673).getHandlers().put("option:open", this);
ObjectDefinition.forId(2674).getHandlers().put("option:open", this);
ObjectDefinition.forId(2673).getHandlers().put("option:search", this);
ObjectDefinition.forId(2674).getHandlers().put("option:search", this);
ObjectDefinition.forId(2688).getHandlers().put("option:open", this);
ObjectDefinition.forId(2688).getHandlers().put("option:search", this);
ObjectDefinition.forId(2687).getHandlers().put("option:open", this);
ObjectDefinition.forId(2687).getHandlers().put("option:search", this);
ObjectDefinition.forId(2685).getHandlers().put("option:open", this);
ObjectDefinition.forId(2685).getHandlers().put("option:open", this);
ObjectDefinition.forId(2686).getHandlers().put("option:search", this);
ObjectDefinition.forId(2686).getHandlers().put("option:search", this);
ObjectDefinition.forId(18958).getHandlers().put("option:search", this);
ObjectDefinition.forId(18958).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18959).getHandlers().put("option:search", this);
ObjectDefinition.forId(18959).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18888).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18888).getHandlers().put("option:operate", this);
ObjectDefinition.forId(36748).getHandlers().put("option:talk-to", this);
ObjectDefinition.forId(18869).getHandlers().put("option:bend", this);
ObjectDefinition.forId(18870).getHandlers().put("option:escape", this);
ObjectDefinition.forId(2689).getHandlers().put("option:open", this);
ObjectDefinition.forId(1528).getHandlers().put("option:open", this);
ObjectDefinition.forId(1529).getHandlers().put("option:close", this);
ObjectDefinition.forId(18899).getHandlers().put("option:search", this);
ObjectDefinition.forId(18899).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18878).getHandlers().put("option:search", this);
ObjectDefinition.forId(18878).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18879).getHandlers().put("option:search", this);
ObjectDefinition.forId(18879).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18898).getHandlers().put("option:search", this);
ObjectDefinition.forId(18898).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18902).getHandlers().put("option:search", this);
ObjectDefinition.forId(18871).getHandlers().put("option:climb", this);
ObjectDefinition.forId(18923).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(18924).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(2676).getHandlers().put("option:open", this);
ObjectDefinition.forId(2675).getHandlers().put("option:open", this);
ObjectDefinition.forId(2676).getHandlers().put("option:watch", this);
ObjectDefinition.forId(2675).getHandlers().put("option:watch", this);
ObjectDefinition.forId(2690).getHandlers().put("option:open", this);
ObjectDefinition.forId(2691).getHandlers().put("option:open", this);
ObjectDefinition.forId(2698).getHandlers().put("option:walk through", this);
ObjectDefinition.forId(2699).getHandlers().put("option:walk through", this);
ObjectDefinition.forId(2677).getHandlers().put("option:open", this);
ObjectDefinition.forId(2678).getHandlers().put("option:search", this);
ObjectDefinition.forId(2684).getHandlers().put("option:search", this);
ObjectDefinition.forId(2684).getHandlers().put("option:look at", this);
ObjectDefinition.forId(2680).getHandlers().put("option:search", this);
ObjectDefinition.forId(2680).getHandlers().put("option:look-in", this);
ObjectDefinition.forId(2681).getHandlers().put("option:search", this);
ObjectDefinition.forId(2681).getHandlers().put("option:look in", this);
ObjectDefinition.forId(18962).getHandlers().put("option:search", this);
ObjectDefinition.forId(18962).getHandlers().put("option:look in", this);
ObjectDefinition.forId(18963).getHandlers().put("option:search", this);
ObjectDefinition.forId(18963).getHandlers().put("option:look in", this);
ObjectDefinition.forId(18951).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18951).getHandlers().put("option:use", this);
ObjectDefinition.forId(2684).getHandlers().put("option:search", this);
ObjectDefinition.forId(2684).getHandlers().put("option:look at", this);
SceneryDefinition.forId(2673).getHandlers().put("option:open", this);
SceneryDefinition.forId(2674).getHandlers().put("option:open", this);
SceneryDefinition.forId(2673).getHandlers().put("option:search", this);
SceneryDefinition.forId(2674).getHandlers().put("option:search", this);
SceneryDefinition.forId(2688).getHandlers().put("option:open", this);
SceneryDefinition.forId(2688).getHandlers().put("option:search", this);
SceneryDefinition.forId(2687).getHandlers().put("option:open", this);
SceneryDefinition.forId(2687).getHandlers().put("option:search", this);
SceneryDefinition.forId(2685).getHandlers().put("option:open", this);
SceneryDefinition.forId(2685).getHandlers().put("option:open", this);
SceneryDefinition.forId(2686).getHandlers().put("option:search", this);
SceneryDefinition.forId(2686).getHandlers().put("option:search", this);
SceneryDefinition.forId(18958).getHandlers().put("option:search", this);
SceneryDefinition.forId(18958).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18959).getHandlers().put("option:search", this);
SceneryDefinition.forId(18959).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18888).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18888).getHandlers().put("option:operate", this);
SceneryDefinition.forId(36748).getHandlers().put("option:talk-to", this);
SceneryDefinition.forId(18869).getHandlers().put("option:bend", this);
SceneryDefinition.forId(18870).getHandlers().put("option:escape", this);
SceneryDefinition.forId(2689).getHandlers().put("option:open", this);
SceneryDefinition.forId(1528).getHandlers().put("option:open", this);
SceneryDefinition.forId(1529).getHandlers().put("option:close", this);
SceneryDefinition.forId(18899).getHandlers().put("option:search", this);
SceneryDefinition.forId(18899).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18878).getHandlers().put("option:search", this);
SceneryDefinition.forId(18878).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18879).getHandlers().put("option:search", this);
SceneryDefinition.forId(18879).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18898).getHandlers().put("option:search", this);
SceneryDefinition.forId(18898).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18902).getHandlers().put("option:search", this);
SceneryDefinition.forId(18871).getHandlers().put("option:climb", this);
SceneryDefinition.forId(18923).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(18924).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(2676).getHandlers().put("option:open", this);
SceneryDefinition.forId(2675).getHandlers().put("option:open", this);
SceneryDefinition.forId(2676).getHandlers().put("option:watch", this);
SceneryDefinition.forId(2675).getHandlers().put("option:watch", this);
SceneryDefinition.forId(2690).getHandlers().put("option:open", this);
SceneryDefinition.forId(2691).getHandlers().put("option:open", this);
SceneryDefinition.forId(2698).getHandlers().put("option:walk through", this);
SceneryDefinition.forId(2699).getHandlers().put("option:walk through", this);
SceneryDefinition.forId(2677).getHandlers().put("option:open", this);
SceneryDefinition.forId(2678).getHandlers().put("option:search", this);
SceneryDefinition.forId(2684).getHandlers().put("option:search", this);
SceneryDefinition.forId(2684).getHandlers().put("option:look at", this);
SceneryDefinition.forId(2680).getHandlers().put("option:search", this);
SceneryDefinition.forId(2680).getHandlers().put("option:look-in", this);
SceneryDefinition.forId(2681).getHandlers().put("option:search", this);
SceneryDefinition.forId(2681).getHandlers().put("option:look in", this);
SceneryDefinition.forId(18962).getHandlers().put("option:search", this);
SceneryDefinition.forId(18962).getHandlers().put("option:look in", this);
SceneryDefinition.forId(18963).getHandlers().put("option:search", this);
SceneryDefinition.forId(18963).getHandlers().put("option:look in", this);
SceneryDefinition.forId(18951).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18951).getHandlers().put("option:use", this);
SceneryDefinition.forId(2684).getHandlers().put("option:search", this);
SceneryDefinition.forId(2684).getHandlers().put("option:look at", this);
NPCDefinition.forId(830).getHandlers().put("option:watch", this);
NPCDefinition.forId(4975).getHandlers().put("option:talk-to", this);
NPCDefinition.forId(4976).getHandlers().put("option:talk-to", this);
@@ -5,7 +5,7 @@ import java.util.List;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.FacialExpression;
import core.game.content.global.action.ClimbActionHandler;
import core.game.content.global.action.DoorActionHandler;
@@ -103,26 +103,26 @@ public final class WaterfallPlugin extends OptionHandler {
public Plugin<Object> newInstance(Object arg) throws Throwable {
PluginManager.definePlugin(new WaterfallUseWithHandler());
NPCDefinition.forId(305).getHandlers().put("option:talk-to", this);
ObjectDefinition.forId(1987).getHandlers().put("option:board", this);
ObjectDefinition.forId(2020).getHandlers().put("option:climb", this);
ObjectDefinition.forId(2022).getHandlers().put("option:get in", this);
ObjectDefinition.forId(10283).getHandlers().put("option:swim", this);
ObjectDefinition.forId(1996).getHandlers().put("option:swim to", this);
ObjectDefinition.forId(1989).getHandlers().put("option:search", this);
ObjectDefinition.forId(1990).getHandlers().put("option:search", this);
ObjectDefinition.forId(1991).getHandlers().put("option:open", this);
ObjectDefinition.forId(37247).getHandlers().put("option:open", this);
ObjectDefinition.forId(32711).getHandlers().put("option:open", this);
ObjectDefinition.forId(33046).getHandlers().put("option:open", this);
ObjectDefinition.forId(42313).getHandlers().put("option:open",this);
ObjectDefinition.forId(33047).getHandlers().put("option:search", this);
ObjectDefinition.forId(33047).getHandlers().put("option:close", this);
ObjectDefinition.forId(33066).getHandlers().put("option:search", this);
ObjectDefinition.forId(1999).getHandlers().put("option:search", this);
ObjectDefinition.forId(42319).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(2002).getHandlers().put("option:open", this);
ObjectDefinition.forId(1992).getHandlers().put("option:read", this);
ObjectDefinition.forId(2014).getHandlers().put("option:take treasure", this);
SceneryDefinition.forId(1987).getHandlers().put("option:board", this);
SceneryDefinition.forId(2020).getHandlers().put("option:climb", this);
SceneryDefinition.forId(2022).getHandlers().put("option:get in", this);
SceneryDefinition.forId(10283).getHandlers().put("option:swim", this);
SceneryDefinition.forId(1996).getHandlers().put("option:swim to", this);
SceneryDefinition.forId(1989).getHandlers().put("option:search", this);
SceneryDefinition.forId(1990).getHandlers().put("option:search", this);
SceneryDefinition.forId(1991).getHandlers().put("option:open", this);
SceneryDefinition.forId(37247).getHandlers().put("option:open", this);
SceneryDefinition.forId(32711).getHandlers().put("option:open", this);
SceneryDefinition.forId(33046).getHandlers().put("option:open", this);
SceneryDefinition.forId(42313).getHandlers().put("option:open",this);
SceneryDefinition.forId(33047).getHandlers().put("option:search", this);
SceneryDefinition.forId(33047).getHandlers().put("option:close", this);
SceneryDefinition.forId(33066).getHandlers().put("option:search", this);
SceneryDefinition.forId(1999).getHandlers().put("option:search", this);
SceneryDefinition.forId(42319).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(2002).getHandlers().put("option:open", this);
SceneryDefinition.forId(1992).getHandlers().put("option:read", this);
SceneryDefinition.forId(2014).getHandlers().put("option:take treasure", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.quest.members.whatliesbelow;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.node.entity.player.link.diary.DiaryType;
import core.game.content.activity.ActivityManager;
@@ -38,9 +38,9 @@ public class WLBelowPlugin extends OptionHandler {
PluginManager.definePlugin(new AnnaJonesDialogue());
PluginManager.definePlugin(new SurokMagisDialogue());
PluginManager.definePlugin(new RatBurgissDialogue());
ObjectDefinition.forId(23095).getHandlers().put("option:use", this);
ObjectDefinition.forId(23058).getHandlers().put("option:enter", this);
ObjectDefinition.forId(23057).getHandlers().put("option:excavate", this);
SceneryDefinition.forId(23095).getHandlers().put("option:use", this);
SceneryDefinition.forId(23058).getHandlers().put("option:enter", this);
SceneryDefinition.forId(23057).getHandlers().put("option:excavate", this);
WhatLiesBelow.RATS_PAPER.getDefinition().getHandlers().put("option:read", this);
WhatLiesBelow.EMPTY_FOLDER.getDefinition().getHandlers().put("option:read", this);
WhatLiesBelow.USED_FOLDER.getDefinition().getHandlers().put("option:read", this);
@@ -1,7 +1,7 @@
package core.game.content.quest.members.witchshouse;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.DoorActionHandler;
import core.game.interaction.NodeUsageEvent;
import core.game.interaction.OptionHandler;
@@ -174,19 +174,19 @@ public class WitchsHousePlugin extends OptionHandler {
public Plugin<Object> newInstance(Object arg) throws Throwable {
PluginManager.definePlugin(new WitchsHouseUseWithHandler());
PluginManager.definePlugin(new MouseNPC());
ObjectDefinition.forId(2867).getHandlers().put("option:look-under", this);
ObjectDefinition.forId(2861).getHandlers().put("option:open", this);
ObjectDefinition.forId(2865).getHandlers().put("option:open", this);
ObjectDefinition.forId(2866).getHandlers().put("option:open", this);
ObjectDefinition.forId(2862).getHandlers().put("option:open", this);
ObjectDefinition.forId(24724).getHandlers().put("option:wind-up", this);
ObjectDefinition.forId(24673).getHandlers().put("option:walk-down", this);
ObjectDefinition.forId(24672).getHandlers().put("option:walk-up", this);
ObjectDefinition.forId(24721).getHandlers().put("option:play", this);
ObjectDefinition.forId(24692).getHandlers().put("option:search", this);
ObjectDefinition.forId(2869).getHandlers().put("option:search", this);
ObjectDefinition.forId(2863).getHandlers().put("option:open", this);
ObjectDefinition.forId(2864).getHandlers().put("option:check", this);
SceneryDefinition.forId(2867).getHandlers().put("option:look-under", this);
SceneryDefinition.forId(2861).getHandlers().put("option:open", this);
SceneryDefinition.forId(2865).getHandlers().put("option:open", this);
SceneryDefinition.forId(2866).getHandlers().put("option:open", this);
SceneryDefinition.forId(2862).getHandlers().put("option:open", this);
SceneryDefinition.forId(24724).getHandlers().put("option:wind-up", this);
SceneryDefinition.forId(24673).getHandlers().put("option:walk-down", this);
SceneryDefinition.forId(24672).getHandlers().put("option:walk-up", this);
SceneryDefinition.forId(24721).getHandlers().put("option:play", this);
SceneryDefinition.forId(24692).getHandlers().put("option:search", this);
SceneryDefinition.forId(2869).getHandlers().put("option:search", this);
SceneryDefinition.forId(2863).getHandlers().put("option:open", this);
SceneryDefinition.forId(2864).getHandlers().put("option:check", this);
ItemDefinition.forId(2408).getHandlers().put("option:read", this);
return this;
@@ -1,6 +1,6 @@
package core.game.content.quest.miniquest.surok;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
@@ -21,7 +21,7 @@ public class HuntForSurokPlugin extends OptionHandler {
PluginManager.definePlugin(new MishkalunDornDialogue());
PluginManager.definePlugin(new SilasDahcsnuDialogue());
PluginManager.definePlugin(new SurokMagisDialogue());
ObjectDefinition.forId(28780).getHandlers().put("option:use", this);
SceneryDefinition.forId(28780).getHandlers().put("option:use", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.quest.tutorials.tutorialisland;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
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;
@@ -24,25 +24,25 @@ public class TutorialIslandPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(3015).getHandlers().put("option:open", this);
ObjectDefinition.forId(3016).getHandlers().put("option:open", this);
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);
ObjectDefinition.forId(3014).getHandlers().put("option:open", this);
ObjectDefinition.forId(3017).getHandlers().put("option:open", this);
ObjectDefinition.forId(3018).getHandlers().put("option:open", this);
ObjectDefinition.forId(3019).getHandlers().put("option:open", this);
ObjectDefinition.forId(3020).getHandlers().put("option:open", this);
ObjectDefinition.forId(3021).getHandlers().put("option:open", this);
ObjectDefinition.forId(3022).getHandlers().put("option:open", this);
ObjectDefinition.forId(3023).getHandlers().put("option:open", this);
ObjectDefinition.forId(3024).getHandlers().put("option:open", this);
ObjectDefinition.forId(3025).getHandlers().put("option:open", this);
ObjectDefinition.forId(3026).getHandlers().put("option:open", this);
ObjectDefinition.forId(3029).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(3030).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(3031).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(1740).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(3028).getHandlers().put("option:climb-up", 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;
}
@@ -92,7 +92,7 @@ public final class EmoteCluePlugin extends EmoteClueScroll {
register(new EmoteCluePlugin("lumb-shack-dance", 2698, ClueLevel.EASY, emote, new int[][] { { 1205 }, { 1153 }, { 1635 } }, "Dance in<br>the shack in Lumbridge Swamp.<br>Equip a bronze<br>dagger, iron full helmet<br>and a gold ring.", new ZoneBorders(3202, 3167, 3205, 3170)));
register(new EmoteCluePlugin("lumb-cave-dance", 2699, ClueLevel.MEDIUM, emote, Emotes.BLOW_KISS, new int[][] { { 1381 }, { 1155 }, { 1731 } }, "Dance in the dark<br>cave beneath<br>Lumbridge Swamp.<br>Blow a kiss before<br>you talk to me.<br>Equip an air staff,<br>bronze full helm and<br>an amulet of power.", new ZoneBorders(3139, 9534, 3260, 9587)));
register(new EmoteCluePlugin("shantay-guild-jig", 2700, ClueLevel.MEDIUM, Emotes.JIG, Emotes.BOW, new int[][] { { 3343 }, { 1381 }, { 1173 } }, "Dance a jig under<br>Shantay's Awning.<br>Bow before you talk to<br>me.<br>Equip a pointed blue<br>snail helmet, an air<br>staff and a bronze<br>square shield.", new ZoneBorders(3302, 3122, 3305, 3125)));
register(new EmoteCluePlugin("cat-entrance-dance", 2701, ClueLevel.HARD, emote, new int[][] { { 2570 }, { 1704 }, { 1317 } }, "Dance at the<br>cat doored pyramid in<br>Sophanem. Beware of double agents!<br>Equip a ring of life,<br>an uncharged amulet<br>of glory and an adamant two handed<br>sword.", new ZoneBorders(3293, 2781, 3296, 2782)));
register(new EmoteCluePlugin("cat-entrance-dance", 2701, ClueLevel.HARD, emote, new int[][] { { 2570 }, { 1704 }, { 1317 } }, "Dance at the<br>cat doored pyramid in<br>Sophanem. Beware of double agents!<br>Equip a ring of life<br>an uncharged amulet of glory<br>and an adamant two handed sword.", new ZoneBorders(3293, 2781, 3296, 2782)));
emote = Emotes.HEADBANG;
register(new EmoteCluePlugin("al-kharid-headbang", 2702, ClueLevel.EASY, emote, new int[][] { { 1833 }, { 1059 }, { 1061 } }, "Headbang in the mine north of Al<br>Kharid.<br>Equip a desert shirt, leather gloves and<br>leather boots.", new ZoneBorders(3297, 3286, 3301, 3316)));
//Removed Vexia code that bricked emotes for certain clues.
@@ -1,7 +1,7 @@
package core.game.content.ttrail;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -91,7 +91,7 @@ public final class TreasureTrailPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(19171).getHandlers().put("option:squeeze-through", this);
SceneryDefinition.forId(19171).getHandlers().put("option:squeeze-through", this);
return this;
}

Some files were not shown because too many files have changed in this diff Show More