public int getStandWalkAnimation() { if (player.getAppearance().getWalkAnimation() > 0) { return(player.getAppearance().getWalkAnimation()); } if (slots[3].getItemId() == -1) { return(1426); } return(ItemData.forId(slots[3].getItemId()).getAnimation()); }
public static void openInterface(Player p) { p.getPackets().displayInterface(771); p.getPackets().sendPlayerHead(771, 79); p.getPackets().animateInterface(9804, 771, 79); p.getPackets().sendConfig(1262, p.getAppearance().getGender() == 2 ? 1 : 8); p.getAppearance().setTemporaryAppearance(new Appearance()); p.getAppearance().getTemporaryAppearance().setColoursArray(p.getAppearance().getColoursArray()); p.getAppearance().getTemporaryAppearance().setLookArray(p.getAppearance().getLookArray()); p.getAppearance().getTemporaryAppearance().setGender(p.getAppearance().getGender()); p.removeTemporaryAttribute("hairToggle"); }
public static void openInterface(Player p) { p.getPackets().displayInterface(771); p.getPackets().sendPlayerHead(771, 79); p.getPackets().animateInterface(9804, 771, 79); p.getPackets().sendConfig(1262, p.getAppearance().getGender() == 2 ? 1 : 8); p.getAppearance().setTemporaryAppearance(new Appearance()); p.getAppearance().getTemporaryAppearance().setColoursArray(p.getAppearance().getColoursArray()); p.getAppearance().getTemporaryAppearance().setLookArray(p.getAppearance().getLookArray()); p.getAppearance().getTemporaryAppearance().setGender(p.getAppearance().getGender()); p.removeTemporaryAttribute("hairToggle"); }
private static int getSkinColour(Player p, int button) { int[] buttons = { 151, 152, 153, 154, 155, 156, 157, 158 }; int[] skins = { 10, 1, 2, 3, 4, 5, 6, 7 }; for (int i = 0; i < buttons.Length; i++) { if (button == buttons[i]) { return(skins[i]); } } return(p.getAppearance().getColour(4)); }
private static int getTorsoColour(Player p, int button) { int[] buttons = { 189, 190, 191, 192, 193, 194, 195, 196 }; int[] colours = { 10, 1, 2, 3, 4, 5, 6, 7 }; for (int i = 0; i < buttons.Length; i++) { if (button == buttons[i]) { return(colours[i]); } } return(p.getAppearance().getColour(2)); }
public static void sortButton(Player p, int button) { Appearance temp = p.getAppearance().getTemporaryAppearance(); if (button == 362) { p.setAppearance(p.getAppearance().getTemporaryAppearance()); p.getPackets().closeInterfaces(); return; } if ((button == 52 && temp.getGender() == 1) || (button == 49 && temp.getGender() == 0)) { p.getPackets().sendConfig(1262, temp.getGender() == 0 ? 1 : 8); temp.setGender(temp.getGender() == 0 ? 1 : 0); return; } if (button == 93) { temp.setLook(0, getHairStyle(p, false)); return; } if (button == 93) { temp.setLook(0, getHairStyle(p, true)); return; } if (button >= 151 && button <= 158) { temp.setColour(4, getSkinColour(p, button)); return; } if (button >= 189 && button <= 217) { temp.setColour(2, getTorsoColour(p, button)); return; } }
public static void sortButton(Player p, int button) { Appearance temp = p.getAppearance().getTemporaryAppearance(); if (button == 362) { p.setAppearance(p.getAppearance().getTemporaryAppearance()); p.getPackets().closeInterfaces(); return; } if ((button == 52 && temp.getGender() == 1) || (button == 49 && temp.getGender() == 0)) { p.getPackets().sendConfig(1262, temp.getGender() == 0 ? 1 : 8); temp.setGender(temp.getGender() == 0 ? 1 : 0); return; } if (button == 93) { temp.setLook(0, getHairStyle(p, false)); return; } if (button == 93) { temp.setLook(0, getHairStyle(p, true)); return; } if (button >= 151 && button <= 158) { temp.setColour(4, getSkinColour(p, button)); return; } if (button >= 189 && button <= 217) { temp.setColour(2, getTorsoColour(p, button)); return; } }
public void execute(Player player, string[] arguments) { if (arguments.Length == 0) { player.getPackets().sendMessage("[PlayerAsNpc command]: ::pnpc npcId"); return; } int npcId = 0; if (!int.TryParse(arguments[0], out npcId)) { player.getPackets().sendMessage("[PlayerAsNpc command]: ::pnpc npcId [npcId is not a number error]"); return; } player.getAppearance().setNpcId(npcId); player.getUpdateFlags().setAppearanceUpdateRequired(true); }
private static int getHairStyle(Player p, bool decrease) { int oldHair = p.getAppearance().getLook(0); int newHair = oldHair; if (p.getTemporaryAttribute("hairToggle") == null) { p.setTemporaryAttribute("hairToggle", 0); return(0); } newHair = (int)p.getTemporaryAttribute("hairToggle"); newHair = decrease ? -1 : +1; if (newHair == 11) { newHair = 186;// } else if (newHair == 12) { newHair = 188;// } else if (newHair == 13) { newHair = 190;// } else if (newHair == 14) { newHair = 192;// } else if (newHair == 15) { newHair = 194;// } else if (newHair == 16) { newHair = 196; // } else if (newHair == 17) { //17 to 25 dump from rs } p.setTemporaryAttribute("hairToggle", newHair); return(newHair); }
private static int getHairStyle(Player p, bool decrease) { int oldHair = p.getAppearance().getLook(0); int newHair = oldHair; if (p.getTemporaryAttribute("hairToggle") == null) { p.setTemporaryAttribute("hairToggle", 0); return 0; } newHair = (int)p.getTemporaryAttribute("hairToggle"); newHair = decrease ? -1 : +1; if (newHair == 11) { newHair = 186;// } else if (newHair == 12) { newHair = 188;// } else if (newHair == 13) { newHair = 190;// } else if (newHair == 14) { newHair = 192;// } else if (newHair == 15) { newHair = 194;// } else if (newHair == 16) { newHair = 196; // } else if (newHair == 17) { //17 to 25 dump from rs } p.setTemporaryAttribute("hairToggle", newHair); return newHair; }
public static void doObstacle(Player p, int index) { if (p.getTemporaryAttribute("unmovable") != null) { return; } switch (index) { case 0: // 3 planks, northern (east side) case 1: // 3 planks, middle (east side) case 2: // 3 planks, southern (east side) case 3: // 3 planks, northern (west side) case 4: // 3 planks, middle (west side) case 5: // 3 planks, southern (west side) int logXCoord = index <= 2 ? (int)AGILITY_ARENA_OBJECTS[index][1] + 1 : (int)AGILITY_ARENA_OBJECTS[index][1] - 1; int logDirectionX = index <= 2 ? -7 : +7; CoordinateEvent plankObstaclesCoordinateEvent = new CoordinateEvent(p, new Location(logXCoord, (int)AGILITY_ARENA_OBJECTS[index][2], 3)); plankObstaclesCoordinateEvent.setAction(() => { bool running = p.getWalkingQueue().isRunToggled(); p.getWalkingQueue().setRunToggled(false); p.getWalkingQueue().resetWalkingQueue(); p.getPackets().clearMapFlag(); p.setTemporaryAttribute("unmovable", true); p.getAppearance().setWalkAnimation(155); p.getUpdateFlags().setAppearanceUpdateRequired(true); p.getWalkingQueue().forceWalk(logDirectionX, 0); Event plankObstaclesEvent = new Event(4300); plankObstaclesEvent.setAction(() => { plankObstaclesEvent.stop(); p.removeTemporaryAttribute("unmovable"); p.getAppearance().setWalkAnimation(-1); p.getUpdateFlags().setAppearanceUpdateRequired(true); p.getSkills().addXp(Skills.SKILL.AGILITY, (double)AGILITY_ARENA_OBJECTS[index][3]); p.getWalkingQueue().setRunToggled(running); }); Server.registerEvent(plankObstaclesEvent); }); Server.registerCoordinateEvent(plankObstaclesCoordinateEvent); break; case 6: //Handholds obstacle east of planks. case 7: //Handholds obstacle west of planks. int handHoldsDirectionX = 1; int handHoldsDirectionY = 1; if (index == 6) { handHoldsDirectionX = -1; handHoldsDirectionY = +1; } else if (index == 7) { handHoldsDirectionX = +1; handHoldsDirectionY = -1; } CoordinateEvent handholdsObstacleCoordinateEvent = new CoordinateEvent(p, new Location((int)AGILITY_ARENA_OBJECTS[index][1], (int)AGILITY_ARENA_OBJECTS[index][2], 3)); handholdsObstacleCoordinateEvent.setAction(() => { bool running = p.getWalkingQueue().isRunToggled(); p.getWalkingQueue().setRunToggled(false); p.getWalkingQueue().resetWalkingQueue(); p.getPackets().clearMapFlag(); p.setTemporaryAttribute("unmovable", true); p.setLastAnimation(new Animation(1121)); p.setFaceLocation(new Location(p.getLocation().getX(), p.getLocation().getY() + handHoldsDirectionY, 3)); Event handholdsObstaclesEvent = new Event(700); int handholdsObstaclesCounter = 0; handholdsObstaclesEvent.setAction(() => { p.setLastAnimation(new Animation(1122)); int regionX = p.getUpdateFlags().getLastRegion().getRegionX(); int regionY = p.getUpdateFlags().getLastRegion().getRegionY(); int lX = (p.getLocation().getX() - ((regionX - 6) * 8)); int lY = (p.getLocation().getY() - ((regionY - 6) * 8)); p.setForceMovement(new ForceMovement(lX, lY, lX + handHoldsDirectionX, lY, 0, 5, 0)); if (handholdsObstaclesCounter++ >= 7) { p.setLastAnimation(new Animation(65535)); handholdsObstaclesEvent.stop(); p.removeTemporaryAttribute("unmovable"); p.getSkills().addXp(Skills.SKILL.AGILITY, (double)AGILITY_ARENA_OBJECTS[index][3]); p.getWalkingQueue().setRunToggled(running); return; } Event teleportEvent = new Event(500); teleportEvent.setAction(() => { teleportEvent.stop(); p.teleport(new Location(p.getLocation().getX() + handHoldsDirectionX, p.getLocation().getY(), 3)); }); Server.registerEvent(teleportEvent); }); Server.registerEvent(handholdsObstaclesEvent); }); Server.registerCoordinateEvent(handholdsObstacleCoordinateEvent); break; } }
private void resetVariables(Player p) { p.setSkullCycles(0); p.getSpecialAttack().resetSpecial(); p.setLastkiller(null); p.setDead(false); p.setEntityFocus(65535); p.setPoisonAmount(0); p.clearKillersHits(); p.setLastVengeanceTime(0); p.setVengeance(false); p.removeTemporaryAttribute("willDie"); p.setFrozen(false); p.removeTemporaryAttribute("unmovable"); p.setAntifireCycles(0); p.setSuperAntipoisonCycles(0); p.setTeleblockTime(0); p.removeTemporaryAttribute("teleblocked"); p.setTarget(null); p.setAttacker(null); foreach (Skills.SKILL skill in Enum.GetValues(typeof(Skills.SKILL))) p.getSkills().setCurLevel(skill, p.getSkills().getMaxLevel(skill)); p.getPackets().sendSkillLevels(); Prayer.deactivateAllPrayers(p); if (p.getTemporaryAttribute("cantDoAnything") != null) { p.getAppearance().setInvisible(false); p.getUpdateFlags().setAppearanceUpdateRequired(true); p.removeTemporaryAttribute("cantDoAnything"); p.removeTemporaryAttribute("unmovable"); teleportToWaitingRoom(p, false); p.getPackets().closeInterfaces(); p.getPackets().setMinimapStatus(0); p.getPackets().clearMapFlag(); } }
public void useOrb(Player p, int button) { if (p.getTemporaryAttribute("teleporting") != null) { return; } if (button == -1) { AreaEvent useOrbAreaEvent = new AreaEvent(p, 2398, 5171, 2400, 5173); useOrbAreaEvent.setAction(() => { p.getPackets().displayInventoryInterface(374); p.getAppearance().setInvisible(true); p.getUpdateFlags().setAppearanceUpdateRequired(true); p.setTemporaryAttribute("cantDoAnything", true); p.setTemporaryAttribute("unmovable", true); p.getPackets().setMinimapStatus(2); Event useOrbEvent = new Event(500); useOrbEvent.setAction(() => { useOrbEvent.stop(); int random = misc.random(4); p.teleport(new Location(ORB_COORDINATES[1][random], ORB_COORDINATES[2][random], 0)); }); Server.registerEvent(useOrbEvent); }); Server.registerCoordinateEvent(useOrbAreaEvent); } else { if (p.getTemporaryAttribute("cantDoAnything") != null) { if (button == 5) { Event useOrbTwoEvent = new Event(500); useOrbTwoEvent.setAction(() => { useOrbTwoEvent.stop(); p.getAppearance().setInvisible(false); p.getUpdateFlags().setAppearanceUpdateRequired(true); p.removeTemporaryAttribute("cantDoAnything"); p.removeTemporaryAttribute("unmovable"); teleportToWaitingRoom(p, false); p.getPackets().closeInterfaces(); p.getPackets().setMinimapStatus(0); p.getPackets().clearMapFlag(); }); Server.registerEvent(useOrbTwoEvent); return; } for (int i = 0; i < ORB_COORDINATES[0].Length; i++) { if (button == ORB_COORDINATES[0][i]) { int j = i; p.setTemporaryAttribute("teleporting", true); Event teleportToOrbEvent = new Event(500); teleportToOrbEvent.setAction(() => { teleportToOrbEvent.stop(); p.teleport(new Location(ORB_COORDINATES[1][j], ORB_COORDINATES[2][j], 0)); Teleport.resetTeleport(p); }); Server.registerEvent(teleportToOrbEvent); return; } } } } }
private static int getTorsoColour(Player p, int button) { int[] buttons = { 189, 190, 191, 192, 193, 194, 195, 196 }; int[] colours = { 10, 1, 2, 3, 4, 5, 6, 7 }; for (int i = 0; i < buttons.Length; i++) { if (button == buttons[i]) { return colours[i]; } } return p.getAppearance().getColour(2); }
private static int getSkinColour(Player p, int button) { int[] buttons = { 151, 152, 153, 154, 155, 156, 157, 158 }; int[] skins = { 10, 1, 2, 3, 4, 5, 6, 7 }; for (int i = 0; i < buttons.Length; i++) { if (button == buttons[i]) { return skins[i]; } } return p.getAppearance().getColour(4); }
private static void appendAppearanceUpdate(Player p, PacketBuilder updateBlock) { PacketBuilder playerProps = new PacketBuilder().setSize(Packet.Size.Bare); Appearance app = p.getAppearance(); playerProps.addByte((byte) (app.getGender() & 0xFF)); if((app.getGender() & 0x2) == 2) { playerProps.addByte((byte) 0); playerProps.addByte((byte) 0); } playerProps.addByte((byte) p.getPrayers().getPkIcon()); playerProps.addByte((byte) p.getPrayers().getHeadIcon()); if (!app.isInvisible()) { if(!app.isNpc()) { for(int i = 0; i < 4; i++) { if(p.getEquipment().getItemInSlot((ItemData.EQUIP)i) != -1) { playerProps.addUShort(32768 + p.getEquipment().getSlot((ItemData.EQUIP)i).getDefinition().getEquipId()); } else { playerProps.addByte((byte) 0); } } if (p.getEquipment().getItemInSlot(ItemData.EQUIP.CHEST) != -1) { playerProps.addUShort(32768 + p.getEquipment().getSlot(ItemData.EQUIP.CHEST).getDefinition().getEquipId()); } else { playerProps.addUShort(0x100 + app.getLook(ItemData.EQUIP.AMULET)); } if (p.getEquipment().getItemInSlot(ItemData.EQUIP.SHIELD) != -1) { playerProps.addUShort(32768 + p.getEquipment().getSlot(ItemData.EQUIP.SHIELD).getDefinition().getEquipId()); } else { playerProps.addByte((byte) 0); } Item chest = p.getEquipment().getSlot(ItemData.EQUIP.CHEST); if (chest != null && chest.getDefinition() != null) { if(!ItemData.isFullBody(chest.getDefinition())) { playerProps.addUShort(0x100 + app.getLook(ItemData.EQUIP.WEAPON)); } else { playerProps.addByte((byte) 0); } } else { playerProps.addUShort(0x100 + app.getLook(ItemData.EQUIP.WEAPON)); } if (p.getEquipment().getItemInSlot(ItemData.EQUIP.LEGS) != -1) { playerProps.addUShort(32768 + p.getEquipment().getSlot(ItemData.EQUIP.LEGS).getDefinition().getEquipId()); } else { playerProps.addUShort(0x100 + app.getLook(ItemData.EQUIP.SHIELD)); } Item hat = p.getEquipment().getSlot(ItemData.EQUIP.HAT); if (hat != null && hat.getDefinition() != null) { if(!ItemData.isFullHat(hat.getDefinition()) && !ItemData.isFullMask(hat.getDefinition())) { playerProps.addUShort(0x100 + app.getLook(ItemData.EQUIP.HAT)); } else { playerProps.addByte((byte) 0); } } else { playerProps.addUShort(0x100 + app.getLook(ItemData.EQUIP.HAT)); } if (p.getEquipment().getItemInSlot(ItemData.EQUIP.HANDS) != -1) { playerProps.addUShort(32768 + p.getEquipment().getSlot(ItemData.EQUIP.HANDS).getDefinition().getEquipId()); } else { playerProps.addUShort(0x100 + app.getLook(ItemData.EQUIP.CHEST)); } if (p.getEquipment().getItemInSlot(ItemData.EQUIP.FEET) != -1) { playerProps.addUShort(32768 + p.getEquipment().getSlot(ItemData.EQUIP.FEET).getDefinition().getEquipId()); } else { playerProps.addUShort(0x100 + app.getLook(6)); } if (hat != null && hat.getDefinition() != null) { if(!ItemData.isFullMask(hat.getDefinition())) { playerProps.addUShort(0x100 + app.getLook(ItemData.EQUIP.CAPE)); } else { playerProps.addByte((byte) 0); } } else { playerProps.addUShort(0x100 + app.getLook(ItemData.EQUIP.CAPE)); } } else { playerProps.addUShort(-1); playerProps.addUShort(app.getNpcId()); playerProps.addByte((byte) 255); } } else { for (int i = 0; i < 12; i++) { playerProps.addByte((byte) 0); } } foreach(int colour in app.getColoursArray()) { playerProps.addByte((byte) colour); } playerProps.addUShort(p.getEquipment().getStandWalkAnimation()); playerProps.addLong(p.getLoginDetails().getLongName()); playerProps.addByte((byte) p.getSkills().getCombatLevel()); playerProps.addUShort(0); playerProps.addByte((byte) 0); updateBlock.addByteA((byte) (playerProps.getLength() & 0xFF)); updateBlock.addBytes(playerProps.toPacket().getData(), 0, playerProps.getLength()); }
/** * Handles a player emote: does the appropriate animation. * @param player * @param buttonId * @return */ public static bool emote(Player player, int buttonId) { if (buttonId == 2) { player.setLastAnimation(new Animation(855, 0)); } else if (buttonId == 3) { player.setLastAnimation(new Animation(856, 0)); } else if (buttonId == 4) { player.setLastAnimation(new Animation(858, 0)); } else if (buttonId == 5) { player.setLastAnimation(new Animation(859, 0)); } else if (buttonId == 6) { player.setLastAnimation(new Animation(857, 0)); } else if (buttonId == 7) { player.setLastAnimation(new Animation(863, 0)); } else if (buttonId == 8) { player.setLastAnimation(new Animation(2113, 0)); } else if (buttonId == 9) { player.setLastAnimation(new Animation(862, 0)); } else if (buttonId == 10) { player.setLastAnimation(new Animation(864, 0)); } else if (buttonId == 11) { player.setLastAnimation(new Animation(861, 0)); } else if (buttonId == 12) { player.setLastAnimation(new Animation(2109, 0)); } else if (buttonId == 13) { player.setLastAnimation(new Animation(2111, 0)); } else if (buttonId == 14) { player.setLastAnimation(new Animation(866, 0)); } else if (buttonId == 15) { player.setLastAnimation(new Animation(2106, 0)); } else if (buttonId == 16) { player.setLastAnimation(new Animation(2107, 0)); } else if (buttonId == 17) { player.setLastAnimation(new Animation(2108, 0)); } else if (buttonId == 18) { player.setLastAnimation(new Animation(860, 0)); } else if (buttonId == 19) { player.setLastAnimation(new Animation(0x558, 0)); player.setLastGraphics(new Graphics(574, 0)); } else if (buttonId == 20) { player.setLastAnimation(new Animation(2105, 0)); } else if (buttonId == 21) { player.setLastAnimation(new Animation(2110, 0)); } else if (buttonId == 22) { player.setLastAnimation(new Animation(865, 0)); } else if (buttonId == 23) { player.setLastAnimation(new Animation(2112, 0)); } else if (buttonId == 24) { player.setLastAnimation(new Animation(0x84F, 0)); } else if (buttonId == 25) { player.setLastAnimation(new Animation(0x850, 0)); } else if (buttonId == 26) { player.setLastAnimation(new Animation(1131, 0)); } else if (buttonId == 27) { player.setLastAnimation(new Animation(1130, 0)); } else if (buttonId == 28) { player.setLastAnimation(new Animation(1129, 0)); } else if (buttonId == 29) { player.setLastAnimation(new Animation(1128, 0)); } else if (buttonId == 30) { player.setLastAnimation(new Animation(4275, 0)); } else if (buttonId == 31) { player.setLastAnimation(new Animation(1745, 0)); } else if (buttonId == 32) { player.setLastAnimation(new Animation(4280, 0)); } else if (buttonId == 33) { player.setLastAnimation(new Animation(4276, 0)); } else if (buttonId == 34) { player.setLastAnimation(new Animation(3544, 0)); } else if (buttonId == 35) { player.setLastAnimation(new Animation(3543, 0)); } else if (buttonId == 36) { player.setLastAnimation(new Animation(7272, 0)); player.setLastGraphics(new Graphics(1244, 0)); } else if (buttonId == 37) { player.setLastAnimation(new Animation(2836, 0)); } else if (buttonId == 38) { player.setLastAnimation(new Animation(6111, 0)); } else if (buttonId == 39) { Skillcape.emote(player); } else if (buttonId == 40) { player.setLastAnimation(new Animation(7531, 0)); } else if (buttonId == 41) { player.setLastAnimation(new Animation(2414, 0)); player.setLastGraphics(new Graphics(1537, 0)); } else if (buttonId == 42) { player.setLastAnimation(new Animation(8770, 0)); player.setLastGraphics(new Graphics(1553, 0)); } else if (buttonId == 43) // Explore { player.setLastAnimation(new Animation(9990, 0)); player.setLastGraphics(new Graphics(1734, 0)); } else if (buttonId == 44) { // Trick player.setLastAnimation(new Animation(10530, 0)); player.setLastGraphics(new Graphics(1864, 0)); } else if (buttonId == 45) { // Freeze player.setLastAnimation(new Animation(11044, 0)); player.setLastGraphics(new Graphics(1973, 0)); } else if (buttonId == 46) { //TODO: lol todo.. umm ya.. unmovable remover is here so.. //it can be used to cheat to remove unmovable spells haha. //to fix: make another unmovable check so there would be 2 ways to become unmovable. //trigger the turkey emote event which changes animation/graphic based on delay. if (player.getTemporaryAttribute("turkeyEmoteInProgress") == null) { player.setTemporaryAttribute("turkeyEmoteStage", 11); player.setTemporaryAttribute("turkeyEmoteInProgress", 1); } else { //Force cancellation of the turkeyEmote Event. player.setTemporaryAttribute("turkeyEmoteStage", -1); //Don't create a new event until the old one is stopped. return false; } Event turkeyEmoteEvent = new Event(500); //500 milliseconds per stage timer (adjust this for better results). turkeyEmoteEvent.setAction(() => { int turkeyEmoteStage = (int)(player.getTemporaryAttribute("turkeyEmoteStage") == null ? -1 : (int)player.getTemporaryAttribute("turkeyEmoteStage")); if (turkeyEmoteStage <= 0) { //kill off this event. turkeyEmoteEvent.stop(); player.removeTemporaryAttribute("unmovable"); player.setTemporaryAttribute("turkeyEmoteInProgress", null); return; } if (turkeyEmoteStage == 11) { player.setLastAnimation(new Animation(10994, 0)); } else if (turkeyEmoteStage == 10) { player.setLastGraphics(new Graphics(1714, 0)); } else if (turkeyEmoteStage == 9) { player.setLastAnimation(new Animation(10996, 0)); player.setTemporaryAttribute("unmovable", true); player.getAppearance().setNpcId(8499); player.getUpdateFlags().setAppearanceUpdateRequired(true); } else if (turkeyEmoteStage == 1) { player.setLastAnimation(new Animation(10995, 0)); player.setLastGraphics(new Graphics(1714, 0)); player.getAppearance().setNpcId(-1); player.getUpdateFlags().setAppearanceUpdateRequired(true); player.removeTemporaryAttribute("unmovable"); player.removeTemporaryAttribute("turkeyEmoteStage"); } if (turkeyEmoteStage > 0) { turkeyEmoteStage--; player.setTemporaryAttribute("turkeyEmoteStage", turkeyEmoteStage); } }); Server.registerEvent(turkeyEmoteEvent); } else { return false; } return true; }