Esempio n. 1
0
 @Override
 public void runImpl() throws Exception {
   for (NpcInstance npc : GameObjectsStorage.getAllNpcs()) {
     if (npc != null && npc.getNpcId() == 18913 && getDistance(npc) <= 1200) {
       ((FurnfaceInstance) npc).setActive2114001(i_ai9);
     }
   }
   PC_TURN = ThreadPoolManager.getInstance().schedule(new PC_TURN(), interval_time * 1000);
 }
Esempio n. 2
0
 @Override
 public void runImpl() throws Exception {
   NpcInstance npc1 = GameObjectsStorage.getAsNpc(_storedId);
   Functions.npcShout(npc1, NpcString.FURNFACE4);
   for (NpcInstance npc : GameObjectsStorage.getAllNpcs()) {
     if (npc != null && npc.getNpcId() == 18913 && getDistance(npc) <= 1200) {
       ((FurnfaceInstance) npc).setSCE_GAME_PLAYER_START();
     }
   }
   i_ai0 = 1;
 }
Esempio n. 3
0
  public void setSCE_POT_ON(int i) {
    if (i == i_ai1 && i_ai0 == 1) {
      if (i_quest9 == 1) {}
      i_ai0 = 2;
    } else if (i == i_ai2 && i_ai0 == 2) {
      if (i_quest9 == 1) {}
      i_ai0 = 3;
    } else if (i == i_ai3 && i_ai0 == 3) {
      if (i_quest9 == 1) {}
      i_ai0 = 4;
    } else if (i == i_ai4 && i_ai0 == 4) {
      if (i_quest9 == 1) {}
      i_ai0 = 5;
    } else if (i == i_ai5 && i_ai0 == 5) {
      if (i_quest9 == 1) {}
      i_ai0 = 6;
    } else if (i == i_ai6 && i_ai0 == 6) {
      if (i_quest9 == 1) {}
      i_ai0 = 7;
    } else if (i == i_ai7 && i_ai0 == 7) {
      if (i_quest9 == 1) {}
      i_ai0 = 8;
    } else if (i == i_ai8 && i_ai0 == 8) {
      if (i_quest9 == 1) {}
      i_ai0 = 9;
    } else if (i == i_ai9 && i_ai0 == 9) {
      if (i_quest9 == 1) {}
      for (NpcInstance npc : GameObjectsStorage.getAllNpcs()) {
        if (npc != null && npc.getNpcId() == 18913 && getDistance(npc) <= 1200) {
          ((FurnfaceInstance) npc).setSCE_GAME_END();
        }
      }

      SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(18934));
      switch (getAISpawnParam()) {
        case 1:
          sp.setLoc(new Location(110772, -82063, -1584));
          break;
        case 2:
          sp.setLoc(new Location(114915, -70998, -544));
          break;
      }
      sp.doSpawn(true);
      Functions.npcShout(this, NpcString.FURNFACE6);
      switch (getAISpawnParam()) {
        case 1:
          if (HURRY_UP_1 != null) {
            HURRY_UP_1.cancel(false);
            HURRY_UP_1 = null;
          }
          if (HURRY_UP2_1 != null) {
            HURRY_UP2_1.cancel(false);
            HURRY_UP2_1 = null;
          }
          break;
        case 2:
          if (HURRY_UP_2 != null) {
            HURRY_UP_2.cancel(false);
            HURRY_UP_2 = null;
          }
          if (HURRY_UP2_2 != null) {
            HURRY_UP2_2.cancel(false);
            HURRY_UP2_2 = null;
          }
          break;
      }
      c_ai0 = null;
      i_quest0 = 0;
      i_quest1 = 0;
    } else {
      for (NpcInstance npc : GameObjectsStorage.getAllNpcs()) {
        if (npc != null && npc.getNpcId() == 18913 && getDistance(npc) <= 1200) {
          ((FurnfaceInstance) npc).setSCE_GAME_FAILURE();
        }
      }
      if (i_quest9 == 1) {
      } else if (i_quest0 < 2) {
        i_quest0 = i_quest0 + 1;
        Functions.npcShout(this, NpcString.FURNFACE7);
        i_quest1 = 0;
      } else {
        switch (getAISpawnParam()) {
          case 1:
            if (HURRY_UP_1 != null) {
              HURRY_UP_1.cancel(false);
              HURRY_UP_1 = null;
            }
            if (HURRY_UP2_1 != null) {
              HURRY_UP2_1.cancel(false);
              HURRY_UP2_1 = null;
            }
            break;
          case 2:
            if (HURRY_UP_2 != null) {
              HURRY_UP_2.cancel(false);
              HURRY_UP_2 = null;
            }
            if (HURRY_UP2_2 != null) {
              HURRY_UP2_2.cancel(false);
              HURRY_UP2_2 = null;
            }
            break;
        }
        Functions.npcShout(this, NpcString.FURNFACE8);
        c_ai0 = null;
        i_quest0 = 0;
        i_quest1 = 0;
      }
    }
  }