Exemplo n.º 1
0
 /**
  * Method onEvtDead.
  *
  * @param killer Creature
  */
 @Override
 protected void onEvtDead(Creature killer) {
   final NpcInstance actor = getActor();
   if (Rnd.chance(30)) {
     Functions.npcSay(actor, "Враги! В�?�?ду враги! В�?е �?�?да, враги зде�?�?!");
   }
   actor.deleteMe();
 }
Exemplo n.º 2
0
  @Override
  public String onTalk(NpcInstance npc, QuestState st) {
    Player player = st.getPlayer();
    int npcId = npc.getNpcId();
    int state = st.getState();
    int cond = st.getCond();
    if (npcId == 32759) {
      if (state == 1) {
        if ((npc.getFollowTarget() != null) && (npc.getFollowTarget() != player)) {
          return "lost_villager_q0457_01a.htm";
        }
        if (st.getPlayer().getLevel() >= 82) {
          if (st.isNowAvailableByTime()) {
            return "lost_villager_q0457_01.htm";
          }
          return "lost_villager_q0457_02.htm";
        }
        return "lost_villager_q0457_03.htm";
      }
      if (state == 2) {
        if ((npc.getFollowTarget() != null) && (npc.getFollowTarget() != player)) {
          return "lost_villager_q0457_01a.htm";
        }
        if (cond == 1) {
          return "lost_villager_q0457_08.htm";
        }
        if (cond == 2) {
          npc.deleteMe();

          st.giveItems(15716, 1L);
          st.unset("cond");
          st.playSound("ItemSound.quest_finish");
          st.exitCurrentQuest(this);
          return "lost_villager_q0457_09.htm";
        }
      }
    }
    return "noquest";
  }
 private void despawnSoulOfWell() {
   if (SoulOfWellInstance != null) {
     SoulOfWellInstance.deleteMe();
   }
 }
 private void despawnGhostOfPriest() {
   if (GhostOfPriestInstance != null) {
     GhostOfPriestInstance.deleteMe();
   }
 }
Exemplo n.º 5
0
 /** Method runImpl. */
 @Override
 public void runImpl() {
   for (NpcInstance npc : GameObjectsStorage.getAllByNpcId(TeleportCube, true)) {
     npc.deleteMe();
   }
 }