• SEARCH

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

      • 준희미니
      • 2016.06.29 - 00:25 132

    자바이름은 제 주관적인 이름입니다

     

    l1j/server/model // 추가

     

    자바 파일 ssibak.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.model;

    import java.util.EnumMap;
    import java.util.logging.Logger;
    import l1j.configure.Config;
    import l1j.server.datatables.ssibakLogTable; 
    import l1j.server.datatables.SprTable;
    import l1j.server.model.instance.L1PcInstance;
    import l1j.server.packets.server.S_Disconnect;
    import l1j.server.packets.server.S_Paralysis;
    import l1j.server.packets.server.S_SystemMessage;

     

    //  어떤놈인지 한번잡아보자 한번해보자

    public class ssibak {

     private static Logger _log =
      Logger.getLogger(ssibak.class.getName());

     private final L1PcInstance _pc;

     private int _injusticeCount;

     private int _justiceCount;

     private static final int INJUSTICE_COUNT_LIMIT = Config.INJUSTICE_COUNT;

     private static final int JUSTICE_COUNT_LIMIT = Config.JUSTICE_COUNT;

     

     // 이동과 공격 간격은 달라. 착각하면안되겟지?

     // 일단 테스트니 나의임의로 5를 내려주어야징

     private static final double CHECK_STRICTNESS =
       (Config.CHECK_STRICTNESS - 5) / 100D;

     private static final double HASTE_RATE = 0.75; // 속도 * 1.33

     private static final double WAFFLE_RATE = 0.87; // 속도 * 1.15

     private static final double STANDARD_RATE = 1.00;
     
     private final EnumMap<ACT_TYPE, Long> _actTimers =
       new EnumMap<ACT_TYPE, Long>(ACT_TYPE.class);

     private final EnumMap<ACT_TYPE, Long> _checkTimers =
       new EnumMap<ACT_TYPE, Long>(ACT_TYPE.class);

     public static enum ACT_TYPE {
      MOVE, ATTACK, SPELL_DIR, SPELL_NODIR
     }

     // 결과

     public static final int R_OK = 0;

     public static final int R_DETECTED = 1;

     public static final int R_DISPOSED = 2;

     public ssibak(L1PcInstance pc) {
      _pc = pc;
      _injusticeCount = 0;
      _justiceCount = 0;
      long now = System.currentTimeMillis();
      for (ACT_TYPE each : ACT_TYPE.values()) {
       _actTimers.put(each, now);
       _checkTimers.put(each, now);
      }
     }

     

    // 서버 폭격으로인한 잘못된 판단으로 프레임으로 추방할수도있다.

    // 0 1 2

     

     public int checkInterval(ACT_TYPE type) {
      int result = R_OK;
      long now = System.currentTimeMillis();
      long interval = now - _actTimers.get(type);
      int rightInterval = getRightInterval(type);
      interval *= CHECK_STRICTNESS;
      double rate = (double) interval / rightInterval;
      if (0 < rate && rate < STANDARD_RATE) {
       _injusticeCount++;
       _justiceCount = 0;
       if (_injusticeCount >= INJUSTICE_COUNT_LIMIT) {
        doPunishment();
        return R_DISPOSED;
       }
       result = R_DETECTED;
      } else if (rate >= STANDARD_RATE) {
       _justiceCount++;
       if (_justiceCount >= JUSTICE_COUNT_LIMIT) {
        _injusticeCount = 0;
        _justiceCount = 0;
       }
      }
      _actTimers.put(type, now);
      return result;
     }

     

    // 네이놈 걸렷구나

     

     private void doPunishment() {
      int punishment_type = Math.abs(Config.PUNISHMENT_TYPE);
      int punishment_time = Math.abs(Config.PUNISHMENT_TIME);
      int punishment_mapid = Math.abs(Config.PUNISHMENT_MAP_ID);
      if (!_pc.isGm()) {

       int x = _pc.getX() ,y = _pc.getY() ,mapid = _pc.getMapId();// 위치확인

       switch (punishment_type) {
       case 0:
    // 꺼져버려 종료시키자

        _pc.sendPackets(new S_SystemMessage(String.format(I18N_ssibak_DISCONNECT_THE_CONNECTION, punishment_time)));
        
    // 너는 걸렷으니 게임을 종료시킬거야

        try {
         Thread.sleep(punishment_time * 1000);
        } catch (Exception e) {
         System.out.println(e.getLocalizedMessage());
        }
        _pc.saveInventory();
        _pc.sendPackets(new S_Disconnect());
        break;
       case 1
    :// 못움직이게

        _pc.sendPackets(new S_Paralysis(S_Paralysis.TYPE_BIND, true));
        _pc.sendPackets(new S_SystemMessage(String.format(I18N_ssibak_STOP_THE_ACTION, punishment_time)));
        // 너는 걸렷으니 게임을 종료시킬거야
        try {
         Thread.sleep(punishment_time * 1000);
        } catch (Exception e) {
         System.out.println(e.getLocalizedMessage());
        }
        _pc.sendPackets(new S_Paralysis(S_Paralysis.TYPE_BIND, false));
        break;
       case 2:// 조용히시키자
        L1Teleport.teleport(_pc, 32737, 32796, (short) punishment_mapid, 5, false);
        _pc.sendPackets(new S_SystemMessage(String.format(I18N_ssibak_MOVE_TO_THE_ISOLATION_MAP, punishment_time)));
        
    // 걸렷으니 해당맵으로 강제로 보내버려 슝~

        try {
         Thread.sleep(punishment_time * 1000);
        } catch (Exception e) {
         System.out.println(e.getLocalizedMessage());
        }
        L1Teleport.teleport(_pc, x, y, (short) mapid, 5, false);
        break;
       }
      } else {
       
    // 나는 운영자이니깐 안되지요

       if (Config.DEBUG_MODE) {
        _pc.sendPackets(new S_SystemMessage("네이놈 잘걸렸다."));
        _pc.sendPackets(new S_SystemMessage(I18N_ssibak_OVERSPEED_DETECTED));
        
    //너걸렷다.

       }
      }
      _injusticeCount = 0;
      _justiceCount = 0;
      if (Config.LOGGING_ssibak) {
       ssibakLogTable logssibak = new ssibakLogTable();
       logssibak.storeLogssibak(_pc
    );// 일단 어떤놈인지 기록을

      }
     }
      

     

    //디도스나 서버폭격으로 프레임이나 패킷때문에 임의로 할수있으니 올바르게

    // 공격 이동 등.

     

     private int getRightInterval(ACT_TYPE type) {
      int interval;
      switch (type) {
      case ATTACK:
       interval = SprTable.getInstance().getAttackSpeed(_pc.getTempCharGfx(),
         _pc.getCurrentWeapon() + 1);
       break;
      case MOVE:
       interval = SprTable.getInstance().getMoveSpeed(_pc.getTempCharGfx(),
         _pc.getCurrentWeapon());
       break;
      case SPELL_DIR:
       interval = SprTable.getInstance().getDirSpellSpeed(_pc.getTempCharGfx());
       break;
      case SPELL_NODIR:
       interval = SprTable.getInstance().getNodirSpellSpeed(_pc.getTempCharGfx());
       break;
      default:
       return 0;
      }
      if (_pc.isHaste()) { 
    //헤이

       interval *= HASTE_RATE;
      }
      if (_pc.isSlow()) {
    //슬로우

       interval /= HASTE_RATE;
      }
      if (_pc.isBrave()) {
    // 용기

       interval *= HASTE_RATE;
      }
      if (_pc.isElfBrave()) {
    // 와퍼

       interval *= WAFFLE_RATE;
      }
      if (type.equals(ACT_TYPE.MOVE) && _pc.isFastMovable()) { // 홀리 윈드 무빙
          interval *= HASTE_RATE;
      }
      if (type.equals(ACT_TYPE.ATTACK) && _pc.isFastAttackable()) {
     // 블러드

       interval *= HASTE_RATE * WAFFLE_RATE;
      }
      if (type.equals(ACT_TYPE.MOVE) && _pc.isRIBRAVE()) {
    // 유그드라

       interval *= WAFFLE_RATE;
      }
      if (_pc.isThirdSpeed()) {
    // 3단

       interval *= WAFFLE_RATE;
      }
      if (_pc.isWindShackle()) { // 윈드   

       interval /= 2;
      }
      if(_pc.getMapId() == 5143) { // 펫레이징부분   

       interval *= 0.1;
      }
      return interval;
     }
    }


    //////////////////////////////////////////////////////////////////////////////

     

    import l1j.server.datatables폴더

    ssibakLogTable 자바 생성

     

    /*
     * 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.datatables;

    import java.sql.PreparedStatement;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import l1j.server.model.instance.L1PcInstance;
    import l1j.server.utils.L1DatabaseFactory;
    import l1j.server.utils.SqlUtil;

    public class ssibakLogTable {
     private static Logger _log = Logger.getLogger(ssibakTable.class.getName());

     public void storessibak(L1PcInstance pc) {
      java.sql.Connection con = null;
      PreparedStatement pstm = null;
      try {
       con = L1DatabaseFactory.getInstance().getConnection();
       pstm = con.prepareStatement("INSERT INTO ssibak_logs SET account_id=?, char_id=?, clan_id=?, map_id=?, loc_x=?, loc_y=?, datetime=SYSDATE()");
       pstm.setInt(1, pc.getAccountId());
       pstm.setInt(2, pc.getId());
       pstm.setInt(3, pc.getClanId());
       pstm.setInt(4, pc.getMapId());
       pstm.setInt(5, pc.getX());
       pstm.setInt(6, pc.getY());
       pstm.execute();
      } catch (Exception e) {
       _log.log(Level.SEVERE, e.getLocalizedMessage(), e);
      } finally {
       SqlUtil.close(pstm);
       SqlUtil.close(con);
      }
     }
    }

     

     

    [출처] [서버방어프로젝트1] 너 스핵쓰냐? 잡아줄게 (비공개 카페)

    이 게시물을..
    N
    0
    0
    • 유저 아이피보는 소스캐빈N.01
    • 0
      준희미니

    준희미니 님의 최근 글

    [에바] 나비켓 테이블 관련 설명 829 1 2016 07.29 에바소스인데 오픈대기 켜고 끄는 소스에요~ 151 2016 07.29 퍼플채팅 색(진보라채팅) 107 2016 07.29 선택상자 2탄입니다!! 접속유지증표를 활용한 아템선택 185 2016 07.29 새로운 아이템 인첸트 시에 마법방어 올라가도록 설정하는 159 2016 07.29

    준희미니 님의 최근 댓글

    rt 2021 05.25 ㄳ 2021 05.11 ㄳ 2021 05.11 rt 2021 05.09 rt 2021 04.25
    글쓴이의 서명작성글 감추기 
    댓글 쓰기 에디터 사용하기 닫기
    • view_headline 목록
    • 14px
    • 유저 아이피보는 소스
    • 목록
      view_headline
    × CLOSE
    기본 (1,068) 제목 날짜 수정 조회 댓글 추천 비추
    분류 정렬 검색
    • 포인트 획득 공지
      4
      2026.04.24 - 19:48 3366 4
    • 링크 업로드 관련 공지
      7
      2026.03.25 - 21:56 3640 7
    • 인증메일 공지
      2
      2026.03.15 - 16:42 3551 2
    • 파일링크 및 인증메일 발송 관련 문의 안내
      8
      2026.03.14 - 22:03 4042 8
    • 포인트 게시판 안내
      2026.02.28 - 19:14 4716
    • 게임존 사이트 변경 사항 안내
      9
      2026.02.26 - 01:07 6395 9
    • 소스자료는 직접 올려주세요
      2017.06.06 - 16:14 666
    1068
    2.7 벚꽃팩 몹드랍 템 편하게
    뷸바다 2026.05.19 - 14:35 46
    1067
    2.7 벛꽃팩 인벤정리 기능추가
    뷸바다 2026.05.14 - 13:41 43
    1066
    2.7 벛꽃팩 원격 펫 소환
    뷸바다 2026.05.03 - 14:24 186
    1065
    2.0팩 버프시간확인 아이템으로 구현
    스트릭스 2026.05.01 - 06:45 78
    1064
    장시간 운영을 위하여
    스트릭스 2026.05.01 - 06:45 70
    1063
    내 케렉터 주위 몹만 움직이게 수정해보기
    스트릭스 2026.05.01 - 06:43 53
    1062
    구버전 1.63~2.0 몬스터 움직임 부드럽게 개선
    스트릭스 2026.05.01 - 06:41 62
    1061
    list 보는법 2
    스트릭스 2026.05.01 - 06:38 46
    1060
    list 보는법
    스트릭스 2026.05.01 - 06:37 53
    1059
    자동스킬 사용법
    스트릭스 2026.05.01 - 06:35 63
    1058
    아머브레이크 데스티니 시전시 성공 확률 조정하는 소스가 있나요?
    안정환 2024.04.23 - 10:01 165
    1057
    List.spr(변신,몬스터 수정소스)개조방법
    유튜브고도리 2024.04.19 - 05:02 435
    1056
    NPC 외침 멘트 깔끔정리(by.유튜브고도리)
    유튜브고도리 2024.04.11 - 05:57 207
    1055
    디아블로 참 만들기
    유튜브고도리 2024.04.09 - 05:55 210
    1054
    리니지m 처럼 피통 늘리기,오류가 날때
    유튜브고도리 2024.04.09 - 05:18 168
    1053
    욕하면 채금 먹게 하기
    유튜브고도리 2024.04.09 - 04:59 151
    1052
    레벨에 따른 호칭 부여..?
    밤톨이11 2024.04.08 - 04:24 151
    1051
    초보자 보호 시스템
    밤톨이11 2024.04.08 - 04:21 126
    1050
    마법무기 데미지 증가
    밤톨이11 2024.04.08 - 04:19 149
    1049
    레벨 제한 맵
    밤톨이11 2024.04.08 - 04:14 128
    1048
    마법스크롤
    밤톨이11 2024.04.08 - 04:06 66
    1047
    리니지m 아지트 소유중에도 공성선포하기
    유튜브고도리 2024.04.07 - 21:37 125
    1046
    리니지m 마법인형이 마법을 쓰네?
    유튜브고도리 2024.04.07 - 21:36 143
    1045
    드래곤 슬레이어 각반(장비추가소스)
    유튜브고도리 2024.04.07 - 19:08 129
    1044
    린엠 게렝 변신 카드 만들기
    유튜브고도리 2024.04.06 - 06:06 178
    1043
    버프 물약 개별 소스 오래전 소스
    밤톨이11 2024.04.05 - 18:43 130
    1042
    일시 스텟 상승 물약
    밤톨이11 2024.04.05 - 18:42 80
    1041
    성 전환 물약
    밤톨이11 2024.04.05 - 18:37 94
    1040
    MP 물약 소스
    밤톨이11 2024.04.05 - 18:35 125
    1039
    리니지 옛날버젼..이라는데...구동가능여부 확인 부탁드립니다.
    도난차량 2024.03.24 - 04:56 471
    1038
    랭커
    foqwer 2024.03.14 - 10:43 212
    1037
    인첸별
    foqwer 2024.03.14 - 10:42 185
    1036
    몬스터 앞에 레벨 넣기
    프렌치좋아 2024.03.04 - 01:40 457
    1035
    3.63 글루딘 Single 용
    블루블랙3 2024.02.28 - 23:08 503
    1034
    Sprite file doesn`t exist 오류
    하앙비 2023.12.23 - 02:19 326
    1033
    전쟁세율 고정값 15%
    하남궁 2023.11.29 - 17:02 249
    1032
    인형합성사
    Rebecca 2023.10.09 - 22:54 417
    1031
    2.0 레벨업시 HP량 올리기
    Rebecca 2023.10.09 - 22:49 501
    1030
    전사버전 펫 만렙 변경
    Rebecca 2023.10.09 - 22:44 219
    1029
    맵 순간이동 가능 불가능지역 설정하기
    Rebecca 2023.10.09 - 22:39 309
    1028
    트레져박스 업로드입니다.
    린컴충성 2023.10.07 - 04:46 241
    1027
    리마스터 접속기 소스자료
    홍자놀기 2023.09.08 - 05:41 2579
    1026
    대미지 발동시 범위 질문드립니다
    나잇따나읻따 2023.05.21 - 22:26 369
    1025
    리니지 리마스터 몹 스폰수 어디서 줄일 수 있나요?
    001001 2023.04.25 - 16:06 809
    1024
    전사팩 로봇가능
    노력하자 2023.03.16 - 19:14 1190
    1023
    2.7 자동 물약 소스
    퍽퍽띠 2022.11.18 - 00:40 1322
    1022
    2.0 자동칼질소스 (클래스 파일에서 빼왔습니다)
    drumlinek 2022.11.06 - 05:20 1008
    1021
    npc가 인겜에서 채팅으로 말하기
    하늘마음 2022.10.06 - 10:04 389
    1020
    유저 아이피보는 소스
    캐빈N.01 2020.12.15 - 21:34 700
    1019
    인공지능
    캐빈N.01 2020.12.15 - 21:27 1195
    • 1 2 3 4 5 6 7 8 9 10 .. 22
    • / 22 GO
  • GAMEZONE
 GAMEZONE all rights reserved.
by OrangeDay