mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-05 16:49:06 +00:00
Telekinetic grab and stuff (#508)
* tidy up * Tidy up check for space * Telekinetic base * Don't allow player to pickup statue * Tidy up item pickup * fixup, statue spawn * Update telekinetic grab * 2nd option for guardian statue * handle telegrab on statue * Allow picking up global drops with telekinetic grab * Check if player can see/reach item * Update PickupItem.java * Allow pasting into chatbox * camera stuff * fixup clipboard stuff * Update PlayerAssistant.java * Update Commands.java * Add mazes initial * Tidy up the clipboard pasting * Update mazes * Calculate new position of statue * fixup telegrab * More tidy up, remove constant running of container * more tidy up.. * Handle moving statues * remove the statue from global drops * Update MagicOnFloorItems.java * Show telekinetic interface * Make public accessable * Only show items to player that are on the same height level * Moving statues around, Spawning * Reward exp, points, law runes * Show points, mazes completed * Add comment * Add observable statue (still needs work) * Fixup where camera focuses * Load items when player changes level * Graveyard base * Add a couple more checks * Update Player.java * Update Commands.java * Make sure statue is visible when player appears at maze * [Mage training arena] Graveyard * Update MageTrainingArena.java * Update MageTrainingArena.java * Update ItemHandler.java
This commit is contained in:
@@ -824,6 +824,10 @@ public abstract class Player {
|
||||
getPacketSender().walkableInterface(15892);
|
||||
} else if (Boundary.isIn(this, Boundary.MAGE_TRAINING_ARENA_ENCHANTING)) {
|
||||
getPacketSender().walkableInterface(15917);
|
||||
} else if (Boundary.isIn(this, Boundary.MAGE_TRAINING_ARENA_TELEKINETIC)) {
|
||||
getPacketSender().walkableInterface(15962);
|
||||
} else if (Boundary.isIn(this, Boundary.MAGE_TRAINING_ARENA_GRAVEYARD)) {
|
||||
getPacketSender().walkableInterface(15931);
|
||||
} else {
|
||||
getPacketSender().sendMapState(0);
|
||||
if (!isSnowy) {
|
||||
@@ -1642,7 +1646,7 @@ public abstract class Player {
|
||||
crystalBowArrowCount, playerMagicBook, teleGfx, teleEndAnimation,
|
||||
teleHeight, teleX, teleY, rangeItemUsed, killingNpcIndex,
|
||||
totalDamageDealt, globalDamageDealt, oldNpcIndex, fightMode, attackTimer,
|
||||
bowSpecShot, ectofuntusWorshipped, graveyardPoints, alchemyPoints, enchantmentPoints, telekineticPoints;
|
||||
bowSpecShot, ectofuntusWorshipped, graveyardPoints, alchemyPoints, enchantmentPoints, telekineticPoints, telekineticMazesSolved;
|
||||
public boolean magicFailed, oldMagicFailed;
|
||||
/**
|
||||
* End
|
||||
@@ -2160,14 +2164,21 @@ public abstract class Player {
|
||||
getMageTrainingArena().alchemy.clearItems();
|
||||
}
|
||||
if (Boundary.isIn(this, Boundary.MAGE_TRAINING_ARENA_ENCHANTING) && !Boundary.isIn(teleportToX, teleportToY, teleHeight, Boundary.MAGE_TRAINING_ARENA_ENCHANTING)) {
|
||||
// remove any alchemy training items
|
||||
// remove any enchanting training items
|
||||
getMageTrainingArena().enchanting.clearItems();
|
||||
}
|
||||
if (Boundary.isIn(this, Boundary.MAGE_TRAINING_ARENA_GRAVEYARD) && !Boundary.isIn(teleportToX, teleportToY, teleHeight, Boundary.MAGE_TRAINING_ARENA_GRAVEYARD)) {
|
||||
// remove any enchanting training items
|
||||
getMageTrainingArena().graveyard.clearItems();
|
||||
}
|
||||
currentX = teleportToX - 8 * mapRegionX;
|
||||
currentY = teleportToY - 8 * mapRegionY;
|
||||
absX = teleportToX;
|
||||
absY = teleportToY;
|
||||
heightLevel = teleHeight >= 0 ? teleHeight : heightLevel >= 0 ? heightLevel : 0;
|
||||
int newHeight = teleHeight >= 0 ? teleHeight : heightLevel >= 0 ? heightLevel : 0;
|
||||
if (heightLevel != newHeight)
|
||||
GameEngine.itemHandler.reloadItems(this);
|
||||
heightLevel = newHeight;
|
||||
resetWalkingQueue();
|
||||
|
||||
teleportToX = teleportToY = teleHeight = -1;
|
||||
|
||||
@@ -769,6 +769,9 @@ public class PlayerAssistant {
|
||||
player.npcIndex = 0;
|
||||
player.playerIndex = 0;
|
||||
player.faceUpdate(0);
|
||||
if (player.heightLevel != height) {
|
||||
player.refresh = true;
|
||||
}
|
||||
player.teleHeight = height;
|
||||
player.startAnimation(714);
|
||||
player.teleTimer = 11;
|
||||
@@ -833,6 +836,9 @@ public class PlayerAssistant {
|
||||
player.npcIndex = 0;
|
||||
player.playerIndex = 0;
|
||||
player.faceUpdate(0);
|
||||
if (player.heightLevel != height) {
|
||||
player.refresh = true;
|
||||
}
|
||||
player.teleHeight = height;
|
||||
player.startAnimation(714);
|
||||
player.teleTimer = 11;
|
||||
@@ -2302,8 +2308,25 @@ public class PlayerAssistant {
|
||||
*/
|
||||
public void sendCameraCutscene(int x, int y, int height, int speed, int angle) {
|
||||
player.getOutStream().createFrame(177);
|
||||
player.getOutStream().writeByte(x / 64); //
|
||||
player.getOutStream().writeByte(y / 64); //
|
||||
player.getOutStream().writeByte(x); // divided by 64 apparently allows real world coords
|
||||
player.getOutStream().writeByte(y); // divided by 64 apparently allows real world coords
|
||||
player.getOutStream().writeWord(height); //
|
||||
player.getOutStream().writeByte(speed); //
|
||||
player.getOutStream().writeByte(angle);
|
||||
}
|
||||
|
||||
/**
|
||||
* anchors the camera to a specific view (for cutscenes)
|
||||
* @param x The X Coordinate (Within the player's loaded area)
|
||||
* @param y The Y Coordinate (Within the player's loaded area)
|
||||
* @param height The Height of Camera (not relative to the game world height)
|
||||
* @param speed The Camera Speed (Speed at which the camera turns to where it should point?)
|
||||
* @param angle The Camera Angle
|
||||
*/
|
||||
public void sendCameraCutscene2(int x, int y, int height, int speed, int angle) {
|
||||
player.getOutStream().createFrame(166);
|
||||
player.getOutStream().writeByte(x); //
|
||||
player.getOutStream().writeByte(y); //
|
||||
player.getOutStream().writeWord(height); //
|
||||
player.getOutStream().writeByte(speed); //
|
||||
player.getOutStream().writeByte(angle);
|
||||
|
||||
@@ -399,6 +399,7 @@ public class PlayerHandler {
|
||||
|
||||
if (plr.refresh) {
|
||||
GlobalDropsHandler.reset((Client)plr);
|
||||
GameEngine.itemHandler.reloadItems(plr);
|
||||
plr.refresh = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -425,6 +425,9 @@ public class PlayerSave {
|
||||
case "telekinetic-points":
|
||||
player.telekineticPoints = Integer.parseInt(token2);
|
||||
break;
|
||||
case "telekinetic-mazes-solved":
|
||||
player.telekineticMazesSolved = Integer.parseInt(token2);
|
||||
break;
|
||||
case "unlocked-bones-to-peaches":
|
||||
player.unlockedBonesToPeaches = Boolean.parseBoolean(token2);
|
||||
break;
|
||||
@@ -806,6 +809,8 @@ public class PlayerSave {
|
||||
characterfile.newLine();
|
||||
characterfile.write("telekinetic-points = " + player.telekineticPoints);
|
||||
characterfile.newLine();
|
||||
characterfile.write("telekinetic-mazes-solved = " + player.telekineticMazesSolved);
|
||||
characterfile.newLine();
|
||||
characterfile.write("unlocked-bones-to-peaches = " + player.unlockedBonesToPeaches);
|
||||
characterfile.newLine();
|
||||
String voidStatus = "";
|
||||
|
||||
Reference in New Issue
Block a user