Jump to content

Styx

Banned
  • Posts

    100
  • Credits

  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Styx last won the day on October 29 2014

Styx had the most liked content!

About Styx

Profile Information

  • Current Mood
    Angry
  • Gender
    Not Telling
  • Country
    Afghanistan

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Styx's Achievements

Newbie

Newbie (1/16)

-1

Reputation

1

Community Answers

  1. same NETWORK? ah? ah?
  2. Waiting...... :dat:
  3. PredatorsGR - Recruit people !!!
  4. GOGO Server opening in 1 hour or so. :)
  5. I will own here
  6. REALY NICE SERVER!
  7. For this have 20 k players and others have millions.
  8. ok lets see :P
  9. Beta time? you dont have :P
  10. Not bad , Good luck!
  11. fucking staffs dont give a fuck for my topic! get aids.
  12. I will check it now thanks for your time..
  13. Thanks for help. /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package net.sf.l2j.gameserver.model.actor.instance; import java.util.StringTokenizer; import net.sf.l2j.gameserver.ai.CtrlIntention; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.model.actor.L2Npc; import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; import net.sf.l2j.gameserver.network.serverpackets.MoveToPawn; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse; import net.sf.l2j.gameserver.templates.chars.L2NpcTemplate; public final class L2BufferInstance extends L2NpcInstance { public L2BufferInstance(int objectId, L2NpcTemplate template) { super(objectId, template); } @Override public void onAction(L2PcInstance player) { // Set the target of the L2PcInstance player if (player.getTarget() != this) player.setTarget(this); else { // Check if the player is attackable (without a forced attack) and isn't dead if (isAutoAttackable(player) && !isAlikeDead()) { // Check the height difference, this max heigth difference might need some tweaking if (Math.abs(player.getZ() - getZ()) < 400) { // Set the L2PcInstance Intention to ATTACK player.getAI().setIntention(CtrlIntention.ATTACK, this); } else { // Send ActionFailed (target is out of attack range) to the L2PcInstance player player.sendPacket(ActionFailed.STATIC_PACKET); } } else if (!isAutoAttackable(player)) { // Calculate the distance between the L2PcInstance and the L2NpcInstance if (!canInteract(player)) { // Notify the L2PcInstance AI with INTERACT player.getAI().setIntention(CtrlIntention.INTERACT, this); } else { // Rotate the player to face the instance player.sendPacket(new MoveToPawn(player, this, L2Npc.INTERACTION_DISTANCE)); // Send ActionFailed to the player in order to avoid he stucks player.sendPacket(ActionFailed.STATIC_PACKET); // Send the freaking chat window showChatWindow(player); } } // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet player.sendPacket(ActionFailed.STATIC_PACKET); } } @Override public void onBypassFeedback(L2PcInstance player, String command) { StringTokenizer st = new StringTokenizer(command, " "); String actualCommand = st.nextToken(); int buffid = 0, bufflevel = 1; if (st.countTokens() == 2) { buffid = Integer.valueOf(st.nextToken()); bufflevel = Integer.valueOf(st.nextToken()); } else if (st.countTokens() == 1) buffid = Integer.valueOf(st.nextToken()); if (actualCommand.equalsIgnoreCase("getbuff")) { if (buffid != 0 && !player.isDead()) { SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player); broadcastPacket(new MagicSkillUse(this, player, buffid, bufflevel, 500, 0)); showChatWindow(player); } } else if (actualCommand.equalsIgnoreCase("restore")) { if (!player.isDead()) { player.setCurrentHp(player.getMaxHp()); broadcastPacket(new MagicSkillUse(this, player, 1258, 4, 500, 0)); showChatWindow(player); } } else if (actualCommand.equalsIgnoreCase("cancel")) { if (!player.isDead()) { player.stopAllEffects(); broadcastPacket(new MagicSkillUse(this, player, 1056, 12, 500, 0)); showChatWindow(player); } } else super.onBypassFeedback(player, command); } @Override public void showChatWindow(L2PcInstance player) { // Send a Server->Client NpcHtmlMessage containing the text of the L2Npc to the L2PcInstance NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/gold/buffer.htm"); html.replace("%objectId%", getObjectId()); player.sendPacket(html); // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet player.sendPacket(ActionFailed.STATIC_PACKET); } }
  14. Hello guys . I want to do this in in my Buffer npc who know how? Default : <a action="bypass -h npc_%objectId%_getbuff 1204 130"> To work like This : <a action="bypass -h npc_%objectId%_getbuff 1204 130;1003 130;1004 130"> if (actualCommand.equalsIgnoreCase("getbuff")) { if (buffid != 0 && !player.isDead()) { SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player); broadcastPacket(new MagicSkillUse(this, player, buffid, bufflevel, 500, 0)); showChatWindow(player); } } I try some methods but i failed ... :| Project aCis.
×
×
  • 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