Random stuff 3 (#304)

* Make ::update automatically restart server as well

* Add bank area checks back since previously you could open a bank, and as long as you didn't open another interface you could abuse it

* Fix noclip (NEEDS TESTING)

* Revert "Fix noclip  (#302)"

This reverts commit 521ae52e4c.

* ::clip command removed, fixed a typo, reordered some stuff, fixed a bug with others cannon

-Removed the clip command from the client;
-Fixed a typo in a dialogue;
-Fixed mud battlestaff nto working as runes (water and earth);
-Fixed a bug with other cannons near you preventing you from setting down a cannon. Somehow your player would glitch himself and make it impossible to spawn a cannon at certain spot;

Co-authored-by: Daniel Ginovker <dcress01@uoguelph.ca>
This commit is contained in:
Gptaqbc
2019-12-19 22:50:15 -05:00
committed by Daniel Ginovker
parent 00500a072b
commit a27b9e22f9
8 changed files with 14 additions and 28 deletions
-12
View File
@@ -4795,18 +4795,6 @@ public class Game extends RSApplet {
if (inputString.equals("::dataon")) {
showInfo = !showInfo;
}
if (inputString.equals("::clip")) {
for (int k1 = 0; k1 < 4; k1++) {
for (int i2 = 1; i2 < 103; i2++) {
for (int k2 = 1; k2 < 103; k2++) {
aClass11Array1230[k1].anIntArrayArray294[i2][k2] = 0;
}
}
}
}
}
if (inputString.startsWith("::")) {
stream.createFrame(103);
@@ -15,7 +15,7 @@ public class MagicRequirements {
}
break;
case 555:
if (wep == 1383 || wep == 1395) {
if (wep == 1383 || wep == 1395 || wep == 6562) {
return true;
}
break;
@@ -25,7 +25,7 @@ public class MagicRequirements {
}
break;
case 557:
if (wep == 1385 || wep == 1399 || wep == 3053) {
if (wep == 1385 || wep == 1399 || wep == 3053 || wep == 6562) {
return true;
}
break;
@@ -86,6 +86,7 @@ public class DwarfCannon {
if (setUpStage >= 4) {
container.stop();
setUpStage = 0;
player.CannonSetupStage = setUpStage;
settingUp = false;
return;
}
@@ -102,6 +103,7 @@ public class DwarfCannon {
placeObject(OBJECT_PARTS[setUpStage], player.absX, player.absY, true);
player.getItemAssistant().deleteItem(ITEM_PARTS[setUpStage], 1);
setUpStage ++;
player.CannonSetupStage = setUpStage;
}
@Override
public void stop() {
@@ -148,7 +150,7 @@ public class DwarfCannon {
}
public boolean hasCannon() {
return (player.cannonX > 0) && (player.cannonY > 0) || (player.cannonX > 0 && player.cannonY > 0);
return (player.CannonSetupStage != 0 || (player.cannonX > 0 && player.cannonY > 0));
}
private boolean myCannon(int x, int y) {
@@ -313,7 +315,7 @@ public class DwarfCannon {
}
}
}
public void pickup(int x, int y) {
if (!myCannon(x, y)) {
player.getPacketSender().sendMessage("You can't pick up somebody else's cannon!");
@@ -343,13 +345,13 @@ public class DwarfCannon {
player.cannonX = 0;
player.cannonY = 0;
}
public void placeObject(int id, int x, int y, boolean add) {
GameEngine.objectHandler.placeObject(new Objects(id, x, y, 0, 516, 10, 0));
if (add)
Region.addObject(id, x, y, 0, 10, 516, true);
}
public void removeObject(int x, int y) {
placeObject(-1, x, y, false);
}
@@ -1184,7 +1184,7 @@ public class DialogueHandler {
break;
case 247:
sendNpcChat3(
"But, when this tower was burnt down, the sercret of creating runes was lost with it...",
"But, when this tower was burnt down, the secret of creating runes was lost with it...",
"or so I thought.",
"Some months ago, while searching these ruins for information, ",
player.talkingNpc, "Sedridor");
@@ -1187,6 +1187,8 @@ public abstract class Player {
public boolean lostCannon = false, refresh = false, isBot = false;
public int CannonSetupStage;
public ArrayList<String> killedPlayers = new ArrayList<String>();
public ArrayList<Integer> attackedPlayers = new ArrayList<Integer>();
public ArrayList<String> lastKilledPlayers = new ArrayList<String>();
@@ -2014,10 +2014,9 @@ public class PlayerAssistant {
player.getPlayerAssistant().addStarter();
player.getPlayerAssistant().movePlayer(3233, 3229, 0);
player.getPacketSender().sendMessage("Welcome to @blu@" + GameConstants.SERVER_NAME + "@bla@ - we are currently in Server Stage v@blu@" + GameConstants.TEST_VERSION + "@bla@.");
player.getPacketSender().sendMessage("@red@Did you know?@bla@ We're open source! Pull requests are welcome");
player.getPacketSender().sendMessage("Source code at github.com/dginovker/2006rebotted");
player.getPacketSender().sendMessage("Welcome to the Beta! A reset will occur before main release -");
player.getPacketSender().sendMessage("Join our Discord: discord.gg/4zrA2Wy");
player.getPacketSender().sendMessage("@red@Did you know?@bla@ We're open source and pull requests are welcome!");
player.getPacketSender().sendMessage("Source code: github.com/dginovker/2006rebotted");
player.getPacketSender().sendMessage("Discord: discord.gg/4zrA2Wy");
player.getDialogueHandler().sendDialogues(3115, 2224);
player.isRunning2 = false;
player.autoRet = 1;
@@ -344,11 +344,6 @@ public class ShopAssistant {
player.getPacketSender().sendMessage("Selling items as an admin has been disabled.");
return false;
}
if (!player.inPlayerShopArea()) //Packet abuse!
{
player.getPacketSender().sendMessage("You're not in a shopping area! Enter one to sell items & manage your store.");
return false;
}
if(!player.isShopping) {
return false;
}