xristoeli1994 Posted June 5, 2023 Posted June 5, 2023 Hello, everyone. How can I make my custom npc buff express some movement when casting a buff as if I cast a self buff? Quote
0 Salty Mike Posted June 5, 2023 Posted June 5, 2023 By sending the appropriate packet to the client, in your case: /* 0x48 */ MagicSkillUse, Quote
0 Orochy Posted June 5, 2023 Posted June 5, 2023 (edited) Exemple with scheme posted for aCis.. java/net/sf/l2j/gameserver/model/actor/instance/SchemeBuffer For all buffs animation: public void onBypassFeedback(Player player, String command) { StringTokenizer st = new StringTokenizer(command, " "); String currentCommand = st.nextToken(); + if (currentCommand.startsWith("menu")) { NpcHtmlMessage html = new NpcHtmlMessage(1); html.setFile(getHtmlPath(getNpcId(), 0)); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } else if (currentCommand.equalsIgnoreCase("getbuff")) { int buffid = 0; int bufflevel = 1; String nextWindow = null; if (st.countTokens() == 3) { buffid = Integer.valueOf(st.nextToken()); bufflevel = Integer.valueOf(st.nextToken()); nextWindow = st.nextToken(); } else if (st.countTokens() == 1) buffid = Integer.valueOf(st.nextToken()); if (buffid != 0) { + player.broadcastPacket(new MagicSkillUse(this, player, buffid, bufflevel, 200, 0)); player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(buffid, bufflevel)); SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player); showSubBufferWindow(player); showChatWindow(player, nextWindow); } } For Cancel Animation: else if (currentCommand.startsWith("cleanup")) { +player.broadcastPacket(new MagicSkillUse(this, player, 1056, 12, 200, 0)); player.stopAllEffectsExceptThoseThatLastThroughDeath(); final Summon summon = player.getSummon(); if (summon != null) summon.stopAllEffectsExceptThoseThatLastThroughDeath(); NpcHtmlMessage html = new NpcHtmlMessage(1); html.setFile(getHtmlPath(getNpcId(), 0)); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } Player use animation of buff on get buffs player.sendPacket(new MagicSkillUse(player, player, buffid, bufflevel, 1000, 0)); NPC use SocialAction player.sendPacket(new SocialAction(this.getObjectId(), 1)); Edited June 5, 2023 by Orochy Quote
Question
xristoeli1994
Hello, everyone. How can I make my custom npc buff express some movement when casting a buff as if I cast a self buff?
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.