bunch o changes (#200)

* Create cluescrolls.txt

* tidy up

* fixup ::item command

* tidy up

* fixup fight caves checker
This commit is contained in:
Danial
2019-11-19 10:28:00 +13:00
committed by Daniel Ginovker
parent 925c91406d
commit 27b5f075bc
6 changed files with 454 additions and 62 deletions
@@ -89,12 +89,9 @@ public class SandwhichLady {
if (itemType == 5) {
player.getPlayerAssistant().closeAllWindows();
player.getItemAssistant().addItem(6965, 1);
player.getActionSender()
.sendMessage(
"Congratulations, you have completed the random event!");
player.getActionSender().sendMessage("Congratulations, you have completed the random event!");
} else {
player.getActionSender().sendMessage(
"You have chosen the wrong item!");
player.getActionSender().sendMessage("You have chosen the wrong item!");
RandomEventHandler.failEvent(player);
}
player.hasSandwhichLady = false;
@@ -104,9 +101,7 @@ public class SandwhichLady {
if (itemType == 6) {
player.getPlayerAssistant().closeAllWindows();
player.getItemAssistant().addItem(2309, 1);
player.getActionSender()
.sendMessage(
"Congratulations, you have completed the random event!");
player.getActionSender().sendMessage("Congratulations, you have completed the random event!");
} else {
player.getActionSender().sendMessage("You have chosen the wrong item!");
RandomEventHandler.failEvent(player);
@@ -33,22 +33,21 @@ public class Runecrafting {
if (c.absY <= yPos) {
Y = "North";
}
c.getActionSender().sendMessage(
"You need to travel " + Y + "-" + X + ".");
c.getActionSender().sendMessage("You need to travel " + Y + "-" + X + ".");
}
private enum Altars {
AIR_ALTAR(2452, new int[] { 1438, 5527 }, new int[] { 2842, 4829 }), MIND_ALTAR(
2453, new int[] { 1448, 5529 }, new int[] { 2793, 4828 }), WATER_ALTAR(
2454, new int[] { 1444, 5531 }, new int[] { 2713, 4836 }), EARTH_ALTAR(
2455, new int[] { 1440, 5535 }, new int[] { 2655, 4831 }), FIRE_ALTAR(
2456, new int[] { 1442, 5537 }, new int[] { 2577, 4845 }), BODY_ALTAR(
2457, new int[] { 1446, 5533 }, new int[] { 2521, 4834 }), COSMIC_ALTAR(
2458, new int[] { 1454, 5539 }, new int[] { 2162, 4833 }), CHAOS_ALTAR(
2461, new int[] { 1452, 5543 }, new int[] { 2268, 4842 }),
NATURE_ALTAR(2460, new int[] { 1462, 5541 }, new int[] { 2400, 4835 }), LAW_ALTAR(
2459, new int[] { 1458, 5545 }, new int[] { 2464, 4819 }), DEATH_ALTAR(
2462, new int[] { 1456, 5547 }, new int[] { 2208, 4831 });
AIR_ALTAR(2452, new int[] { 1438, 5527 }, new int[] { 2842, 4829 }),
MIND_ALTAR(2453, new int[] { 1448, 5529 }, new int[] { 2793, 4828 }),
WATER_ALTAR(2454, new int[] { 1444, 5531 }, new int[] { 2713, 4836 }),
EARTH_ALTAR(2455, new int[] { 1440, 5535 }, new int[] { 2655, 4831 }),
FIRE_ALTAR(2456, new int[] { 1442, 5537 }, new int[] { 2577, 4845 }),
BODY_ALTAR(2457, new int[] { 1446, 5533 }, new int[] { 2521, 4834 }),
COSMIC_ALTAR(2458, new int[] { 1454, 5539 }, new int[] { 2162, 4833 }),
CHAOS_ALTAR(2461, new int[] { 1452, 5543 }, new int[] { 2268, 4842 }),
NATURE_ALTAR(2460, new int[] { 1462, 5541 }, new int[] { 2400, 4835 }),
LAW_ALTAR(2459, new int[] { 1458, 5545 }, new int[] { 2464, 4819 }),
DEATH_ALTAR(2462, new int[] { 1456, 5547 }, new int[] { 2208, 4831 });
int objId;
int[] keys, loc;
@@ -81,50 +80,35 @@ public class Runecrafting {
c.nextChat = 0;
return;
}*/
if (a.getKeys()[1] == c.playerEquipment[c.playerHat]
|| a.getKeys()[0] == itemUse) {
c.getPlayerAssistant().movePlayer(a.getNewLoc()[0],
a.getNewLoc()[1], 0);
c.getActionSender().sendMessage(
"You enter the mysterious ruins.");
if (a.getKeys()[1] == c.playerEquipment[c.playerHat] || a.getKeys()[0] == itemUse) {
c.getPlayerAssistant().movePlayer(a.getNewLoc()[0], a.getNewLoc()[1], 0);
c.getActionSender().sendMessage("You enter the mysterious ruins.");
} else {
c.getActionSender().sendMessage(
"Nothing interesting happens.");
c.getActionSender().sendMessage("Nothing interesting happens.");
}
}
}
private enum Altar_Data {
AIR(2478, 1, 6, 556, new int[][] { { 11, 2 }, { 22, 3 }, { 33, 4 },
{ 44, 5 }, { 55, 6 }, { 66, 7 }, { 77, 8 }, { 88, 9 },
{ 99, 9 } }), MIND(2479, 5, 6, 558, new int[][] { { 14, 2 },
{ 28, 3 }, { 42, 4 }, { 56, 5 }, { 70, 6 }, { 84, 7 },
{ 98, 8 } }), WATER(2480, 9, 7, 555, new int[][] { { 19, 2 },
{ 38, 3 }, { 57, 4 }, { 76, 5 }, { 95, 6 } }), EARTH(2481, 9,
7, 557, new int[][] { { 26, 2 }, { 52, 3 }, { 78, 4 } }), FIRE(
2482, 14, 7, 554,
new int[][] { { 26, 2 }, { 52, 3 }, { 78, 4 } }), BODY(2483,
20, 8, 559, new int[][] { { 35, 2 }, { 70, 3 } }), COSMIC(2484,
27, 9, 564, new int[][] { { 59, 2 } }), CHAOS(2487, 35, 9, 562,
new int[][] { { 74, 2 } }), // was 2485, 35,
// 9, 562, new
// int[][]{{74,
// 2}}
NATURE(2486, 44, 10, 561, new int[][] { { 91, 2 } }), LAW(2485, 54, 11,
563, new int[][] { { 100, 2 } }), // was 2487, 54,
// 11, 563, new
// int[][]{{100,
// 2}})
DEATH(2488, 65, 13, 560, new int[][] { { 100, 2 } }), BLOOD(2489, 77,
15, 565, new int[][] { { 100, 2 } }), SOUL(2490, 90, 17, 566,
new int[][] { { 100, 2 } }), ASTRAL(17010, 40, 10, 9075,
new int[][] { { 82, 2 } });
AIR(2478, 1, 6, 556, new int[][] { { 11, 2 }, { 22, 3 }, { 33, 4 }, { 44, 5 }, { 55, 6 }, { 66, 7 }, { 77, 8 }, { 88, 9 }, { 99, 9 } }),
MIND(2479, 5, 6, 558, new int[][] { { 14, 2 }, { 28, 3 }, { 42, 4 }, { 56, 5 }, { 70, 6 }, { 84, 7 }, { 98, 8 } }),
WATER(2480, 9, 7, 555, new int[][] { { 19, 2 }, { 38, 3 }, { 57, 4 }, { 76, 5 }, { 95, 6 } }),
EARTH(2481, 9, 7, 557, new int[][] { { 26, 2 }, { 52, 3 }, { 78, 4 } }),
FIRE(2482, 14, 7, 554, new int[][] { { 26, 2 }, { 52, 3 }, { 78, 4 } }),
BODY(2483, 20, 8, 559, new int[][] { { 35, 2 }, { 70, 3 } }),
COSMIC(2484, 27, 9, 564, new int[][] { { 59, 2 } }),
CHAOS(2487, 35, 9, 562, new int[][] { { 74, 2 } }),
NATURE(2486, 44, 10, 561, new int[][] { { 91, 2 } }),
LAW(2485, 54, 11, 563, new int[][] {}),
DEATH(2488, 65, 13, 560, new int[][] {}),
BLOOD(2489, 77, 15, 565, new int[][] {}),
SOUL(2490, 90, 17, 566, new int[][] {}),
ASTRAL(17010, 40, 10, 9075, new int[][] { { 82, 2 } });
int altarID, levelReq, xp, rewardedRune;
int[][] multiRunes;
private Altar_Data(int altarID, int levelReq, int xp, int rewardedRune,
int[][] multiRunes) {
private Altar_Data(int altarID, int levelReq, int xp, int rewardedRune, int[][] multiRunes) {
this.altarID = altarID;
this.levelReq = levelReq;
this.xp = xp;
@@ -159,16 +143,14 @@ public class Runecrafting {
if (ad != null) {
RandomEventHandler.addRandom(c);
if (!SkillHandler.RUNECRAFTING) {
c.getActionSender().sendMessage(
"This skill is currently disabled.");
c.getActionSender().sendMessage("This skill is currently disabled.");
return false;
}
if (c.playerLevel[c.playerRunecrafting] >= ad.levelReq) {
getMultiSupport(obj);
c.startAnimation(791);
c.gfx100(186);
c.getActionSender().sendSound(SoundList.RUNECRAFTING, 100,
0);
c.getActionSender().sendSound(SoundList.RUNECRAFTING, 100, 0);
} else {
c.getActionSender().sendMessage("You need a runecrafting level of at least " + ad.levelReq + " to make runes here.");
}
@@ -900,7 +900,7 @@ public class NpcHandler {
|| npcs[i].npcType == 1532 // Barricade
|| npcs[i].npcType == 153 // Butterfly
|| PestControl.npcIsPCMonster(npcs[i].npcType)
|| FightCaves.isFightCaveNpc(npcs[i].npcType)) {
|| FightCaves.isFightCaveNpc(i)) {
// These npcs shouldn't have drops
return;
}
@@ -103,7 +103,7 @@ public class NPCDropsHandler {
return NPCDrops.pyrefiend;
} else if (npc.equals("aberrant_spectre")
|| npc.equals("aberrant_specter")
|| npc.equals("Aberant_specter")) {
|| npc.equals("aberant_specter")) {
return NPCDrops.abberantspectre;
} else if (npc.equals("earth_warrior")) {
return NPCDrops.earthwarrior;
@@ -526,7 +526,7 @@ public class Commands implements PacketType {
return;
}
int newItemID = Integer.parseInt(arguments[0]);
int newItemAmount = arguments[1] != null ? Integer.parseInt(arguments[1]) : 1;
int newItemAmount = arguments.length >= 2 ? Integer.parseInt(arguments[1]) : 1;
if (newItemID <= 10000 && newItemID >= 0) {
player.getItemAssistant().addItem(newItemID, newItemAmount);
if (player.isBusy()) {