mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-07 08:39:07 +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
@@ -5,6 +5,7 @@
|
|||||||
// West -3 face = doorY +1 face = -2
|
// 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 3235 0 0 0 //duel arena gate
|
||||||
door = 3312 3234 0 0 0 //duel arena gate
|
door = 3312 3234 0 0 0 //duel arena gate
|
||||||
door = 3253 3266 0 0 0 //cow gate
|
door = 3253 3266 0 0 0 //cow gate
|
||||||
|
|||||||
@@ -1019,3 +1019,4 @@
|
|||||||
5244 3656 3514 0 1 0
|
5244 3656 3514 0 1 0
|
||||||
1530 3079 3497 3 0 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 class MagicTeleports {
|
||||||
|
|
||||||
public static final int AIR_RUNE = 556, FIRE_RUNE = 554, WATER_RUNE = 555,
|
public static final int AIR_RUNE = 556, FIRE_RUNE = 554,
|
||||||
EARTH_RUNE = 557, LAW_RUNE = 563, BLOOD_RUNE = 565,
|
WATER_RUNE = 555, EARTH_RUNE = 557,
|
||||||
|
LAW_RUNE = 563, BLOOD_RUNE = 565,
|
||||||
SOUL_RUNE = 566, BANANA = 1963;
|
SOUL_RUNE = 566, BANANA = 1963;
|
||||||
|
|
||||||
public static void handleLoginText(Client player) {
|
public static void handleLoginText(Client player) {
|
||||||
player.getPlayerAssistant().sendFrame126("Varrock Teleport", 1300);
|
player.getPlayerAssistant().sendFrame126("Level 25: Varrock Teleport", 1300);
|
||||||
player.getPlayerAssistant().sendFrame126("Lumbridge Teleport", 1325);
|
player.getPlayerAssistant().sendFrame126("Level 31: Lumbridge Teleport", 1325);
|
||||||
player.getPlayerAssistant().sendFrame126("Falador Teleport", 1350);
|
player.getPlayerAssistant().sendFrame126("Level 37: Falador Teleport", 1350);
|
||||||
player.getPlayerAssistant().sendFrame126("Camelot Teleport", 1382);
|
player.getPlayerAssistant().sendFrame126("Level 45: Camelot Teleport", 1382);
|
||||||
player.getPlayerAssistant().sendFrame126("Ardougne Teleport", 1415);
|
player.getPlayerAssistant().sendFrame126("Level 51: Ardougne Teleport", 1415);
|
||||||
player.getPlayerAssistant().sendFrame126("Paddewwa Teleport", 13037);
|
player.getPlayerAssistant().sendFrame126("Level 54: Paddewwa Teleport", 13037);
|
||||||
player.getPlayerAssistant().sendFrame126("Senntisten Teleport", 13047);
|
player.getPlayerAssistant().sendFrame126("Level 60: Senntisten Teleport", 13047);
|
||||||
player.getPlayerAssistant().sendFrame126("Kharyrll Teleport", 13055);
|
player.getPlayerAssistant().sendFrame126("Level 66: Kharyrll Teleport", 13055);
|
||||||
player.getPlayerAssistant().sendFrame126("Lassar Teleport", 13063);
|
player.getPlayerAssistant().sendFrame126("Level 72: Lassar Teleport", 13063);
|
||||||
player.getPlayerAssistant().sendFrame126("Dareeyak Teleport", 13071);
|
player.getPlayerAssistant().sendFrame126("Level 78: Dareeyak Teleport", 13071);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -94,7 +95,7 @@ public class MagicTeleports {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void paddewwaTeleport(Client player) {
|
public static void paddewwaTeleport(Client player) {
|
||||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -196,7 +197,7 @@ public class MagicTeleports {
|
|||||||
player.getPlayerAssistant().addSkillXP(82, player.playerMagic);
|
player.getPlayerAssistant().addSkillXP(82, player.playerMagic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void dareeyakTeleport(Client player) {
|
public static void dareeyakTeleport(Client player) {
|
||||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -278,7 +279,7 @@ public class MagicTeleports {
|
|||||||
player.getPlayerAssistant().addSkillXP(100, player.playerMagic);
|
player.getPlayerAssistant().addSkillXP(100, player.playerMagic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ghorrockTeleport(Client player) {
|
public static void ghorrockTeleport(Client player) {
|
||||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -305,7 +306,7 @@ public class MagicTeleports {
|
|||||||
player.getPlayerAssistant().addSkillXP(106, player.playerMagic);
|
player.getPlayerAssistant().addSkillXP(106, player.playerMagic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void varrockTeleport(Client player) {
|
public static void varrockTeleport(Client player) {
|
||||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -334,7 +335,7 @@ public class MagicTeleports {
|
|||||||
player.getPlayerAssistant().addSkillXP(35, player.playerMagic);
|
player.getPlayerAssistant().addSkillXP(35, player.playerMagic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void lumbridgeTeleport(Client player) {
|
public static void lumbridgeTeleport(Client player) {
|
||||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -363,7 +364,7 @@ public class MagicTeleports {
|
|||||||
player.getPlayerAssistant().addSkillXP(35, player.playerMagic);
|
player.getPlayerAssistant().addSkillXP(35, player.playerMagic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void faladorTeleport(Client player) {
|
public static void faladorTeleport(Client player) {
|
||||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -392,7 +393,7 @@ public class MagicTeleports {
|
|||||||
player.getPlayerAssistant().addSkillXP(48, player.playerMagic);
|
player.getPlayerAssistant().addSkillXP(48, player.playerMagic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void camelotTeleport(Client player) {
|
public static void camelotTeleport(Client player) {
|
||||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -419,7 +420,7 @@ public class MagicTeleports {
|
|||||||
player.getPlayerAssistant().addSkillXP(55.5, player.playerMagic);
|
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) {
|
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -446,7 +447,7 @@ public class MagicTeleports {
|
|||||||
player.getPlayerAssistant().addSkillXP(61, player.playerMagic);
|
player.getPlayerAssistant().addSkillXP(61, player.playerMagic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void watchTowerTeleport(Client player) {
|
public static void watchTowerTeleport(Client player) {
|
||||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -473,7 +474,7 @@ public class MagicTeleports {
|
|||||||
player.getPlayerAssistant().addSkillXP(68, player.playerMagic);
|
player.getPlayerAssistant().addSkillXP(68, player.playerMagic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void trollhiemTeleport(Client player) {
|
public static void trollhiemTeleport(Client player) {
|
||||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -500,7 +501,7 @@ public class MagicTeleports {
|
|||||||
player.getPlayerAssistant().addSkillXP(68, player.playerMagic);
|
player.getPlayerAssistant().addSkillXP(68, player.playerMagic);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void apeAtollTeleport(Client player) {
|
public static void apeAtollTeleport(Client player) {
|
||||||
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
if (System.currentTimeMillis() - player.lastCast < 5000) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,14 +69,22 @@ public class Woodcutting {
|
|||||||
CycleEventHandler.getSingleton().addEvent(player, new CycleEvent() {
|
CycleEventHandler.getSingleton().addEvent(player, new CycleEvent() {
|
||||||
@Override
|
@Override
|
||||||
public void execute(CycleEventContainer container) {
|
public void execute(CycleEventContainer container) {
|
||||||
if (player.isWoodcutting) {
|
if (player.isWoodcutting)
|
||||||
try {
|
{
|
||||||
player.startAnimation(Axe_Settings[a][3]);
|
if ((a >= 0) && (a < Axe_Settings.length))
|
||||||
} catch (ArrayIndexOutOfBoundsException exception) {
|
{
|
||||||
System.out.println("LOL this happend again: " + exception);
|
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();
|
container.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class Doors {
|
|||||||
|
|
||||||
public static Doors getSingleton() {
|
public static Doors getSingleton() {
|
||||||
if (singleton == null) {
|
if (singleton == null) {
|
||||||
singleton = new Doors("./data/doors.txt");
|
singleton = new Doors(System.getProperty("user.dir") + "/data/doors.txt");
|
||||||
}
|
}
|
||||||
return singleton;
|
return singleton;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ public class DoubleDoors {
|
|||||||
|
|
||||||
if (doorClicked == null) {
|
if (doorClicked == null) {
|
||||||
Server.objectHandler.placeObject(new Objects(-1, x, y, z, 0, 0, 0));
|
Server.objectHandler.placeObject(new Objects(-1, x, y, z, 0, 0, 0));
|
||||||
System.out.println("Removed null door for poor lad");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (doorClicked.doorId > 12000) {
|
if (doorClicked.doorId > 12000) {
|
||||||
|
|||||||
@@ -2605,6 +2605,18 @@ public class ObjectsActions {
|
|||||||
player.getPlayerAssistant().walkTo(0, -1);
|
player.getPlayerAssistant().walkTo(0, -1);
|
||||||
}
|
}
|
||||||
break;
|
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -297,6 +297,7 @@ public class Climbing {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 6434:
|
case 6434:
|
||||||
|
case 5167:
|
||||||
UseOther.useDown(client, client.objectId);
|
UseOther.useDown(client, client.objectId);
|
||||||
break;
|
break;
|
||||||
case 1767:
|
case 1767:
|
||||||
@@ -321,15 +322,7 @@ public class Climbing {
|
|||||||
client.getActionSender().sendMessage("You climb down.");
|
client.getActionSender().sendMessage("You climb down.");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 5167:
|
case 2147:
|
||||||
if (Constants.EXPERIMENTS) {
|
|
||||||
UseOther.useDown(client, client.objectId);
|
|
||||||
} else {
|
|
||||||
client.getActionSender().sendMessage(
|
|
||||||
"Experiments are currently disabled.");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2147:
|
|
||||||
client.getPlayerAssistant().movePlayer(3104, 9576, 0);
|
client.getPlayerAssistant().movePlayer(3104, 9576, 0);
|
||||||
client.startAnimation(827);
|
client.startAnimation(827);
|
||||||
client.getActionSender().sendMessage("You climb down.");
|
client.getActionSender().sendMessage("You climb down.");
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ public class HighscoresHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getRank(int i, String sortBy) {
|
public String getRank(int i, String sortBy) {
|
||||||
|
if (players.size() <= i)
|
||||||
|
return "Nobody";
|
||||||
|
|
||||||
switch (sortBy)
|
switch (sortBy)
|
||||||
{
|
{
|
||||||
case "level":
|
case "level":
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ public class Commands implements PacketType {
|
|||||||
player.startAnimation(404);
|
player.startAnimation(404);
|
||||||
break;
|
break;
|
||||||
case "randomtoggle":
|
case "randomtoggle":
|
||||||
|
case "togglerandom":
|
||||||
player.randomToggle = !player.randomToggle;
|
player.randomToggle = !player.randomToggle;
|
||||||
message = player.randomToggle ? "You will now receive random events." : "You will no longer receieve random events.";
|
message = player.randomToggle ? "You will now receive random events." : "You will no longer receieve random events.";
|
||||||
player.getActionSender().sendMessage(message);
|
player.getActionSender().sendMessage(message);
|
||||||
@@ -147,7 +148,6 @@ public class Commands implements PacketType {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void donatorCommands(Client player, String playerCommand) {
|
public static void donatorCommands(Client player, String playerCommand) {
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -158,11 +158,11 @@ public class Commands implements PacketType {
|
|||||||
if (PlayerHandler.players[j] != null) {
|
if (PlayerHandler.players[j] != null) {
|
||||||
Client c2 = (Client)PlayerHandler.players[j];
|
Client c2 = (Client)PlayerHandler.players[j];
|
||||||
if (player.playerRights == 1) {
|
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) {
|
} 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) {
|
} 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