Examples of destroyItem()


Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.destroyItem()

                spawn.setId(IdFactory.getInstance().getNextId());
                spawn.setLocx(activeChar.getX());
                spawn.setLocy(activeChar.getY());
                spawn.setLocz(activeChar.getZ());
                L2World.getInstance().storeObject(spawn.spawnOne());
                activeChar.destroyItem("Summon", item.getObjectId(), 1, null, false);
                activeChar.sendMessage("Created " + npcTemplate.name + " at x: " + spawn.getLocx() + " y: " + spawn.getLocy() + " z: " + spawn.getLocz());
            }
            catch (Exception e)
            {
                activeChar.sendMessage("Target is not ingame.");
View Full Code Here

Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.destroyItem()

                MagicSkillUser MSU = new MagicSkillUser(playable, activeChar, _skill.getId(), 1, 1, 0);
                activeChar.sendPacket(MSU);
                activeChar.broadcastPacket(MSU);
                _effect.addNumCharges(1);
                activeChar.sendPacket(new EtcStatusUpdate(activeChar));
                activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false);
            }
            else if (_effect.getLevel() == 2)
            {
                activeChar.sendPacket(new SystemMessage(SystemMessageId.FORCE_MAXLEVEL_REACHED));
            }
View Full Code Here

Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.destroyItem()

        // Modified by Tempy - 28 Jul 05 \\
        // Check if this is a blessed scroll, if it is then shorten the cast time.
        int itemId = item.getItemId();
        int escapeSkill = (itemId == 1538 || itemId == 5858 || itemId == 5859 || itemId == 3958) ? 2036 : 2013;

        if (!activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false))
            return;

        activeChar.disableAllSkills();

        L2Skill skill = SkillTable.getInstance().getInfo(escapeSkill, 1);
View Full Code Here

Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.destroyItem()

            activeChar.sendMessage("You cannot hire any more mercenaries of this type.  You may still hire other types of mercenaries");
            return;
        }

        int npcId = MercTicketManager.getInstance().addTicket(item.getItemId(), activeChar, MESSAGES);
        activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false); // Remove item from char's inventory
        activeChar.sendMessage("Hired mercenary ("+itemId+","+npcId+") at coords:" + activeChar.getX() + "," + activeChar.getY() + "," + activeChar.getZ() + " heading:" + activeChar.getHeading());
    }

    // left in here for backward compatibility
    @Override
View Full Code Here

Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.destroyItem()

                    {
                        if (item == null) continue;
                        if (_heroItems.contains(item.getItemId()))
                          continue;

                        player.destroyItem("Hero", item, null, true);
                        iu = new InventoryUpdate();
                        iu.addRemovedItem(item);
                        player.sendPacket(iu);
                    }
View Full Code Here

Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.destroyItem()

                  SystemMessageId.ITEM_MISSING_TO_LEARN_SKILL));
              return;
            }

            // ok
            player.destroyItem("Consume", spb, trainer, true);
          }
        }
      } else
      {
        SystemMessage sm = new SystemMessage(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.