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:
Ben Maher
2019-10-06 17:35:24 +01:00
committed by Daniel Ginovker
parent b327e34f8e
commit f777f24e53
10 changed files with 77 additions and 59 deletions
@@ -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();
}
}