Examples of Summon


Examples of lineage2.gameserver.model.Summon

    {
      if (_summonList.size() >= 4)
      {
        return false;
      }
      Summon summon = getFirstServitor();
      if (summon != null)
      {
        Skill skill = SkillTable.getInstance().getInfo(summon.getSummonSkillId(), summon.getSummonSkillLvl());
        if (skill != null)
        {
          return (skill instanceof SummonServitor) && (((SummonServitor) skill).getSummonType() == SummonType.MULTI_SERVITOR);
        }
      }
View Full Code Here

Examples of lineage2.gameserver.model.Summon

   */
  public Summon getFirstServitor()
  {
    if (_summonList.size() == 1)
    {
      Summon summon = _summonList.values().iterator().next();
      Skill skill = SkillTable.getInstance().getInfo(summon.getSummonSkillId(), summon.getSummonSkillLvl());
      if ((skill == null) || (skill.getSkillType() != Skill.SkillType.SUMMON) || (((SummonServitor) skill).getSummonType() == SummonType.MULTI_SERVITOR))
      {
        return null;
      }
      return summon;
View Full Code Here

Examples of lineage2.gameserver.model.Summon

   */
  public Summon getSecondServitor()
  {
    if (_summonList.size() == 2)
    {
      Summon summon = _summonList.values().iterator().next();
      Skill skill = SkillTable.getInstance().getInfo(summon.getSummonSkillId(), summon.getSummonSkillLvl());
      if ((skill == null) || (skill.getSkillType() != Skill.SkillType.SUMMON))
      {
        return null;
      }
      return summon;
View Full Code Here

Examples of lineage2.gameserver.model.Summon

  public void onStart()
  {
    super.onStart();
    if ((_effected != null) && _effected.isServitor())
    {
      Summon summon = (Summon) _effected;
      summon.setDepressed(true);
      summon.getAI().Attack(summon.getPlayer(), true, false);
    }
  }
View Full Code Here

Examples of lineage2.gameserver.model.Summon

  public void onExit()
  {
    super.onExit();
    if ((_effected != null) && _effected.isServitor())
    {
      Summon summon = (Summon) _effected;
      summon.setDepressed(false);
      summon.getAI().setIntention(AI_INTENTION_ACTIVE);
    }
  }
View Full Code Here

Examples of lineage2.gameserver.model.Summon

    if (!Config.SERVICES_CHANGE_PET_NAME_ENABLED)
    {
      show("Серви�? откл�?чен.", player);
      return;
    }
    Summon pl_pet = player.getSummonList().getPet();
    if ((pl_pet == null) || !pl_pet.isPet())
    {
      show("�?итомец должен быт�? вызван.", player);
      return;
    }
    if (player.getInventory().destroyItemByItemId(Config.SERVICES_CHANGE_PET_NAME_ITEM, Config.SERVICES_CHANGE_PET_NAME_PRICE))
    {
      pl_pet.setName(pl_pet.getTemplate().name);
      pl_pet.broadcastCharInfo();
      PetInstance _pet = (PetInstance) pl_pet;
      ItemInstance control = _pet.getControlItem();
      if (control != null)
      {
        control.setCustomType2(1);
View Full Code Here

Examples of lineage2.gameserver.model.Summon

    if (!Config.SERVICES_EXCHANGE_BABY_PET_ENABLED)
    {
      show("Серви�? откл�?чен.", player);
      return;
    }
    Summon pl_pet = player.getSummonList().getPet();
    if ((pl_pet == null) || pl_pet.isDead() || !((pl_pet.getNpcId() == PetDataTable.IMPROVED_BABY_BUFFALO_ID) || (pl_pet.getNpcId() == PetDataTable.IMPROVED_BABY_KOOKABURRA_ID)))
    {
      show("�?ет должен быт�? вызван.", player);
      return;
    }
    if (player.getInventory().destroyItemByItemId(Config.SERVICES_EXCHANGE_BABY_PET_ITEM, Config.SERVICES_EXCHANGE_BABY_PET_PRICE))
    {
      ItemInstance control = player.getInventory().getItemByObjectId(pl_pet.getControlItemObjId());
      control.setItemId(L2Pet.IMPROVED_BABY_COUGAR.getControlItemId());
      control.setJdbcState(JdbcEntityState.UPDATED);
      control.update();
      player.sendPacket(new InventoryUpdate().addModifiedItem(control));
      player.getSummonList().unsummonPet(false);
View Full Code Here

Examples of lineage2.gameserver.model.Summon

    if (!Config.SERVICES_EXCHANGE_BABY_PET_ENABLED)
    {
      show("Серви�? откл�?чен.", player);
      return;
    }
    Summon pl_pet = player.getSummonList().getPet();
    if ((pl_pet == null) || pl_pet.isDead() || !((pl_pet.getNpcId() == PetDataTable.IMPROVED_BABY_COUGAR_ID) || (pl_pet.getNpcId() == PetDataTable.IMPROVED_BABY_KOOKABURRA_ID)))
    {
      show("�?ет должен быт�? вызван.", player);
      return;
    }
    if (Config.ALT_IMPROVED_PETS_LIMITED_USE && player.isMageClass())
    {
      show("Этот пет тол�?ко дл�? воинов.", player);
      return;
    }
    if (player.getInventory().destroyItemByItemId(Config.SERVICES_EXCHANGE_BABY_PET_ITEM, Config.SERVICES_EXCHANGE_BABY_PET_PRICE))
    {
      ItemInstance control = player.getInventory().getItemByObjectId(pl_pet.getControlItemObjId());
      control.setItemId(L2Pet.IMPROVED_BABY_BUFFALO.getControlItemId());
      control/**
       * Method exToKookaburra.
       */
      .setJdbcState(JdbcEntityState.UPDATED);
 
View Full Code Here

Examples of lineage2.gameserver.model.Summon

    if (!Config.SERVICES_EXCHANGE_BABY_PET_ENABLED)
    {
      show("Серви�? откл�?чен.", player);
      return;
    }
    Summon pl_pet = player.getSummonList().getPet();
    if ((pl_pet == null) || pl_pet.isDead() || !((pl_pet.getNpcId() == PetDataTable.IMPROVED_BABY_BUFFALO_ID) || (pl_pet.getNpcId() == PetDataTable.IMPROVED_BABY_COUGAR_ID)))
    {
      show("�?ет должен быт�? вызван.", player);
      return;
    }
    if (Config.ALT_IMPROVED_PETS_LIMITED_USE && !player.isMageClass())
    {
      show("Этот пет тол�?ко дл�? магов.", player);
      return;
    }
    if (player.getInventory().destroyItemByItemId(Config.SERVICES_EXCHANGE_BABY_PET_ITEM, Config.SERVICES_EXCHANGE_BABY_PET_PRICE))
    {
      ItemInstance control = player.getInventory().getItemByObjectId(pl_pet.getControlItemObjId());
      control.setItemId(L2Pet.IMPROVED_BABY_KOOKABURRA.getControlItemId());
      control.setJdbcState(JdbcEntityState.UPDATED);
      control.update();
      player.sendPacket(new InventoryUpdate().addModifiedItem(control));
      player.getSummonList().unsummonPet(false);
View Full Code Here

Examples of lineage2.gameserver.model.Summon

    NpcInstance npc = getNpc();
    if ((player == null) || (npc == null))
    {
      return;
    }
    Summon pl_pet = player.getSummonList().getPet();
    if (player.getInventory().getItemByItemId(WOLF_COLLAR) == null)
    {
      show("scripts/services/petevolve/no_item.htm", player, npc);
      return;
    }
    if ((pl_pet == null) || pl_pet.isDead())
    {
      show("scripts/services/petevolve/evolve_no.htm", player, npc);
      return;
    }
    if (pl_pet.getNpcId() != WOLF)
    {
      show("scripts/services/petevolve/no_wolf.htm", player, npc);
      return;
    }
    if (pl_pet.getLevel() < 55)
    {
      show("scripts/services/petevolve/no_level.htm", player, npc);
      return;
    }
    int controlItemId = pl_pet.getControlItemObjId();
    player.getSummonList().unsummonPet(false);
    ItemInstance control = player.getInventory().getItemByObjectId(controlItemId);
    control.setItemId(GREAT_WOLF_NECKLACE);
    control.setEnchantLevel(L2Pet.GREAT_WOLF.getMinLevel());
    control.setJdbcState(JdbcEntityState.UPDATED);
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.