diff --git a/.idea/misc.xml b/.idea/misc.xml
index fb83acef..048d263d 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index da4d252a..59d252af 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -6,9 +6,14 @@
-
+
+
-
+
+
+
+
+
@@ -23,7 +28,7 @@
-
+
@@ -39,7 +44,7 @@
-
+
@@ -82,8 +87,8 @@
-
+
@@ -106,7 +111,9 @@
diff --git a/2006Redone Server/src/redone/game/content/skills/core/Woodcutting.java b/2006Redone Server/src/redone/game/content/skills/core/Woodcutting.java
index c87991a0..1b994523 100644
--- a/2006Redone Server/src/redone/game/content/skills/core/Woodcutting.java
+++ b/2006Redone Server/src/redone/game/content/skills/core/Woodcutting.java
@@ -175,7 +175,7 @@ public class Woodcutting {
}
}
- public boolean hasAxe(Client player) {
+ public static boolean hasAxe(Client player) {
for (int i = 0; i < Axe_Settings.length; i++) {
if (player.getItemAssistant().playerHasItem(Axe_Settings[i][0]) || player.playerEquipment[player.playerWeapon] == Axe_Settings[i][0]) {
return true;
diff --git a/2006Redone Server/src/redone/game/items/Item.java b/2006Redone Server/src/redone/game/items/Item.java
index 650ea132..fe871ab9 100644
--- a/2006Redone Server/src/redone/game/items/Item.java
+++ b/2006Redone Server/src/redone/game/items/Item.java
@@ -88,7 +88,7 @@ public class Item {
6062 };
public static int rings[] = { 8082, 773, 1635, 1637, 1639, 1641, 1643,
1645, 2550, 2552, 2554, 2556, 2558, 2560, 2562, 2564, 2566, 2568,
- 2570, 2572, 4202, 4657, 6465, 6737, 6731, 6735, 6735, 6583, 6733 };
+ 2570, 2572, 4202, 4657, 6465, 6737, 6731, 6735, 6583, 6733 };
public static int body[] = { 7608, 2520, 430, 7362, 7364, 636, 638, 640,
642, 644, 8064, 426, 430, 1005, 1757, 7592, 8031, 8027, 6617, 8019,
8014, 8002, 7376, 544, 7372, 7370, 577, 7974, 7970, 7965, 7961,
diff --git a/2006Redone Server/src/redone/game/npcs/NpcHandler.java b/2006Redone Server/src/redone/game/npcs/NpcHandler.java
index f772435e..9e8f947e 100644
--- a/2006Redone Server/src/redone/game/npcs/NpcHandler.java
+++ b/2006Redone Server/src/redone/game/npcs/NpcHandler.java
@@ -935,7 +935,7 @@ public class NpcHandler {
break;
}
if (Misc.random(1, 256) == 1) {
- int level = npcs[i].combatLevel;
+ int level = getNpcListCombat(npcs[i].npcType);
if (level >= 2 && level <= 24) // easy
Server.itemHandler.createGroundItem(c, 2677, npcs[i].absX, npcs[i].absY, 1, c.playerId);
else if (level <= 40) // easy → medium
@@ -944,8 +944,8 @@ public class NpcHandler {
Server.itemHandler.createGroundItem(c, 2678, npcs[i].absX, npcs[i].absY, 1, c.playerId);
else if (level <= 150) // medium → hard
Server.itemHandler.createGroundItem(c, 2678 + Misc.random(0, 1), npcs[i].absX, npcs[i].absY, 1, c.playerId);
- else // hard
- Server.itemHandler.createGroundItem(c, 2678 + Misc.random(0, 1), npcs[i].absX, npcs[i].absY, 1, c.playerId);
+ else if (level > 150)// hard
+ Server.itemHandler.createGroundItem(c, 2679, npcs[i].absX, npcs[i].absY, 1, c.playerId);
}
}
}
@@ -1387,16 +1387,10 @@ public class NpcHandler {
token = token.trim();
token2 = line.substring(spot + 1);
token2 = token2.trim();
- token2_2 = token2.replaceAll("\t\t", "\t");
- token2_2 = token2_2.replaceAll("\t\t", "\t");
- token2_2 = token2_2.replaceAll("\t\t", "\t");
- token2_2 = token2_2.replaceAll("\t\t", "\t");
- token2_2 = token2_2.replaceAll("\t\t", "\t");
+ token2_2 = token2.replaceAll("\t+", "\t");
token3 = token2_2.split("\t");
if (token.equals("npc")) {
- newNPCList(Integer.parseInt(token3[0]), token3[1],
- Integer.parseInt(token3[2]),
- Integer.parseInt(token3[3]));
+ newNPCList(Integer.parseInt(token3[0]), token3[1], Integer.parseInt(token3[2]), Integer.parseInt(token3[3]));
}
} else {
if (line.equals("[ENDOFNPCLIST]")) {
diff --git a/2006Redone Server/src/redone/game/objects/impl/BrimhavenVines.java b/2006Redone Server/src/redone/game/objects/impl/BrimhavenVines.java
index 08f4b53f..444369c6 100644
--- a/2006Redone Server/src/redone/game/objects/impl/BrimhavenVines.java
+++ b/2006Redone Server/src/redone/game/objects/impl/BrimhavenVines.java
@@ -1,5 +1,6 @@
package redone.game.objects.impl;
+import redone.game.content.skills.core.Woodcutting;
import redone.game.players.Client;
/**
@@ -8,6 +9,11 @@ import redone.game.players.Client;
public class BrimhavenVines {
public static void handleBrimhavenVines(Client c, int objectType) {
+ if (!Woodcutting.hasAxe(c)) {
+ c.getActionSender().sendMessage("You will need an axe to chop through these!");
+ return;
+ }
+ c.getActionSender().sendMessage("You chop your way through the vines.");
switch (objectType) {
case 12987:
case 12986:
@@ -31,21 +37,23 @@ public class BrimhavenVines {
}
}
- public static void moveThroughVinesX(Client c, int originX, int x1, int y1,
- int x2, int y2) {
+ public static void moveThroughVinesX(Client c, int originX, int x1, int y1, int x2, int y2) {
+ int x = c.getX();
+ int y = c.getY();
if (c.absX <= originX) {
- c.getPlayerAssistant().walkTo(x1, y1);
+ c.getPlayerAssistant().movePlayer(x + x1, y + y1, 0);
} else {
- c.getPlayerAssistant().walkTo(x2, y2);
+ c.getPlayerAssistant().movePlayer(x + x2, y + y2, 0);
}
}
- public static void moveThroughVinesY(Client c, int originY, int x1, int y1,
- int x2, int y2) {
+ public static void moveThroughVinesY(Client c, int originY, int x1, int y1, int x2, int y2) {
+ int x = c.getX();
+ int y = c.getY();
if (c.absY <= originY) {
- c.getPlayerAssistant().walkTo(x1, y1);
+ c.getPlayerAssistant().movePlayer(x + x1, y + y1, 0);
} else {
- c.getPlayerAssistant().walkTo(x2, y2);
+ c.getPlayerAssistant().movePlayer(x + x2, y + y2, 0);
}
}
diff --git a/2006Redone Server/src/redone/net/packets/impl/Commands.java b/2006Redone Server/src/redone/net/packets/impl/Commands.java
index 836c2802..0ab2f2f2 100644
--- a/2006Redone Server/src/redone/net/packets/impl/Commands.java
+++ b/2006Redone Server/src/redone/net/packets/impl/Commands.java
@@ -522,6 +522,7 @@ public class Commands implements PacketType {
public static void developerCommands(Client player, String playerCommand, String[] arguments) {
switch (playerCommand.toLowerCase()) {
case "clicktotele":
+ case "ctt": // alias
player.clickToTele = !player.clickToTele;
player.getActionSender().sendMessage("Click to teleport: " + (player.clickToTele ? "Enabled" : "Disabled"));
break;
@@ -627,7 +628,7 @@ public class Commands implements PacketType {
}
} catch (Exception ಠ_ಠ) {}
break;
- case "cantAttack":
+ case "cantattack":
player.npcCanAttack = !player.npcCanAttack;
player.getActionSender().sendMessage("Npcs " + (player.npcCanAttack ? "can" : "can no longer") + " attack you.");
break;
diff --git a/2006Redone Server/src/redone/world/ItemHandler.java b/2006Redone Server/src/redone/world/ItemHandler.java
index 233ad624..b1540004 100644
--- a/2006Redone Server/src/redone/world/ItemHandler.java
+++ b/2006Redone Server/src/redone/world/ItemHandler.java
@@ -305,9 +305,7 @@ public int itemAmount(String name, int itemId, int itemX, int itemY) {
public ItemList ItemList[] = new ItemList[Constants.ITEM_LIMIT];
- public void newItemList(int ItemId, String ItemName,
- String ItemDescription, double ShopValue, double LowAlch,
- double HighAlch, int Bonuses[]) {
+ public void newItemList(int ItemId, String ItemName, String ItemDescription, double ShopValue, double LowAlch, double HighAlch, int Bonuses[]) {
// first, search for a free slot
int slot = -1;
for (int i = 0; i < 11740; i++) {
@@ -386,11 +384,7 @@ public int itemAmount(String name, int itemId, int itemX, int itemY) {
token = token.trim();
token2 = line.substring(spot + 1);
token2 = token2.trim();
- token2_2 = token2.replaceAll("\t\t", "\t");
- token2_2 = token2_2.replaceAll("\t\t", "\t");
- token2_2 = token2_2.replaceAll("\t\t", "\t");
- token2_2 = token2_2.replaceAll("\t\t", "\t");
- token2_2 = token2_2.replaceAll("\t\t", "\t");
+ token2_2 = token2.replaceAll("\t+", "\t");
token3 = token2_2.split("\t");
if (token.equals("item")) {
int[] Bonuses = new int[12];
@@ -412,8 +406,7 @@ public int itemAmount(String name, int itemId, int itemX, int itemY) {
if (line.equals("[ENDOFITEMLIST]")) {
try {
characterfile.close();
- } catch (IOException ioexception) {
- }
+ } catch (IOException ಠ_ಠ) {}
//return true;
}
}
diff --git a/CompiledServer/production/2006rebotted/redone/game/content/skills/core/Woodcutting.class b/CompiledServer/production/2006rebotted/redone/game/content/skills/core/Woodcutting.class
index 271fbbf0..63959b2c 100644
Binary files a/CompiledServer/production/2006rebotted/redone/game/content/skills/core/Woodcutting.class and b/CompiledServer/production/2006rebotted/redone/game/content/skills/core/Woodcutting.class differ