Jump to content

Question

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

Exemple with scheme posted for aCis..

 

java/net/sf/l2j/gameserver/model/actor/instance/SchemeBuffer

 

For all buffs animation:

  1.  public void onBypassFeedback(Player player, String command)
  2.  {
  3.  StringTokenizer st = new StringTokenizer(command, " ");
  4.  String currentCommand = st.nextToken();
  5. +
  6.  if (currentCommand.startsWith("menu"))
  7.  {
  8.  NpcHtmlMessage html = new NpcHtmlMessage(1);
  9.  html.setFile(getHtmlPath(getNpcId(), 0));
  10.  html.replace("%objectId%", getObjectId());
  11.  player.sendPacket(html);
  12.  }
  13.  else if (currentCommand.equalsIgnoreCase("getbuff"))
  14.  {
  15.  int buffid = 0;
  16.  int bufflevel = 1;
  17.  String nextWindow = null;
  18.  
  19.  if (st.countTokens() == 3)
  20.  {
  21.  buffid = Integer.valueOf(st.nextToken());
  22.  bufflevel = Integer.valueOf(st.nextToken());
  23.  nextWindow = st.nextToken();
  24.  }
  25.  else if (st.countTokens() == 1)
  26.  buffid = Integer.valueOf(st.nextToken());
  27.  
  28.  if (buffid != 0)
  29.  {
  30. + player.broadcastPacket(new MagicSkillUse(this, player, buffid, bufflevel, 200, 0));
  31.  
  32.  player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(buffid, bufflevel));
  33.  SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player);
  34.  showSubBufferWindow(player);
  35.  showChatWindow(player, nextWindow);
  36.  }
  37.  }
 
  1. For Cancel Animation:
 
  1.  else if (currentCommand.startsWith("cleanup"))
  2.  {
  3.  +player.broadcastPacket(new MagicSkillUse(this, player, 1056, 12, 200, 0));
  4.  player.stopAllEffectsExceptThoseThatLastThroughDeath();
  5.  
  6.  final Summon summon = player.getSummon();
  7.  if (summon != null)
  8.  summon.stopAllEffectsExceptThoseThatLastThroughDeath();
  9.  
  10.  NpcHtmlMessage html = new NpcHtmlMessage(1);
  11.  html.setFile(getHtmlPath(getNpcId(), 0));
  12.  html.replace("%objectId%", getObjectId());
  13.  player.sendPacket(html);
  14.  }
 
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 by Orochy

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock