Package l2p.gameserver.model.instances

Examples of l2p.gameserver.model.instances.L2NpcInstance.spawnMe()


    L2NpcInstance npc = template.getNewInstance();
    npc.setSpawnedLoc(loc);
    npc.onSpawn();
    npc.setHeading(loc.h);
    npc.setXYZInvisible(loc);
    npc.spawnMe();
    return npc;
  }

  public static void setScarletSpawnTask(boolean forced)
  {
View Full Code Here


        {
          L2NpcInstance npc = NpcTable.getTemplate(bro).getNewInstance();
          npc.setSpawnedLoc(((L2MonsterInstance) actor).getMinionPosition());
          npc.setReflection(actor.getReflection());
          npc.onSpawn();
          npc.spawnMe(npc.getSpawnedLoc());
          npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, Rnd.get(1, 100));
        }
        catch(Exception e)
        {
          e.printStackTrace();
View Full Code Here

        {
          npc = new L2SepulcherNpcInstance(IdFactory.getInstance().getNextId(), template);
        }
        npc.onSpawn();
        npc.setSpawnedLoc(loc);
        npc.spawnMe(loc);
        _allMobs.add(npc);
      }
    }
  }
View Full Code Here

          return false;
        }
        npc = (L2NpcInstance) obj;
        npc.setHeading(activeChar.getHeading());
        npc.decayMe();
        npc.spawnMe();
        activeChar.sendMessage("New heading : " + activeChar.getHeading());
        spawn = npc.getSpawn();
        if(spawn == null)
        {
          activeChar.sendMessage("Spawn for this npc == null!");
View Full Code Here

    npc.setSpawnedLoc(loc);
    npc.onSpawn();
    npc.setHeading(loc.h);
    npc.setXYZInvisible(loc);
    npc.setReflection(currentReflection);
    npc.spawnMe();
    return npc;
  }

  private static class ActivityTimeEnd implements Runnable
  {
View Full Code Here

        {
          L2NpcInstance npc = NpcTable.getTemplate(bro).getNewInstance();
          npc.setSpawnedLoc(((L2MonsterInstance) actor).getMinionPosition());
          npc.setReflection(actor.getReflection());
          npc.onSpawn();
          npc.spawnMe(npc.getSpawnedLoc());
          npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, Rnd.get(1, 1000));
        }
        catch(Exception e)
        {
          e.printStackTrace();
View Full Code Here

      {
        L2NpcInstance npc = NpcTable.getTemplate(npcId).getNewInstance();
        npc.setReflection(refId);
        npc.setSpawnedLoc(randomOffset > 50 ? loc.rnd(50, randomOffset, false) : loc);
        npc.onSpawn();
        npc.spawnMe(npc.getSpawnedLoc());
        return npc;
      }
    }
    catch(Exception e1)
    {
View Full Code Here

      }
    }
    L2NpcInstance GilmoreInstance = L2ObjectsStorage.getAsNpc(oldGilmore);
    if(GilmoreInstance != null)
    {
      GilmoreInstance.spawnMe();
    }
  }

  /**
   * Читает статус эвента из базы.
View Full Code Here

      return;
    }
    L2NpcInstance rewarder = new L2NpcInstance(IdFactory.getInstance().getNextId(), template);
    rewarder.setXYZInvisible(spawnLoc);
    rewarder.setHeading((int) (Math.atan2(spawnLoc.y - rewarded.getY(), spawnLoc.x - rewarded.getX()) * L2Character.HEADINGS_IN_PI) + 32768); // Лицом к игроку
    rewarder.spawnMe();
    Functions.npcSayCustomMessage(rewarder, "scripts.events.SavingSnowman.RewarderPhrase1");
    Location targetLoc = Location.getAroundPosition(rewarded, rewarded, 40, 50, 10);
    rewarder.setSpawnedLoc(targetLoc);
    rewarder.broadcastPacket(new CharMoveToLocation(rewarder.getObjectId(), rewarder.getLoc(), targetLoc));
    executeTask("events.SavingSnowman.SavingSnowman", "reward", new Object[] {rewarder, rewarded}, 5000);
View Full Code Here

    try
    {
      L2NpcInstance npc = NpcTable.getTemplate(npcId).getNewInstance();
      npc.setSpawnedLoc(loc.correctGeoZ());
      npc.onSpawn();
      npc.spawnMe(npc.getSpawnedLoc());
      return npc;
    }
    catch(Exception e)
    {
      e.printStackTrace();
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.