diff --git a/2006Redone Server/src/main/java/com/rebotted/game/content/music/sound/SoundList.java b/2006Redone Server/src/main/java/com/rebotted/game/content/music/sound/SoundList.java index 9217e7d1..fe11d92e 100644 --- a/2006Redone Server/src/main/java/com/rebotted/game/content/music/sound/SoundList.java +++ b/2006Redone Server/src/main/java/com/rebotted/game/content/music/sound/SoundList.java @@ -25,7 +25,6 @@ public class SoundList { public static final int BONE_BURY = 380; public static final int FIRE_LIGHT = 375, FIRE_SUCCESSFUL = 608, FIRST_ATTEMPT = 2584; public static final int TREE_CUT_BEGIN = 471, TREE_CUTTING = 472, TREE_EMPTY = 473; - public static final int LEVEL_UP = 67; public static final int FISHING = 289;// Cast out Net/Cage/Harpoon public static final int START_FLY_FISHING = 377, FLY_FISHING = 378; public static final int RUNECRAFTING = 481; @@ -37,6 +36,55 @@ public class SoundList { public static final int PROSPECTING = 431; public static final int CUT_GEM = 464; + /** + * Skill Level Up Sounds + */ + //Each are different lengths, so a songDelay in the sendQuickSong method would have to be changed per skill sound + //Some of these are level up sounds from 50-99, while some are only heard when unlocking certain items/armour + //Some might not be level up sounds + public static final int LEVEL_UP_RUNECRAFTING_UNKNOWN = 66;//? + public static final int LEVEL_UP_UNKNOWN = 67; //? + public static final int LEVEL_UP_COOKING = 68; + public static final int LEVEL_UP_UNKNOWN2 = 69;//? + public static final int LEVEL_UP_FIREMAKING = 71; + public static final int LEVEL_UP_RUNECRAFTING = 72; + public static final int LEVEL_UP_THIEVING = 73; + public static final int LEVEL_UP_RANGED = 74; + public static final int LEVEL_UP_FLETCHING = 77; + public static final int LEVEL_UP_SMITHING = 78; //? I can't hear this? + public static final int LEVEL_UP_PRAYER2 = 79; + public static final int LEVEL_UP_UNKNOWN5 = 80; //? + public static final int LEVEL_UP_UNKNOWN6 = 82; //? + public static final int LEVEL_UP_PRAYER = 83; + public static final int LEVEL_UP_ATTACK_UNKNOWN = 84; //? + public static final int LEVEL_UP_FISHING = 85; + public static final int LEVEL_UP_MAGIC_UNKNOWN = 86; //? + public static final int LEVEL_UP_MAGIC = 87; + public static final int LEVEL_UP_DEFENCE = 88; + public static final int LEVEL_UP_HERBLORE = 90; + public static final int LEVEL_UP_ATTACK = 91; + public static final int LEVEL_UP_WOODCUTTING = 92; + public static final int LEVEL_UP_UNKNOWN7 = 94; //? + public static final int LEVEL_UP_UNKNOWN8 = 95; //? + public static final int LEVEL_UP_FLETCHING_UNKNOWN = 96; //? + public static final int LEVEL_UP_FISHING_UNKNOWN = 98; //? + public static final int LEVEL_UP_MINING = 99; + public static final int LEVEL_UP_CRAFTING = 100; + public static final int LEVEL_UP_UNKNOWN9 = 101; //? + public static final int LEVEL_UP_MAGIC2 = 102; + public static final int LEVEL_UP_UNKNOWN10 = 103;//? + public static final int LEVEL_UP_UNKNOWN11 = 104;//? + public static final int LEVEL_UP_UNKNOWN12 = 105;//? + public static final int LEVEL_UP_STRENGTH = 107; + public static final int LEVEL_UP_UNKNOWN13 = 108;//? + public static final int LEVEL_UP_UNKNOWN14 = 109;//? + + /** + * Death Sound + */ + + public static final int PLAYER_DEATH_SOUND = 75; + /** * Prayer */ diff --git a/2006Redone Server/src/main/java/com/rebotted/game/players/PlayerAssistant.java b/2006Redone Server/src/main/java/com/rebotted/game/players/PlayerAssistant.java index cf7442b9..3098b4e7 100644 --- a/2006Redone Server/src/main/java/com/rebotted/game/players/PlayerAssistant.java +++ b/2006Redone Server/src/main/java/com/rebotted/game/players/PlayerAssistant.java @@ -2142,4 +2142,51 @@ public class PlayerAssistant { public int totalGold() { return player.getItemAssistant().getBankQuantity(996) + player.getItemAssistant().getItemAmount(995); } + + /** + * 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 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().writeWord(height); // + player.getOutStream().writeByte(speed); // + player.getOutStream().writeByte(angle); + } + + /** + * Makes the player view shake (Cutscene use and other events like Barrows?) + * @param i1 + * @param i2 + * @param i3 + * @param i4 + */ + public void sendCameraShake(int i1, int i2, int i3, int i4) + { + player.getOutStream().createFrame(35); //Not sure of each specific integer, but some cannot be greater than 5 (maybe less) + player.getOutStream().writeByte(i1); + player.getOutStream().writeByte(i2); + player.getOutStream().writeByte(i3); + player.getOutStream().writeByte(i4); + player.updateRequired = true; + player.appearanceUpdateRequired = true; + } + + /** + * Resets the players camera from using sendCameraShake and sendCameraCutscene + */ + public void sendCameraReset() { + synchronized(player) { + if(player.getOutStream() != null && player != null) { + player.getOutStream().createFrame(107); + player.flushOutStream(); + } + } + } } \ No newline at end of file diff --git a/2006Redone Server/src/main/java/com/rebotted/net/packets/impl/Commands.java b/2006Redone Server/src/main/java/com/rebotted/net/packets/impl/Commands.java index 2cf34221..b65c3fb6 100644 --- a/2006Redone Server/src/main/java/com/rebotted/net/packets/impl/Commands.java +++ b/2006Redone Server/src/main/java/com/rebotted/net/packets/impl/Commands.java @@ -748,6 +748,27 @@ public class Commands implements PacketType { public static void developerCommands(Player player, String playerCommand, String[] arguments) { switch (playerCommand.toLowerCase()) { + case "quicksong": + try{ + if (arguments.length == 0) { + player.getPacketSender().sendMessage("You must specify a quick song id: ::quicksong id"); + return; + } + int song = Integer.parseInt(arguments[0]); + player.getPacketSender().sendQuickSong(song, 2); //delay of 2 to repeat at least once before returning to regular music + }catch(Exception e) { + player.getPacketSender().sendMessage("Sound could not be sent."); + } + break; + case"cameracutscene": + player.getPlayerAssistant().sendCameraCutscene(player.getX(), player.getY(),10,10, 10); //Test numbers + break; + case"camerashake": + player.getPlayerAssistant().sendCameraShake(1,9,1,9); //these are just test numbers + break; + case "camerareset": + player.getPlayerAssistant().sendCameraReset(); //Resets the camera to the normal player view + break; case "clicktotele": case "ctt": // alias player.clickToTele = !player.clickToTele;