mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-07 08:39:07 +00:00
Merge remote-tracking branch 'upstream/master' into bot
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
[2019/11/21] 18:52 andrew5 used command: bank
|
||||||
|
[2019/11/21] 19:04 andrew5 used command: bank
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
[2019/11/21] 19:51 andrew5 was killed by andrew44 absX: 3104 absY: 3898
|
||||||
@@ -17,7 +17,8 @@ public class Constants {
|
|||||||
public static int[] SIDEBARS = { 2423, 3917, 638, 3213, 1644, 5608, 1151,
|
public static int[] SIDEBARS = { 2423, 3917, 638, 3213, 1644, 5608, 1151,
|
||||||
18128, 5065, 5715, 2449, 904, 147, 962 };
|
18128, 5065, 5715, 2449, 904, 147, 962 };
|
||||||
public static boolean TUTORIAL_ISLAND = false, HOLIDAYS = true,
|
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,
|
public final static int HAT = 0, CAPE = 1, AMULET = 2, WEAPON = 3,
|
||||||
CHEST = 4, SHIELD = 5, LEGS = 7, HANDS = 9, FEET = 10, RING = 12,
|
CHEST = 4, SHIELD = 5, LEGS = 7, HANDS = 9, FEET = 10, RING = 12,
|
||||||
|
|||||||
@@ -572,11 +572,6 @@ public class CombatAssistant {
|
|||||||
resetPlayerAttack();
|
resetPlayerAttack();
|
||||||
return;
|
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 (NpcHandler.npcs[i].npcType == 757 && c.vampSlayer > 2) {
|
||||||
if (!c.getItemAssistant().playerHasItem(1549, 1) || !c.getItemAssistant().playerHasItem(2347, 1)) {
|
if (!c.getItemAssistant().playerHasItem(1549, 1) || !c.getItemAssistant().playerHasItem(2347, 1)) {
|
||||||
c.getActionSender().sendMessage("You need a stake and hammer to attack count draynor.");
|
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!");
|
c.getActionSender().sendMessage("You can't attack a swarm!");
|
||||||
resetPlayerAttack();
|
resetPlayerAttack();
|
||||||
return;
|
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()) {
|
if (NpcHandler.npcs[i].underAttackBy > 0 && NpcHandler.npcs[i].underAttackBy != c.playerId && !NpcHandler.npcs[i].inMulti()) {
|
||||||
c.npcIndex = 0;
|
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
|
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(), 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)) {
|
|| !c.goodDistance(c.getX(), c.getY(), NpcHandler.npcs[i].getX(), NpcHandler.npcs[i].getY(), 8) && (c.usingBow || c.usingMagic)) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import redone.game.players.Client;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Rare Protection
|
* Rare Protection
|
||||||
* @author Andrew (I'm A Boss on Rune-Server, Mr Extremez on Moparscape & Runelocus)
|
* @author Andrew (Mr Extremez)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class RareProtection {
|
public class RareProtection {
|
||||||
@@ -12,10 +12,9 @@ public class RareProtection {
|
|||||||
public static final boolean RARES = false, CRACKERS = false;
|
public static final boolean RARES = false, CRACKERS = false;
|
||||||
private static final int[] RARE_ITEMS = { 1037, 1038, 1039, 1040, 1041,
|
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 };
|
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
|
public static boolean equipItem(Client c) {// check when wearing, removing
|
||||||
/* Allow rares
|
|
||||||
for (int element : RARE_ITEMS) {
|
for (int element : RARE_ITEMS) {
|
||||||
if (!RARES && c.wearId == element && c.playerRights < 3) {
|
if (!RARES && c.wearId == element && c.playerRights < 3) {
|
||||||
c.getActionSender().sendMessage("You shouldn't have that item!");
|
c.getActionSender().sendMessage("You shouldn't have that item!");
|
||||||
@@ -24,13 +23,10 @@ public class RareProtection {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean removeItem(Client c, int itemId) {// check when
|
public static boolean removeItem(Client c, int itemId) {
|
||||||
// wearing, removing
|
|
||||||
/* Allow rares
|
|
||||||
for (int element : RARE_ITEMS) {
|
for (int element : RARE_ITEMS) {
|
||||||
if (!RARES && itemId == element && c.playerRights < 3) {
|
if (!RARES && itemId == element && c.playerRights < 3) {
|
||||||
c.getActionSender().sendMessage("You shouldn't have that item!");
|
c.getActionSender().sendMessage("You shouldn't have that item!");
|
||||||
@@ -38,12 +34,10 @@ public class RareProtection {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasDupedItem(Client c) {// check on login
|
public static boolean hasDupedItem(Client c) {// check on login
|
||||||
/* Allow rares
|
|
||||||
for (int element : RARE_ITEMS) {
|
for (int element : RARE_ITEMS) {
|
||||||
if (!RARES && c.getItemAssistant().playerHasItem(element)
|
if (!RARES && c.getItemAssistant().playerHasItem(element)
|
||||||
&& c.playerRights < 3) {
|
&& c.playerRights < 3) {
|
||||||
@@ -53,14 +47,11 @@ public class RareProtection {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean eatDupedItem(Client c, int itemId) {// check when
|
public static boolean eatDupedItem(Client c, int itemId) {
|
||||||
// eating
|
for (int element : EDIBLE_RARES) {
|
||||||
/* Allow rares
|
|
||||||
for (int element : EATABLE_RARES) {
|
|
||||||
if (!RARES && itemId == element && c.playerRights < 3) {
|
if (!RARES && itemId == element && c.playerRights < 3) {
|
||||||
c.getActionSender().sendMessage("You can't eat that item!");
|
c.getActionSender().sendMessage("You can't eat that item!");
|
||||||
int amountToDelete = c.getItemAssistant().getItemCount(element);
|
int amountToDelete = c.getItemAssistant().getItemCount(element);
|
||||||
@@ -68,26 +59,18 @@ public class RareProtection {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean doOtherDupe(Client c, int itemId) {// check when
|
public static boolean doOtherDupe(Client c, int itemId) {
|
||||||
// dropping,
|
|
||||||
// trading,
|
|
||||||
// staking,
|
|
||||||
// dropping
|
|
||||||
/* Allow rares
|
|
||||||
for (int element : RARE_ITEMS) {
|
for (int element : RARE_ITEMS) {
|
||||||
if (!RARES && c.getItemAssistant().playerHasItem(element)
|
if (!RARES && c.getItemAssistant().playerHasItem(element) && c.playerRights < 3) {
|
||||||
&& c.playerRights < 3) {
|
|
||||||
c.getActionSender().sendMessage("You shouldnt have that item!");
|
c.getActionSender().sendMessage("You shouldnt have that item!");
|
||||||
int amountToDelete = c.getItemAssistant().getItemCount(element);
|
int amountToDelete = c.getItemAssistant().getItemCount(element);
|
||||||
c.getItemAssistant().deleteItem(element, amountToDelete);
|
c.getItemAssistant().deleteItem(element, amountToDelete);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -961,7 +961,7 @@ public class NpcHandler {
|
|||||||
scroll = 2678 + Misc.random(0, 1);
|
scroll = 2678 + Misc.random(0, 1);
|
||||||
else if (level > 150)// hard
|
else if (level > 150)// hard
|
||||||
scroll = 2679;
|
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);
|
Server.itemHandler.createGroundItem(c, scroll, npcs[i].absX, npcs[i].absY, 1, c.playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package redone.game.players;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import redone.Constants;
|
import redone.Constants;
|
||||||
|
import redone.Server;
|
||||||
|
import redone.game.content.combat.prayer.PrayerDrain;
|
||||||
import redone.game.content.minigames.castlewars.CastleWars;
|
import redone.game.content.minigames.castlewars.CastleWars;
|
||||||
import redone.game.items.Item;
|
import redone.game.items.Item;
|
||||||
import redone.game.items.ItemAssistant;
|
import redone.game.items.ItemAssistant;
|
||||||
@@ -1972,9 +1974,13 @@ public boolean goodDistance(int objectX, int objectY, int playerX, int playerY,
|
|||||||
singleCombatDelay = System.currentTimeMillis();
|
singleCombatDelay = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void dealDamage(int damage) {
|
public void dealDamage(int damage) {
|
||||||
if (teleTimer <= 0) {
|
if (teleTimer <= 0) {
|
||||||
playerLevel[3] -= damage;
|
playerLevel[3] -= damage;
|
||||||
|
int difference = playerLevel[3] - damage;
|
||||||
|
if (difference <= getLevelForXP(playerXP[3]) / 10 && difference > 0)
|
||||||
|
appendRedemption();
|
||||||
} else {
|
} else {
|
||||||
if (hitUpdateRequired) {
|
if (hitUpdateRequired) {
|
||||||
hitUpdateRequired = false;
|
hitUpdateRequired = false;
|
||||||
@@ -1983,9 +1989,26 @@ public boolean goodDistance(int objectX, int objectY, int playerX, int playerY,
|
|||||||
hitUpdateRequired2 = false;
|
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];
|
public int[] damageTaken = new int[PlayerHandler.players.length];
|
||||||
|
|
||||||
public void handleHitMask(int damage) {
|
public void handleHitMask(int damage) {
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ public class Trading {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (amount >= 1000000000) {
|
if (amount >= Integer.MAX_VALUE) {
|
||||||
player.getActionSender().sendMessage("You can't possibly have that much of that item!");
|
player.getActionSender().sendMessage("You can't possibly have that much of that item!");
|
||||||
player.getItemAssistant().deleteItem(itemID, fromSlot, amount);
|
player.getItemAssistant().deleteItem(itemID, fromSlot, amount);
|
||||||
return false;
|
return false;
|
||||||
@@ -279,14 +279,6 @@ public class Trading {
|
|||||||
return false;
|
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;
|
player.tradeConfirmed = false;
|
||||||
o.tradeConfirmed = false;
|
o.tradeConfirmed = false;
|
||||||
if (!Item.itemStackable[itemID] && !Item.itemIsNote[itemID]) {
|
if (!Item.itemStackable[itemID] && !Item.itemIsNote[itemID]) {
|
||||||
|
|||||||
@@ -368,6 +368,7 @@ public class ShopAssistant {
|
|||||||
}
|
}
|
||||||
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.");
|
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)) {
|
if (amount > 0 && itemID == (player.playerItems[fromSlot] - 1)) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package redone.net.packets.impl;
|
package redone.net.packets.impl;
|
||||||
|
|
||||||
|
import redone.Constants;
|
||||||
import redone.Server;
|
import redone.Server;
|
||||||
import redone.game.content.consumables.Beverages;
|
import redone.game.content.consumables.Beverages;
|
||||||
import redone.game.content.consumables.Kebabs;
|
import redone.game.content.consumables.Kebabs;
|
||||||
@@ -143,18 +144,26 @@ public class ClickItem implements PacketType {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 2677:
|
case 2677:
|
||||||
player.getItemAssistant().deleteItem(itemId, 1);
|
if (Constants.CLUES_ENABLED)
|
||||||
TreasureTrails.addClueReward(player, 0);
|
{
|
||||||
|
player.getItemAssistant().deleteItem(itemId, 1);
|
||||||
|
TreasureTrails.addClueReward(player, 0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2678:
|
case 2678:
|
||||||
player.getItemAssistant().deleteItem(itemId, 1);
|
if (Constants.CLUES_ENABLED) {
|
||||||
TreasureTrails.addClueReward(player, 1);
|
player.getItemAssistant().deleteItem(itemId, 1);
|
||||||
|
TreasureTrails.addClueReward(player, 1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2679:
|
case 2679:
|
||||||
player.getItemAssistant().deleteItem(itemId, 1);
|
if (Constants.CLUES_ENABLED)
|
||||||
TreasureTrails.addClueReward(player, 2);
|
{
|
||||||
|
player.getItemAssistant().deleteItem(itemId, 1);
|
||||||
|
TreasureTrails.addClueReward(player, 2);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 299:
|
case 299:
|
||||||
|
|||||||
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user