diff --git a/2006Redone Server/data/logs/commands/andrew5.txt b/2006Redone Server/data/logs/commands/andrew5.txt new file mode 100644 index 00000000..23ca9e1d --- /dev/null +++ b/2006Redone Server/data/logs/commands/andrew5.txt @@ -0,0 +1,2 @@ +[2019/11/21] 18:52 andrew5 used command: bank +[2019/11/21] 19:04 andrew5 used command: bank diff --git a/2006Redone Server/data/logs/pking/killed/andrew5.txt b/2006Redone Server/data/logs/pking/killed/andrew5.txt new file mode 100644 index 00000000..708de148 --- /dev/null +++ b/2006Redone Server/data/logs/pking/killed/andrew5.txt @@ -0,0 +1 @@ +[2019/11/21] 19:51 andrew5 was killed by andrew44 absX: 3104 absY: 3898 diff --git a/2006Redone Server/src/redone/Constants.java b/2006Redone Server/src/redone/Constants.java index 0ba86f3a..f02649d0 100644 --- a/2006Redone Server/src/redone/Constants.java +++ b/2006Redone Server/src/redone/Constants.java @@ -17,7 +17,8 @@ public class Constants { public static int[] SIDEBARS = { 2423, 3917, 638, 3213, 1644, 5608, 1151, 18128, 5065, 5715, 2449, 904, 147, 962 }; public static boolean TUTORIAL_ISLAND = false, HOLIDAYS = true, - MEMBERS_ONLY = false, sendServerPackets = false, HALLOWEEN = false; + MEMBERS_ONLY = false, sendServerPackets = false, HALLOWEEN = false, + CLUES_ENABLED = false; public final static int HAT = 0, CAPE = 1, AMULET = 2, WEAPON = 3, CHEST = 4, SHIELD = 5, LEGS = 7, HANDS = 9, FEET = 10, RING = 12, diff --git a/2006Redone Server/src/redone/game/content/combat/CombatAssistant.java b/2006Redone Server/src/redone/game/content/combat/CombatAssistant.java index 52e3d0e2..a79164be 100644 --- a/2006Redone Server/src/redone/game/content/combat/CombatAssistant.java +++ b/2006Redone Server/src/redone/game/content/combat/CombatAssistant.java @@ -572,11 +572,6 @@ public class CombatAssistant { resetPlayerAttack(); return; } - if (NpcHandler.npcs[i].npcType == 134 || NpcHandler.npcs[i].npcType == 1267 || NpcHandler.npcs[i].npcType == 1265) { - if (Misc.random(350) == 0) { - AntiBotting.botCheckInterface(c); - } - } if (NpcHandler.npcs[i].npcType == 757 && c.vampSlayer > 2) { if (!c.getItemAssistant().playerHasItem(1549, 1) || !c.getItemAssistant().playerHasItem(2347, 1)) { c.getActionSender().sendMessage("You need a stake and hammer to attack count draynor."); @@ -598,9 +593,6 @@ public class CombatAssistant { c.getActionSender().sendMessage("You can't attack a swarm!"); resetPlayerAttack(); return; - } - if (!c.goodDistance(c.getX(), c.getY(), NpcHandler.npcs[i].getX(), NpcHandler.npcs[i].getY(), 1)) { - } if (NpcHandler.npcs[i].underAttackBy > 0 && NpcHandler.npcs[i].underAttackBy != c.playerId && !NpcHandler.npcs[i].inMulti()) { c.npcIndex = 0; @@ -677,7 +669,7 @@ public class CombatAssistant { if (!c.goodDistance(c.getX(), c.getY(), NpcHandler.npcs[i].getX(), NpcHandler.npcs[i].getY(), 2) && RangeData.usingHally(c) && !c.usingRangeWeapon && !c.usingBow && !c.usingMagic || !c.goodDistance(c.getX(), c.getY(), NpcHandler.npcs[i].getX(), NpcHandler.npcs[i].getY(), 4) && c.usingRangeWeapon && !c.usingBow && !c.usingMagic - || !c.goodDistance(c.getX(), c.getY(), NpcHandler.npcs[i].getX(), NpcHandler.npcs[i].getY(), 1)&& !c.usingRangeWeapon && !RangeData.usingHally(c) && !c.usingBow && !c.usingMagic + || !c.goodDistance(c.getX(), c.getY(), NpcHandler.npcs[i].getX(), NpcHandler.npcs[i].getY(), 1) && !c.usingRangeWeapon && !RangeData.usingHally(c) && !c.usingBow && !c.usingMagic || !c.goodDistance(c.getX(), c.getY(), NpcHandler.npcs[i].getX(), NpcHandler.npcs[i].getY(), 8) && (c.usingBow || c.usingMagic)) { return; } else { diff --git a/2006Redone Server/src/redone/game/items/impl/RareProtection.java b/2006Redone Server/src/redone/game/items/impl/RareProtection.java index 9073ac71..a6ccbdcd 100644 --- a/2006Redone Server/src/redone/game/items/impl/RareProtection.java +++ b/2006Redone Server/src/redone/game/items/impl/RareProtection.java @@ -4,7 +4,7 @@ import redone.game.players.Client; /** * Rare Protection - * @author Andrew (I'm A Boss on Rune-Server, Mr Extremez on Moparscape & Runelocus) + * @author Andrew (Mr Extremez) */ public class RareProtection { @@ -12,10 +12,9 @@ public class RareProtection { public static final boolean RARES = false, CRACKERS = false; private static final int[] RARE_ITEMS = { 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 962, 963, 1959, 1961, 1989 }; - private static final int[] EATABLE_RARES = { 1959, 1961, 1989 }; + private static final int[] EDIBLE_RARES = { 1959, 1961, 1989 }; public static boolean equipItem(Client c) {// check when wearing, removing - /* Allow rares for (int element : RARE_ITEMS) { if (!RARES && c.wearId == element && c.playerRights < 3) { c.getActionSender().sendMessage("You shouldn't have that item!"); @@ -24,13 +23,10 @@ public class RareProtection { return false; } } - */ return true; } - public static boolean removeItem(Client c, int itemId) {// check when - // wearing, removing - /* Allow rares + public static boolean removeItem(Client c, int itemId) { for (int element : RARE_ITEMS) { if (!RARES && itemId == element && c.playerRights < 3) { c.getActionSender().sendMessage("You shouldn't have that item!"); @@ -38,12 +34,10 @@ public class RareProtection { return false; } } - */ return true; } public static boolean hasDupedItem(Client c) {// check on login - /* Allow rares for (int element : RARE_ITEMS) { if (!RARES && c.getItemAssistant().playerHasItem(element) && c.playerRights < 3) { @@ -53,14 +47,11 @@ public class RareProtection { return false; } } - */ return true; } - public static boolean eatDupedItem(Client c, int itemId) {// check when - // eating - /* Allow rares - for (int element : EATABLE_RARES) { + public static boolean eatDupedItem(Client c, int itemId) { + for (int element : EDIBLE_RARES) { if (!RARES && itemId == element && c.playerRights < 3) { c.getActionSender().sendMessage("You can't eat that item!"); int amountToDelete = c.getItemAssistant().getItemCount(element); @@ -68,26 +59,18 @@ public class RareProtection { return false; } } - */ return true; } - public static boolean doOtherDupe(Client c, int itemId) {// check when - // dropping, - // trading, - // staking, - // dropping - /* Allow rares + public static boolean doOtherDupe(Client c, int itemId) { for (int element : RARE_ITEMS) { - if (!RARES && c.getItemAssistant().playerHasItem(element) - && c.playerRights < 3) { + if (!RARES && c.getItemAssistant().playerHasItem(element) && c.playerRights < 3) { c.getActionSender().sendMessage("You shouldnt have that item!"); int amountToDelete = c.getItemAssistant().getItemCount(element); c.getItemAssistant().deleteItem(element, amountToDelete); return false; } } - */ return true; } } diff --git a/2006Redone Server/src/redone/game/npcs/NpcHandler.java b/2006Redone Server/src/redone/game/npcs/NpcHandler.java index 65f36ac5..da2393d1 100644 --- a/2006Redone Server/src/redone/game/npcs/NpcHandler.java +++ b/2006Redone Server/src/redone/game/npcs/NpcHandler.java @@ -961,7 +961,7 @@ public class NpcHandler { scroll = 2678 + Misc.random(0, 1); else if (level > 150)// hard scroll = 2679; - if (scroll >= 0) + if (scroll >= 0 && Constants.CLUES_ENABLED) Server.itemHandler.createGroundItem(c, scroll, npcs[i].absX, npcs[i].absY, 1, c.playerId); } } diff --git a/2006Redone Server/src/redone/game/players/Player.java b/2006Redone Server/src/redone/game/players/Player.java index 5bfbd325..b3798edd 100644 --- a/2006Redone Server/src/redone/game/players/Player.java +++ b/2006Redone Server/src/redone/game/players/Player.java @@ -3,6 +3,8 @@ package redone.game.players; import java.util.ArrayList; import redone.Constants; +import redone.Server; +import redone.game.content.combat.prayer.PrayerDrain; import redone.game.content.minigames.castlewars.CastleWars; import redone.game.items.Item; import redone.game.items.ItemAssistant; @@ -1971,10 +1973,14 @@ public boolean goodDistance(int objectX, int objectY, int playerX, int playerY, logoutDelay = System.currentTimeMillis(); singleCombatDelay = System.currentTimeMillis(); } + public void dealDamage(int damage) { if (teleTimer <= 0) { playerLevel[3] -= damage; + int difference = playerLevel[3] - damage; + if (difference <= getLevelForXP(playerXP[3]) / 10 && difference > 0) + appendRedemption(); } else { if (hitUpdateRequired) { hitUpdateRequired = false; @@ -1983,8 +1989,25 @@ public boolean goodDistance(int objectX, int objectY, int playerX, int playerY, hitUpdateRequired2 = false; } } - } + + public void appendRedemption() { + Client c = (Client) PlayerHandler.players[playerId]; + if (c.getPrayer().prayerActive[22]) { + int added = c.playerLevel[3] += (int)(c.getLevelForXP(c.playerXP[5]) * .25); + if (added > c.getLevelForXP(c.playerXP[3])) { + c.playerLevel[3] = c.getLevelForXP(c.playerXP[3]); + } else { + c.playerLevel[3] += (int)(getLevelForXP(c.playerXP[5]) * .25); + } + c.playerLevel[5] = 0; + c.getPlayerAssistant().refreshSkill(3); + c.getPlayerAssistant().refreshSkill(5); + c.gfx0(436); + PrayerDrain.resetPrayers(c); + } + } + public int[] damageTaken = new int[PlayerHandler.players.length]; diff --git a/2006Redone Server/src/redone/game/players/Trading.java b/2006Redone Server/src/redone/game/players/Trading.java index 61da6c75..8fb09186 100644 --- a/2006Redone Server/src/redone/game/players/Trading.java +++ b/2006Redone Server/src/redone/game/players/Trading.java @@ -266,7 +266,7 @@ public class Trading { return false; } - if (amount >= 1000000000) { + if (amount >= Integer.MAX_VALUE) { player.getActionSender().sendMessage("You can't possibly have that much of that item!"); player.getItemAssistant().deleteItem(itemID, fromSlot, amount); return false; @@ -279,14 +279,6 @@ public class Trading { return false; } } - if (!RareProtection.doOtherDupe(player, itemID)) { - return false; - } - // /if (!((c.playerItems[fromSlot] == itemID + 1) && - // (c.playerItemsN[fromSlot] >= amount))) { - // c.getPacketDispatcher().sendMessage("You don't have that amount!"); - // return false; - // } player.tradeConfirmed = false; o.tradeConfirmed = false; if (!Item.itemStackable[itemID] && !Item.itemIsNote[itemID]) { diff --git a/2006Redone Server/src/redone/game/shops/ShopAssistant.java b/2006Redone Server/src/redone/game/shops/ShopAssistant.java index ba37f030..1fea7de1 100644 --- a/2006Redone Server/src/redone/game/shops/ShopAssistant.java +++ b/2006Redone Server/src/redone/game/shops/ShopAssistant.java @@ -368,6 +368,7 @@ public class ShopAssistant { } if (player.TotalShopItems >= 39) { player.getActionSender().sendMessage("If you sell more individuals items in this shop, they won't be displayed."); + return false; } if (amount > 0 && itemID == (player.playerItems[fromSlot] - 1)) { diff --git a/2006Redone Server/src/redone/net/packets/impl/ClickItem.java b/2006Redone Server/src/redone/net/packets/impl/ClickItem.java index f2a14723..29a62123 100644 --- a/2006Redone Server/src/redone/net/packets/impl/ClickItem.java +++ b/2006Redone Server/src/redone/net/packets/impl/ClickItem.java @@ -1,5 +1,6 @@ package redone.net.packets.impl; +import redone.Constants; import redone.Server; import redone.game.content.consumables.Beverages; import redone.game.content.consumables.Kebabs; @@ -143,18 +144,26 @@ public class ClickItem implements PacketType { break; case 2677: - player.getItemAssistant().deleteItem(itemId, 1); - TreasureTrails.addClueReward(player, 0); + if (Constants.CLUES_ENABLED) + { + player.getItemAssistant().deleteItem(itemId, 1); + TreasureTrails.addClueReward(player, 0); + } break; case 2678: - player.getItemAssistant().deleteItem(itemId, 1); - TreasureTrails.addClueReward(player, 1); + if (Constants.CLUES_ENABLED) { + player.getItemAssistant().deleteItem(itemId, 1); + TreasureTrails.addClueReward(player, 1); + } break; case 2679: - player.getItemAssistant().deleteItem(itemId, 1); - TreasureTrails.addClueReward(player, 2); + if (Constants.CLUES_ENABLED) + { + player.getItemAssistant().deleteItem(itemId, 1); + TreasureTrails.addClueReward(player, 2); + } break; case 299: diff --git a/CompiledServer/production/2006rebotted/redone/Constants.class b/CompiledServer/production/2006rebotted/redone/Constants.class index 188bb790..e662b84c 100644 Binary files a/CompiledServer/production/2006rebotted/redone/Constants.class and b/CompiledServer/production/2006rebotted/redone/Constants.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/content/combat/CombatAssistant.class b/CompiledServer/production/2006rebotted/redone/game/content/combat/CombatAssistant.class index a3505d2f..c40264e0 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/content/combat/CombatAssistant.class and b/CompiledServer/production/2006rebotted/redone/game/content/combat/CombatAssistant.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/content/minigames/FightCaves$1.class b/CompiledServer/production/2006rebotted/redone/game/content/minigames/FightCaves$1.class index ab155b8a..7e6723dc 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/content/minigames/FightCaves$1.class and b/CompiledServer/production/2006rebotted/redone/game/content/minigames/FightCaves$1.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/content/minigames/FightCaves.class b/CompiledServer/production/2006rebotted/redone/game/content/minigames/FightCaves.class index af43c71c..c19871b9 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/content/minigames/FightCaves.class and b/CompiledServer/production/2006rebotted/redone/game/content/minigames/FightCaves.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/content/skills/core/Prayer$1.class b/CompiledServer/production/2006rebotted/redone/game/content/skills/core/Prayer$1.class index 8ea49226..c58b662d 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/content/skills/core/Prayer$1.class and b/CompiledServer/production/2006rebotted/redone/game/content/skills/core/Prayer$1.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/content/skills/core/Prayer.class b/CompiledServer/production/2006rebotted/redone/game/content/skills/core/Prayer.class index 2ab95f7f..7b27a70f 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/content/skills/core/Prayer.class and b/CompiledServer/production/2006rebotted/redone/game/content/skills/core/Prayer.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/content/skills/slayer/Slayer$SlayerMasters.class b/CompiledServer/production/2006rebotted/redone/game/content/skills/slayer/Slayer$SlayerMasters.class index be34f062..dcb59a05 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/content/skills/slayer/Slayer$SlayerMasters.class and b/CompiledServer/production/2006rebotted/redone/game/content/skills/slayer/Slayer$SlayerMasters.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/content/skills/slayer/Slayer$Task.class b/CompiledServer/production/2006rebotted/redone/game/content/skills/slayer/Slayer$Task.class index 4d191b92..81e90e67 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/content/skills/slayer/Slayer$Task.class and b/CompiledServer/production/2006rebotted/redone/game/content/skills/slayer/Slayer$Task.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/content/skills/slayer/Slayer.class b/CompiledServer/production/2006rebotted/redone/game/content/skills/slayer/Slayer.class index e0fe90fb..057e5647 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/content/skills/slayer/Slayer.class and b/CompiledServer/production/2006rebotted/redone/game/content/skills/slayer/Slayer.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/items/Item.class b/CompiledServer/production/2006rebotted/redone/game/items/Item.class index df8a2be8..e2e60fb6 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/items/Item.class and b/CompiledServer/production/2006rebotted/redone/game/items/Item.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/items/ItemAssistant.class b/CompiledServer/production/2006rebotted/redone/game/items/ItemAssistant.class index c979129e..9c6e4964 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/items/ItemAssistant.class and b/CompiledServer/production/2006rebotted/redone/game/items/ItemAssistant.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/items/impl/RareProtection.class b/CompiledServer/production/2006rebotted/redone/game/items/impl/RareProtection.class index 570924be..50560b6b 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/items/impl/RareProtection.class and b/CompiledServer/production/2006rebotted/redone/game/items/impl/RareProtection.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/npcs/NpcHandler.class b/CompiledServer/production/2006rebotted/redone/game/npcs/NpcHandler.class index 44d40cae..310e10cf 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/npcs/NpcHandler.class and b/CompiledServer/production/2006rebotted/redone/game/npcs/NpcHandler.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/npcs/drops/NPCDrops.class b/CompiledServer/production/2006rebotted/redone/game/npcs/drops/NPCDrops.class index 50e53404..e0217f9f 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/npcs/drops/NPCDrops.class and b/CompiledServer/production/2006rebotted/redone/game/npcs/drops/NPCDrops.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/npcs/drops/NPCDropsHandler.class b/CompiledServer/production/2006rebotted/redone/game/npcs/drops/NPCDropsHandler.class index 2573d5fe..a75a3c31 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/npcs/drops/NPCDropsHandler.class and b/CompiledServer/production/2006rebotted/redone/game/npcs/drops/NPCDropsHandler.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/objects/ObjectsActions.class b/CompiledServer/production/2006rebotted/redone/game/objects/ObjectsActions.class index 6ee4125c..37557173 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/objects/ObjectsActions.class and b/CompiledServer/production/2006rebotted/redone/game/objects/ObjectsActions.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/players/Player.class b/CompiledServer/production/2006rebotted/redone/game/players/Player.class index 1c6b7323..1b25b8f5 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/players/Player.class and b/CompiledServer/production/2006rebotted/redone/game/players/Player.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/players/PlayerAssistant.class b/CompiledServer/production/2006rebotted/redone/game/players/PlayerAssistant.class index c25ebacc..6e3c5d7c 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/players/PlayerAssistant.class and b/CompiledServer/production/2006rebotted/redone/game/players/PlayerAssistant.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/players/Trading$1.class b/CompiledServer/production/2006rebotted/redone/game/players/Trading$1.class index 31e29347..3f077688 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/players/Trading$1.class and b/CompiledServer/production/2006rebotted/redone/game/players/Trading$1.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/players/Trading.class b/CompiledServer/production/2006rebotted/redone/game/players/Trading.class index a12b70d5..7e554797 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/players/Trading.class and b/CompiledServer/production/2006rebotted/redone/game/players/Trading.class differ diff --git a/CompiledServer/production/2006rebotted/redone/game/shops/ShopAssistant.class b/CompiledServer/production/2006rebotted/redone/game/shops/ShopAssistant.class index 3c0374d2..9431c173 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/shops/ShopAssistant.class and b/CompiledServer/production/2006rebotted/redone/game/shops/ShopAssistant.class differ diff --git a/CompiledServer/production/2006rebotted/redone/net/packets/impl/ClickItem.class b/CompiledServer/production/2006rebotted/redone/net/packets/impl/ClickItem.class index 19d4bcc5..cff85adf 100644 Binary files a/CompiledServer/production/2006rebotted/redone/net/packets/impl/ClickItem.class and b/CompiledServer/production/2006rebotted/redone/net/packets/impl/ClickItem.class differ diff --git a/CompiledServer/production/2006rebotted/redone/net/packets/impl/ClickingButtons.class b/CompiledServer/production/2006rebotted/redone/net/packets/impl/ClickingButtons.class index 4a688cb2..6b0e3695 100644 Binary files a/CompiledServer/production/2006rebotted/redone/net/packets/impl/ClickingButtons.class and b/CompiledServer/production/2006rebotted/redone/net/packets/impl/ClickingButtons.class differ