mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
God capes, Ancient chamber teleport and axe array checks (#16)
* Revised shop re-stocking interval. * Revised shop re-stocking interval. * Updated character save directory. * Renamed new player save directory from accounts to characters. * Added inverse for random toggle, since it's the first thing I type every time. * Added god capes. * Re-implemented experiments. * Yell now looks a little cleaner. * Fixed outside of bounds exception on High scores, when player count doesn't meet threshold. * Cleaned up Magic Teleports class and added level requirements. * Fixed exit portal from ancient chamber. * Added check to ensure axe id isn't outside the bounds of expected axes.
This commit is contained in:
committed by
Daniel Ginovker
parent
b327e34f8e
commit
f777f24e53
@@ -4,7 +4,8 @@
|
||||
// North -2 face = doorX +1 face = -1
|
||||
// West -3 face = doorY +1 face = -2
|
||||
|
||||
// doorX doorY Height Face State //0 closed, 1 open
|
||||
// doorX doorY Height Face State //0 closed, 1 open
|
||||
door = 2474 3233 9312 0 1 //Ancient temple portal
|
||||
door = 3312 3235 0 0 0 //duel arena gate
|
||||
door = 3312 3234 0 0 0 //duel arena gate
|
||||
door = 3253 3266 0 0 0 //cow gate
|
||||
|
||||
@@ -1018,4 +1018,5 @@
|
||||
5244 3684 3476 1 0 0
|
||||
5244 3656 3514 0 1 0
|
||||
1530 3079 3497 3 0 0
|
||||
12348 3207 3217 1 0 0
|
||||
12348 3207 3217 1 0 0
|
||||
2474 3233 9312 0 1 0
|
||||
@@ -7,21 +7,22 @@ import redone.util.Misc;
|
||||
|
||||
public class MagicTeleports {
|
||||
|
||||
public static final int AIR_RUNE = 556, FIRE_RUNE = 554, WATER_RUNE = 555,
|
||||
EARTH_RUNE = 557, LAW_RUNE = 563, BLOOD_RUNE = 565,
|
||||
public static final int AIR_RUNE = 556, FIRE_RUNE = 554,
|
||||
WATER_RUNE = 555, EARTH_RUNE = 557,
|
||||
LAW_RUNE = 563, BLOOD_RUNE = 565,
|
||||
SOUL_RUNE = 566, BANANA = 1963;
|
||||
|
||||
public static void handleLoginText(Client player) {
|
||||
player.getPlayerAssistant().sendFrame126("Varrock Teleport", 1300);
|
||||
player.getPlayerAssistant().sendFrame126("Lumbridge Teleport", 1325);
|
||||
player.getPlayerAssistant().sendFrame126("Falador Teleport", 1350);
|
||||
player.getPlayerAssistant().sendFrame126("Camelot Teleport", 1382);
|
||||
player.getPlayerAssistant().sendFrame126("Ardougne Teleport", 1415);
|
||||
player.getPlayerAssistant().sendFrame126("Paddewwa Teleport", 13037);
|
||||
player.getPlayerAssistant().sendFrame126("Senntisten Teleport", 13047);
|
||||
player.getPlayerAssistant().sendFrame126("Kharyrll Teleport", 13055);
|
||||
player.getPlayerAssistant().sendFrame126("Lassar Teleport", 13063);
|
||||
player.getPlayerAssistant().sendFrame126("Dareeyak Teleport", 13071);
|
||||
player.getPlayerAssistant().sendFrame126("Level 25: Varrock Teleport", 1300);
|
||||
player.getPlayerAssistant().sendFrame126("Level 31: Lumbridge Teleport", 1325);
|
||||
player.getPlayerAssistant().sendFrame126("Level 37: Falador Teleport", 1350);
|
||||
player.getPlayerAssistant().sendFrame126("Level 45: Camelot Teleport", 1382);
|
||||
player.getPlayerAssistant().sendFrame126("Level 51: Ardougne Teleport", 1415);
|
||||
player.getPlayerAssistant().sendFrame126("Level 54: Paddewwa Teleport", 13037);
|
||||
player.getPlayerAssistant().sendFrame126("Level 60: Senntisten Teleport", 13047);
|
||||
player.getPlayerAssistant().sendFrame126("Level 66: Kharyrll Teleport", 13055);
|
||||
player.getPlayerAssistant().sendFrame126("Level 72: Lassar Teleport", 13063);
|
||||
player.getPlayerAssistant().sendFrame126("Level 78: Dareeyak Teleport", 13071);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,7 +95,7 @@ public class MagicTeleports {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void paddewwaTeleport(Client player) {
|
||||
public static void paddewwaTeleport(Client player) {
|
||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||
return;
|
||||
}
|
||||
@@ -196,7 +197,7 @@ public class MagicTeleports {
|
||||
player.getPlayerAssistant().addSkillXP(82, player.playerMagic);
|
||||
}
|
||||
|
||||
public static void dareeyakTeleport(Client player) {
|
||||
public static void dareeyakTeleport(Client player) {
|
||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||
return;
|
||||
}
|
||||
@@ -278,7 +279,7 @@ public class MagicTeleports {
|
||||
player.getPlayerAssistant().addSkillXP(100, player.playerMagic);
|
||||
}
|
||||
|
||||
public static void ghorrockTeleport(Client player) {
|
||||
public static void ghorrockTeleport(Client player) {
|
||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||
return;
|
||||
}
|
||||
@@ -305,7 +306,7 @@ public class MagicTeleports {
|
||||
player.getPlayerAssistant().addSkillXP(106, player.playerMagic);
|
||||
}
|
||||
|
||||
public static void varrockTeleport(Client player) {
|
||||
public static void varrockTeleport(Client player) {
|
||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||
return;
|
||||
}
|
||||
@@ -334,7 +335,7 @@ public class MagicTeleports {
|
||||
player.getPlayerAssistant().addSkillXP(35, player.playerMagic);
|
||||
}
|
||||
|
||||
public static void lumbridgeTeleport(Client player) {
|
||||
public static void lumbridgeTeleport(Client player) {
|
||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||
return;
|
||||
}
|
||||
@@ -363,7 +364,7 @@ public class MagicTeleports {
|
||||
player.getPlayerAssistant().addSkillXP(35, player.playerMagic);
|
||||
}
|
||||
|
||||
public static void faladorTeleport(Client player) {
|
||||
public static void faladorTeleport(Client player) {
|
||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||
return;
|
||||
}
|
||||
@@ -392,7 +393,7 @@ public class MagicTeleports {
|
||||
player.getPlayerAssistant().addSkillXP(48, player.playerMagic);
|
||||
}
|
||||
|
||||
public static void camelotTeleport(Client player) {
|
||||
public static void camelotTeleport(Client player) {
|
||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||
return;
|
||||
}
|
||||
@@ -419,7 +420,7 @@ public class MagicTeleports {
|
||||
player.getPlayerAssistant().addSkillXP(55.5, player.playerMagic);
|
||||
}
|
||||
|
||||
public static void ardougneTeleport(Client player) {
|
||||
public static void ardougneTeleport(Client player) {
|
||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||
return;
|
||||
}
|
||||
@@ -446,7 +447,7 @@ public class MagicTeleports {
|
||||
player.getPlayerAssistant().addSkillXP(61, player.playerMagic);
|
||||
}
|
||||
|
||||
public static void watchTowerTeleport(Client player) {
|
||||
public static void watchTowerTeleport(Client player) {
|
||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||
return;
|
||||
}
|
||||
@@ -473,7 +474,7 @@ public class MagicTeleports {
|
||||
player.getPlayerAssistant().addSkillXP(68, player.playerMagic);
|
||||
}
|
||||
|
||||
public static void trollhiemTeleport(Client player) {
|
||||
public static void trollhiemTeleport(Client player) {
|
||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||
return;
|
||||
}
|
||||
@@ -500,7 +501,7 @@ public class MagicTeleports {
|
||||
player.getPlayerAssistant().addSkillXP(68, player.playerMagic);
|
||||
}
|
||||
|
||||
public static void apeAtollTeleport(Client player) {
|
||||
public static void apeAtollTeleport(Client player) {
|
||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -69,14 +69,22 @@ public class Woodcutting {
|
||||
CycleEventHandler.getSingleton().addEvent(player, new CycleEvent() {
|
||||
@Override
|
||||
public void execute(CycleEventContainer container) {
|
||||
if (player.isWoodcutting) {
|
||||
try {
|
||||
player.startAnimation(Axe_Settings[a][3]);
|
||||
} catch (ArrayIndexOutOfBoundsException exception) {
|
||||
System.out.println("LOL this happend again: " + exception);
|
||||
if (player.isWoodcutting)
|
||||
{
|
||||
if ((a >= 0) && (a < Axe_Settings.length))
|
||||
{
|
||||
try
|
||||
{
|
||||
player.startAnimation(Axe_Settings[a][3]);
|
||||
} catch (ArrayIndexOutOfBoundsException exception)
|
||||
{
|
||||
System.out.println("LOL this happend again: " + exception);
|
||||
}
|
||||
player.getActionSender().sendSound(SoundList.TREE_CUTTING, 100, 0);
|
||||
}
|
||||
player.getActionSender().sendSound(SoundList.TREE_CUTTING, 100, 0);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
container.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class Doors {
|
||||
|
||||
public static Doors getSingleton() {
|
||||
if (singleton == null) {
|
||||
singleton = new Doors("./data/doors.txt");
|
||||
singleton = new Doors(System.getProperty("user.dir") + "/data/doors.txt");
|
||||
}
|
||||
return singleton;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,6 @@ public class DoubleDoors {
|
||||
|
||||
if (doorClicked == null) {
|
||||
Server.objectHandler.placeObject(new Objects(-1, x, y, z, 0, 0, 0));
|
||||
System.out.println("Removed null door for poor lad");
|
||||
return true;
|
||||
}
|
||||
if (doorClicked.doorId > 12000) {
|
||||
|
||||
@@ -190,7 +190,7 @@ public class ObjectsActions {
|
||||
case 6707:
|
||||
player.getBarrows().useStairs();
|
||||
break;
|
||||
|
||||
|
||||
case 10284:
|
||||
player.getBarrows().useChest();
|
||||
break;
|
||||
@@ -2605,6 +2605,18 @@ public class ObjectsActions {
|
||||
player.getPlayerAssistant().walkTo(0, -1);
|
||||
}
|
||||
break;
|
||||
case 2873:
|
||||
if (player.getItemAssistant().hasFreeSlots(1))
|
||||
player.getItemAssistant().addItem(2412, 1);
|
||||
break;
|
||||
case 2874:
|
||||
if (player.getItemAssistant().hasFreeSlots(1))
|
||||
player.getItemAssistant().addItem(2414, 1);
|
||||
break;
|
||||
case 2875:
|
||||
if (player.getItemAssistant().hasFreeSlots(1))
|
||||
player.getItemAssistant().addItem(2413, 1);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import redone.util.Misc;
|
||||
public class Climbing {
|
||||
|
||||
private static final int CLIMB_UP = 828, CLIMB_DOWN = CLIMB_UP;
|
||||
|
||||
|
||||
public static void handleClimbing(final Client client) {
|
||||
if (System.currentTimeMillis() - client.climbDelay < 1200) {
|
||||
return;
|
||||
@@ -40,7 +40,7 @@ public class Climbing {
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
|
||||
|
||||
public static void processClimbing(Client client) {
|
||||
switch (client.objectId) {
|
||||
case 9584:
|
||||
@@ -48,16 +48,16 @@ public class Climbing {
|
||||
client.getPlayerAssistant().movePlayer(2933, 3282, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 272:
|
||||
client.getPlayerAssistant().movePlayer(client.absX, client.absY, 1);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
case 273:
|
||||
client.getPlayerAssistant().movePlayer(client.absX, client.absY, 0);
|
||||
break;
|
||||
|
||||
|
||||
case 245:
|
||||
if (client.objectY == 3224) {
|
||||
client.getPlayerAssistant().movePlayer(client.absX, client.absY+2, 2);
|
||||
@@ -297,6 +297,7 @@ public class Climbing {
|
||||
break;
|
||||
|
||||
case 6434:
|
||||
case 5167:
|
||||
UseOther.useDown(client, client.objectId);
|
||||
break;
|
||||
case 1767:
|
||||
@@ -321,15 +322,7 @@ public class Climbing {
|
||||
client.getActionSender().sendMessage("You climb down.");
|
||||
|
||||
break;
|
||||
case 5167:
|
||||
if (Constants.EXPERIMENTS) {
|
||||
UseOther.useDown(client, client.objectId);
|
||||
} else {
|
||||
client.getActionSender().sendMessage(
|
||||
"Experiments are currently disabled.");
|
||||
}
|
||||
break;
|
||||
case 2147:
|
||||
case 2147:
|
||||
client.getPlayerAssistant().movePlayer(3104, 9576, 0);
|
||||
client.startAnimation(827);
|
||||
client.getActionSender().sendMessage("You climb down.");
|
||||
@@ -545,7 +538,7 @@ public class Climbing {
|
||||
client.getPlayerAssistant().movePlayer(3230, 3394, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 5096:
|
||||
client.getPlayerAssistant().movePlayer(2649, 9591, 0);
|
||||
break;
|
||||
@@ -667,7 +660,7 @@ public class Climbing {
|
||||
if (System.currentTimeMillis() - client.climbDelay < 1200) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
switch (client.heightLevel) {
|
||||
case -1:
|
||||
client.getPlayerAssistant().movePlayer(client.absX, client.absY, 0);
|
||||
@@ -754,7 +747,7 @@ public class Climbing {
|
||||
client.getDialogueHandler().sendOption2("Climb Up.", "Climb Down.");
|
||||
client.dialogueAction = 147;
|
||||
}
|
||||
|
||||
|
||||
private static void close(Client client, int actionButtonId) {
|
||||
if (actionButtonId == 9157) {
|
||||
client.getActionSender().sendMessage("You climb up.");
|
||||
@@ -766,7 +759,7 @@ public class Climbing {
|
||||
client.getPlayerAssistant().closeAllWindows();
|
||||
client.nextChat = 0;
|
||||
}
|
||||
|
||||
|
||||
public static void handleLadderButtons(Client client, int actionButtonId) {
|
||||
if (client.dialogueAction != 147) {
|
||||
return;
|
||||
@@ -791,5 +784,5 @@ public class Climbing {
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,9 @@ public class HighscoresHandler {
|
||||
}
|
||||
|
||||
public String getRank(int i, String sortBy) {
|
||||
if (players.size() <= i)
|
||||
return "Nobody";
|
||||
|
||||
switch (sortBy)
|
||||
{
|
||||
case "level":
|
||||
|
||||
@@ -98,6 +98,7 @@ public class Commands implements PacketType {
|
||||
player.startAnimation(404);
|
||||
break;
|
||||
case "randomtoggle":
|
||||
case "togglerandom":
|
||||
player.randomToggle = !player.randomToggle;
|
||||
message = player.randomToggle ? "You will now receive random events." : "You will no longer receieve random events.";
|
||||
player.getActionSender().sendMessage(message);
|
||||
@@ -147,7 +148,6 @@ public class Commands implements PacketType {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void donatorCommands(Client player, String playerCommand) {
|
||||
|
||||
}
|
||||
@@ -158,11 +158,11 @@ public class Commands implements PacketType {
|
||||
if (PlayerHandler.players[j] != null) {
|
||||
Client c2 = (Client)PlayerHandler.players[j];
|
||||
if (player.playerRights == 1) {
|
||||
c2.getActionSender().sendMessage("@blu@[Moderator]@bla@"+ Misc.optimizeText(player.playerName) +": " + Misc.optimizeText(playerCommand.substring(5)) +"");
|
||||
c2.getActionSender().sendMessage("@blu@[Moderator] @bla@"+ Misc.optimizeText(player.playerName) +": " + Misc.optimizeText(playerCommand.substring(5)) +"");
|
||||
} else if (player.playerRights == 2) {
|
||||
c2.getActionSender().sendMessage("@gre@[Administator]@bla@"+ Misc.optimizeText(player.playerName) +": " + Misc.optimizeText(playerCommand.substring(5)) +"");
|
||||
c2.getActionSender().sendMessage("@gre@[Administator] @bla@"+ Misc.optimizeText(player.playerName) +": " + Misc.optimizeText(playerCommand.substring(5)) +"");
|
||||
} else if (player.playerRights == 3) {
|
||||
c2.getActionSender().sendMessage("@red@[Owner]@bla@"+ Misc.optimizeText(player.playerName) +": " + Misc.optimizeText(playerCommand.substring(5)) +"");
|
||||
c2.getActionSender().sendMessage("@red@[Developer] @bla@"+ Misc.optimizeText(player.playerName) +": " + Misc.optimizeText(playerCommand.substring(5)) +"");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user