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 1b192790..f9695709 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 491fb425..89be462c 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; @@ -1935,10 +1937,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; @@ -1947,8 +1953,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 3863222d..01d3e9f1 100644 --- a/2006Redone Server/src/redone/game/players/Trading.java +++ b/2006Redone Server/src/redone/game/players/Trading.java @@ -257,7 +257,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; @@ -270,14 +270,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 e46a6b10..51524eb7 100644 --- a/2006Redone Server/src/redone/game/shops/ShopAssistant.java +++ b/2006Redone Server/src/redone/game/shops/ShopAssistant.java @@ -355,9 +355,9 @@ public class ShopAssistant { if(!player.isShopping) { return false; } - if (player.TotalShopItems >= 39) - { + 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..1b0d1523 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,16 +144,19 @@ public class ClickItem implements PacketType { break; case 2677: + if (Constants.CLUES_ENABLED) player.getItemAssistant().deleteItem(itemId, 1); TreasureTrails.addClueReward(player, 0); break; case 2678: + if (Constants.CLUES_ENABLED) player.getItemAssistant().deleteItem(itemId, 1); TreasureTrails.addClueReward(player, 1); break; case 2679: + if (Constants.CLUES_ENABLED) player.getItemAssistant().deleteItem(itemId, 1); TreasureTrails.addClueReward(player, 2); break;