• SEARCH

    통합검색
  • GAMEZONE
    • 커뮤니티
      • 공지사항
      • 유저게시판
        • 등업게시판
        • 출석체크
        • 정회원 무료자료실
      • 스크린샷
      • 인증자료실
    • 리니지
      • 게임공략 & 팁
      • 홍보게시판
      • 유틸자료실
      • 소스자료실
      • 자유게시판
      • 노하우 게시판
    • 메이플스토리
      • 게임공략 & 팁
      • 홍보게시판
      • 유틸자료실
      • 소스자료실
      • 자유게시판
      • 노하우 게시판
    • 바람의나라
      • 자유게시판
      • 홍보게시판
      • 자료게시판
        • 유틸자료실
        • 소스자료실
        • 클라이언트
        • 팩 자료실
      • 연구게시판
        • 개발내역
        • 질문과답변
        • 기타
      • 강의게시판
        • DR
        • CR
        • 구버전
        • 클라이언트 개조
        • 노하우 게시판
        • 게임공략 & 팁
    • 다크에덴
      • 게임공략 & 팁
      • 홍보게시판
      • 유틸자료실
      • 소스자료실
      • 자유게시판
      • 노하우 게시판
    • 믹스마스터
      • 게임공략 & 팁
      • 홍보게시판
      • 유틸자료실
      • 소스자료실
      • 자유게시판
      • 노하우 게시판
    • 라그나로크
      • 게임공략 & 팁
      • 홍보게시판
      • 유틸자료실
      • 소스자료실
      • 자유게시판
      • 노하우 게시판
    • 기타게임
      • 게임공략 & 팁
      • 홍보게시판
      • 유틸자료실
      • 소스자료실
      • 자유게시판
      • 노하우 게시판
    • 게임강의
    • 비베&포토샵
      • 자유게시판
      • 자료실
        • 일반자료실
        • 포인트 자료실
      • 노하우게시판
      • 포토샵게시판
    • 모바일
      • 게임공략
      • 포인트 자료실
      • 유틸자료실
      • 자유게시판
  • 리니지 소스자료실
    • 리니지 소스자료실 ()
    • 린올 상점 추가

      • Eternal
      • 2017.04.07 - 11:21 266

    PacketHandler.java   // 자바명
    ================================

    case C_EXTENDED_PROTOBUF:  // 검색
    new C_Shop(abyte0, _client);  // 추가

    =============================
    C_Shop  // 자바명
    ==============================

    아래 소스 넣어준다 .

    package l1j.server.server.clientpackets;

    import java.util.ArrayList;

    import l1j.server.Config;
    import l1j.server.server.GameClient;
    import l1j.server.server.model.Broadcaster;
    import l1j.server.server.model.L1PolyMorph;
    import l1j.server.server.model.Instance.L1DollInstance;
    import l1j.server.server.model.Instance.L1ItemInstance;
    import l1j.server.server.model.Instance.L1PcInstance;
    import l1j.server.server.model.Instance.L1PetInstance;
    import l1j.server.server.serverpackets.S_ChangeShape;
    import l1j.server.server.serverpackets.S_CharVisualUpdate;
    import l1j.server.server.serverpackets.S_ChatPacket;
    import l1j.server.server.serverpackets.S_Disconnect;
    import l1j.server.server.serverpackets.S_DoActionGFX;
    import l1j.server.server.serverpackets.S_DoActionShop;
    import l1j.server.server.serverpackets.S_PacketBox;
    import l1j.server.server.serverpackets.S_ServerMessage;
    import l1j.server.server.serverpackets.S_SystemMessage;
    import l1j.server.server.templates.L1PrivateShopBuyList;
    import l1j.server.server.templates.L1PrivateShopSellList;

    public class C_Shop extends ClientBasePacket {

     private static final String C_SHOP = "[C] C_Shop";
     private static final int 개인상점 = 817;
     
     public C_Shop(byte abyte0[], GameClient clientthread) {
      super(abyte0);

      int type = readH();
      L1PcInstance pc = clientthread.getActiveChar();
      
       if (type == 개인상점)
           {
             L1ItemInstance sellitem = null;
             L1ItemInstance buyitem = null;
             ArrayList<L1PrivateShopSellList> sellList = pc.getSellList();
             ArrayList<L1PrivateShopBuyList> buyList = pc.getBuyList();
             boolean tradable = true;
             int sellTotalCount = 0;
             int buyTotalCount = 0;
             readC();
             readC();
             readC();
             int start = readC();
             if (start == 0) {
               boolean next = true;
               while (next) {
                 int subtype = readC();
                 if (subtype == 34) {
                   next = false;
                   continue;
                 }
                 if (subtype == 18) {
                   sellTotalCount++;
                   int totallen = readC();
                   int len = readC();
                   int sellObjectId = readK(len - 3);
                   readC();
                   int pricelen = totallen - (len + 1);
                   int sellPrice = readK(pricelen);
                   readC();
                   int sellCount = readC();

                   L1ItemInstance checkItem = pc.getInventory().getItem(sellObjectId);
                   if (checkItem == null) {
                     continue;
                   }
                   if (sellObjectId != checkItem.getId()) {
                     tradable = false;
                     pc.sendPackets(new S_SystemMessage("비정상 아이템 입니다. 다시 시도해주세요."), true);
                   }

                   if ((!checkItem.isStackable()) && (sellCount != 1)) {
                     tradable = false;
                     pc.sendPackets(new S_SystemMessage("비정상 아이템 입니다. 다시 시도해주세요."), true);
                   }

                   if (sellCount > checkItem.getCount()) {
                     sellCount = checkItem.getCount();
                   }
                   if ((checkItem.getCount() < sellCount) || (checkItem.getCount() <= 0) || (sellCount <= 0)) {
                     tradable = false;
                     pc.sendPackets(new S_SystemMessage("비정상 아이템 입니다. 다시 시도해주세요."), true);
                   }

                   if (checkItem.getBless() >= 128) {
                     tradable = false;
                     pc.sendPackets(new S_ServerMessage(210, checkItem.getItem().getName()));
                   }

                   if (checkItem.getEndTime() != null) { pc.sendPackets(new S_SystemMessage("시간제 아이템은 상점등록이 불가능합니다."), true);
                     return; }
         L1DollInstance 인형 = null;
         for (Object 인형오브젝트 : pc.getDollList().values()) {
          if (인형오브젝트 instanceof L1DollInstance) {
           인형 = (L1DollInstance) 인형오브젝트;
           if (checkItem.getId() == 인형.getItemObjId()) {

            tradable = false;
            pc.sendPackets(new S_SystemMessage("소환중인 인형은 상점에 올릴 수 없습니다."), true);
           }
          }
         }

                   if (!checkItem.getItem().isTradable()) {
                     tradable = false;
                     pc.sendPackets(new S_ServerMessage(166, checkItem.getItem().getName(), "거래 불가능합니다. "), true);
                   }
         for (Object petObject : pc.getPetList().values()) {
          if (petObject instanceof L1PetInstance) {
           L1PetInstance pet = (L1PetInstance) petObject;
           if (checkItem.getId() == pet.getItemObjId()) {
            tradable = false;
            pc.sendPackets(new S_ServerMessage(166,checkItem.getItem().getName(),"거래 불가능합니다. "), true);
            break;
           }
          }
         }
                   L1PrivateShopSellList pssl = new L1PrivateShopSellList();
                   pssl.setItemObjectId(sellObjectId);
                   pssl.setItemId(checkItem.getItemId());
                   pssl.setSellPrice(sellPrice);
                   pssl.setSellTotalCount(sellCount);
                   pssl.setUserName(pc.getName());
                   Config.addSellList(pssl);
                   sellList.add(pssl);
                  
                 } else if (subtype == 26) {
                   buyTotalCount++;
                   int totallen = readC();
                   int len = readC();
                   int buyObjectId = readK(len - 3);
                   readC();
                   int pricelen = totallen - (len + 1);
                   int buyPrice = readK(pricelen);
                   readC();
                   int buyCount = readC();
                  
                   L1ItemInstance checkItem = pc.getInventory().getItem(buyObjectId);
                   if (checkItem == null) {
                     continue;
                   }
                   if (buyObjectId != checkItem.getId()) {
                     tradable = false;
                     pc.sendPackets(new S_SystemMessage("비정상 아이템 입니다. 다시 시도해주세요."), true);
                   }

                   if ((!checkItem.isStackable()) && (buyCount != 1)) {
                     tradable = false;
                     pc.sendPackets(new S_SystemMessage("비정상 아이템 입니다. 다시 시도해주세요."), true);
                   }

                   if (buyCount > checkItem.getCount()) {
                     buyCount = checkItem.getCount();
                   }
                   if ((checkItem.getCount() < buyCount) || (checkItem.getCount() <= 0) || (buyCount <= 0)) {
                     tradable = false;
                     pc.sendPackets(new S_SystemMessage("비정상 아이템 입니다. 다시 시도해주세요."), true);
                   }

                   if (checkItem.getBless() >= 128) {
                     tradable = false;
                     pc.sendPackets(new S_ServerMessage(210, checkItem.getItem().getName()));
                   }

                   if (checkItem.getEndTime() != null) { pc.sendPackets(new S_SystemMessage("시간제 아이템은 상점등록이 불가능합니다."), true);
                     return; }
         L1DollInstance 인형 = null;
         for (Object 인형오브젝트 : pc.getDollList().values()) {
          if (인형오브젝트 instanceof L1DollInstance) {
           인형 = (L1DollInstance) 인형오브젝트;
           if (checkItem.getId() == 인형.getItemObjId()) {

            tradable = false;
            pc.sendPackets(new S_SystemMessage("소환중인 인형은 상점에 올릴 수 없습니다."), true);
           }
          }
         }

                   if (!checkItem.getItem().isTradable()) {
                     tradable = false;
                     pc.sendPackets(new S_ServerMessage(166, checkItem.getItem().getName(), "거래 불가능합니다. "), true);
                   }
         for (Object petObject : pc.getPetList().values()) {
          if (petObject instanceof L1PetInstance) {
           L1PetInstance pet = (L1PetInstance) petObject;
           if (checkItem.getId() == pet.getItemObjId()) {
            tradable = false;
            pc.sendPackets(new S_ServerMessage(166,checkItem.getItem().getName(),"거래 불가능합니다. "), true);
            break;
           }
          }
         }
                  
                   L1PrivateShopBuyList psbl = new L1PrivateShopBuyList();
                   psbl.setItemObjectId(buyObjectId);
                   psbl.setItemId(checkItem.getItemId());
                   psbl.setBuyPrice(buyPrice);
                   psbl.setBuyTotalCount(buyCount);
                   psbl.setUserName(pc.getName());
                   Config.addBuyList(psbl);
                   buyList.add(psbl);
                 }
               }
               int len = readC();

               byte[] chat = readByte(len);
               readC();
               int polylen = readC();

               if ((sellTotalCount == 0) && (buyTotalCount == 0)) { pc.sendPackets(new S_ServerMessage(908), true);
                 pc.setPrivateShop(false);
                 pc.sendPackets(new S_DoActionGFX(pc.getId(), 3), true);
                 Broadcaster.broadcastPacket(pc, new S_DoActionGFX(pc.getId(), 3), true);
                 return; }
                if (!tradable) {
                 Config.SellListClear(pc);
                 Config.BuyListClear(pc);
                 sellList.clear();
                 buyList.clear();
                 pc.setPrivateShop(false);
                 pc.sendPackets(new S_DoActionGFX(pc.getId(), 3), true);
                 Broadcaster.broadcastPacket(pc, new S_DoActionGFX(pc.getId(), 3), true);
                 return;
                 }
               pc.getNetConnection().getAccount().updateShopOpenCount();
               pc.sendPackets(new S_PacketBox(198, pc.getNetConnection().getAccount().Shop_open_count), true);

               pc.setShopChat(chat);
               pc.setPrivateShop(true);

               pc.sendPackets(new S_DoActionShop(pc.getId(), 70, chat), true);
               Broadcaster.broadcastPacket(pc, new S_DoActionShop(pc.getId(), 70, chat), true);
               pc.sendPackets(new S_ChatPacket(pc, "명령어 [.무인상점] 누른후 다른 캐릭터로 접속 가능합니다"));
              
               try
               {
                for (L1PrivateShopSellList pss : pc.getSellList()) {
          int sellp = pss.getSellPrice();
          int sellc = pss.getSellTotalCount();
          sellitem = pc.getInventory().getItem(
            pss.getItemObjectId());
          if (sellitem == null)
           continue;
          pc.SaveShop(pc, sellitem, sellp, sellc, 1);
          }
               }
               catch (Exception e) {
                 e.printStackTrace();
               }
               try
               {
         for (L1PrivateShopBuyList psb : pc.getBuyList()) {
          int buyp = psb.getBuyPrice();
          int buyc = psb.getBuyTotalCount();
          buyitem = pc.getInventory().getItem(
            psb.getItemObjectId());
          if (buyitem == null)
           continue;
          pc.SaveShop(pc, buyitem, buyp, buyc, 0);
         }
               }
               catch (Exception e) {
                 e.printStackTrace();
               }
               try
               {
                 String polyName = readS(polylen);
                 int polyId = 0;
                 if (polyName.equalsIgnoreCase("tradezone1"))
                   polyId = 11326;
                 else if (polyName.equalsIgnoreCase("tradezone2"))
                   polyId = 11427;
                 else if (polyName.equalsIgnoreCase("tradezone3"))
                   polyId = 10047;
                 else if (polyName.equalsIgnoreCase("tradezone4"))
                   polyId = 9688;
                 else if (polyName.equalsIgnoreCase("tradezone5"))
                   polyId = 11322;
                 else if (polyName.equalsIgnoreCase("tradezone6"))
                   polyId = 10069;
                 else if (polyName.equalsIgnoreCase("tradezone7"))
                   polyId = 10034;
                 else if (polyName.equalsIgnoreCase("tradezone8")) {
                   polyId = 10032;
                 }
                 if (polyId != 0) {
                   pc.killSkillEffectTimer(67);
                   L1PolyMorph.undoPoly(pc);
                   L1ItemInstance weapon = pc.getWeapon();
                   if (weapon != null)
                     pc.getInventory().setEquipped(weapon, false, false, false);
                   pc.setTempCharGfx(polyId);
                   pc.sendPackets(new S_ChangeShape(pc.getId(), polyId, pc.getCurrentWeapon()));
                   if ((!pc.isGmInvis()) && (!pc.isInvisble())) {
                     Broadcaster.broadcastPacket(pc, new S_ChangeShape(pc.getId(), polyId));
                   }
                   S_CharVisualUpdate charVisual = new S_CharVisualUpdate(pc, 0x46);
                   pc.sendPackets(charVisual);
                   Broadcaster.broadcastPacket(pc, charVisual);
                 }
               } catch (Exception e) {
                 pc.상점아이템삭제(pc.getId());
                 Config.SellListClear(pc);
                 Config.BuyListClear(pc);
                 sellList.clear();
                 buyList.clear();
                 pc.setPrivateShop(false);
                 pc.sendPackets(new S_DoActionGFX(pc.getId(), 3), true);
                 Broadcaster.broadcastPacket(pc, new S_DoActionGFX(pc.getId(), 3), true);

                 clear();

                 return;
               }
             } else if (start == 1) {
              if (pc.getOnlineStatus() != 1) {
            pc.sendPackets(new S_Disconnect());
            return;
           }
               Config.SellListClear(pc);
               Config.BuyListClear(pc);
               sellList.clear();
               buyList.clear();
               pc.setPrivateShop(false);

               int classId = pc.getClassId();
               pc.setTempCharGfx(classId);
               pc.sendPackets(new S_ChangeShape(pc.getId(), classId));
               Broadcaster.broadcastPacket(pc, new S_ChangeShape(pc.getId(), classId));
               L1ItemInstance weapon = pc.getWeapon();
               if (weapon != null)
                 pc.getInventory().setEquipped(weapon, false, false, false);
               S_CharVisualUpdate charVisual = new S_CharVisualUpdate(pc);
               pc.sendPackets(charVisual);
               Broadcaster.broadcastPacket(pc, charVisual);
             }
      }
     }
      
     @Override
     public String getType() {
      return C_SHOP;
     }

    }

     

    ==================


    ClientBasePacket.java  // 자바명
    ============

     public int readK(int len) {    // 아무대나 넣어준다
          int i = 0;
          switch (len) {
          case 1:
            i = (_decrypt[(_off++)] & 0xFF) - 128;
            break;
          case 2:
            i = (_decrypt[(_off++)] & 0xFF) - 128;
            i |= (_decrypt[(_off++)] & 0xFF) << 7;
            break;
          case 3:
            i = (_decrypt[(_off++)] & 0xFF) - 128;
            i |= (_decrypt[(_off++)] & 0xFF) - 128 << 7;
            i |= (_decrypt[(_off++)] & 0xFF) << 14;
            break;
          case 4:
            i = (_decrypt[(_off++)] & 0xFF) - 128;
            i |= (_decrypt[(_off++)] & 0xFF) - 128 << 7;
            i |= (_decrypt[(_off++)] & 0xFF) - 128 << 14;
            i |= (_decrypt[(_off++)] & 0xFF) << 21;
            break;
          case 5:
            i = (_decrypt[(_off++)] & 0xFF) - 128;
            i |= (_decrypt[(_off++)] & 0xFF) - 128 << 7;
            i |= (_decrypt[(_off++)] & 0xFF) - 128 << 14;
            i |= (_decrypt[(_off++)] & 0x7F) << 21;
            i |= (_decrypt[(_off++)] & 0xFF) << 28;
            break;
          case 6:
            i = (_decrypt[(_off++)] & 0xFF) - 128;
            i |= (_decrypt[(_off++)] & 0xFF) - 128 << 7;
            i |= (_decrypt[(_off++)] & 0xFF) - 128 << 14;
            i |= (_decrypt[(_off++)] & 0x7F) << 21;
            i |= (_decrypt[(_off++)] & 0x7F) << 28;
            i |= (_decrypt[(_off++)] & 0xFF) << 35;
          }

          return i;
        }

    public byte[] readByte(int len)
       {
         byte[] result = new byte[len];
         try {
           System.arraycopy(_decrypt, _off, result, 0, len);
           _off += len;
         } catch (Exception e) {
           e.printStackTrace();
         }
         return result;
       }

    ================================

    L1PrivateShopBuyList.java  // 자바명

    ==================
    public L1PrivateShopBuyList() {
     }    // 검색  아래 넣어준다

    private String _UserName;   // 여기서부터
     public void setUserName(String name)
       {
         _UserName = name;
       }

       public String getUserName()
       {
         return _UserName;
       }
      
      private int _itemId;
      public void setItemId(int i)
       {
         _itemId = i;
       }

       public int getItemId() {
         return _itemId;
       }


    ==============================
    Config.java  //자바명

    =========

    // 개인상점  아무대나 넣어준다
      public static void addSellList(L1PrivateShopSellList sellitem)
       {
         sellList.add(sellitem);
       }

       public static void SellListClear(L1PcInstance pc) {
         for (L1PrivateShopSellList slist : pc.getSellList())
           if (sellList.contains(slist))
             sellList.remove(slist);
       }

       public static void addBuyList(L1PrivateShopBuyList buyitem)
       {
         buyList.add(buyitem);
       }

       public static void BuyListClear(L1PcInstance pc) {
         for (L1PrivateShopBuyList blist : pc.getBuyList())
           if (buyList.contains(blist))
             buyList.remove(blist);
       }

    ================================================

    L1PrivateShopSellList.java  //자바명

    ===============================

    public L1PrivateShopSellList() {
     }   // 검색  아래 넣어준다

    private String _UserName;   // 여기부터 추가
     public void setUserName(String name)
       {
         _UserName = name;
       }

       public String getUserName()
       {
         return _UserName;
       }
     
      
      private int _itemId;
       public void setItemId(int i)
       {
         _itemId = i;
       }

       public int getItemId() {
         return _itemId;
       }
      
    =====================================

    Account.java // 자바명

    =================

    public static int getGamePassword() {
      return _GamePassword;
     }  // 검색  바로 아래 

    public void updateShopOpenCount() {   // 추가  여기서부터
      Shop_open_count++;
      Connection con = null;
      PreparedStatement pstm = null;
      try {
       con = L1DatabaseFactory.getInstance().getConnection();
       String sqlstr = "UPDATE accounts SET Shop_open_count=? WHERE login = ?";
       pstm = con.prepareStatement(sqlstr);
       pstm.setInt(1, Shop_open_count);
       pstm.setString(2, _name);
       pstm.executeUpdate();
      } catch (Exception e) {
       _log.log(Level.SEVERE, e.getLocalizedMessage(), e);
      } finally {
       SQLUtil.close(pstm);
       SQLUtil.close(con);
      }
     }

    =====  같은 자바위치  ====

          /** 창고 비밀번호 */
     private static int _GamePassword;   // 검색
     
     public int Shop_open_count;   // 이것만 추가

    ===============================

    L1PcInstance.java

    ==========

    //
    // pc의 모니터를 stop 한다.
      stopEtcMonitor();
      // 온라인 상태를 OFF로 해, DB에 캐릭터 정보를 기입한다
      setOnlineStatus(0);
      try {
       save();
       saveInventory();
       L1BookMark.WriteBookmark(this);
      } catch (Exception e) {
       _log.log(Level.SEVERE, e.getLocalizedMessage(), e);
      }
     }                ///  검색    바로 아래 추가


    /////////여기서 부터 추가 ...

    public void 상점아이템매입삭제(int objid, int itemid, int type2) {// 아이템아이디별 판매 구매
                    // 구분후 삭제
      Connection con = null;
      PreparedStatement pstm = null;
      try {
       con = L1DatabaseFactory.getInstance().getConnection();
       pstm = con
         .prepareStatement("DELETE FROM character_shop WHERE obj_id=? AND item_id=? AND type=?");
       pstm.setInt(1, objid);
       pstm.setInt(2, itemid);
       pstm.setInt(3, type2);
       pstm.executeUpdate();
      } catch (SQLException e) {
       e.printStackTrace();
      } finally {
       SQLUtil.close(pstm);
       SQLUtil.close(con);
      }
     }

     public void 상점아이템삭제(int objid, int itemid, int type2) {// 아이템아이디별 판매 구매 구분후
                   // 삭제
      Connection con = null;
      PreparedStatement pstm = null;
      try {
       con = L1DatabaseFactory.getInstance().getConnection();
       pstm = con
         .prepareStatement("DELETE FROM character_shop WHERE obj_id=? AND item_objid=? AND type=?");
       pstm.setInt(1, objid);
       pstm.setInt(2, itemid);
       pstm.setInt(3, type2);
       pstm.executeUpdate();
      } catch (SQLException e) {
       e.printStackTrace();
      } finally {
       SQLUtil.close(pstm);
       SQLUtil.close(con);
      }
     }

     public void 상점아이템매입업데이트(int objid, int itemid, int type2, int count1) {
      Connection con = null;
      PreparedStatement pstm = null;
      try {
       con = L1DatabaseFactory.getInstance().getConnection();
       pstm = con
         .prepareStatement("UPDATE character_shop SET count=? WHERE obj_id=? AND item_id=? AND type=?");
       pstm.setInt(1, count1);
       pstm.setInt(2, objid);
       pstm.setInt(3, itemid);
       pstm.setInt(4, type2);
       pstm.executeUpdate();
      } catch (SQLException e) {
       e.printStackTrace();
      } finally {
       SQLUtil.close(pstm);
       SQLUtil.close(con);
      }
     }

     public void 상점아이템업데이트(int objid, int itemid, int type2, int count1) {
      Connection con = null;
      PreparedStatement pstm = null;
      try {
       con = L1DatabaseFactory.getInstance().getConnection();
       pstm = con
         .prepareStatement("UPDATE character_shop SET count=? WHERE obj_id=? AND item_objid=? AND type=?");
       pstm.setInt(1, count1);
       pstm.setInt(2, objid);
       pstm.setInt(3, itemid);
       pstm.setInt(4, type2);
       pstm.executeUpdate();
      } catch (SQLException e) {
       e.printStackTrace();
      } finally {
       SQLUtil.close(pstm);
       SQLUtil.close(con);
      }
     }

     public void 상점아이템삭제(int objid) {
      Connection con = null;
      PreparedStatement pstm = null;
      try {
       con = L1DatabaseFactory.getInstance().getConnection();
       pstm = con
         .prepareStatement("DELETE FROM character_shop WHERE obj_id=?");
       pstm.setInt(1, objid);
       pstm.executeUpdate();
      } catch (SQLException e) {
       e.printStackTrace();
      } finally {
       SQLUtil.close(pstm);
       SQLUtil.close(con);
      }
     }

     
     public void SaveShop(L1PcInstance pc, L1ItemInstance item, int price, int sellcount, int type)
       {
         Connection con = null;
         int bless = item.getBless();
         int attr = item.getAttrEnchantLevel();
         PreparedStatement pstm = null;
         try {
           con = L1DatabaseFactory.getInstance().getConnection();

           pstm = con
             .prepareStatement("INSERT INTO character_shop SET obj_id=?, char_name=?, item_objid=?, item_id=?, Item_name=?, count=?, enchant=?, price=?, type=?, locx=?, locy=?, locm=?, iden=?, attr=?");

           pstm.setInt(1, pc.getId());
           pstm.setString(2, pc.getName());
           pstm.setInt(3, item.getId());
           pstm.setInt(4, item.getItemId());
           pstm.setString(5, item.getItem().getName());
           pstm.setInt(6, sellcount);
           pstm.setInt(7, item.getEnchantLevel());
           pstm.setInt(8, price);
           pstm.setInt(9, type);
           pstm.setInt(10, pc.getX());
           pstm.setInt(11, pc.getY());
           pstm.setInt(12, pc.getMapId());

           if (!item.isIdentified())
             pstm.setInt(13, 0);
           else {
             switch (bless) {
             case 0:
               pstm.setInt(13, 2);
               break;
             case 1:
               pstm.setInt(13, 1);
               break;
             case 2:
               pstm.setInt(13, 3);
             }
           }

           pstm.setInt(14, attr);

           pstm.executeUpdate();
         } catch (SQLException localSQLException) {
         } catch (Exception localException) {
         } finally {
           SQLUtil.close(pstm);
           SQLUtil.close(con);
         }
       }   //여기까지

    =================

    L1PcInventory.java  // 자바명

    ===========

    public void setEquipped(L1ItemInstance item, boolean equipped) {
      setEquipped(item, equipped, false, false, false);
     }    //검색  아래 추가 

    // 여기서 부터 추가
    public void setEquipped(L1ItemInstance item, boolean equipped, boolean loaded, boolean changeWeapon) {
      setEquipped(item, equipped, loaded, changeWeapon, false);
     }

    ================================

    나비켓 테이블 추가
    ========================
    character_shop.sql
    파일 첨부 합니다  나비켓에  읽어 오시면 됩니다..

    ====================

     


    [][][][][][][][][][][][][][][][][][][][][][][][][][]

    출처 :  코어팩 161114 에서 추출한거구요   (감자)
    ( 코어팩에 추가하신분께 깊은 감사에 말씀 드립니다)

    새로운 방법으로 구현 설명 드려요
    자세히 설명 드렸으니 초보자 분들도 따라서 하시면 됩니다.
    다른맘은 없으니 마음껏 쓰시고  출처 달아주는 센스!! 

    코어팩 추출자 린올에맞게 변경-  Mr. black

    [][][][][][][][][][][][][][][][][][][][][][][][][][]

     

     

     

    이 게시물을..
    N
    0
    0
    • npc가 인겜에서 채팅으로 말하기하늘마음
    • 12
      Eternal

    Eternal 님의 최근 글

    아래 천화서버 매니저 변경 및 로봇 적용한 파일 667 15 2018 01.14 아래 천화서버 매니저 바꾼 버전 278 1 2018 01.09 완미세계1.51버전VM! 286 1 2017 04.28 완미세계 1.31버전 VM 147 2017 04.28 완미세계 1.36 서버 vm 버전 258 2017 04.28

    Eternal 님의 최근 댓글

    자바 환경변수 해줘야합니다. 자바 1.8버전입니다. 2018 01.08 1.8버전쓰시면됩니다 2018 01.08
    글쓴이의 서명작성글 감추기 
    댓글 쓰기 에디터 사용하기 닫기
    • view_headline 목록
    • 14px
    • npc가 인겜에서 채팅으로 말하기
    • 목록
      view_headline
    × CLOSE
    기본 (1,069) 제목 날짜 수정 조회 댓글 추천 비추
    분류 정렬 검색
    • 포인트 획득 공지
      5
      2026.04.24 - 19:48 4953 5
    • 링크 업로드 관련 공지
      8
      2026.03.25 - 21:56 4715 8
    • 인증메일 공지
      3
      2026.03.15 - 16:42 4606 3
    • 파일링크 및 인증메일 발송 관련 문의 안내
      9
      2026.03.14 - 22:03 5258 9
    • 포인트 게시판 안내
      2026.02.28 - 19:14 5997
    • 게임존 사이트 변경 사항 안내
      9
      2026.02.26 - 01:07 7855 9
    • 소스자료는 직접 올려주세요
      2017.06.06 - 16:14 680
    1069
    2.7 벚꽃팩(넬기반) 보스 대미지 배율 조정 외부화
    뷸바다 2026.06.04 - 00:40 55
    1068
    2.7 벚꽃팩 몹드랍 템 편하게
    뷸바다 2026.05.19 - 14:35 213
    1067
    2.7 벛꽃팩 인벤정리 기능추가
    뷸바다 2026.05.14 - 13:41 76
    1066
    2.7 벛꽃팩 원격 펫 소환
    뷸바다 2026.05.03 - 14:24 223
    1065
    2.0팩 버프시간확인 아이템으로 구현
    스트릭스 2026.05.01 - 06:45 124
    1064
    장시간 운영을 위하여
    스트릭스 2026.05.01 - 06:45 116
    1063
    내 케렉터 주위 몹만 움직이게 수정해보기
    스트릭스 2026.05.01 - 06:43 83
    1062
    구버전 1.63~2.0 몬스터 움직임 부드럽게 개선
    스트릭스 2026.05.01 - 06:41 98
    1061
    list 보는법 2
    스트릭스 2026.05.01 - 06:38 83
    1060
    list 보는법
    스트릭스 2026.05.01 - 06:37 76
    1059
    자동스킬 사용법
    스트릭스 2026.05.01 - 06:35 101
    1058
    아머브레이크 데스티니 시전시 성공 확률 조정하는 소스가 있나요?
    안정환 2024.04.23 - 10:01 188
    1057
    List.spr(변신,몬스터 수정소스)개조방법
    유튜브고도리 2024.04.19 - 05:02 471
    1056
    NPC 외침 멘트 깔끔정리(by.유튜브고도리)
    유튜브고도리 2024.04.11 - 05:57 222
    1055
    디아블로 참 만들기
    유튜브고도리 2024.04.09 - 05:55 233
    1054
    리니지m 처럼 피통 늘리기,오류가 날때
    유튜브고도리 2024.04.09 - 05:18 193
    1053
    욕하면 채금 먹게 하기
    유튜브고도리 2024.04.09 - 04:59 170
    1052
    레벨에 따른 호칭 부여..?
    밤톨이11 2024.04.08 - 04:24 173
    1051
    초보자 보호 시스템
    밤톨이11 2024.04.08 - 04:21 150
    1050
    마법무기 데미지 증가
    밤톨이11 2024.04.08 - 04:19 173
    1049
    레벨 제한 맵
    밤톨이11 2024.04.08 - 04:14 154
    1048
    마법스크롤
    밤톨이11 2024.04.08 - 04:06 86
    1047
    리니지m 아지트 소유중에도 공성선포하기
    유튜브고도리 2024.04.07 - 21:37 140
    1046
    리니지m 마법인형이 마법을 쓰네?
    유튜브고도리 2024.04.07 - 21:36 164
    1045
    드래곤 슬레이어 각반(장비추가소스)
    유튜브고도리 2024.04.07 - 19:08 159
    1044
    린엠 게렝 변신 카드 만들기
    유튜브고도리 2024.04.06 - 06:06 196
    1043
    버프 물약 개별 소스 오래전 소스
    밤톨이11 2024.04.05 - 18:43 150
    1042
    일시 스텟 상승 물약
    밤톨이11 2024.04.05 - 18:42 100
    1041
    성 전환 물약
    밤톨이11 2024.04.05 - 18:37 112
    1040
    MP 물약 소스
    밤톨이11 2024.04.05 - 18:35 158
    1039
    리니지 옛날버젼..이라는데...구동가능여부 확인 부탁드립니다.
    도난차량 2024.03.24 - 04:56 500
    1038
    랭커
    foqwer 2024.03.14 - 10:43 229
    1037
    인첸별
    foqwer 2024.03.14 - 10:42 209
    1036
    몬스터 앞에 레벨 넣기
    프렌치좋아 2024.03.04 - 01:40 478
    1035
    3.63 글루딘 Single 용
    블루블랙3 2024.02.28 - 23:08 517
    1034
    Sprite file doesn`t exist 오류
    하앙비 2023.12.23 - 02:19 345
    1033
    전쟁세율 고정값 15%
    하남궁 2023.11.29 - 17:02 263
    1032
    인형합성사
    Rebecca 2023.10.09 - 22:54 428
    1031
    2.0 레벨업시 HP량 올리기
    Rebecca 2023.10.09 - 22:49 527
    1030
    전사버전 펫 만렙 변경
    Rebecca 2023.10.09 - 22:44 232
    1029
    맵 순간이동 가능 불가능지역 설정하기
    Rebecca 2023.10.09 - 22:39 332
    1028
    트레져박스 업로드입니다.
    린컴충성 2023.10.07 - 04:46 258
    1027
    리마스터 접속기 소스자료
    홍자놀기 2023.09.08 - 05:41 4073
    1026
    대미지 발동시 범위 질문드립니다
    나잇따나읻따 2023.05.21 - 22:26 387
    1025
    리니지 리마스터 몹 스폰수 어디서 줄일 수 있나요?
    001001 2023.04.25 - 16:06 822
    1024
    전사팩 로봇가능
    노력하자 2023.03.16 - 19:14 1214
    1023
    2.7 자동 물약 소스
    퍽퍽띠 2022.11.18 - 00:40 1346
    1022
    2.0 자동칼질소스 (클래스 파일에서 빼왔습니다)
    drumlinek 2022.11.06 - 05:20 1027
    1021
    npc가 인겜에서 채팅으로 말하기
    하늘마음 2022.10.06 - 10:04 404
    1020
    유저 아이피보는 소스
    캐빈N.01 2020.12.15 - 21:34 726
    • 1 2 3 4 5 6 7 8 9 10 .. 22
    • / 22 GO
  • GAMEZONE
 GAMEZONE all rights reserved.
by OrangeDay