close_btn
로그인, 회원가입후 더 많은 혜택을 누리세요 로그인 회원가입 닫기

오림시스템

2016.05.18 22:04

김닉넴 조회 수:80

몬스터는 나비켓으로 만드세요..

 

따로 안만들어드리겠습니다.

공부공부!! 만드시는법 모르시는분은 검색 하셔서 한번해보세요! 참쉽죠잉

 

주의!

제 팩은 에바팩이 아닙니다 에바이용하시는분들은 자바 설정잘하시구. 단어 잘보세요

 

 

C_NpcAction.java

 

import l1j.server.model.L1OrimQuest; //추가

 

htmlid = "";//검색

 

} else if (((L1NpcInstance) obj). getNpcTemplate (). getNpcId () == 91329) { //오림

   if (s.equalsIgnoreCase ( "enter")) {
 
    boolean entrance = false;
 
    if (pc.isInParty ()) {

     if (pc.getParty (). isLeader (pc)) { 
      int members = 1;

      for (L1PcInstance player : L1World.getInstance (). getVisiblePlayer (pc)) {
 
       if (pc.getParty (). isMember (player)) {
 
        members + +;
 
        if (pc.getParty (). getNumOfMembers () == members &&
 
          pc.getParty (). getNumOfMembers ()> 1) {
 
                  entrance = true;
 
        }
 
       }
 
      }
 
     }
 
    }
 
    if (pc.isGm ()) {

     int instanceMap = L1OrimQuest.getInstance (). setActiveMaps (9101);
 
     L1Teleport.teleport (pc, 32798, 32805, (short) (instanceMap), 6, true);
 
     L1OrimQuest.getInstance (). getActiveMaps (instanceMap). start ();
 
     return;
 
    }
 
    if (entrance) {/ / 입장 
     if (L1OrimQuest.getInstance (). getNumOfActiveMaps () <50) {
 
      int instanceMap = L1OrimQuest.getInstance (). setActiveMaps (9101);
 
      for (L1PcInstance ptmember : pc.getParty (). getMembers ()) {
 
       L1PolyMorph.undoPoly (ptmember) ;

       L1Teleport.teleport (ptmember, 32798, 32805, (short) (instanceMap), 6, true);

      }

      L1OrimQuest.getInstance (). getActiveMaps (instanceMap). start ();

     }
 
    } else {
 
     htmlid = "";
 
    }

   }
/////////////////////////////////

} else {
  htmlid = "j_html02";
  
    } //검색

////////////////////추가////
} else if (s.equalsIgnoreCase ( "b")) {

    if (! pc.isGm ()) {

     return;

    }

    if (pc.getInventory (). checkItem (L1ItemId.ADENA 10000)

      && pc.getInventory (). checkItem (50025, 1)) {

     int mate = 1;

     if (pc.getInventory (). countItems (50025)> 3) {

      mate = pc.getInventory (). countItems (50025) - 2;

     }

     if (! pc.isGm ()) {

      pc.getInventory (). consumeItem (50025, mate);

      pc.getInventory (). consumeItem (L1ItemId.ADENA, 10000);

     }
 
     htmlid = "";

     L1Teleport
 
       . teleport (pc, 32745, 32855, (short) 9202, 6, true);
 
    } else {
 
     htmlid = "j_html02";
 
    }
////////////////////////////////////

} else {
  htmlid = "j_html06";
  
    } //검색

////////////추가
} else if (s.equalsIgnoreCase ( "e")) {

    if (pc.getInventory (). checkItem (50026,1) / / 오림의 일기 6 월 14 일

      && pc.getInventory (). checkItem (50027,1) / / 오림의 일기 6 월 16 일

      && pc.getInventory (). checkItem (50028,1) / / 오림의 일기 6 월 18 일

      && pc.getInventory (). checkItem (50029,1) / / 오림의 일기 6 월 21 일

      && pc.getInventory (). checkItem (50030,1) / / 오림의 일기 6 월 22 일
 
      && pc.getInventory (). checkItem (50031,1) / / 오림의 일기 6 월 25 일
 
      && pc.getInventory (). checkItem (50032,1) / / 오림의 일기 7 월 5 일
 
      && pc.getInventory (). checkItem (50033,1) / / 오림의 일기 7 월 17 일

      && pc.getInventory (). checkItem (50034,1) / / 오림의 일기 7 월 18 일
 
      && pc.getInventory (). checkItem (50035,1) / / 오림의 일기 8 월 5 일
 
      && pc.getInventory (). checkItem (50036,1) / / 오림의 일기 8 월 8 일

      && pc.getInventory (). checkItem (50037,1) / / 오림의 일기 8 월 9 일

      && pc.getInventory (). checkItem (50038,1) / / 오림의 일기 8 월 10 일

      && pc.getInventory (). checkItem (50039,1) / / 오림의 일기 8 월 11 일

      && pc.getInventory (). checkItem (50040,1) / / 오림의 일기 8 월 12 일

      && pc.getInventory (). checkItem (50041,1) / / 오림의 일기 8 월 13 일

      && pc.getInventory (). checkItem (50042,1) / / 오림의 일기 8 월 14 일


     ) {

     materials = new int [] {50026,50027,50028,50029,50030,50031,50032,50033,

        50034,50035,50036,50037,50038,50039,50040,50041,50042,50043}; / / 아데나,

     counts = new int [] {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};

     createitem = new int [] {50044}; / / 오림의 일기장

     createcount = new int [] {1};
 
     htmlid = "j_html04";

    } else {
 
     htmlid = "j_html06";
 
    }
   }
//////////////////////////////////////////////
S_RedMessage.java 자바 한개만드세요 없는분들
////////////////////////////////////////////

 
 /* This program is free software : you can redistribute it and / or modify
 
 * it under the terms of the GNU General Public License as published by
 
 * the Free Software Foundation, either version 3 of the License, or
 
 * (at your option) any later version.
 
 * 
 
 * This program is distributed in the hope that it will be useful,
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
 * GNU General Public License for more details.
 
 * 
 
 * You should have received a copy of the GNU General Public License
 
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 
 * /
 
package l1j.server.packets.server;
 
import java.util.logging.Logger;
 
import l1j.server.codes.Opcodes;
 
public class S_RedMessage extends ServerBasePacket {
 
 private static Logger _log = Logger.getLogger (S_RedMessage.class.getName ());
 
 private static final String S_RedMessage = "[S] S_RedMessage";
 
 public S_RedMessage (String s) {
 
  writeC (Opcodes.S_OPCODE_ACTIVESPELLS);
 
  writeC (0x54);
 
  writeC (0x02);
 
  writeS ( "\ \ f3"+ s);
 
 }
 
 @ Override
 
 public byte [] getContent () {
 
  return getBytes ();
 
 }
 
 @ Override
 
 public String getType () {
 
  return S_RedMessage;
 
 } 
}
//////////////////////////
S_DisplayClack.java 만드세요
/////////////////////////

/* This program is free software : you can redistribute it and / or modify
 
 * it under the terms of the GNU General Public License as published by
 
 * the Free Software Foundation, either version 3 of the License, or
 
 * (at your option) any later version.
 
 * 
 
 * This program is distributed in the hope that it will be useful,
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
 * GNU General Public License for more details.
 
 * 
 
 * You should have received a copy of the GNU General Public License
 
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 
 * /

package l1j.server.packets.server;
 
import java.util.logging.Logger;
 
import l1j.server.codes.Opcodes;
 
public class S_DisplayClack extends ServerBasePacket {
 
 private static Logger _log = Logger.getLogger (S_DisplayClack.class.getName ());
 
 private static final String S_DisplayClack = "[S] S_DisplayClack";
 
 public S_DisplayClack () {
 
  writeC (Opcodes.S_OPCODE_ACTIVESPELLS);
 
  writeC (0x53);
 
  writeC (0x01);
 
  writeC (0x00);
 
  writeC (0x00);
 
  writeC (0x00);
 
  writeC (0x01);
 
  writeC (0x1d);
 
 }
 
 @ Override
 
 public byte [] getContent () {
 
  return getBytes ();
 
 }
 
 @ Override
 
 public String getType () {
 
  return S_DisplayClack;
 
 } 
}
//////////////////
S_YellowMessage.java 만드세요
/////////////////

/* This program is free software : you can redistribute it and / or modify
 
 * it under the terms of the GNU General Public License as published by
 
 * the Free Software Foundation, either version 3 of the License, or
 
 * (at your option) any later version.
 
 * 
 
 * This program is distributed in the hope that it will be useful,
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
 * GNU General Public License for more details.
 
 * 
 
 * You should have received a copy of the GNU General Public License
 
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 
 * /
package l1j.server.packets.server;

import java.util.logging.Logger;
 
import l1j.server.codes.Opcodes;
 
public class S_YellowMessage extends ServerBasePacket {
 
 private static Logger _log = Logger.getLogger (S_YellowMessage.class.getName ());
 
 private static final String S_YellowMessage = "[S] S_YellowMessage";
 
 public S_YellowMessage (String s) {
 
  writeC (Opcodes.S_OPCODE_ACTIVESPELLS);
 
  writeC (0x54);
 
  writeC (0x02);
 
  writeS ( "\ \ f ="+ s);
 
 }
 
 @ Override
 
 public byte [] getContent () {
 
  return getBytes ();
 
 }
 
 @ Override
 
 public String getType () {
 
  return S_YellowMessage;
 
 } 
}
///////////////
S_BlackWindow.java 만드세요
/////////////////////

/* This program is free software : you can redistribute it and / or modify
 
 * it under the terms of the GNU General Public License as published by
 
 * the Free Software Foundation, either version 3 of the License, or
 
 * (at your option) any later version.
 
 * 
 
 * This program is distributed in the hope that it will be useful,
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
 * GNU General Public License for more details.
 
 * 
 
 * You should have received a copy of the GNU General Public License
 
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 
 * /
package l1j.server.packets.server;
 
import java.util.logging.Logger;
 
import l1j.server.codes.Opcodes;
 
public class S_BlackWindow extends ServerBasePacket {

 private static Logger _log = Logger.getLogger (S_BlackWindow.class.getName ());
 
 private static final String S_BlackWindow = "[S] S_BlackWindow";
 
 public S_BlackWindow () {
 
  writeC (Opcodes.S_OPCODE_ACTIVESPELLS);
 
  writeC (0x53);
 
  writeC (0x04);
 
  writeC (0x00);
 
  writeC (0x00);
 
  writeC (0x00);
 
  writeC (0x01);
 
  writeC (0x1d);
 
 }
 
 @ Override
 
 public byte [] getContent () {
 
  return getBytes ();

 }
 
 @ Override

 public String getType () {
 
  return S_BlackWindow;
 
 } 
}

l1j/server/templates/L1DoorGfx.java


Private L1DoorGfx (int gfxId, int direction, int rightEdgeOffset, //이것을
Public L1DoorGfx (int gfxId, int direction, int rightEdgeOffset,  //이것으로

//////////////////////
model/L1OrimQuest.java 만드세요
//////////////////////////

package l1j.server.model;
 
import java.util.HashMap;
 
import java.util.logging.Logger;

import l1j.server.model.etc.L1OrimQuestInstance;
 
import l1j.server.model.map.L1InstanceMap;
 
public class L1OrimQuest {
 
 private static Logger _log = Logger.getLogger (L1OrimQuest.class.getName ());
 
 
 
 private static HashMap <Integer, L1OrimQuestInstance> _activeMaps;

 private static L1OrimQuest _instance;
 
 public static L1OrimQuest getInstance () {
 
  if (_instance == null) {
 
   _instance = new L1OrimQuest ();
 
  }
 
  return _instance;
 
 }
 

 L1OrimQuest () {
 
  _activeMaps = new HashMap <Integer, L1OrimQuestInstance> ();
 
 }
 
  ///////////////////////지정자////
 
 public L1OrimQuestInstance getActiveMaps (int mapId) {

  if (! _activeMaps.containsKey (mapId)) {

   return null;
 
  }
 
  return _activeMaps.get (mapId);
 
 }

 ///////////해쉬맵///
 
 public short setActiveMaps (int mapId) {
 
  int instanceMapId = L1InstanceMap.getInstance (). addInstanceMap (mapId);
 
  L1OrimQuestInstance obj = new L1OrimQuestInstance ((short) instanceMapId);
 
  _activeMaps.put (instanceMapId, obj);
 
  return obj.getMapId ();
 
 }
 
 
 
 ////////완료부분 맵가동///
 
 public void resetActiveMaps (int mapId) {
 
  if (! _activeMaps.containsKey (mapId)) {
 
   return;
 
  }
 
  _activeMaps.remove (mapId);
 
  L1InstanceMap.getInstance (). removeInstanceMap (mapId);
 
 }
 
 
 
         ///시작할때 //
 
 public int getNumOfActiveMaps () {
 
  return _activeMaps.size ();
 
 }
 
}


L1NpcInstance.java
import l1j.server.model.L1OrimQuest; //추가

 

 else if (getNpcId () == 91297) {//검색

윗 부분에

if (L1HardinQuest.getInstance (). getActiveMaps (getMapId ()). isActive ()) { //추가
L1HardinQuest.getInstance (). getActiveMaps (getMapId ()). setActionHardin (pc, actionId);

 else if (getNpcId () == 91297) {//검색

       아랫부분에

if (L1HardinQuest.getInstance (). getActiveMaps (getMapId ()). isActive ()) {
    L1HardinQuest.getInstance (). getActiveMaps (getMapId ()). setActionKerenis (pc, actionId);

   }

  } else if (getNpcId () == 91449) {/ / 배


    L1OrimQuest.getInstance (). getActiveMaps (getMapId ()). setAction (pc, actionId);
   }

L1MonsterInstance.java 
import l1j.server.model.L1OrimQuest;//추가

private void doExecutionWhenNpcDied () throws InterruptedException {//검색
if (91265 <= getNpcId () && 91268> = getNpcId ()) { //추가

. lunkerDie (this);//검색
}
}

} else if (getNpcId () == 91455) {/ / 주술 미믹

   if (L1OrimQuest.getInstance (). getActiveMaps (getMapId ())! = null) {

    L1OrimQuest.getInstance (). getActiveMaps (getMapId ()). mimicDie (this);

   }
 
  } else if (getNpcId () == 91481) {/ / 크라켄
 
   if (L1OrimQuest.getInstance (). getActiveMaps (getMapId ())! = null) {

    L1OrimQuest.getInstance (). getActiveMaps (getMapId ()). crakenDead ();
 
   }

  } else if (getNpcId () == 91492) {/ / 오른쪽

   if (L1OrimQuest.getInstance (). getActiveMaps (getMapId ())! = null) {
 
    L1OrimQuest.getInstance (). getActiveMaps (getMapId ()). crakenTailDead_Right ();
 
   }

  } else if (getNpcId () == 91491) {/ /  왼쪽
 
   if (L1OrimQuest.getInstance (). getActiveMaps (getMapId ())! = null) {

    L1OrimQuest.getInstance (). getActiveMaps (getMapId ()). crakenTailDead_Left ();
 
   }

 

그다음 적정부분에

 

private boolean _isCurseMimic;

 public void setCurseMimic (boolean curseMimic) {

  _isCurseMimic = curseMimic;
 
 }


 public boolean isCurseMimic () {
 
  return _isCurseMimic;
 
 } 
}

L1TrodSwitch.java

import l1j.server.model.L1OrimQuest; //임포트 추가
import l1j.server.model.L1Teleport;
import l1j.server.model.instance.L1PcInstance;

           L1Location loc; //검색 
   switch (_switchId) {

  class SwitchThread implements Runnable { //변경 기존거 주석처리. 혹시대비.
  
  @ Override

  public void run () {

 

   / / IF 문은 else 구성

   try {
 
    int mapId = _trodFrom.getMapId ();
 
    boolean onPc;
 
    L1Location loc;

    switch (_switchId) {

L1Location (32666,32797, _trodFrom.getMapId ()), 5); //검색
    break;

case 14 :/ /추가
 
     if (L1OrimQuest.getInstance (). getActiveMaps (mapId) == null) return;

     L1Teleport.teleport (_trodFrom, new L1Location (32677,32800, _trodFrom.getMapId ()), 5, true);
 
    break;
 
    case 15 :/ / 과거 오림의 연락선 -> 선내에

     if (L1OrimQuest.getInstance (). getActiveMaps (mapId) == null) return;
 
     L1Teleport.teleport (_trodFrom, new L1Location (32677,32864, _trodFrom.getMapId ()), 5, true);

    break;
 
    case 16 :/ / 과거 오림의 연락선 -> 선내에
 
     if (L1OrimQuest.getInstance (). getActiveMaps (mapId) == null) return;
 
     L1Teleport.teleport (_trodFrom, new L1Location (32741,32860, _trodFrom.getMapId ()), 5, true);

    break;
 
    case 17 :/ / 과거 오림의 연락선 -> 선내에
 
     if (L1OrimQuest.getInstance (). getActiveMaps (mapId) == null) return;
 
     L1Teleport.teleport (_trodFrom, new L1Location (32805,32862, _trodFrom.getMapId ()), 5, true);
 
    break;

    case 18 :/ / 선내 -> 과거 오림의 연락선에

     if (L1OrimQuest.getInstance (). getActiveMaps (mapId) == null) return;
 
     L1Teleport.teleport (_trodFrom, new L1Location (32792,32802, _trodFrom.getMapId ()), 2, true);
 
    break;

///////////////////////
L1OrimQuestInstance.java 만드세요
//////////////////////


/*
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <
http://www.gnu.org/licenses/>.
 */

package jp.l1j.server.model.etc;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Timer;
import java.util.TimerTask;
import l1j.server.codes.ActionCodes;
import l1j.server.datatables.DoorTable;
import l1j.server.datatables.NpcTable;
import l1j.server.datatables.TrapTable;
import l1j.server.model.L1Location;
import l1j.server.model.L1Object;
import l1j.server.model.L1OrimQuest;
import l1j.server.model.L1Teleport;
import l1j.server.model.L1World;
import l1j.server.model.instance.L1DoorInstance;
import l1j.server.model.instance.L1EffectInstance;
import l1j.server.model.instance.L1FieldObjectInstance;
import l1j.server.model.instance.L1ItemInstance;
import l1j.server.model.instance.L1MonsterInstance;
import l1j.server.model.instance.L1NpcInstance;
import l1j.server.model.instance.L1PcInstance;
import l1j.server.model.instance.L1TrapInstance;
import l1j.server.model.inventory.L1Inventory;
import l1j.server.model.trap.L1Trap;
import l1j.server.model.trap.L1WorldTraps;
import l1j.server.packets.server.S_BlackWindow;
import l1j.server.packets.server.S_DisplayClack;
import l1j.server.packets.server.S_DoActionGFX;
import l1j.server.packets.server.S_EffectLocation;
import l1j.server.packets.server.S_GreenMessage;
import l1j.server.packets.server.S_NpcPack;
import l1j.server.packets.server.S_RedMessage;
import l1j.server.packets.server.S_ShockWave;
import l1j.server.packets.server.S_SkillSound;
import l1j.server.packets.server.S_Sound;
import l1j.server.packets.server.S_YellowMessage;
import l1j.server.packets.server.ServerBasePacket;
import l1j.server.random.RandomGenerator;
import l1j.server.random.RandomGeneratorFactory;
import l1j.server.templates.L1DoorGfx;
import l1j.server.types.Point;
import l1j.server.utils.IdFactory;

public class L1OrimQuestInstance {
 private short _mapId;  //만들어진 맵 
 private int _OrimQuestStatus;//진행상태보자 귀찬게하는 오림이네
 private boolean _isDeleteTransactionNow;//선박 장비 사용하니?너니?
 private boolean _acceptOrder;/
 private int _comeShipCount ;
 private boolean _extraShipCome;
 private boolean _isRankSelected;
 private boolean _isCrakenDead;
 private boolean _isLastBossDead;

 private L1NpcInstance _ship;
 private L1NpcInstance _diffence_rune_1;
 private L1NpcInstance _diffence_rune_2;
 private L1NpcInstance _attack_rune;
 private L1NpcInstance _portal_rune;
 private L1NpcInstance _cannon_1;
 private L1NpcInstance _cannon_2;
 private L1NpcInstance _shipWall;
 private L1NpcInstance _craken_tail_left;
 private L1NpcInstance _craken_tail_right;
 private L1MonsterInstance _mimic_A;
 private L1MonsterInstance _mimic_B;
 private L1MonsterInstance _mimic_C;
 private L1DoorInstance _createDoor;
 private L1TrapInstance _moveTrap;
 private int _startPoint;
 private int _endPoint;

 private int[] _roundDiffenceStatus= new int[12];
 private int[] _roundHitDamage= new int[12];
 private int[] _roundStatus = new int[12];
 private int[] _bonusRoundStatus = new int[12];
 private int _currentRound;
 private int _point;//위치 저장합세
 private int _ship_burning;
 private int _tempNpcNumber;
 private static RandomGenerator _random = RandomGeneratorFactory.newRandom();
 void init(){
  _cannon_1 = spawnOne(new L1Location(32803,32809,_mapId),91450 ,0);
  _cannon_2 = spawnOne(new L1Location(32792,32809,_mapId),91451 ,0);
  _cannon_1.getMap().setPassable(32803, 32809, false);
  _cannon_2.getMap().setPassable(32792, 32809, false);
  _shipWall = spawnOne(new L1Location(32799,32806,_mapId),91449 ,0);
  _shipWall.setStatus(32);
  L1DoorGfx gfx = new L1DoorGfx(2510, 0, 10, -10);

  _createDoor = DoorTable.getInstance().createDoor(0, gfx,
    new L1Location(32798, 32795, _mapId), 0, 0, false);
  spawnOne(new L1Location(32677,32800,_mapId), 91452, 0);//포탈
  spawnOne(new L1Location(32677,32864,_mapId), 91452, 0);//포탈
  spawnOne(new L1Location(32741,32860,_mapId), 91452, 0);//포탈
  spawnOne(new L1Location(32805,32862,_mapId), 91452, 0);///포탈
  setSwitch(new L1Location(32677,32800,_mapId), 74);//포탈
  setSwitch(new L1Location(32677,32864,_mapId), 74);///포탈
  setSwitch(new L1Location(32741,32860,_mapId), 74);///포탈
  setSwitch(new L1Location(32805,32862,_mapId), 74);///포탈
 }

 public static final int _STATUS_ORIMQUEAT_NonE = 0;
 public static final int _STATUS_ORIMQUEAT_READY_1 = 1;
 public static final int _STATUS_ORIMQUEAT_READY_2= 2;
 public static final int _STATUS_ORIMQUEAT_READY_3 = 3;
 public static final int _STATUS_ORIMQUEAT_READY_4 = 4;
 public static final int _STATUS_ORIMQUEAT_READY_5 = 30;
 public static final int _STATUS_ORIMQUEAT_READY_6 = 31;
 public static final int _STATUS_ORIMQUEAT_READY_7 = 32;
 public static final int _STATUS_ORIMQUEAT_READY_8 = 33;
 public static final int _STATUS_ORIMQUEAT_READY_8_1 = 50;
 public static final int _STATUS_ORIMQUEAT_READY_8_2 = 51;
 public static final int _STATUS_ORIMQUEAT_READY_8_3 = 52;
 public static final int _STATUS_ORIMQUEAT_READY_9 = 34;
 public static final int _STATUS_ORIMQUEAT_READY_10 = 35;
 public static final int _STATUS_ORIMQUEAT_READY_11 = 36;
 public static final int _STATUS_ORIMQUEAT_READY_11_1 = 37;
 public static final int _STATUS_ORIMQUEAT_READY_11_2 = 38;

 public static final int _STATUS_ORIMQUEAT_START = 5;
 public static final int _STATUS_ORIMQUEAT_START_2 = 6;
 public static final int _STATUS_ORIMQUEAT_START_2_1 = 7;
 public static final int _STATUS_ORIMQUEAT_START_2_2 = 8;
 public static final int _STATUS_ORIMQUEAT_START_2_3 = 9;
 public static final int _STATUS_ORIMQUEAT_START_2_4 = 10;
 public static final int _STATUS_ORIMQUEAT_START_3 = 11;
 public static final int _STATUS_ORIMQUEAT_START_3_1 = 12;
 public static final int _STATUS_ORIMQUEAT_START_3_2 = 13;
 public static final int _STATUS_ORIMQUEAT_START_3_3 = 14;
 public static final int _STATUS_ORIMQUEAT_END_1 = 15;
 public static final int _STATUS_ORIMQUEAT_END_2 = 16;
 public static final int _STATUS_ORIMQUEAT_END_3 = 17;
 public static final int _STATUS_ORIMQUEAT_END_4 = 18;
 public static final int _STATUS_ORIMQUEAT_END_5 = 19;
 public static final int _STATUS_ORIMQUEAT_END_6 = 21;
 public static final int _STATUS_ORIMQUEAT_END = 20;

 public static final int _STATUS_MOVE_SHIP_1 = 99;
 public static final int _STATUS_MOVE_SHIP_2 = 98;
 public static final int _STATUS_MOVE_SEA_MonSTER = 100;
 public static final int _STATUS_ORIMQUEST_MonITOR = 1000;
 public static final int _STATUS_SPAWN_MonSTERS = 10001;
 public static final int _STATUS_CREATE_RUNES = 10002;
 public static final int _STATUS_ENEMY_CANON = 10003;
 public static final int _STATUS_FIRE_CANON_1 = 10004;
 public static final int _STATUS_FIRE_CANON_2 = 10005;

 static final int STATUS_ORIMQUEAT_LIMIT = 25;
 static final int STATUS_ORIMQUEAT_LIMIT2 = 26;
 static final int STATUS_ORIMQUEAT_LIMIT3 = 27;

 public boolean _IS_SPAWN_SHIP_TYPEA ;
 public boolean _IS_SPAWN_SHIP_TYPEB ;
 public boolean _IS_SPAWN_SHIP_TYPEC ;

 public static final int STATUS_NonE = 0;
 public static final int STATUS_READY_SPAWN = 1;
 public static final int STATUS_SPAWN = 2;

 private int _action;//액션값 뭐냐

 private int[] _pointMessages = {10638,10639,10640,10641,10642,
   10643,10644,10645,10646,10647,10648,10649,10666,10667,10668,10669,10670,10671,10672,
   10673,10674,10675,10676,10677,10678,10679,10680,10681,10682,10683,10684,10685,10686};

 private int[] _monstersA = { 91278, //몬스터이름 쓰는게 귀찬아 시간날때 하귀
         91273, 
         91459, 
         91457, 
         91456, 
         91458, 
         91460, 
         91464, 
         91461, 
         91280, 
         91462, 
         91463, 
         91495, 
         91292, 
         91465, 
         91466, 
         91467, 
         91468, 
         91469, 
         91470 
        };
 private int[] _monstersB = { 45374, //몬스터이름 쓰는게 귀찬아 시간날때 하귀
         45825, 
         45827, 
         45874, 
        };
 private int[] _monstersC = { 46057, //몬스터이름 쓰는게 귀찬아 시간날때 하귀
         46056, 
         46059, 
         46058, 
         45502 
        };

 public L1OrimQuestInstance(short mapId) {
  setMapId(mapId);
  init();//처음으로 초기화
 }

 /**
  * 시작해보자
  */
 public void start() {
  if(_STATUS_ORIMQUEAT_NONE  == _OrimQuestStatus){
   OrimQuestTimer timer_start = new OrimQuestTimer(
     _STATUS_ORIMQUEAT_NONE, 0);
   timer_start.begin();
  }
 }

 /**
  * 스레뒤
  */
 class OrimQuestTimer extends TimerTask {
  int _time;//시작
  int _order;//처리구간
  OrimQuestTimer(int order,int time){
   _time= time;
   _order= order;
  }

  public void begin() {
   final Timer timer = new Timer();
   timer.schedule(this, _time);
  }

  @Override
  public void run() {
   if(!_isDeleteTransactionNow){//
    switch (_order) {
     /**********시작하자고 **************/
     case _STATUS_ORIMQUEAT_NONE:
      setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_1);//상태확인
      OrimQuestTimer timer_1 = new OrimQuestTimer(
         _STATUS_ORIMQUEAT_READY_1, 12000);
      timer_1.begin();
      //모니터용
      OrimQuestTimer monitor = new OrimQuestTimer(
         _STATUS_ORIMQUEST_MONITOR,30000);
      monitor.begin();
     break;
     case _STATUS_ORIMQUEAT_READY_1:
      setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_2);
      sendMessage("$9529", 0); 
      OrimQuestTimer timer_2 = new OrimQuestTimer(
        _STATUS_ORIMQUEAT_READY_2, 8000);
      timer_2.begin();
     break;
     case _STATUS_ORIMQUEAT_READY_2:
      _action = 0;
      setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_3);
      sendMessage("$9530", 0); 
      OrimQuestTimer timer_3 = new OrimQuestTimer(
        _STATUS_ORIMQUEAT_READY_3, 8000);
      timer_3.begin();
     break;
     case _STATUS_ORIMQUEAT_READY_3:
      int action = _action ;
      _action = 0;

      if(action == 68){
       setOrimQuestStatus(_STATUS_ORIMQUEAT_START);
       OrimQuestTimer timer_start1 = new OrimQuestTimer(
         _STATUS_ORIMQUEAT_START, 8000);
       timer_start1.begin();
      }else{
       
       setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_4);
       sendMessage("$9531", 0); 
       OrimQuestTimer timer_4 = new OrimQuestTimer(
         _STATUS_ORIMQUEAT_READY_4, 8000);
       timer_4.begin();
      }
     break;
     case _STATUS_ORIMQUEAT_READY_4:
      setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_5);
      sendMessage("$9532", 0); 
      OrimQuestTimer timer_5 = new OrimQuestTimer(
        _STATUS_ORIMQUEAT_READY_5, 8000);
      timer_5.begin();
     break;
     case _STATUS_ORIMQUEAT_READY_5:
      setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_6);
      sendMessage("$9533", 0); 
      OrimQuestTimer timer_6 = new OrimQuestTimer(
        _STATUS_ORIMQUEAT_READY_6, 8000);
      timer_6.begin();
     break;
     case _STATUS_ORIMQUEAT_READY_6:
      setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_7);
      sendMessage("$9534", 0); 
      _attack_rune = spawnOne(L1Location.randomLocation(new L1Location(32799,32803,_mapId), 1, 6, false), 91454, 5);
      OrimQuestTimer timer_7 = new OrimQuestTimer(
        _STATUS_ORIMQUEAT_READY_7, 8000);
      timer_7.begin();
     break;
     case _STATUS_ORIMQUEAT_READY_7:
      setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_8);
      sendMessage("$9535", 0); 
      OrimQuestTimer timer_8 = new OrimQuestTimer(
        _STATUS_ORIMQUEAT_READY_8, 8000);
      timer_8.begin();
     break;
     case _STATUS_ORIMQUEAT_READY_8:
      _action = 0;
      setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_8_1);
      sendMessage("$9536", 0); 
      OrimQuestTimer timer_8_1 = new OrimQuestTimer(
        _STATUS_ORIMQUEAT_READY_8_1, 8000);
      timer_8_1.begin();
     break;
     case _STATUS_ORIMQUEAT_READY_8_1:
      if(_attack_rune == null){
       setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_9);
       OrimQuestTimer timer_9 = new OrimQuestTimer(
         _STATUS_ORIMQUEAT_READY_9, 8000);
       timer_9.begin();
      }else{
       setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_8_2);
       sendMessage("$9545", 0); 
       OrimQuestTimer timer_8_2 = new OrimQuestTimer(
         _STATUS_ORIMQUEAT_READY_8_2, 8000);
       timer_8_2.begin();
      }

     break;
     case _STATUS_ORIMQUEAT_READY_8_2:
      if(_attack_rune == null){
       setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_9);
       OrimQuestTimer timer_9 = new OrimQuestTimer(
         _STATUS_ORIMQUEAT_READY_9, 8000);
       timer_9.begin();
      }else{
       setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_9);
       sendMessage("$9546", 0); 
       OrimQuestTimer timer_9 = new OrimQuestTimer(
         _STATUS_ORIMQUEAT_READY_9, 8000);
       timer_9.begin();
      }

     break;
     case _STATUS_ORIMQUEAT_READY_9:
      setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_10);
      sendMessage("$9537", 0); 
      OrimQuestTimer timer_10 = new OrimQuestTimer(
        _STATUS_ORIMQUEAT_READY_10, 8000);
      timer_10.begin();
     break;
     case _STATUS_ORIMQUEAT_READY_10:
      setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_11);
      sendMessage("$9538", 0); 
      _diffence_rune_1 = spawnOne(L1Location.randomLocation(new L1Location(32799,32803,_mapId), 1, 6, false), 91453, 5);
      _diffence_rune_2 = spawnOne(L1Location.randomLocation(new L1Location(32799,32803,_mapId), 1, 6, false), 91453, 5);
      OrimQuestTimer timer_11 = new OrimQuestTimer(
        _STATUS_ORIMQUEAT_READY_11, 8000);
      timer_11.begin();
     break;
     case _STATUS_ORIMQUEAT_READY_11:
      _action = 0;
      setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_11_1);
      sendMessage("$9539", 0); 
      OrimQuestTimer timer_11_1 = new OrimQuestTimer(
        _STATUS_ORIMQUEAT_READY_11_1, 8000);
      timer_11_1.begin();
     break;

     case _STATUS_ORIMQUEAT_READY_11_1:
      if(_diffence_rune_1 == null && _diffence_rune_2 == null ){
       setOrimQuestStatus(_STATUS_ORIMQUEAT_START);
       OrimQuestTimer timer_start = new OrimQuestTimer(
         _STATUS_ORIMQUEAT_START, 8000);
       timer_start.begin();
      }else{
       setOrimQuestStatus(_STATUS_ORIMQUEAT_READY_11_2);
       sendMessage("$9545", 0);
       OrimQuestTimer timer_11_2 = new OrimQuestTimer(
         _STATUS_ORIMQUEAT_READY_11_2, 8000);
       timer_11_2.begin();
      }

     break;
     case _STATUS_ORIMQUEAT_READY_11_2:
      if(_diffence_rune_1 == null && _diffence_rune_2 == null ){
       setOrimQuestStatus(_STATUS_ORIMQUEAT_START);
       OrimQuestTimer timer_start = new OrimQuestTimer(
         _STATUS_ORIMQUEAT_START, 8000);
       timer_start.begin();
      }else{
       setOrimQuestStatus(_STATUS_ORIMQUEAT_START);
       sendMessage("$9546", 0); 
       OrimQuestTimer timer_start = new OrimQuestTimer(
         _STATUS_ORIMQUEAT_START, 8000);
       timer_start.begin();
      }

     break;
     /********** 끝   **************/

     case _STATUS_ORIMQUEAT_START:
      clearAllRune();
     try {
      sendMessage("$9540", 0);
      for(int round=0;round<12;round++){
       _currentRound = round;//
       Thread.sleep(3000);
       if(round==0){
        sendMessage("$9603", 0); 
        sendPackets(new S_DisplayClack());
        sendPackets(new S_Sound(82));
        OrimQuestTimer spawn = new OrimQuestTimer(
          _STATUS_SPAWN_MONSTERS, 0);
        spawn.begin();
        Thread.sleep(35000);
        int monsterCount = checkAliveMonster();
        if(monsterCount >= 5 && monsterCount <= 7){

         _startPoint = 0;
         _endPoint = 5;
        }else if(monsterCount >= 3 && monsterCount <= 4){

         _startPoint = 2;
         _endPoint = 7;
        }else if(monsterCount == 2){
         _startPoint = 10;
         _endPoint = 19;
        }else if(monsterCount == 1){
         _startPoint = 8;
         _endPoint = 12;
        }else if(monsterCount == 0){
         _startPoint = 5;
         _endPoint = 9;
        }

       }

       Thread.sleep(5000);
       sendMessage("$9548", 0);
       int i = _random.nextInt(4);
       _bonusRoundStatus[round]=i;
       Thread.sleep(5000);
       if(i==0){
        L1NpcInstance temp = spawnOne(new L1Location(32803,32788,_mapId),91445,4);
        temp.broadcastPacket(new S_DoActionGFX(temp.getId(), 0));
        sendMessage("$", 0);
        deleteNpc(temp);
       }else{
        L1NpcInstance temp = null;
        if(i==1){
         int rd = _random.nextInt(4)+3;
         _tempNpcNumber = 91483;
         for(int z = 0;z<rd;z++){
          OrimQuestTimer timer = new OrimQuestTimer(
            _STATUS_MOVE_SEA_MONSTER, 0);
          timer.begin();
         }
         sendMessage("$9542", 0);
        }else if(i==2){
         int rd = _random.nextInt(4)+3;
         _tempNpcNumber = 91482;
         for(int z = 0;z<rd;z++){
          OrimQuestTimer timer = new OrimQuestTimer(
            _STATUS_MOVE_SEA_MONSTER, 0);
          timer.begin();
         }
         sendMessage("$9543", 0);
        }else if(i==3){
         temp = spawnOne(new L1Location(32800,32794,_mapId),91494,4);
         temp.broadcastPacket(new S_DoActionGFX(temp.getId(), 0));
         deleteNpc(temp);
         sendMessage("$9544", 0);
        }
       }
       Thread.sleep(10000);
       
       if(i!=0){
        if(checkSeaMonsterAttack(i)){
         if(i==3){
          if(_createDoor != null){
           _createDoor.open();
          }
          Thread.sleep(10000);
          sendMessage("$10720", 1);
          long startTime = System.currentTimeMillis();
          while(!_isCrakenDead && !_isDeleteTransactionNow){
           Thread.sleep(3000);
          }
          if(System.currentTimeMillis()-startTime <= 63000){
           
           spawnOneMob(new L1Location(32798,32807,_mapId), 91440);
          }
          if(_createDoor != null){
           _createDoor.close();
          }
          Thread.sleep(10000);
         }
        }
       }
       sendMessage("$"+_pointMessages[_point/100],1);

       Thread.sleep(10000);
       if(round != 11){
        if(round > 0 && (round+1)%4 == 0){
         sendMessage("$9554", 0);
        }else{
         
         sendMessage("$9550",0);
        }
        
        _acceptOrder = true;
        createRune();
       }else{
        sendMessage("$9556",0);
       }

       Thread.sleep(20000);
       
       if(round != 11){
        sendMessage("$9551",0);
       }
      

       OrimQuestTimer move_ship = new OrimQuestTimer(
         _STATUS_MOVE_SHIP_1, 0);
       move_ship.begin();

       Thread.sleep(20000);
     
       sendMessage("$"+(9609+round),1);
       Thread.sleep(3000);
       sendPackets(new S_DisplayClack());
       sendPackets(new S_Sound(82));
       Thread.sleep(3000);
      
       if(!(round == 11)){
        for(int subRound = 0;subRound<4;subRound++){
         if(subRound == 3){
          if(_mimic_A == null && _mimic_B == null &&_mimic_C == null ){
           sendMessage("$9608",2);/
           sendPackets(new S_BlackWindow());
           int[][] templocation = {{32741,32800},
             {32732,32798},
             {32733,32807}
             };
           int rndval = _random.nextInt(3);
           _mimic_A = spawnOneMob(new L1Location(templocation[0][0],templocation[0][1],_mapId),91455);
           _mimic_B = spawnOneMob(new L1Location(templocation[1][0],templocation[1][1],_mapId),91455);
           _mimic_C = spawnOneMob(new L1Location(templocation[2][0],templocation[2][1],_mapId),91455);
           _mimic_A.getInventory().storeItem(50061, 1);
           _mimic_B.getInventory().storeItem(50061, 1);
           _mimic_C.getInventory().storeItem(50061, 1);

           if(rndval==0){
            _mimic_A.setCurseMimic(true);
           }else if(rndval==1){
            _mimic_B.setCurseMimic(true);
           }else if(rndval==2){
            _mimic_C.setCurseMimic(true);
           }
           
           ArrayList<L1PcInstance> pclist = L1World.getInstance().getVisiblePlayer(_shipWall, 15);
           Collections.shuffle(pclist);
           for(L1PcInstance pc : pclist){
            Thread.sleep(3000);
            L1Teleport.teleport(pc, 32735,32802,_mapId, 1, false);
            break;
           }
           sendMessage("$9606",1);
          }
          OrimQuestTimer moveShip = new OrimQuestTimer(_STATUS_MOVE_SHIP_2, 0);
          moveShip.begin();
         }else{
          if(subRound==1){
           int countMonster = checkAliveMonster();
           if(countMonster >= 5){
            _roundStatus[round]=-1;
           }else if(countMonster >

번호 제목 글쓴이 날짜 조회 수
공지 소스자료는 직접 올려주세요 게임존 2017.06.06 550
159 통합 쓰레드(Thread) 소스!! 알고리즘? 김닉넴 2016.05.20 102
158 보스몹 멘트 띄우기 김닉넴 2016.05.19 120
157 로또복권 김닉넴 2016.05.19 80
156 불량 채팅 검출 김닉넴 2016.05.19 51
155 실시간 레벨제한 김닉넴 2016.05.19 59
154 여관 들어가기 김닉넴 2016.05.19 46
153 영자들끼리 대화 김닉넴 2016.05.19 96
152 영자 명령어 경치 복구 김닉넴 2016.05.19 39
151 오토루팅 김닉넴 2016.05.19 244
150 퀘스트템 자동 지급 소스 김닉넴 2016.05.19 115
149 초반 말하는 두루마리 지급 부분 본섭화 김닉넴 2016.05.19 59
148 l1skilluse.handlecommands - null point 에러 야호 2016.05.19 47
147 기억창 소스 김닉넴 2016.05.18 127
146 gm명령 메모리솔류션 김닉넴 2016.05.18 102
» 오림시스템 김닉넴 2016.05.18 80
144 너스핵쓰냐?잡아본다 [2] 김닉넴 2016.05.18 202
143 마을경비 입구가져오는몹 죽이는법 김닉넴 2016.05.18 58
142 던전 타이머 소스 김닉넴 2016.05.18 102
141 낚시터 드랍경로 [1] 김닉넴 2016.05.18 88
140 허수아비렙제 김닉넴 2016.05.18 99
139 운영자 명령어 [혈전시작] 추가방법 김닉넴 2016.05.18 71
138 같은혈 용병로봇들이 상대방혈의 로봇들 치게 하는방법.[초코님 점팩 기준] 김닉넴 2016.05.18 285
137 파티원 수 늘리기 김닉넴 2016.05.18 36
136 [아이서버] 공성주기 변경 김닉넴 2016.05.18 60
135 환영의 체인소드 김닉넴 2016.05.18 29
134 커멘드로 영자권한 주기입니다 김닉넴 2016.05.18 97
133 특정아이템 획득시 전체공지 김닉넴 2016.05.18 105
132 [아이서버] 혈전종료 명령어 김닉넴 2016.05.18 41
131 linall 유저가접하면 알아서 인사하고~ 성주가 접하면 알아서 성주인사를~합니다~ 김닉넴 2016.05.18 139
130 축아이템 만들기 [1] 김닉넴 2016.05.18 182
129 1억수표 김닉넴 2016.05.18 102
128 잊섬 2시간 텀으로 열리게 컴파일 요청합니다 file 아오이와소라 2016.05.17 186
127 mr에 의한 데미지 경감 소스 [1] LoseF 2016.05.10 157
126 몬스터 피틱 and 엠틱 간단하게 쓰레드 최소화? 로스트사가 2016.05.05 84
125 매니저창 구버전 하시는분들한테 좋을거 같아서 올립니다. file 로스트사가 2016.05.05 683
124 귓말 글자수 늘려보자 로스트사가 2016.05.04 41
123 에메랄드 아이콘 패킷 로스트사가 2016.05.03 88
122 마법 방어 인첸트 적용 로스트사가 2016.05.03 85
121 족보&나이 [1] file 로스트사가 2016.05.03 143
120 펫관련 본섭화와 밸런스 file 로스트사가 2016.05.03 198
119 [본섭화]수호탑근처가면투명해제 로스트사가 2016.05.03 46
118 변신 레벨에따른 공속변화 로스트사가 2016.04.30 495
117 5분마다 자도옹지 띄우기 이드1 2016.04.27 103
116 공성 먹자 군주 방지 [1] 이드1 2016.04.27 124
115 몬스터잡은만큼 버프주기 이드1 2016.04.26 113
114 [중복] 자세히 클래스변경물약 이드1 2016.04.26 85
113 유저커멘드 인벤템 보여주기 이드1 2016.04.26 125
112 인첸별 이펙 이드1 2016.04.26 157
111 특정맵 경험치증가 이드1 2016.04.26 95
110 특정아이템 뮨효과 이드1 2016.04.26 135