Commit 3e29ede9 authored by Scott T's avatar Scott T

Config for custom landscape

Exit portal work/ chaos maze implementation
parent 88f6b33f
......@@ -24655,7 +24655,6 @@ INSERT INTO `openrsc_objects` (`x`, `y`, `id`, `direction`, `type`, `d_id`) VALU
(395, 803, 405, 3, 0, 14658),
(395, 805, 394, 3, 0, 14659),
(394, 807, 32, 4, 0, 14660),
(392, 806, 404, 4, 0, 14661),
(394, 801, 394, 3, 0, 14662),
(392, 803, 403, 2, 0, 14663),
(407, 805, 404, 1, 0, 14664),
......@@ -33811,13 +33810,11 @@ INSERT INTO `openrsc_objects` (`x`, `y`, `id`, `direction`, `type`, `d_id`) VALU
(145, 3530, 72, 7, 0, 23810),
(148, 3528, 72, 7, 0, 23811),
(145, 3539, 51, 4, 0, 23812),
(148, 3541, 51, 4, 0, 23813),
(147, 3537, 1, 0, 0, 23814),
(144, 3530, 72, 7, 0, 23815),
(144, 3529, 72, 7, 0, 23816),
(150, 3538, 1, 0, 0, 23817),
(145, 3529, 72, 7, 0, 23818),
(151, 3541, 51, 4, 0, 23819),
(145, 3528, 72, 7, 0, 23820),
(145, 3519, 51, 0, 0, 23821),
(150, 3517, 51, 0, 0, 23822),
......@@ -37996,136 +37993,160 @@ INSERT INTO `openrsc_objects` (`x`, `y`, `id`, `direction`, `type`, `d_id`) VALU
(399, 182, 55, 0, 0, 29126),
(400, 180, 55, 0, 0, 29127),
(393, 172, 577, 2, 0, 29141),
(209, 448, 97, 0, 0, 29278),
(685, 14, 1226, 0, 0, 29273),
(692, 3, 1227, 4, 0, 29272),
(838, 20, 1203, 0, 0, 29271),
(841, 19, 68, 0, 0, 29270),
(835, 19, 68, 0, 0, 29269),
(838, 17, 68, 2, 0, 29268),
(890, 23, 1218, 0, 0, 29267),
(887, 20, 1199, 0, 0, 29266),
(890, 19, 68, 0, 0, 29265),
(884, 19, 68, 0, 0, 29264),
(887, 17, 68, 2, 0, 29263),
(409, 534, 1208, 1, 0, 29262),
(392, 804, 1206, 4, 0, 29261),
(259, 503, 1200, 5, 0, 29260),
(50, 633, 1198, 0, 0, 29259),
(62, 464, 1196, 5, 0, 29258),
(147, 684, 1194, 2, 0, 29257),
(306, 593, 1190, 2, 0, 29256),
(988, 66, 1216, 0, 0, 29255),
(985, 70, 1195, 0, 0, 29254),
(988, 71, 68, 0, 0, 29253),
(982, 71, 68, 0, 0, 29252),
(985, 73, 68, 2, 0, 29251),
(934, 63, 68, 2, 0, 29250),
(931, 65, 68, 0, 0, 29249),
(937, 65, 68, 0, 0, 29248),
(937, 69, 1217, 0, 0, 29247),
(934, 65, 1197, 0, 0, 29246),
(890, 67, 1219, 0, 0, 29245),
(886, 70, 1201, 0, 0, 29244),
(886, 67, 68, 2, 0, 29243),
(886, 73, 68, 2, 0, 29242),
(884, 70, 68, 0, 0, 29241),
(793, 58, 1223, 0, 0, 29240),
(790, 58, 1209, 0, 0, 29239),
(743, 14, 1211, 0, 0, 29238),
(740, 18, 1224, 0, 0, 29237),
(741, 14, 68, 0, 0, 29236),
(745, 14, 68, 0, 0, 29235),
(743, 12, 68, 2, 0, 29234),
(783, 26, 1223, 0, 0, 29233),
(741, 68, 1225, 0, 0, 29232),
(738, 71, 1213, 1, 0, 29231),
(738, 74, 68, 2, 0, 29230),
(738, 68, 68, 2, 0, 29229),
(736, 71, 68, 0, 0, 29228),
(783, 22, 0, 0, 0, 29227),
(787, 21, 1207, 0, 0, 29226),
(789, 21, 68, 0, 0, 29225),
(787, 19, 68, 2, 0, 29224),
(785, 21, 68, 0, 0, 29223),
(795, 29, 0, 0, 0, 29222),
(798, 25, 0, 0, 0, 29221),
(795, 18, 0, 0, 0, 29220),
(776, 20, 0, 0, 0, 29219),
(776, 28, 0, 0, 0, 29218),
(781, 32, 0, 0, 0, 29217),
(779, 31, 0, 0, 0, 29216),
(784, 33, 0, 0, 0, 29215),
(781, 13, 0, 0, 0, 29214),
(791, 15, 0, 0, 0, 29213),
(790, 13, 0, 0, 0, 29212),
(783, 19, 34, 0, 0, 29211),
(785, 17, 34, 0, 0, 29210),
(792, 18, 34, 0, 0, 29209),
(794, 19, 34, 0, 0, 29208),
(796, 24, 34, 0, 0, 29207),
(795, 26, 34, 0, 0, 29206),
(793, 30, 34, 0, 0, 29205),
(789, 33, 34, 0, 0, 29204),
(786, 33, 34, 0, 0, 29203),
(783, 32, 34, 0, 0, 29202),
(781, 30, 34, 0, 0, 29201),
(779, 28, 34, 0, 0, 29200),
(777, 25, 34, 0, 0, 29199),
(778, 21, 34, 0, 0, 29198),
(780, 17, 0, 0, 0, 29197),
(785, 14, 0, 0, 0, 29196),
(787, 16, 0, 0, 0, 29195),
(782, 16, 0, 0, 0, 29194),
(794, 22, 938, 0, 0, 29193),
(793, 21, 938, 0, 0, 29192),
(788, 31, 0, 0, 0, 29191),
(786, 31, 0, 0, 0, 29190),
(790, 32, 0, 0, 0, 29189),
(794, 27, 938, 0, 0, 29188),
(796, 23, 938, 0, 0, 29187),
(791, 18, 0, 0, 0, 29186),
(778, 23, 0, 0, 0, 29185),
(779, 27, 0, 0, 0, 29184),
(780, 20, 0, 0, 0, 29183),
(783, 29, 938, 0, 0, 29182),
(790, 29, 938, 0, 0, 29181),
(790, 31, 938, 0, 0, 29180),
(785, 18, 285, 0, 0, 29179),
(787, 18, 188, 0, 0, 29178),
(784, 18, 188, 0, 0, 29177),
(779, 25, 0, 0, 0, 29176),
(780, 22, 0, 0, 0, 29175),
(798, 20, 0, 0, 0, 29174),
(795, 31, 0, 0, 0, 29173),
(798, 28, 0, 0, 0, 29172),
(781, 28, 0, 0, 0, 29171),
(790, 34, 0, 0, 0, 29170),
(787, 32, 0, 0, 0, 29169),
(794, 15, 0, 0, 0, 29168),
(789, 18, 0, 0, 0, 29167),
(795, 21, 0, 0, 0, 29166),
(792, 20, 0, 0, 0, 29165),
(782, 19, 0, 0, 0, 29164),
(782, 24, 0, 0, 0, 29163),
(785, 30, 0, 0, 0, 29162),
(792, 28, 0, 0, 0, 29161),
(795, 25, 0, 0, 0, 29160),
(786, 18, 188, 0, 0, 29159),
(793, 32, 0, 0, 0, 29158),
(806, 25, 0, 0, 0, 29157),
(800, 12, 0, 0, 0, 29156),
(297, 438, 1192, 0, 0, 29155),
(931, 16, 1215, 1, 0, 29154),
(934, 25, 68, 2, 0, 29153),
(930, 21, 68, 0, 0, 29152),
(938, 21, 68, 0, 0, 29151),
(934, 21, 1193, 4, 0, 29150),
(982, 21, 1214, 1, 0, 29149),
(978, 21, 68, 2, 0, 29148),
(978, 19, 1191, 0, 0, 29147),
(978, 17, 68, 2, 0, 29145),
(976, 19, 68, 0, 0, 29146),
(978, 17, 68, 2, 0, 29145);
(978, 19, 1191, 0, 0, 29147),
(978, 21, 68, 2, 0, 29148),
(982, 21, 1214, 1, 0, 29149),
(934, 21, 1193, 4, 0, 29150),
(938, 21, 68, 0, 0, 29151),
(930, 21, 68, 0, 0, 29152),
(934, 25, 68, 2, 0, 29153),
(931, 16, 1215, 1, 0, 29154),
(297, 438, 1192, 0, 0, 29155),
(800, 12, 0, 0, 0, 29156),
(806, 25, 0, 0, 0, 29157),
(793, 32, 0, 0, 0, 29158),
(786, 18, 188, 0, 0, 29159),
(795, 25, 0, 0, 0, 29160),
(792, 28, 0, 0, 0, 29161),
(785, 30, 0, 0, 0, 29162),
(782, 24, 0, 0, 0, 29163),
(782, 19, 0, 0, 0, 29164),
(792, 20, 0, 0, 0, 29165),
(795, 21, 0, 0, 0, 29166),
(789, 18, 0, 0, 0, 29167),
(794, 15, 0, 0, 0, 29168),
(787, 32, 0, 0, 0, 29169),
(790, 34, 0, 0, 0, 29170),
(781, 28, 0, 0, 0, 29171),
(798, 28, 0, 0, 0, 29172),
(795, 31, 0, 0, 0, 29173),
(798, 20, 0, 0, 0, 29174),
(780, 22, 0, 0, 0, 29175),
(779, 25, 0, 0, 0, 29176),
(784, 18, 188, 0, 0, 29177),
(787, 18, 188, 0, 0, 29178),
(785, 18, 285, 0, 0, 29179),
(790, 31, 938, 0, 0, 29180),
(790, 29, 938, 0, 0, 29181),
(783, 29, 938, 0, 0, 29182),
(780, 20, 0, 0, 0, 29183),
(779, 27, 0, 0, 0, 29184),
(778, 23, 0, 0, 0, 29185),
(791, 18, 0, 0, 0, 29186),
(796, 23, 938, 0, 0, 29187),
(794, 27, 938, 0, 0, 29188),
(790, 32, 0, 0, 0, 29189),
(786, 31, 0, 0, 0, 29190),
(788, 31, 0, 0, 0, 29191),
(793, 21, 938, 0, 0, 29192),
(794, 22, 938, 0, 0, 29193),
(782, 16, 0, 0, 0, 29194),
(787, 16, 0, 0, 0, 29195),
(785, 14, 0, 0, 0, 29196),
(780, 17, 0, 0, 0, 29197),
(778, 21, 34, 0, 0, 29198),
(777, 25, 34, 0, 0, 29199),
(779, 28, 34, 0, 0, 29200),
(781, 30, 34, 0, 0, 29201),
(783, 32, 34, 0, 0, 29202),
(786, 33, 34, 0, 0, 29203),
(789, 33, 34, 0, 0, 29204),
(793, 30, 34, 0, 0, 29205),
(795, 26, 34, 0, 0, 29206),
(796, 24, 34, 0, 0, 29207),
(794, 19, 34, 0, 0, 29208),
(792, 18, 34, 0, 0, 29209),
(785, 17, 34, 0, 0, 29210),
(783, 19, 34, 0, 0, 29211),
(790, 13, 0, 0, 0, 29212),
(791, 15, 0, 0, 0, 29213),
(781, 13, 0, 0, 0, 29214),
(784, 33, 0, 0, 0, 29215),
(779, 31, 0, 0, 0, 29216),
(781, 32, 0, 0, 0, 29217),
(776, 28, 0, 0, 0, 29218),
(776, 20, 0, 0, 0, 29219),
(795, 18, 0, 0, 0, 29220),
(798, 25, 0, 0, 0, 29221),
(795, 29, 0, 0, 0, 29222),
(785, 21, 68, 0, 0, 29223),
(787, 19, 68, 2, 0, 29224),
(789, 21, 68, 0, 0, 29225),
(787, 21, 1207, 0, 0, 29226),
(783, 22, 0, 0, 0, 29227),
(736, 71, 68, 0, 0, 29228),
(738, 68, 68, 2, 0, 29229),
(738, 74, 68, 2, 0, 29230),
(738, 71, 1213, 1, 0, 29231),
(741, 68, 1225, 0, 0, 29232),
(783, 26, 1223, 0, 0, 29233),
(743, 12, 68, 2, 0, 29234),
(745, 14, 68, 0, 0, 29235),
(741, 14, 68, 0, 0, 29236),
(740, 18, 1224, 0, 0, 29237),
(743, 14, 1211, 0, 0, 29238),
(790, 58, 1209, 0, 0, 29239),
(793, 58, 1223, 0, 0, 29240),
(884, 70, 68, 0, 0, 29241),
(886, 73, 68, 2, 0, 29242),
(886, 67, 68, 2, 0, 29243),
(886, 70, 1201, 0, 0, 29244),
(890, 67, 1219, 0, 0, 29245),
(934, 65, 1197, 0, 0, 29246),
(937, 69, 1217, 0, 0, 29247),
(937, 65, 68, 0, 0, 29248),
(931, 65, 68, 0, 0, 29249),
(934, 63, 68, 2, 0, 29250),
(985, 73, 68, 2, 0, 29251),
(982, 71, 68, 0, 0, 29252),
(988, 71, 68, 0, 0, 29253),
(985, 70, 1195, 0, 0, 29254),
(988, 66, 1216, 0, 0, 29255),
(306, 593, 1190, 2, 0, 29256),
(147, 684, 1194, 2, 0, 29257),
(62, 464, 1196, 5, 0, 29258),
(50, 633, 1198, 0, 0, 29259),
(259, 503, 1200, 5, 0, 29260),
(392, 804, 1206, 4, 0, 29261),
(409, 534, 1208, 1, 0, 29262),
(887, 17, 68, 2, 0, 29263),
(884, 19, 68, 0, 0, 29264),
(890, 19, 68, 0, 0, 29265),
(887, 20, 1199, 0, 0, 29266),
(890, 23, 1218, 0, 0, 29267),
(838, 17, 68, 2, 0, 29268),
(835, 19, 68, 0, 0, 29269),
(841, 19, 68, 0, 0, 29270),
(838, 20, 1203, 0, 0, 29271),
(692, 3, 1227, 4, 0, 29272),
(685, 14, 1226, 0, 0, 29273),
(209, 448, 97, 0, 0, 29278),
(106, 3565, 1202, 2, 0, 29284),
(842, 24, 1224, 0, 0, 29286),
(232, 375, 1204, 0, 0, 29287),
(843, 75, 1228, 0, 0, 29299),
(831, 77, 1229, 0, 0, 29301),
(823, 76, 1230, 0, 0, 29303),
(825, 63, 1231, 0, 0, 29304),
(822, 55, 1232, 0, 0, 29305),
(825, 67, 1233, 0, 0, 29306),
(836, 76, 1233, 0, 0, 29307),
(843, 79, 1233, 0, 0, 29308),
(859, 79, 1233, 0, 0, 29309),
(849, 83, 1233, 0, 0, 29310),
(835, 71, 1234, 0, 0, 29311),
(839, 75, 1234, 0, 0, 29312),
(851, 60, 1234, 0, 0, 29313),
(825, 72, 1234, 0, 0, 29314),
(842, 55, 1235, 0, 0, 29315),
(830, 57, 1235, 0, 0, 29316),
(829, 64, 1235, 0, 0, 29317),
(823, 51, 1235, 0, 0, 29318),
(79, 505, 59, 0, 0, 29320),
(857, 53, 1205, 0, 0, 29321),
(855, 52, 1221, 0, 0, 29322);
DROP TABLE IF EXISTS `openrsc_recovery_questions`;
CREATE TABLE IF NOT EXISTS `openrsc_recovery_questions` (
......@@ -6563,7 +6563,15 @@ public class EntityHandler {
objects.add(new GameObjectDef("Portal", "This will lead you out", "Exit", "Examine", 1, 2, 2, 0, "portal", i++));//death altar
objects.add(new GameObjectDef("Portal", "This will lead you out", "Exit", "Examine", 1, 2, 2, 0, "portal", i++));//blood altar
objects.add(new GameObjectDef("Portal", "This will lead you out", "Exit", "Examine", 1, 2, 2, 0, "portal", i++));//Runeessence portal
objects.add(new GameObjectDef("Raw Essence", "A pile of raw essence", "Mine", "Examine", 1, 8, 8, 0, "essencemine", i++));//rune essence mine1226
objects.add(new GameObjectDef("Raw Essence", "A pile of raw essence", "Mine", "Examine", 1, 8, 8, 0, "essencemine", i++));//rune essence mine1227
objects.add(new GameObjectDef("Portal", "This portal helps you navigate the maze.", "Take", "Examine", 1, 1, 1, 0, "portal", i++));//Runeessence portal 1228
objects.add(new GameObjectDef("Portal", "This portal helps you navigate the maze.", "Take", "Examine", 1, 1, 1, 0, "portal", i++));//Runeessence portal
objects.add(new GameObjectDef("Portal", "This portal helps you navigate the maze.", "Take", "Examine", 1, 1, 1, 0, "portal", i++));//Runeessence portal
objects.add(new GameObjectDef("Portal", "This portal helps you navigate the maze.", "Take", "Examine", 1, 1, 1, 0, "portal", i++));//Runeessence portal
objects.add(new GameObjectDef("Portal", "This portal helps you navigate the maze.", "Take", "Examine", 1, 1, 1, 0, "portal", i++));//Runeessence portal
objects.add(new GameObjectDef("Portal", "This portal helps you navigate the maze.", "Take", "Examine", 1, 1, 1, 0, "portal", i++));//Runeessence portal
objects.add(new GameObjectDef("Portal", "This portal helps you navigate the maze.", "Take", "Examine", 1, 1, 1, 0, "portal", i++));//Runeessence portal
objects.add(new GameObjectDef("Portal", "This portal helps you navigate the maze.", "Take", "Examine", 1, 1, 1, 0, "portal", i++));//Runeessence portal
}
}
......
......@@ -115,6 +115,7 @@ public class Config {
public static boolean S_LENIENT_CONTACT_DETAILS = false;
public static boolean S_WANT_FATIGUE = true;
public static boolean S_WANT_CUSTOM_SPRITES = false;
public static boolean S_WANT_CUSTOM_LANDSCAPE = false;
public static boolean S_WANT_PLAYER_COMMANDS = false;
public static boolean S_WANT_PETS = false;
public static int S_MAX_WALKING_SPEED = 1;
......@@ -123,6 +124,7 @@ public class Config {
public static boolean S_FISHING_SPOTS_DEPLETABLE = false;
public static boolean S_PROPER_MAGIC_TREE_NAME = false;
public static void set(String key, Object value) {
prop.setProperty(key, value.toString());
}
......
......@@ -744,7 +744,7 @@ public class PacketHandler {
int wantDropX, wantExpInfo, wantWoodcuttingGuild, wantFixedOverheadChat, wantPets, showUnidentifiedHerbNames;
int wantDecanting, wantCertsToBank, wantCustomRankDisplay, wantRightClickBank, wantPlayerCommands;
int getFPS, wantEmail, wantRegistrationLimit, allowResize, lenientContactDetails, wantFatigue, wantCustomSprites;
int fishingSpotsDepletable, properMagicTreeName, wantRunecrafting;
int fishingSpotsDepletable, properMagicTreeName, wantRunecrafting, wantCustomLandscape;
String logoSpriteID;
if (!mc.gotInitialConfigs) {
......@@ -808,6 +808,7 @@ public class PacketHandler {
fishingSpotsDepletable = this.getClientStream().getUnsignedByte(); //58
properMagicTreeName = this.getClientStream().getUnsignedByte(); //59
wantRunecrafting = this.getClientStream().getUnsignedByte(); //60
wantCustomLandscape = this.getClientStream().getUnsignedByte(); //61
} else {
serverName = packetsIncoming.readString(); // 1
serverNameWelcome = packetsIncoming.readString(); // 2
......@@ -869,6 +870,7 @@ public class PacketHandler {
fishingSpotsDepletable = packetsIncoming.getUnsignedByte(); //58
properMagicTreeName = packetsIncoming.getUnsignedByte(); //59
wantRunecrafting = packetsIncoming.getUnsignedByte(); //60
wantCustomLandscape = packetsIncoming.getUnsignedByte(); //61
}
if (Config.DEBUG) {
......@@ -932,7 +934,8 @@ public class PacketHandler {
"\nS_WANT_QUEST_STARTED_INDICATOR " + wantQuestStartedIndicator + // 57
"\nS_FISHING_SPOTS_DEPLETABLE " + fishingSpotsDepletable + // 58
"\nS_PROPER_MAGIC_TREE_NAME " + properMagicTreeName +// 59
"\nS_WANT_RUNECRAFTING " // 59
"\nS_WANT_RUNECRAFTING " + wantRunecrafting +// 60
"\nS_WANT_CUSTOM_LANDSCAPE " + wantCustomLandscape// 61
);
}
......@@ -998,6 +1001,7 @@ public class PacketHandler {
props.setProperty("S_FISHING_SPOTS_DEPLETABLE", fishingSpotsDepletable == 1 ? "true" : "false"); //58
props.setProperty("S_PROPER_MAGIC_TREE_NAME", properMagicTreeName == 1 ? "true" : "false"); //59
props.setProperty("S_WANT_RUNECRAFTING", wantRunecrafting == 1 ? "true" : "false"); //60
props.setProperty("S_WANT_CUSTOM_LANDSCAPE", wantCustomLandscape == 1 ? "true" : "false"); //61
Config.updateServerConfiguration(props);
......
......@@ -75,7 +75,10 @@ public final class World {
sectors = new Sector[4];
try {
tileArchive = new ZipFile(new File(Config.F_CACHE_DIR + File.separator + "Landscape.orsc"));
if (Config.S_WANT_CUSTOM_LANDSCAPE)
tileArchive = new ZipFile(new File(Config.F_CACHE_DIR + File.separator + "Custom_Landscape.orsc"));
else
tileArchive = new ZipFile(new File(Config.F_CACHE_DIR + File.separator + "Authentic_Landscape.orsc"));
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
......
......@@ -9108,7 +9108,7 @@ public final class mudclient implements Runnable {
}
yOffset += 13;
}
yOffset -= 2;
this.getSurface().drawLineHoriz(x, yOffset-7, width, 0);
heightMargin = yOffset + 8;
......
......@@ -106,6 +106,8 @@
<entry key = "looted_chests_stuck">true</entry> <!-- MODIFIED -->
<entry key = "want_discord_updates">false</entry>
<entry key = "discord_webhook_url">null</entry>
<entry key = "want_runecrafting">false</entry>
<entry key = "custom_landscape">false</entry>
<!-- Bank -->
<entry key = "right_click_bank">true</entry> <!-- MODIFIED -->
......
......@@ -106,6 +106,8 @@
<entry key = "looted_chests_stuck">true</entry> <!-- MODIFIED -->
<entry key = "want_discord_updates">false</entry>
<entry key = "discord_webhook_url">null</entry>
<entry key = "want_runecrafting">false</entry>
<entry key = "custom_landscape">false</entry>
<!-- Bank -->
<entry key = "right_click_bank">true</entry> <!-- MODIFIED -->
......
......@@ -106,6 +106,8 @@
<entry key = "looted_chests_stuck">false</entry>
<entry key = "want_discord_updates">false</entry>
<entry key = "discord_webhook_url">null</entry>
<entry key = "want_runecrafting">false</entry>
<entry key = "custom_landscape">false</entry>
<!-- Bank -->
<entry key = "right_click_bank">true</entry> <!-- MODIFIED -->
......
package com.openrsc.server.plugins.misc;
import com.mysql.jdbc.Util;
import com.openrsc.server.model.Point;
import com.openrsc.server.model.entity.GameObject;
import com.openrsc.server.model.entity.player.Player;
import com.openrsc.server.plugins.listeners.action.ObjectActionListener;
import com.openrsc.server.plugins.listeners.executive.ObjectActionExecutiveListener;
import com.openrsc.server.util.rsc.DataConversions;
import javax.swing.text.Utilities;
import java.util.ArrayList;
public class ExitPortal implements ObjectActionListener, ObjectActionExecutiveListener {
ArrayList<Point> level1Portals;
ArrayList<Point> level2Portals;
ArrayList<Point> level3Portals;
public ExitPortal() {
this.initPortals();
}
private void initPortals() {
this.level1Portals = new ArrayList<>();
this.level2Portals = new ArrayList<>();
this.level3Portals = new ArrayList<>();
this.level1Portals.add(new Point(825, 67));
this.level1Portals.add(new Point(836, 76));
this.level1Portals.add(new Point(843, 79));
this.level1Portals.add(new Point(849, 83));
this.level1Portals.add(new Point(859, 79));
this.level2Portals.addAll(level1Portals);
this.level2Portals.add(new Point(835, 71));
this.level2Portals.add(new Point(839, 75));
this.level2Portals.add(new Point(851, 60));
this.level3Portals.addAll(level2Portals);
this.level3Portals.add(new Point(842, 55));
this.level3Portals.add(new Point(830, 57));
this.level3Portals.add(new Point(829, 64));
this.level3Portals.add(new Point(823, 51));
}
@Override
public boolean blockObjectAction(GameObject obj, String command, Player player){
public boolean blockObjectAction(GameObject obj, String command, Player player) {
return obj.getGameObjectDef().getObjectModel().equalsIgnoreCase("portal");
}
......@@ -18,58 +52,88 @@ public class ExitPortal implements ObjectActionListener, ObjectActionExecutiveLi
if (command.equalsIgnoreCase("exit")) {
switch (obj.getID()) {
case 1214: //air altar
player.teleport(305,594,false);
player.teleport(305, 594, false);
break;
case 1215: //mind altar
player.teleport(298,441,false);
player.teleport(298, 441, false);
break;
case 1216://water altar
player.teleport(148,683,false);
player.teleport(148, 683, false);
break;
case 1217://earth altar
player.teleport(63,467,false);
player.teleport(63, 467, false);
break;
case 1218://fire altar
player.teleport(53,634,false);
player.teleport(53, 634, false);
break;
case 1219://body altar
player.teleport(260,502,false);
player.teleport(260, 502, false);
break;
case 1220://cosmic altar
player.teleport(104,3566,false);
player.teleport(104, 3566, false);
break;
case 1221://chaos altar
player.teleport(236,376,false);
player.teleport(236, 376, false);
break;
case 1222://nature altar
player.teleport(393,803,false);
player.teleport(393, 803, false);
break;
case 1223://law altar
player.teleport(410,537,false);
player.teleport(410, 537, false);
break;
case 1224://death altar
player.teleport(0,0,false);
player.teleport(0, 0, false);
break;
case 1225://blood altar
player.teleport(0,0,false);
player.teleport(0, 0, false);
break;
case 1226://rune essence mine
{
if (player.getCache().hasKey("essence_entrance"))
{
if (player.getCache().hasKey("essence_entrance")) {
if (player.getCache().getInt("essence_entrance") == 0) {
player.teleport(101,523,false);
player.teleport(101, 523, false);
} else {
player.teleport(222,3517,false);
player.teleport(222, 3517, false);
}
player.getCache().remove("essence_entrance");
}
else //shouldn't happen unless a gm teleports to essence
player.teleport(101,523,false);
} else //shouldn't happen unless a gm teleports to essence
player.teleport(101, 523, false);
}
break;
}
} else if (command.equalsIgnoreCase("take")) {
int rand = 0;
switch (obj.getID()) {
case 1228: //chaos altar maze begin
player.teleport(835, 71, false);
break;
case 1229: //chaos altar maze begin
player.teleport(825, 76, false);
break;
case 1230: //chaos altar maze begin
player.teleport(842, 55, false);
break;
case 1231: //chaos altar maze begin
player.teleport(819, 51, false);
break;
case 1232: //chaos altar maze begin
player.teleport(859, 51, false);
break;
case 1233: //level1 random wrong portal
rand = DataConversions.random(1,level1Portals.size()) - 1;
player.teleport(level1Portals.get(rand).getX(),level1Portals.get(rand).getY());
break;
case 1234: //level2 random wrong portal
rand = DataConversions.random(1,level2Portals.size()) - 1;
player.teleport(level2Portals.get(rand).getX(),level2Portals.get(rand).getY());
break;
case 1235: //level3 random wrong portal
rand = DataConversions.random(1,level3Portals.size()) - 1;
player.teleport(level3Portals.get(rand).getX(),level3Portals.get(rand).getY());
break;
case 1236: //exit portal at the altar
break;
}
}
}
}
......@@ -149,7 +149,7 @@ public class Runecrafting implements ObjectActionListener, ObjectActionExecutive
p.teleport(839,26,false);
break;
case CHAOS_TALISMAN:
p.teleport(934,14,false);
p.teleport(826,90,false);
break;
case NATURE_TALISMAN:
p.teleport(787,29,false);
......
......@@ -106,7 +106,8 @@
<entry key = "looted_chests_stuck">true</entry> <!-- MODIFIED -->
<entry key = "want_discord_updates">false</entry>
<entry key = "discord_webhook_url">null</entry>
<entry key = "want_runecrafting">true</entry>
<entry key = "custom_landscape">true</entry>
<!-- Bank -->
<entry key = "right_click_bank">true</entry> <!-- MODIFIED -->
<entry key = "want_custom_banks">true</entry> <!-- MODIFIED -->
......
......@@ -106,6 +106,8 @@
<entry key = "looted_chests_stuck">false</entry>
<entry key = "want_discord_updates">false</entry>
<entry key = "discord_webhook_url">null</entry>
<entry key = "want_runecrafting">false</entry>
<entry key = "custom_landscape">false</entry>
<!-- Bank -->
<entry key = "right_click_bank">false</entry>
......
......@@ -237,6 +237,7 @@ public final class Constants {
public static boolean FIX_OVERHEAD_CHAT = false;
public static boolean WANT_FATIGUE = true;
public static boolean WANT_CUSTOM_SPRITES = false;
public static boolean WANT_CUSTOM_LANDSCAPE = false;
public static boolean PLAYER_COMMANDS = false;
public static boolean WANT_PETS = false;
public static boolean AUTO_SERVER_RESTART = false;
......@@ -369,6 +370,7 @@ public final class Constants {
MESSAGE_FULL_INVENTORY = Boolean.parseBoolean(props.getProperty("message_full_inventory"));
WANT_FATIGUE = Boolean.parseBoolean(props.getProperty("want_fatigue"));
WANT_CUSTOM_SPRITES = Boolean.parseBoolean(props.getProperty("custom_sprites"));
WANT_CUSTOM_LANDSCAPE = Boolean.parseBoolean(props.getProperty("custom_landscape"));
WANT_PETS = Boolean.parseBoolean(props.getProperty("want_pets"));
SHOW_UNIDENTIFIED_HERB_NAMES = Boolean.parseBoolean(props.getProperty("show_unidentified_herb_names"));
WANT_QUEST_STARTED_INDICATOR = Boolean.parseBoolean(props.getProperty("want_quest_started_indicator"));
......
......@@ -141,9 +141,12 @@ public class WorldLoader {
final long start = System.currentTimeMillis();
try {
if (Constants.GameServer.MEMBER_WORLD) {
tileArchive = new ZipFile(new File("./conf/server/data/P2PLandscape.rscd")); // Members landscape
if (Constants.GameServer.WANT_CUSTOM_LANDSCAPE)
tileArchive = new ZipFile(new File("./conf/server/data/Custom_P2PLandscape.orsc")); // Members landscape
else
tileArchive = new ZipFile(new File("./conf/server/data/Authentic_P2PLandscape.orsc")); // Members landscape
} else {
tileArchive = new ZipFile(new File("./conf/server/data/F2PLandscape.rscd")); // Free landscape
tileArchive = new ZipFile(new File("./conf/server/data/F2PLandscape.orsc")); // Free landscape
}
} catch (Exception e) {
LOGGER.catching(e);
......
......@@ -325,6 +325,9 @@ public abstract class Mob extends Entity {
else if (o.getID() == 1227)
if ((lowXDiff <= 2 || highXDiff <= 2) && (highYDiff <= 3))
return true;
else if (o.getID() >= 1228 && o.getID() <= 1232)
if ((lowXDiff <= 2 || highXDiff <= 2) && (lowYDiff <= 2 || highYDiff <= 2))
return true;
else if (o.getID() == 953)
{
......
......@@ -501,6 +501,7 @@ public class ActionSender {
LOGGER.info(FISHING_SPOTS_DEPLETABLE + " 58");
LOGGER.info(PROPER_MAGIC_TREE_NAME + " 59");
LOGGER.info(WANT_RUNECRAFTING + " 60");
LOGGER.info(WANT_CUSTOM_LANDSCAPE + " 61");
}
com.openrsc.server.net.PacketBuilder s = prepareServerConfigs();
ConnectionAttachment attachment = new ConnectionAttachment();
......@@ -577,6 +578,8 @@ public class ActionSender {
s.writeByte((byte) (FISHING_SPOTS_DEPLETABLE ? 1 : 0)); // 58
s.writeByte((byte) (PROPER_MAGIC_TREE_NAME ? 1 : 0)); // 59
s.writeByte((byte) (WANT_RUNECRAFTING ? 1 : 0)); //60
s.writeByte((byte) (WANT_CUSTOM_LANDSCAPE ? 1 : 0)); //61
return s;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment