mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
Random stuff 3 (#308)
* 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;
* Snow improvement
Nothing major
* Fixed Click to teleport command
Fixed Click to teleport command;
* cleaned stuff
Co-authored-by: Daniel Ginovker <dcress01@uoguelph.ca>
This commit is contained in:
@@ -5970,7 +5970,6 @@ public class Game extends RSApplet {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int j3 = j2;
|
||||
int k3 = j1;
|
||||
anIntArrayArray901[j2][j1] = 99;
|
||||
|
||||
@@ -117,17 +117,12 @@ public class DwarfCannon {
|
||||
}
|
||||
}, 2);
|
||||
}
|
||||
|
||||
public boolean needsCannon() {
|
||||
return (player.lostCannon == true);
|
||||
}
|
||||
|
||||
public void loginCheck() {
|
||||
if (needsCannon()) {
|
||||
if (player.lostCannon) {
|
||||
player.getPacketSender().sendMessage("@red@You can collect your cannon from Nulodion.");
|
||||
}
|
||||
}
|
||||
|
||||
private boolean canSetUp() {
|
||||
if (setUpStage == 0) {
|
||||
if (player.getItemAssistant().playerHasItem(ITEM_PARTS[0]) && player.getItemAssistant().playerHasItem(ITEM_PARTS[1]) && player.getItemAssistant().playerHasItem(ITEM_PARTS[2]) && player.getItemAssistant().playerHasItem(ITEM_PARTS[3])) {
|
||||
|
||||
@@ -6843,7 +6843,7 @@ public class DialogueHandler {
|
||||
* @author Andrew
|
||||
*/
|
||||
case 3500:
|
||||
if (player.getCannon().needsCannon()) {
|
||||
if (player.lostCannon) {
|
||||
sendNpcChat2("Hello, " + Misc.capitalize(player.playerName) + ".", "I see that you lost your cannon.", player.talkingNpc, "Nulodion");
|
||||
player.nextChat = 3501;
|
||||
} else {
|
||||
@@ -6853,7 +6853,7 @@ public class DialogueHandler {
|
||||
break;
|
||||
|
||||
case 3501:
|
||||
if (player.getCannon().needsCannon()) {
|
||||
if (player.lostCannon) {
|
||||
if (player.getItemAssistant().freeSlots() >= 4) {
|
||||
sendNpcChat1("Here is your cannon, try not to lose it again.", player.talkingNpc, "Nulodion");
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
||||
@@ -161,35 +161,49 @@ public class Walking implements PacketType {
|
||||
packetSize -= 14;
|
||||
}
|
||||
|
||||
int steps = (packetSize - 5) / 2;
|
||||
player.getNewWalkCmdX()[0] = player.getNewWalkCmdY()[0] = 0;
|
||||
|
||||
int[][] path = new int[steps][2];
|
||||
int firstStepX = player.getInStream().readSignedWordBigEndianA();
|
||||
for (int i = 0; i < steps; i++) {
|
||||
path[i][0] = player.getInStream().readSignedByte();
|
||||
path[i][1] = player.getInStream().readSignedByte();
|
||||
}
|
||||
int firstStepY = player.getInStream().readSignedWordBigEndian();
|
||||
int x = firstStepX;
|
||||
int y = firstStepY;
|
||||
player.setNewWalkCmdIsRunning(player.isRunning2 && player.playerEnergy > 0);
|
||||
for (int i = 0; i < steps; i++) {
|
||||
path[i][0] += firstStepX;
|
||||
path[i][1] += firstStepY;
|
||||
x = path[i][0];
|
||||
y = path[i][1];
|
||||
}
|
||||
|
||||
if (!player.clickToTele) {
|
||||
if (player.distanceToPoint(x, y) > 30) {
|
||||
if (player.clickToTele) {
|
||||
player.newWalkCmdSteps = (packetSize - 5) / 2;
|
||||
if (++player.newWalkCmdSteps > player.walkingQueueSize) {
|
||||
player.newWalkCmdSteps = 0;
|
||||
return;
|
||||
}
|
||||
player.getNewWalkCmdX()[0] = player.getNewWalkCmdY()[0] = 0;
|
||||
int firstStepX, firstStepY;
|
||||
firstStepX = player.getInStream().readSignedWordBigEndianA();
|
||||
for (int i = 1; i < player.newWalkCmdSteps; i++) {
|
||||
player.getNewWalkCmdX()[i] = player.getInStream().readSignedByte();
|
||||
player.getNewWalkCmdY()[i] = player.getInStream().readSignedByte();
|
||||
}
|
||||
firstStepY = player.getInStream().readSignedWordBigEndian();
|
||||
player.setNewWalkCmdIsRunning(player.getInStream().readSignedByteC() == 1 && player.playerEnergy > 0);
|
||||
for (int i1 = 0; i1 < player.newWalkCmdSteps; i1++) {
|
||||
player.getPlayerAssistant().movePlayer(player.getNewWalkCmdX()[i1] + firstStepX, player.getNewWalkCmdY()[i1] + firstStepY, player.heightLevel);
|
||||
player.getNewWalkCmdX()[i1] += firstStepX;
|
||||
player.getNewWalkCmdY()[i1] += firstStepY;
|
||||
}
|
||||
}
|
||||
//System.out.println("Player has requested to walk to: "+x+","+y);
|
||||
player.getPlayerAssistant().playerWalk(x, y);
|
||||
|
||||
else {
|
||||
player.getNewWalkCmdX()[0] = player.getNewWalkCmdY()[0] = 0;
|
||||
int steps = (packetSize - 5) / 2;
|
||||
|
||||
int[][] path = new int[steps][2];
|
||||
int firstStepX = player.getInStream().readSignedWordBigEndianA();
|
||||
for (int i = 0; i < steps; i++) {
|
||||
path[i][0] = player.getInStream().readSignedByte();
|
||||
path[i][1] = player.getInStream().readSignedByte();
|
||||
}
|
||||
int firstStepY = player.getInStream().readSignedWordBigEndian();
|
||||
int x = firstStepX;
|
||||
int y = firstStepY;
|
||||
player.setNewWalkCmdIsRunning(player.isRunning2 && player.playerEnergy > 0);
|
||||
for (int i = 0; i < steps; i++) {
|
||||
path[i][0] += firstStepX;
|
||||
path[i][1] += firstStepY;
|
||||
x = path[i][0];
|
||||
y = path[i][1];
|
||||
}
|
||||
//System.out.println("Player has requested to walk to: "+x+","+y);
|
||||
player.getPlayerAssistant().playerWalk(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user