├── .gitignore
├── MapleSQL.sql
├── MonsterDrops.mdf
├── README.md
├── config.yml
├── lib
├── HikariCP-2.4.3.jar
├── MapleDataFormat.jar
├── jbcrypt-0.4.jar
├── log4j-1.2.17.jar
├── lombok.jar
├── mysql-connector-java-8.0.28.jar
├── netty-all-4.0.31.Final.jar
├── slf4j-api-1.7.14.jar
├── slf4j-jdk14-1.7.14.jar
├── slf4j-log4j12-1.7.12.jar
├── slf4j-nop-1.7.14.jar
├── slf4j-simple-1.7.14.jar
├── snakeyaml-1.14.jar
└── sqlite-jdbc-3.7.2.jar
├── monster_drops.db
├── scripts
├── constants
│ └── HenesysPQ.js
├── event
│ ├── boats.js
│ └── ellinia_orbis_boat.js
├── item
│ ├── 1122017.js
│ └── monsterBookCard.js
├── legacy_patches.txt
├── map
│ ├── 101000300.js
│ ├── 108000100.js
│ ├── 108000200.js
│ ├── 108000300.js
│ ├── 108000400.js
│ ├── 130030000.js
│ ├── 130030001.js
│ ├── 130030002.js
│ ├── 130030003.js
│ ├── 130030004.js
│ ├── 130030005.js
│ ├── 140090000.js
│ ├── 910010000.js
│ ├── 914000000.js
│ ├── 914000200.js
│ ├── 914000210.js
│ ├── 914000220.js
│ ├── 970000102.js
│ └── global
│ │ ├── aranDirection.js
│ │ ├── go10000.js
│ │ ├── go1020000.js
│ │ ├── goAdventure.js
│ │ ├── goArcher.js
│ │ ├── goMagician.js
│ │ ├── goPirate.js
│ │ ├── goRogue.js
│ │ └── goSwordman.js
├── npc
│ ├── 1012000.js_old
│ ├── 1012009.js
│ ├── 1012100.js
│ ├── 1012112.js
│ ├── 1012114.js
│ ├── 1022000.js
│ ├── 1022101.js
│ ├── 1032001.js
│ ├── 1032008.js
│ ├── 1052001.js
│ ├── 1061008.js
│ ├── 1072000.js
│ ├── 1072001.js
│ ├── 1072002.js
│ ├── 1072003.js
│ ├── 1072004.js
│ ├── 1072005.js
│ ├── 1072006.js
│ ├── 1072007.js
│ ├── 1100000.js
│ ├── 1101001.js
│ ├── 1102003.js
│ ├── 1202000.js
│ ├── 1209000.js
│ ├── 1209001.js
│ ├── 1209002.js
│ ├── 1209003.js
│ ├── 1209004.js
│ ├── 1209005.js
│ ├── 2010007.js
│ ├── 2012001.js
│ ├── 2040046.js
│ ├── 2042000.js
│ ├── 2091005.js
│ ├── 2nd_job_npc.js
│ ├── 2nd_job_npc_marbles.js
│ ├── 9000021.js
│ ├── 9010002.js
│ ├── 9010009.js
│ ├── 9030100.js
│ ├── 9100100.js
│ ├── 9201067.js
│ ├── abstract_job_advancer.js
│ ├── all_hair.js
│ ├── death_npc.js
│ ├── error.js
│ ├── exp_npc.js
│ ├── fallback.js
│ ├── gachapon.js
│ ├── guide.js
│ ├── information.js
│ ├── job_switcher.js
│ ├── legacy
│ │ ├── 1002000.js
│ │ ├── 1002002.js
│ │ ├── 1002003.js
│ │ ├── 1002004.js
│ │ ├── 1002005.js
│ │ ├── 1002006.js
│ │ ├── 1002007.js
│ │ ├── 1002100.js
│ │ ├── 1012000.js
│ │ ├── 1012002.js
│ │ ├── 1012005.js
│ │ ├── 1012006.js
│ │ ├── 1012007.js
│ │ ├── 1012008.js
│ │ ├── 1012009.js
│ │ ├── 1012100.js
│ │ ├── 1012103.js
│ │ ├── 1012104.js
│ │ ├── 1012105.js
│ │ ├── 1012112.js
│ │ ├── 1012113.js
│ │ ├── 1012114.js
│ │ ├── 1012115.js
│ │ ├── 1012116.js
│ │ ├── 1012117.js
│ │ ├── 1012118.js
│ │ ├── 1013104.js
│ │ ├── 10200.js
│ │ ├── 10201.js
│ │ ├── 10202.js
│ │ ├── 10203.js
│ │ ├── 10204.js
│ │ ├── 1022000.js
│ │ ├── 1022001.js
│ │ ├── 1022003.js
│ │ ├── 1022004.js
│ │ ├── 1022005.js
│ │ ├── 1022101.js
│ │ ├── 1022104.js
│ │ ├── 1022105.js
│ │ ├── 1032000.js
│ │ ├── 1032001.js
│ │ ├── 1032002.js
│ │ ├── 1032003.js
│ │ ├── 1032004.js
│ │ ├── 1032005.js
│ │ ├── 1032006.js
│ │ ├── 1032007.js
│ │ ├── 1032008.js
│ │ ├── 1032009.js
│ │ ├── 1032100.js
│ │ ├── 1032102.js
│ │ ├── 1032109.js
│ │ ├── 1032110.js
│ │ ├── 1032111.js
│ │ ├── 1032113.js
│ │ ├── 1032114.js
│ │ ├── 1040000.js
│ │ ├── 1043000.js
│ │ ├── 1043001.js
│ │ ├── 1052001.js
│ │ ├── 1052002.js
│ │ ├── 1052003.js
│ │ ├── 1052004.js
│ │ ├── 1052005.js
│ │ ├── 1052006.js
│ │ ├── 1052007.js
│ │ ├── 1052008.js
│ │ ├── 1052009.js
│ │ ├── 1052010.js
│ │ ├── 1052011.js
│ │ ├── 1052012.js
│ │ ├── 1052013.js
│ │ ├── 1052014.js
│ │ ├── 1052015.js
│ │ ├── 1052016.js
│ │ ├── 1052017.js
│ │ ├── 1052100.js
│ │ ├── 1052101.js
│ │ ├── 1052107.js
│ │ ├── 1052109.js
│ │ ├── 1052110.js
│ │ ├── 1052111.js
│ │ ├── 1052112.js
│ │ ├── 1052113.js
│ │ ├── 1052114.js
│ │ ├── 1052115.js
│ │ ├── 1052125.js
│ │ ├── 1061000.js
│ │ ├── 1061006.js
│ │ ├── 1061007.js
│ │ ├── 1061008.js
│ │ ├── 1061009.js
│ │ ├── 1061010.js
│ │ ├── 1061012.js
│ │ ├── 1061014.js
│ │ ├── 1061016.js
│ │ ├── 1061018.js
│ │ ├── 1061100.js
│ │ ├── 1063000.js
│ │ ├── 1063001.js
│ │ ├── 1063002.js
│ │ ├── 1063012.js
│ │ ├── 1063013.js
│ │ ├── 1063016.js
│ │ ├── 1063017.js
│ │ ├── 1072000.js
│ │ ├── 1072001.js
│ │ ├── 1072002.js
│ │ ├── 1072003.js
│ │ ├── 1072004.js
│ │ ├── 1072005.js
│ │ ├── 1072006.js
│ │ ├── 1072007.js
│ │ ├── 1072008.js
│ │ ├── 1081001.js
│ │ ├── 1090000.js
│ │ ├── 1091003.js
│ │ ├── 1091004.js
│ │ ├── 1092000.js
│ │ ├── 1092007.js
│ │ ├── 1092010.js
│ │ ├── 1092014.js
│ │ ├── 1092016.js
│ │ ├── 1092018.js
│ │ ├── 1092019.js
│ │ ├── 1092090.js
│ │ ├── 1092091.js
│ │ ├── 1092094.js
│ │ ├── 1092095.js
│ │ ├── 1094000.js
│ │ ├── 1094002.js
│ │ ├── 1094003.js
│ │ ├── 1094004.js
│ │ ├── 1094005.js
│ │ ├── 1094006.js
│ │ ├── 1095001.js
│ │ ├── 1095002.js
│ │ ├── 1096001.js
│ │ ├── 1096003.js
│ │ ├── 1096005.js
│ │ ├── 1096010.js
│ │ ├── 11000.js
│ │ ├── 1100000.js
│ │ ├── 1100003.js
│ │ ├── 1100004.js
│ │ ├── 1100005.js
│ │ ├── 1100006.js
│ │ ├── 1100007.js
│ │ ├── 1100008.js
│ │ ├── 1101001.js
│ │ ├── 1101008.js
│ │ ├── 1102001.js
│ │ ├── 1102002.js
│ │ ├── 1102003.js
│ │ ├── 1103005.js
│ │ ├── 1104000.js
│ │ ├── 1104100.js
│ │ ├── 1104101.js
│ │ ├── 1104102.js
│ │ ├── 1104103.js
│ │ ├── 1104104.js
│ │ ├── 1200000.js
│ │ ├── 1200003.js
│ │ ├── 1200004.js
│ │ ├── 1200005.js
│ │ ├── 1200006.js
│ │ ├── 1202000.js
│ │ ├── 1202009.js
│ │ ├── 1202010.js
│ │ ├── 1204001.js
│ │ ├── 1209000.js
│ │ ├── 1209001.js
│ │ ├── 1209002.js
│ │ ├── 1209003.js
│ │ ├── 1209004.js
│ │ ├── 1209005.js
│ │ ├── 12101.js
│ │ ├── 1300013.js
│ │ ├── 2001000.js
│ │ ├── 2001001.js
│ │ ├── 2001002.js
│ │ ├── 2001003.js
│ │ ├── 2001004.js
│ │ ├── 2002000.js
│ │ ├── 2003.js
│ │ ├── 2007.js
│ │ ├── 2010000.js
│ │ ├── 2010001.js
│ │ ├── 2010002.js
│ │ ├── 2010003.js
│ │ ├── 2010005.js
│ │ ├── 2010006.js
│ │ ├── 2010007.js
│ │ ├── 2010008.js
│ │ ├── 2010009.js
│ │ ├── 2012000.js
│ │ ├── 2012001.js
│ │ ├── 2012002.js
│ │ ├── 2012006.js
│ │ ├── 2012007.js
│ │ ├── 2012008.js
│ │ ├── 2012009.js
│ │ ├── 2012012.js
│ │ ├── 2012013.js
│ │ ├── 2012014.js
│ │ ├── 2012015.js
│ │ ├── 2012021.js
│ │ ├── 2012022.js
│ │ ├── 2012024.js
│ │ ├── 2012025.js
│ │ ├── 2013000.js
│ │ ├── 2013001.js
│ │ ├── 2013002.js
│ │ ├── 2020000.js
│ │ ├── 2020002.js
│ │ ├── 2020004.js
│ │ ├── 2020005.js
│ │ ├── 2020008.js
│ │ ├── 2020009.js
│ │ ├── 2020010.js
│ │ ├── 2020011.js
│ │ ├── 2020013.js
│ │ ├── 2022004.js
│ │ ├── 2023000.js
│ │ ├── 2030000.js
│ │ ├── 2030006.js
│ │ ├── 2030008.js
│ │ ├── 2030010.js
│ │ ├── 2030011.js
│ │ ├── 2030013.js
│ │ ├── 2032001.js
│ │ ├── 2032002.js
│ │ ├── 2032003.js
│ │ ├── 2040000.js
│ │ ├── 2040002.js
│ │ ├── 2040003.js
│ │ ├── 2040014.js
│ │ ├── 2040016.js
│ │ ├── 2040019.js
│ │ ├── 2040020.js
│ │ ├── 2040021.js
│ │ ├── 2040022.js
│ │ ├── 2040024.js
│ │ ├── 2040025.js
│ │ ├── 2040026.js
│ │ ├── 2040027.js
│ │ ├── 2040028.js
│ │ ├── 2040030.js
│ │ ├── 2040031.js
│ │ ├── 2040032.js
│ │ ├── 2040033.js
│ │ ├── 2040034.js
│ │ ├── 2040035.js
│ │ ├── 2040036.js
│ │ ├── 2040037.js
│ │ ├── 2040038.js
│ │ ├── 2040039.js
│ │ ├── 2040040.js
│ │ ├── 2040041.js
│ │ ├── 2040042.js
│ │ ├── 2040043.js
│ │ ├── 2040044.js
│ │ ├── 2040045.js
│ │ ├── 2040046.js
│ │ ├── 2040047.js
│ │ ├── 2040047_old.js
│ │ ├── 2040048.js
│ │ ├── 2040050.js
│ │ ├── 2040052.js
│ │ ├── 2041000.js
│ │ ├── 2041001.js
│ │ ├── 2041007.js
│ │ ├── 2041008.js
│ │ ├── 2041009.js
│ │ ├── 2041010.js
│ │ ├── 2041013.js
│ │ ├── 2041017.js
│ │ ├── 2041023.js
│ │ ├── 2041025.js
│ │ ├── 2041029.js
│ │ ├── 2042000.js
│ │ ├── 2050004.js
│ │ ├── 2060005.js
│ │ ├── 2060008.js
│ │ ├── 2060009.js
│ │ ├── 2060100.js
│ │ ├── 2070000.js
│ │ ├── 2080000.js
│ │ ├── 2080005.js
│ │ ├── 2081000.js
│ │ ├── 2081005.js
│ │ ├── 2081009.js
│ │ ├── 2081010.js
│ │ ├── 2081100.js
│ │ ├── 2081200.js
│ │ ├── 2081300.js
│ │ ├── 2081400.js
│ │ ├── 2081500.js
│ │ ├── 2082000.js
│ │ ├── 2082001.js
│ │ ├── 2082002.js
│ │ ├── 2082003.js
│ │ ├── 2082004.js
│ │ ├── 2083000.js
│ │ ├── 2083001.js
│ │ ├── 2083002.js
│ │ ├── 2083004.js
│ │ ├── 2083005.js
│ │ ├── 2083006.js
│ │ ├── 2090000.js
│ │ ├── 2090004.js
│ │ ├── 2090005.js
│ │ ├── 2090100.js
│ │ ├── 2090101.js
│ │ ├── 2090102.js
│ │ ├── 2090103.js
│ │ ├── 2090104.js
│ │ ├── 2091005.js
│ │ ├── 2091005_old.js
│ │ ├── 2091006.js
│ │ ├── 2091009.js
│ │ ├── 2093003.js
│ │ ├── 2093004.js
│ │ ├── 2094000.js
│ │ ├── 2094001.js
│ │ ├── 2094002.js
│ │ ├── 2096000.js
│ │ ├── 2100.js
│ │ ├── 2100000.js
│ │ ├── 2100001.js
│ │ ├── 2100002.js
│ │ ├── 2100003.js
│ │ ├── 2100005.js
│ │ ├── 2100006.js
│ │ ├── 2100007.js
│ │ ├── 2100008.js
│ │ ├── 2100009.js
│ │ ├── 2101.js
│ │ ├── 2101000.js
│ │ ├── 2101001.js
│ │ ├── 2101002.js
│ │ ├── 2101003.js
│ │ ├── 2101004.js
│ │ ├── 2101005.js
│ │ ├── 2101006.js
│ │ ├── 2101007.js
│ │ ├── 2101008.js
│ │ ├── 2101009.js
│ │ ├── 2101010.js
│ │ ├── 2101011.js
│ │ ├── 2101013.js
│ │ ├── 2101014.js
│ │ ├── 2101017.js
│ │ ├── 2101018.js
│ │ ├── 2102000.js
│ │ ├── 2102001.js
│ │ ├── 2102002.js
│ │ ├── 2103000.js
│ │ ├── 2103001.js
│ │ ├── 2103002.js
│ │ ├── 2103003.js
│ │ ├── 2103004.js
│ │ ├── 2103005.js
│ │ ├── 2103006.js
│ │ ├── 2103009.js
│ │ ├── 2103010.js
│ │ ├── 2103011.js
│ │ ├── 2103012.js
│ │ ├── 2103013.js
│ │ ├── 2110000.js
│ │ ├── 2110002.js
│ │ ├── 2110005.js
│ │ ├── 2111000.js
│ │ ├── 2111001.js
│ │ ├── 2111003.js
│ │ ├── 2111004.js
│ │ ├── 2111005.js
│ │ ├── 2111006.js
│ │ ├── 2111007.js
│ │ ├── 2111008.js
│ │ ├── 2111009.js
│ │ ├── 2111010.js
│ │ ├── 2111013.js
│ │ ├── 2111014.js
│ │ ├── 2111015.js
│ │ ├── 2111017.js
│ │ ├── 2111018.js
│ │ ├── 2111019.js
│ │ ├── 2111020.js
│ │ ├── 2111021.js
│ │ ├── 2111022.js
│ │ ├── 2111023.js
│ │ ├── 2111025.js
│ │ ├── 2111026.js
│ │ ├── 2112000.js
│ │ ├── 2112001.js
│ │ ├── 2112003.js
│ │ ├── 2112004.js
│ │ ├── 2112005.js
│ │ ├── 2112006.js
│ │ ├── 2112007.js
│ │ ├── 2112010.js
│ │ ├── 2112011.js
│ │ ├── 2112013.js
│ │ ├── 2112016.js
│ │ ├── 2112018.js
│ │ ├── 2120003.js
│ │ ├── 2131000.js
│ │ ├── 2131001.js
│ │ ├── 2131002.js
│ │ ├── 2131003.js
│ │ ├── 2131004.js
│ │ ├── 2131005.js
│ │ ├── 2131006.js
│ │ ├── 2131007.js
│ │ ├── 2132000.js
│ │ ├── 2132001.js
│ │ ├── 2132002.js
│ │ ├── 2132003.js
│ │ ├── 2133000.js
│ │ ├── 2133001.js
│ │ ├── 2133002.js
│ │ ├── 2133004.js
│ │ ├── 2141000.js
│ │ ├── 2141001.js
│ │ ├── 2141002.js
│ │ ├── 22000.js
│ │ ├── 9000000.js
│ │ ├── 9000001.js
│ │ ├── 9000002.js
│ │ ├── 9000004.js
│ │ ├── 9000008.js
│ │ ├── 9000009.js
│ │ ├── 9000010.js
│ │ ├── 9000011.js
│ │ ├── 9000012.js
│ │ ├── 9000013.js
│ │ ├── 9000017.js
│ │ ├── 9000020.js
│ │ ├── 9000021.js
│ │ ├── 9000021_old.js
│ │ ├── 9000036.js
│ │ ├── 9000037.js
│ │ ├── 9000038.js
│ │ ├── 9000041.js
│ │ ├── 9000049.js
│ │ ├── 9001108.js
│ │ ├── 9010001.js
│ │ ├── 9010002.js
│ │ ├── 9010003.js
│ │ ├── 9010004.js
│ │ ├── 9010021.js
│ │ ├── 9010022.js
│ │ ├── 9010022_old.js
│ │ ├── 9020000.js
│ │ ├── 9020001.js
│ │ ├── 9020002.js
│ │ ├── 9030000.js
│ │ ├── 9030100.js
│ │ ├── 9040000.js
│ │ ├── 9040001.js
│ │ ├── 9040002.js
│ │ ├── 9040003.js
│ │ ├── 9040004.js
│ │ ├── 9040005.js
│ │ ├── 9040006.js
│ │ ├── 9040007.js
│ │ ├── 9040008.js
│ │ ├── 9040009.js
│ │ ├── 9040010.js
│ │ ├── 9040011.js
│ │ ├── 9040012.js
│ │ ├── 9060000.js
│ │ ├── 9101001.js
│ │ ├── 9102101.js
│ │ ├── 9103000.js
│ │ ├── 9103001.js
│ │ ├── 9103002.js
│ │ ├── 9103003.js
│ │ ├── 9110002.js
│ │ ├── 9120003.js
│ │ ├── 9120009.js
│ │ ├── 9120010.js
│ │ ├── 9120013.js
│ │ ├── 9120015.js
│ │ ├── 9120023.js
│ │ ├── 9120100.js
│ │ ├── 9120101.js
│ │ ├── 9120200.js
│ │ ├── 9120201.js
│ │ ├── 9120202.js
│ │ ├── 9120203.js
│ │ ├── 9200100.js
│ │ ├── 9200101.js
│ │ ├── 9200102.js
│ │ ├── 9201000.js
│ │ ├── 9201001.js
│ │ ├── 9201002.js
│ │ ├── 9201003.js
│ │ ├── 9201004.js
│ │ ├── 9201005.js
│ │ ├── 9201006.js
│ │ ├── 9201007.js
│ │ ├── 9201008.js
│ │ ├── 9201010.js
│ │ ├── 9201012.js
│ │ ├── 9201013.js
│ │ ├── 9201014.js
│ │ ├── 9201015.js
│ │ ├── 9201016.js
│ │ ├── 9201017.js
│ │ ├── 9201018.js
│ │ ├── 9201019.js
│ │ ├── 9201021.js
│ │ ├── 9201022.js
│ │ ├── 9201023.js
│ │ ├── 9201024.js
│ │ ├── 9201025.js
│ │ ├── 9201026.js
│ │ ├── 9201027.js
│ │ ├── 9201033.js
│ │ ├── 9201039.js
│ │ ├── 9201042.js
│ │ ├── 9201043.js
│ │ ├── 9201044.js
│ │ ├── 9201045.js
│ │ ├── 9201046.js
│ │ ├── 9201047.js
│ │ ├── 9201048.js
│ │ ├── 9201049.js
│ │ ├── 9201050.js
│ │ ├── 9201051.js
│ │ ├── 9201052.js
│ │ ├── 9201054.js
│ │ ├── 9201056.js
│ │ ├── 9201057.js
│ │ ├── 9201061.js
│ │ ├── 9201062.js
│ │ ├── 9201063.js
│ │ ├── 9201064.js
│ │ ├── 9201065.js
│ │ ├── 9201068.js
│ │ ├── 9201069.js
│ │ ├── 9201070.js
│ │ ├── 9201071.js
│ │ ├── 9201072.js
│ │ ├── 9201073.js
│ │ ├── 9201079.js
│ │ ├── 9201081.js
│ │ ├── 9201083.js
│ │ ├── 9201093.js
│ │ ├── 9201094.js
│ │ ├── 9201095.js
│ │ ├── 9201096.js
│ │ ├── 9201097.js
│ │ ├── 9201098.js
│ │ ├── 9201099.js
│ │ ├── 9201100.js
│ │ ├── 9201101.js
│ │ ├── 9201102.js
│ │ ├── 9201103.js
│ │ ├── 9201104.js
│ │ ├── 9201105.js
│ │ ├── 9201106.js
│ │ ├── 9201107.js
│ │ ├── 9201108.js
│ │ ├── 9201109.js
│ │ ├── 9201110.js
│ │ ├── 9201111.js
│ │ ├── 9201112.js
│ │ ├── 9201113.js
│ │ ├── 9201114.js
│ │ ├── 9201115.js
│ │ ├── 9201123.js
│ │ ├── 9201124.js
│ │ ├── 9201125.js
│ │ ├── 9201126.js
│ │ ├── 9201127.js
│ │ ├── 9201128.js
│ │ ├── 9201129.js
│ │ ├── 9201130.js
│ │ ├── 9201131.js
│ │ ├── 9201132.js
│ │ ├── 9201134.js
│ │ ├── 9201135.js
│ │ ├── 9201142.js
│ │ ├── 9201143.js
│ │ ├── 9209000.js
│ │ ├── 9209000_old.js
│ │ ├── 9209001.js
│ │ ├── 9209100.js
│ │ ├── 9220004.js
│ │ ├── 9220005.js
│ │ ├── 9220005_old.js
│ │ ├── 9250045.js
│ │ ├── 9270017.js
│ │ ├── 9270018.js
│ │ ├── 9270023.js
│ │ ├── 9270024.js
│ │ ├── 9270025.js
│ │ ├── 9270026.js
│ │ ├── 9270031.js
│ │ ├── 9270033.js
│ │ ├── 9270036.js
│ │ ├── 9270037.js
│ │ ├── 9270038.js
│ │ ├── 9270041.js
│ │ ├── 9270042.js
│ │ ├── 9270043.js
│ │ ├── 9270047.js
│ │ ├── 9270054.js
│ │ ├── 9310058.js
│ │ ├── 9900000.js
│ │ ├── 9900001.js
│ │ ├── MagatiaPassword.js
│ │ ├── MaybeItsGrendel_end.js
│ │ ├── PupeteerPassword.js
│ │ ├── ThiefPassword.js
│ │ ├── changeName.js
│ │ ├── commands.js
│ │ ├── credits.js
│ │ ├── gachapon.js
│ │ ├── gachaponRemote.js
│ │ ├── gachaponold.js
│ │ ├── readme.txt
│ │ ├── unidentifiedNpc.js
│ │ └── waterOfLife.js
│ ├── lilin_welcome.js
│ ├── lookup_command_npc.js
│ ├── lookup_item.js
│ ├── map_search.js
│ ├── rate_editor.js
│ ├── simple_talk.js
│ ├── stat_test.js
│ ├── storage_npc.js
│ ├── trade_button_npc.js
│ └── tutoNpc.js
├── portal
│ ├── aranTutorAloneX.js
│ ├── aranTutorArrow0.js
│ ├── aranTutorArrow1.js
│ ├── aranTutorArrow2.js
│ ├── aranTutorArrow3.js
│ ├── aranTutorGuide0.js
│ ├── aranTutorGuide1.js
│ ├── aranTutorGuide2.js
│ ├── aranTutorLost.js
│ ├── aranTutorMono0.js
│ ├── aranTutorMono1.js
│ ├── aranTutorMono2.js
│ ├── aranTutorMono3.js
│ ├── aranTutorOut1.js
│ ├── aranTutorOut2.js
│ ├── aranTutorOut3.js
│ ├── enterAchter.js
│ ├── enterDisguise0.js
│ ├── enterMagiclibrar.js
│ ├── fallback.js
│ ├── glTutoMsg0.js
│ ├── infoAttack.js
│ ├── infoMinimap.js
│ ├── infoPickup.js
│ ├── infoReactor.js
│ ├── infoSkill.js
│ ├── infoWorldmap.js
│ ├── market01.js
│ ├── market19.js
│ ├── outChild.js
│ ├── rankRoom.js
│ ├── rienTutor1.js
│ ├── tutoChatNpc.js
│ ├── tutorHelper.js
│ ├── tutorMinimap.js
│ ├── tutorWorldmap.js
│ ├── tutorialNPC.js
│ └── tutorquest.js
├── quest
│ ├── 1021.js
│ ├── 20010.js
│ ├── 20011.js
│ ├── 20012.js
│ ├── 20013.js
│ ├── 20016.js
│ ├── 20017.js
│ ├── 20102.js
│ ├── 21000.js
│ ├── 21001.js
│ ├── 21010.js
│ ├── fallback.js
│ └── medal_award.js
├── reactor
│ ├── boss.js
│ ├── erebItem0.js
│ ├── mBoxItem0.js
│ ├── missing_script.js
│ ├── moonItem0.js
│ ├── moonItem1.js
│ ├── moonItem2.js
│ ├── moonItem3.js
│ ├── moonItem4.js
│ └── moonItem5.js
└── todo_legacy_support.txt
├── src
├── config
│ ├── Configuration.java
│ ├── ConfigurationProvider.java
│ ├── MapleServerConfiguration.java
│ └── YamlConfiguration.java
├── constants
│ ├── ElementalEffectiveness.java
│ ├── EquipSlot.java
│ ├── ExpTable.java
│ ├── FieldLimit.java
│ ├── GameConstants.java
│ ├── ItemLetterFont.java
│ ├── LoginStatus.java
│ ├── MapleBuffStat.java
│ ├── MapleDisease.java
│ ├── MapleElement.java
│ ├── MapleEmote.java
│ ├── MapleStat.java
│ ├── MessageType.java
│ ├── MonsterStatus.java
│ ├── PopupInfo.java
│ ├── SmegaType.java
│ ├── Song.java
│ ├── SpecialEffect.java
│ ├── SummonMovementType.java
│ └── skills
│ │ ├── Aran.java
│ │ ├── Archer.java
│ │ ├── Assassin.java
│ │ ├── Bandit.java
│ │ ├── Beginner.java
│ │ ├── Bishop.java
│ │ ├── BlazeWizard.java
│ │ ├── Bowmaster.java
│ │ ├── Brawler.java
│ │ ├── Buccaneer.java
│ │ ├── ChiefBandit.java
│ │ ├── Cleric.java
│ │ ├── Corsair.java
│ │ ├── Crossbowman.java
│ │ ├── Crusader.java
│ │ ├── DarkKnight.java
│ │ ├── DawnWarrior.java
│ │ ├── DragonKnight.java
│ │ ├── FPArchMage.java
│ │ ├── FPMage.java
│ │ ├── FPWizard.java
│ │ ├── Fighter.java
│ │ ├── GM.java
│ │ ├── Gunslinger.java
│ │ ├── Hermit.java
│ │ ├── Hero.java
│ │ ├── Hunter.java
│ │ ├── ILArchMage.java
│ │ ├── ILMage.java
│ │ ├── ILWizard.java
│ │ ├── Legend.java
│ │ ├── Magician.java
│ │ ├── Marauder.java
│ │ ├── Marksman.java
│ │ ├── NightLord.java
│ │ ├── NightWalker.java
│ │ ├── Noblesse.java
│ │ ├── Outlaw.java
│ │ ├── Page.java
│ │ ├── Paladin.java
│ │ ├── Pirate.java
│ │ ├── Priest.java
│ │ ├── Ranger.java
│ │ ├── Rogue.java
│ │ ├── Shadower.java
│ │ ├── Sniper.java
│ │ ├── Spearman.java
│ │ ├── SuperGM.java
│ │ ├── Swordsman.java
│ │ ├── ThunderBreaker.java
│ │ ├── WhiteKnight.java
│ │ └── WindArcher.java
├── database
│ ├── BatchedScript.java
│ ├── ConvertToMapleData.java
│ ├── Database.java
│ ├── ExecuteResult.java
│ ├── LocalDatabase.java
│ ├── MapleDatabase.java
│ ├── MonsterDropManager.java
│ ├── PossibleNullValue.java
│ └── QueryResult.java
├── log4j.xml
├── maplestory
│ ├── cashshop
│ │ ├── CashShopInventory.java
│ │ ├── CashShopItemData.java
│ │ ├── CashShopPackage.java
│ │ └── CashShopWallet.java
│ ├── channel
│ │ ├── MapleChannel.java
│ │ ├── MapleCrossWorldChannel.java
│ │ ├── MapleEvent.java
│ │ ├── MapleSocketChannel.java
│ │ └── MapleVirtualChannel.java
│ ├── client
│ │ ├── MapleClient.java
│ │ └── MapleMessenger.java
│ ├── guild
│ │ ├── GuildEntry.java
│ │ ├── GuildNotFoundException.java
│ │ ├── GuildOperationType.java
│ │ ├── MapleGuild.java
│ │ ├── MapleGuildEmblem.java
│ │ ├── MapleGuildRank.java
│ │ ├── MapleGuildRankLevel.java
│ │ └── bbs
│ │ │ ├── BulletinEmote.java
│ │ │ ├── BulletinPost.java
│ │ │ ├── BulletinReply.java
│ │ │ ├── GuildBulletin.java
│ │ │ └── MapleGuildBulletin.java
│ ├── inventory
│ │ ├── CashInventory.java
│ │ ├── EquipSlot.java
│ │ ├── Inventory.java
│ │ ├── InventoryGroup.java
│ │ ├── InventoryOperation.java
│ │ ├── InventoryType.java
│ │ ├── MapleCashInventory.java
│ │ ├── MapleEquippedInventory.java
│ │ ├── MapleInventory.java
│ │ ├── MapleWeaponType.java
│ │ ├── item
│ │ │ ├── BoxItem.java
│ │ │ ├── CashItem.java
│ │ │ ├── DueyParcel.java
│ │ │ ├── EquipItem.java
│ │ │ ├── EquipItemInfo.java
│ │ │ ├── Item.java
│ │ │ ├── ItemFactory.java
│ │ │ ├── ItemFlag.java
│ │ │ ├── ItemInfoProvider.java
│ │ │ ├── ItemMeta.java
│ │ │ ├── ItemStatInfo.java
│ │ │ ├── ItemType.java
│ │ │ ├── MapleBoxItem.java
│ │ │ ├── MapleCashItem.java
│ │ │ ├── MapleEquipCashItem.java
│ │ │ ├── MapleEquipItem.java
│ │ │ ├── MapleItem.java
│ │ │ ├── MaplePetItem.java
│ │ │ ├── MapleScrollItem.java
│ │ │ ├── MapleSkillBook.java
│ │ │ ├── MapleSummoningBag.java
│ │ │ ├── PetItem.java
│ │ │ ├── ScrollItem.java
│ │ │ ├── ScrollResult.java
│ │ │ ├── ScrollStatInfo.java
│ │ │ ├── SkillBook.java
│ │ │ └── SummoningBag.java
│ │ └── storage
│ │ │ └── MapleStorageBox.java
│ ├── life
│ │ ├── MapleHiredMerchant.java
│ │ ├── MapleLifeFactory.java
│ │ ├── MapleMonster.java
│ │ ├── MapleMonsterStats.java
│ │ ├── MapleMount.java
│ │ ├── MapleNPC.java
│ │ ├── MapleSummon.java
│ │ ├── MobSkill.java
│ │ ├── MobSkillFactory.java
│ │ └── movement
│ │ │ ├── AbsoluteLifeMovement.java
│ │ │ ├── ChairLifeMovement.java
│ │ │ ├── ChangeEquipMovement.java
│ │ │ ├── EmptyLifeMovement.java
│ │ │ ├── JumpDownLifeMovement.java
│ │ │ ├── LifeMovement.java
│ │ │ ├── LifeMovementFactory.java
│ │ │ ├── MoveType.java
│ │ │ ├── MovementPath.java
│ │ │ ├── RelativeLifeMovement.java
│ │ │ └── TeleportLifeMovement.java
│ ├── map
│ │ ├── AbstractAnimatedMapleMapObject.java
│ │ ├── AbstractLoadedMapleLife.java
│ │ ├── AbstractMapleMapObject.java
│ │ ├── AnimatedMapleMapObject.java
│ │ ├── MapleClock.java
│ │ ├── MapleFoothold.java
│ │ ├── MapleFootholdTree.java
│ │ ├── MapleGenericPortal.java
│ │ ├── MapleMagicDoor.java
│ │ ├── MapleMap.java
│ │ ├── MapleMapFactory.java
│ │ ├── MapleMapItem.java
│ │ ├── MapleMapItemPresent.java
│ │ ├── MapleMapObject.java
│ │ ├── MapleMapObjectType.java
│ │ ├── MapleMapPortal.java
│ │ ├── MapleMist.java
│ │ ├── MaplePortal.java
│ │ ├── MapleReactor.java
│ │ └── PortalFactory.java
│ ├── party
│ │ ├── MapleParty.java
│ │ └── PartyOperationType.java
│ ├── player
│ │ ├── BuddyList.java
│ │ ├── MapleCharacter.java
│ │ ├── MapleCharacterSnapshot.java
│ │ ├── MapleJob.java
│ │ ├── MapleNote.java
│ │ ├── MaplePetInstance.java
│ │ ├── PartyQuestProgress.java
│ │ ├── monsterbook
│ │ │ ├── MonsterBook.java
│ │ │ └── MonsterCard.java
│ │ └── ui
│ │ │ ├── HiredMerchantInterface.java
│ │ │ ├── InvitationJoinable.java
│ │ │ ├── MapleHiredMerchantInterface.java
│ │ │ ├── MapleTradeInterface.java
│ │ │ ├── MapleUserInterface.java
│ │ │ ├── MatchCardInterface.java
│ │ │ ├── MiniGameInterface.java
│ │ │ ├── OmokInterface.java
│ │ │ ├── TradeInterface.java
│ │ │ └── UserInterface.java
│ ├── quest
│ │ ├── MapleQuest.java
│ │ ├── MapleQuestAction.java
│ │ ├── MapleQuestActionType.java
│ │ ├── MapleQuestInfo.java
│ │ ├── MapleQuestInstance.java
│ │ ├── MapleQuestRequirement.java
│ │ └── MapleQuestRequirementType.java
│ ├── script
│ │ ├── AbstractScriptManager.java
│ │ ├── EventScriptManager.java
│ │ ├── ItemScriptManager.java
│ │ ├── MapScriptManager.java
│ │ ├── MapleScript.java
│ │ ├── MapleScriptInstance.java
│ │ ├── NpcConversationManager.java
│ │ ├── PortalScriptManager.java
│ │ ├── QuestScriptManager.java
│ │ ├── ReactorScriptManager.java
│ │ └── legacy
│ │ │ ├── OdinNpcConversationManager.java
│ │ │ ├── OdinQuestScriptManager.java
│ │ │ └── OdinScriptPatches.java
│ ├── server
│ │ ├── ConsoleListener.java
│ │ ├── MapleServer.java
│ │ ├── MapleStory.java
│ │ ├── net
│ │ │ ├── MapleConnectionHandler.java
│ │ │ ├── MaplePacket.java
│ │ │ ├── MaplePacketDecoder.java
│ │ │ ├── MaplePacketEncoder.java
│ │ │ ├── MaplePacketHandler.java
│ │ │ ├── PacketFactory.java
│ │ │ ├── RecvOpcode.java
│ │ │ ├── SendOpcode.java
│ │ │ └── handlers
│ │ │ │ ├── DefaultMaplePacketHandler.java
│ │ │ │ ├── NoOpHandler.java
│ │ │ │ ├── PongHandler.java
│ │ │ │ ├── channel
│ │ │ │ ├── AbstractDealDamageHandler.java
│ │ │ │ ├── AranComboHandler.java
│ │ │ │ ├── AutoAggroHandler.java
│ │ │ │ ├── AutoAssignAPHandler.java
│ │ │ │ ├── BuddyListModifyHandler.java
│ │ │ │ ├── CancelBuffHandler.java
│ │ │ │ ├── CancelItemEffectHandler.java
│ │ │ │ ├── CashShopCouponHandler.java
│ │ │ │ ├── CashShopOperationHandler.java
│ │ │ │ ├── ChairSitRequestHandler.java
│ │ │ │ ├── ChangeChannelHandler.java
│ │ │ │ ├── ChangeFameHandler.java
│ │ │ │ ├── ChangeMapHandler.java
│ │ │ │ ├── ChangeMapSpecialHandler.java
│ │ │ │ ├── ChangeMonsterBookCoverHandler.java
│ │ │ │ ├── CharInfoRequestHandler.java
│ │ │ │ ├── ClickGuideHandler.java
│ │ │ │ ├── CloseChalkboardHandler.java
│ │ │ │ ├── CloseRangeDamageHandler.java
│ │ │ │ ├── DamageReactorHandler.java
│ │ │ │ ├── DamageSummonHandler.java
│ │ │ │ ├── DenyPartyInviteHandler.java
│ │ │ │ ├── DistributeApHandler.java
│ │ │ │ ├── DistributeSpHandler.java
│ │ │ │ ├── DueyActionHandler.java
│ │ │ │ ├── EnterCashshopHandler.java
│ │ │ │ ├── EnterMTSHandler.java
│ │ │ │ ├── FaceExpressionHandler.java
│ │ │ │ ├── GeneralChatHandler.java
│ │ │ │ ├── GroupChatHandler.java
│ │ │ │ ├── GuildBBSHandler.java
│ │ │ │ ├── GuildOperationHandler.java
│ │ │ │ ├── HealOverTimeHandler.java
│ │ │ │ ├── HiredMerchantRequestHandler.java
│ │ │ │ ├── ItemMoveHandler.java
│ │ │ │ ├── ItemPickupHandler.java
│ │ │ │ ├── KeymapChangeHandler.java
│ │ │ │ ├── MagicDamageHandler.java
│ │ │ │ ├── MesoDropHandler.java
│ │ │ │ ├── MessengerHandler.java
│ │ │ │ ├── MonsterBombHandler.java
│ │ │ │ ├── MonsterDamageMonsterHandler.java
│ │ │ │ ├── MoveMonsterHandler.java
│ │ │ │ ├── MovePetHandler.java
│ │ │ │ ├── MovePlayerHandler.java
│ │ │ │ ├── MoveSummonHandler.java
│ │ │ │ ├── MovementPacketHandler.java
│ │ │ │ ├── NoteActionHandler.java
│ │ │ │ ├── NpcAnimationHandler.java
│ │ │ │ ├── NpcMoreTalkHandler.java
│ │ │ │ ├── NpcShopHandler.java
│ │ │ │ ├── NpcTalkHandler.java
│ │ │ │ ├── PartyOperationHandler.java
│ │ │ │ ├── PetCommandHandler.java
│ │ │ │ ├── PetFoodHandler.java
│ │ │ │ ├── PetLootHandler.java
│ │ │ │ ├── PlayerInteractionHandler.java
│ │ │ │ ├── PlayerLoggedInHandler.java
│ │ │ │ ├── QuestActionHandler.java
│ │ │ │ ├── RangedAttackHandler.java
│ │ │ │ ├── SitRequestHandler.java
│ │ │ │ ├── SkillEffectHandler.java
│ │ │ │ ├── SpawnPetHandler.java
│ │ │ │ ├── SpecialMoveHandler.java
│ │ │ │ ├── StorageHandler.java
│ │ │ │ ├── SummonAttackHandler.java
│ │ │ │ ├── TakeDamageHandler.java
│ │ │ │ ├── UpdateCashShopCurrencyHandler.java
│ │ │ │ ├── UseBoxItemHandler.java
│ │ │ │ ├── UseCashItemHandler.java
│ │ │ │ ├── UseInnerPortalHandler.java
│ │ │ │ ├── UseItemHandler.java
│ │ │ │ ├── UseMagicDoorHandler.java
│ │ │ │ ├── UseMountFoodHandler.java
│ │ │ │ ├── UsePetFoodHandler.java
│ │ │ │ ├── UseScrollHandler.java
│ │ │ │ ├── UseSkillBookHandler.java
│ │ │ │ ├── UseSummonBagHandler.java
│ │ │ │ └── WhisperHandler.java
│ │ │ │ └── login
│ │ │ │ ├── CharListRequestHandler.java
│ │ │ │ ├── CharSelectHandler.java
│ │ │ │ ├── CharSelectWithPicHandler.java
│ │ │ │ ├── CheckCharNameHandler.java
│ │ │ │ ├── ClientStartErrorHandler.java
│ │ │ │ ├── CreateCharHandler.java
│ │ │ │ ├── DeleteCharHandler.java
│ │ │ │ ├── LoginPasswordHandler.java
│ │ │ │ ├── RegisterPicHandler.java
│ │ │ │ ├── ServerListRequestHandler.java
│ │ │ │ ├── ServerStatusRequestHandler.java
│ │ │ │ ├── ViewAllCharactersHandler.java
│ │ │ │ ├── ViewAllPicRegisterHandler.java
│ │ │ │ └── ViewAllSelectCharacterWithPicHandler.java
│ │ └── security
│ │ │ ├── AccountEncryption.java
│ │ │ ├── BCryptAccountEncryption.java
│ │ │ ├── MapleAESOFB.java
│ │ │ ├── MapleCustomEncryption.java
│ │ │ └── Sha256AccountEncryption.java
│ ├── shop
│ │ ├── MapleShop.java
│ │ └── MapleShopItem.java
│ ├── skill
│ │ ├── MapleStatEffect.java
│ │ ├── MonsterStatusEffect.java
│ │ ├── Skill.java
│ │ ├── SkillChanges.java
│ │ ├── SkillData.java
│ │ └── SkillFactory.java
│ ├── util
│ │ ├── Hex.java
│ │ ├── Pair.java
│ │ ├── Randomizer.java
│ │ └── StringUtil.java
│ └── world
│ │ ├── MapleGlobalWorld.java
│ │ ├── MapleWorld.java
│ │ ├── PlayerStorage.java
│ │ ├── RankManager.java
│ │ ├── RateManager.java
│ │ └── World.java
├── rebel.xml
├── simplelogger.properties
└── tools
│ ├── ArrayMap.java
│ ├── CRand32.java
│ ├── JCESkipUtil.java
│ ├── TimerManager.java
│ └── data
│ ├── input
│ ├── ByteArrayByteStream.java
│ ├── ByteInputStream.java
│ ├── GenericLittleEndianAccessor.java
│ ├── GenericSeekableLittleEndianAccessor.java
│ ├── InputStreamByteStream.java
│ ├── LittleEndianAccessor.java
│ ├── RandomAccessByteStream.java
│ ├── SeekableInputStreamBytestream.java
│ └── SeekableLittleEndianAccessor.java
│ └── output
│ ├── BAOSByteOutputStream.java
│ ├── ByteOutputStream.java
│ ├── GenericLittleEndianWriter.java
│ ├── LittleEndianWriter.java
│ └── MaplePacketWriter.java
└── wz
├── Base.mdf
├── Character.mdf
├── Effect.mdf
├── Etc.mdf
├── Item.mdf
├── List.mdf
├── Map.mdf
├── Mob.mdf
├── MonsterBookData.mdf
├── Morph.mdf
├── Npc.mdf
├── Quest.mdf
├── Reactor.mdf
├── Skill.mdf
├── Sound.mdf
├── String.mdf
├── TamingMob.mdf
└── UI.mdf
/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | *.xml
3 | .settings/org.eclipse.jdt.core.prefs
4 | bin/simplelogger.properties
5 | /bin/
6 | /wz/
7 | hotswap-agent-1.1.0-SNAPSHOT.jar
8 | .idea/*
9 | *.iml
--------------------------------------------------------------------------------
/MonsterDrops.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/MonsterDrops.mdf
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # MapleStory
2 |
--------------------------------------------------------------------------------
/lib/HikariCP-2.4.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/lib/HikariCP-2.4.3.jar
--------------------------------------------------------------------------------
/lib/MapleDataFormat.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/lib/MapleDataFormat.jar
--------------------------------------------------------------------------------
/lib/jbcrypt-0.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/lib/jbcrypt-0.4.jar
--------------------------------------------------------------------------------
/lib/log4j-1.2.17.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/lib/log4j-1.2.17.jar
--------------------------------------------------------------------------------
/lib/lombok.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/lib/lombok.jar
--------------------------------------------------------------------------------
/lib/mysql-connector-java-8.0.28.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/lib/mysql-connector-java-8.0.28.jar
--------------------------------------------------------------------------------
/lib/netty-all-4.0.31.Final.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/lib/netty-all-4.0.31.Final.jar
--------------------------------------------------------------------------------
/lib/slf4j-api-1.7.14.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/lib/slf4j-api-1.7.14.jar
--------------------------------------------------------------------------------
/lib/slf4j-jdk14-1.7.14.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/lib/slf4j-jdk14-1.7.14.jar
--------------------------------------------------------------------------------
/lib/slf4j-log4j12-1.7.12.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/lib/slf4j-log4j12-1.7.12.jar
--------------------------------------------------------------------------------
/lib/slf4j-nop-1.7.14.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/lib/slf4j-nop-1.7.14.jar
--------------------------------------------------------------------------------
/lib/slf4j-simple-1.7.14.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/lib/slf4j-simple-1.7.14.jar
--------------------------------------------------------------------------------
/lib/snakeyaml-1.14.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/lib/snakeyaml-1.14.jar
--------------------------------------------------------------------------------
/lib/sqlite-jdbc-3.7.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/lib/sqlite-jdbc-3.7.2.jar
--------------------------------------------------------------------------------
/monster_drops.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/monster_drops.db
--------------------------------------------------------------------------------
/scripts/event/ellinia_orbis_boat.js:
--------------------------------------------------------------------------------
1 |
2 | var MessageType = Java.type("constants.MessageType");
3 |
4 | var first_port = em.getChannel().getMap(101000300);
5 | var second_port = em.getChannel().getMap(200000111);
6 |
7 | var docked_first_boat = [em.getChannel().getMap(101000301), em.getChannel().getMap(200090001)];
8 | var docked_second_boat = [em.getChannel().getMap(200000112), em.getChannel().getMap(200090001)];
9 |
10 | var moving_first_boat = [em.getChannel().getMap(200090010), em.getChannel().getMap(200090011)];
11 | var moving_second_boat = [em.getChannel().getMap(200090000), em.getChannel().getMap(200090001)];
12 |
13 | function onBoatDock(port, players){
14 | for each(pl in players){
15 | pl.sendMessage(MessageType.PINK_TEXT, "We have arrived!");
16 | }
17 | }
18 |
19 | function onBoatLaunch(boat, players){
20 | for each(pl in players){
21 | pl.sendMessage(MessageType.PINK_TEXT, "The ship has launched!");
22 | }
23 | }
24 |
25 | load("scripts/event/boats.js");
--------------------------------------------------------------------------------
/scripts/item/monsterBookCard.js:
--------------------------------------------------------------------------------
1 |
2 | function onPickup(chr, item){
3 | chr.getMonsterBook().increaseLevel(item.getItemId() % 10000);
4 | }
--------------------------------------------------------------------------------
/scripts/map/101000300.js:
--------------------------------------------------------------------------------
1 | function onPlayerEnter(chr){
2 |
3 | if(msm.getMap().getMetadata("boat", false)){
4 | chr.updateBoat(true);
5 | }
6 |
7 |
8 | }
--------------------------------------------------------------------------------
/scripts/map/108000100.js:
--------------------------------------------------------------------------------
1 |
2 | var Random = Java.type("java.util.Random");
3 |
4 | var myRandom = new Random();
5 |
6 | var luck = 3;
7 |
8 | function onMonsterKilled(monster, killer){
9 |
10 | if(myRandom.nextInt(luck--) == 0){//this will guarantee a pearl every 3 monsters, I like that :)
11 | luck = 3;
12 | monster.addDeathListener(function (time) {
13 | monster.getMap().dropItem(4031013, 1, monster.getPosition(), monster);
14 | });
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/scripts/map/108000200.js:
--------------------------------------------------------------------------------
1 |
2 | var Random = Java.type("java.util.Random");
3 |
4 | var myRandom = new Random();
5 |
6 | var luck = 3;
7 |
8 | function onMonsterKilled(monster, killer){
9 |
10 | if(myRandom.nextInt(luck--) == 0){//this will guarantee a pearl every 3 monsters, I like that :)
11 | luck = 3;
12 | monster.addDeathListener(function (time) {
13 | monster.getMap().dropItem(4031013, 1, monster.getPosition(), monster);
14 | });
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/scripts/map/108000300.js:
--------------------------------------------------------------------------------
1 |
2 | var Random = Java.type("java.util.Random");
3 |
4 | var myRandom = new Random();
5 |
6 | var luck = 3;
7 |
8 | function onMonsterKilled(monster, killer){
9 |
10 | if(myRandom.nextInt(luck--) == 0){//this will guarantee a pearl every 3 monsters, I like that :)
11 | luck = 3;
12 | monster.addDeathListener(function (time) {
13 | monster.getMap().dropItem(4031013, 1, monster.getPosition(), monster);
14 | });
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/scripts/map/108000400.js:
--------------------------------------------------------------------------------
1 |
2 | var Random = Java.type("java.util.Random");
3 |
4 | var myRandom = new Random();
5 |
6 | var luck = 3;
7 |
8 | function onMonsterKilled(monster, killer){
9 |
10 | if(myRandom.nextInt(luck--) == 0){//this will guarantee a pearl every 3 monsters, I like that :)
11 | luck = 3;
12 | monster.addDeathListener(function (time) {
13 | monster.getMap().dropItem(4031013, 1, monster.getPosition(), monster);
14 | });
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/scripts/map/130030000.js:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | var MapleQuest = Java.type("maplestory.quest.MapleQuest");
5 | var MapleQuestInstance = Java.type("maplestory.quest.MapleQuestInstance");
6 |
7 | function onPlayerEnter(chr){
8 |
9 | instance = chr.getQuest(21000);
10 |
11 | if(instance.getStatus().getId() == 0){
12 | instance.setStatus(0);
13 | instance.setProgress(0, 1);
14 | chr.updateQuest(instance);
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/scripts/map/130030001.js:
--------------------------------------------------------------------------------
1 |
2 | function onPlayerEnter(chr){
3 |
4 | msm.spawnGuide();
5 |
6 | }
--------------------------------------------------------------------------------
/scripts/map/130030002.js:
--------------------------------------------------------------------------------
1 |
2 | function onPlayerEnter(chr){
3 | msm.spawnGuide();
4 | }
--------------------------------------------------------------------------------
/scripts/map/130030003.js:
--------------------------------------------------------------------------------
1 |
2 | function onPlayerEnter(chr){
3 | msm.spawnGuide();
4 | }
--------------------------------------------------------------------------------
/scripts/map/130030004.js:
--------------------------------------------------------------------------------
1 |
2 | function onPlayerEnter(chr){
3 | msm.spawnGuide();
4 | }
--------------------------------------------------------------------------------
/scripts/map/130030005.js:
--------------------------------------------------------------------------------
1 |
2 | function onPlayerEnter(chr){
3 | msm.spawnGuide();
4 | }
--------------------------------------------------------------------------------
/scripts/map/140090000.js:
--------------------------------------------------------------------------------
1 |
2 | function onPlayerEnter(chr){
3 | msm.openNpc("lilin_welcome", 1202000);
4 | }
--------------------------------------------------------------------------------
/scripts/map/914000000.js:
--------------------------------------------------------------------------------
1 |
2 | function onPlayerEnter(chr){
3 |
4 | if(chr.getMaxHp() < 30000){
5 | chr.setMaxHp(30000);
6 | chr.setMaxMp(30000);
7 | chr.setHp(30000);
8 | chr.setMp(30000);
9 | }
10 |
11 | }
--------------------------------------------------------------------------------
/scripts/map/914000200.js:
--------------------------------------------------------------------------------
1 |
2 | function onPlayerEnter(chr){
3 | msm.grantGodlyStats();
4 | }
--------------------------------------------------------------------------------
/scripts/map/914000210.js:
--------------------------------------------------------------------------------
1 |
2 | function onPlayerEnter(chr){
3 | msm.grantGodlyStats();
4 | }
--------------------------------------------------------------------------------
/scripts/map/914000220.js:
--------------------------------------------------------------------------------
1 |
2 | function onPlayerEnter(chr){
3 | msm.grantGodlyStats();
4 | }
--------------------------------------------------------------------------------
/scripts/map/970000102.js:
--------------------------------------------------------------------------------
1 |
2 | var MonsterType = Java.type("maplestory.map.MapleMapObjectType");
3 |
4 | function onPlayerEnter(chr){
5 | msm.getMap().createClock(15, "onClockEnd", chr);
6 | }
7 |
8 | function onClockEnd(chr){
9 | var returnMap = chr.getMap().getMetadata("returnMap", 100000000);
10 |
11 | chr.changeMap(returnMap);
12 |
13 | cm.openNpc(9201067);
14 | }
15 |
16 | function monstersLeft(map){
17 | return map.countObjectsOfType(MonsterType.MONSTER);
18 | }
19 |
20 | function onMonsterKilled(monster, killer){
21 | if(monstersLeft(monster.getMap()) == 0){
22 | monster.getMap().deleteClock();
23 | onClockEnd(killer);
24 | }
25 | }
--------------------------------------------------------------------------------
/scripts/map/global/aranDirection.js:
--------------------------------------------------------------------------------
1 |
2 | function onUserEnter(){
3 |
4 | msm.getCharacter().lockUI();
5 | msm.getCharacter().disableUI();
6 | msm.displayAranIntro();
7 |
8 | }
--------------------------------------------------------------------------------
/scripts/map/global/go10000.js:
--------------------------------------------------------------------------------
1 | function onUserEnter(){
2 |
3 | msm.getCharacter().unlockUI();
4 |
5 | }
--------------------------------------------------------------------------------
/scripts/map/global/go1020000.js:
--------------------------------------------------------------------------------
1 | function onUserEnter(){
2 |
3 | msm.getCharacter().unlockUI();
4 |
5 | }
--------------------------------------------------------------------------------
/scripts/map/global/goAdventure.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | function onUserEnter(){
4 |
5 | msm.getCharacter().lockUI();
6 |
7 | msm.showIntro("Effect/Direction3.img/goAdventure/Scene" + msm.getCharacter().getGender());
8 |
9 | }
--------------------------------------------------------------------------------
/scripts/map/global/goArcher.js:
--------------------------------------------------------------------------------
1 |
2 | function onUserEnter(){
3 |
4 | msm.getCharacter().lockUI();
5 |
6 | msm.showIntro("Effect/Direction3.img/archer/Scene" + msm.getCharacter().getGender());
7 |
8 |
9 |
10 | }
--------------------------------------------------------------------------------
/scripts/map/global/goMagician.js:
--------------------------------------------------------------------------------
1 |
2 | function onUserEnter(){
3 |
4 | msm.getCharacter().lockUI();
5 |
6 | msm.showIntro("Effect/Direction3.img/magician/Scene" + msm.getCharacter().getGender());
7 |
8 |
9 |
10 | }
--------------------------------------------------------------------------------
/scripts/map/global/goPirate.js:
--------------------------------------------------------------------------------
1 |
2 | function onUserEnter(){
3 |
4 | msm.getCharacter().lockUI();
5 |
6 | msm.showIntro("Effect/Direction3.img/pirate/Scene" + msm.getCharacter().getGender());
7 |
8 |
9 |
10 | }
--------------------------------------------------------------------------------
/scripts/map/global/goRogue.js:
--------------------------------------------------------------------------------
1 |
2 | function onUserEnter(){
3 |
4 | msm.getCharacter().lockUI();
5 |
6 | msm.showIntro("Effect/Direction3.img/rogue/Scene" + msm.getCharacter().getGender());
7 |
8 |
9 |
10 | }
--------------------------------------------------------------------------------
/scripts/map/global/goSwordman.js:
--------------------------------------------------------------------------------
1 |
2 | function onUserEnter(){
3 |
4 | msm.getCharacter().lockUI();
5 |
6 | msm.showIntro("Effect/Direction3.img/swordman/Scene" + msm.getCharacter().getGender());
7 |
8 |
9 |
10 | }
--------------------------------------------------------------------------------
/scripts/npc/1012009.js:
--------------------------------------------------------------------------------
1 | load("scripts/npc/storage_npc.js");
--------------------------------------------------------------------------------
/scripts/npc/1022101.js:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | function start(){
5 | cm.sendOk("Hello there? I'm Rooney.");
6 | cm.dispose();
7 | }
--------------------------------------------------------------------------------
/scripts/npc/1032008.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | if(cm.hasItem(4031045)){
3 | if (is_open())
4 | cm.sendYesNo("Do you want to go to Orbis?");
5 | else{
6 | cm.sendOk("The boat to Orbis is already travelling, please be patient for the next one.");
7 | cm.dispose();
8 | }
9 | }else{
10 | cm.sendOk("Make sure you got a Orbis ticket to travel in this boat. Check your inventory.");
11 | cm.dispose();
12 | }
13 | }
14 |
15 | function action(mode, type, selection) {
16 | if (mode <= 0) {
17 | cm.sendOk("Okay, talk to me if you change your mind!");
18 | cm.dispose();
19 | return;
20 | }
21 | if (is_open()) {
22 | cm.warp(101000301);
23 | cm.giveItem(4031045, -1);
24 | cm.dispose();
25 | }
26 | else{
27 | cm.sendOk("The boat to Orbis is ready to take off, please be patient for the next one.");
28 | cm.dispose();
29 | }
30 | }
31 |
32 | function is_open(){
33 | return !cm.getMap().getMetadata("boat_closed", false) && cm.getMap().getMetadata("boat", false);
34 | }
--------------------------------------------------------------------------------
/scripts/npc/1061008.js:
--------------------------------------------------------------------------------
1 | load("scripts/npc/storage_npc.js");
--------------------------------------------------------------------------------
/scripts/npc/1072000.js:
--------------------------------------------------------------------------------
1 | load("scripts/npc/2nd_job_npc.js");
--------------------------------------------------------------------------------
/scripts/npc/1072001.js:
--------------------------------------------------------------------------------
1 | load("scripts/npc/2nd_job_npc.js");
--------------------------------------------------------------------------------
/scripts/npc/1072002.js:
--------------------------------------------------------------------------------
1 | load("scripts/npc/2nd_job_npc.js");
--------------------------------------------------------------------------------
/scripts/npc/1072003.js:
--------------------------------------------------------------------------------
1 | load("scripts/npc/2nd_job_npc.js");
--------------------------------------------------------------------------------
/scripts/npc/1072004.js:
--------------------------------------------------------------------------------
1 | load("scripts/npc/2nd_job_npc_marbles.js");
--------------------------------------------------------------------------------
/scripts/npc/1072005.js:
--------------------------------------------------------------------------------
1 | load("scripts/npc/2nd_job_npc_marbles.js");
--------------------------------------------------------------------------------
/scripts/npc/1072006.js:
--------------------------------------------------------------------------------
1 | load("scripts/npc/2nd_job_npc_marbles.js");
--------------------------------------------------------------------------------
/scripts/npc/1072007.js:
--------------------------------------------------------------------------------
1 | load("scripts/npc/2nd_job_npc_marbles.js");
--------------------------------------------------------------------------------
/scripts/npc/1100000.js:
--------------------------------------------------------------------------------
1 |
2 | load("scripts/npc/storage_npc.js");
3 |
--------------------------------------------------------------------------------
/scripts/npc/1101001.js:
--------------------------------------------------------------------------------
1 |
2 | var blessing = 2022458
3 |
4 | function start() {
5 |
6 | if(cm.hasItemBuff(blessing)){
7 | cm.sendOk("Don't stop training. Every ounce of your energy is required to protect the world of Maple....");
8 | }else{
9 | cm.useItem(blessing);
10 | cm.playSkillEffect(1010);
11 | }
12 |
13 | cm.dispose();
14 | }
15 |
--------------------------------------------------------------------------------
/scripts/npc/1102003.js:
--------------------------------------------------------------------------------
1 |
2 | function start(){
3 | cm.sendOk("What knight out there is careless with his or her dignity? This is the Hall of Fame, where the most accomplished, dignified Knights of Cygnus stay immortalized.");
4 | cm.dispose();
5 | }
--------------------------------------------------------------------------------
/scripts/npc/1209000.js:
--------------------------------------------------------------------------------
1 | var status = -1;
2 |
3 | function start() {
4 | action(1, 0, 0);
5 | }
6 |
7 | function action(mode, type, selection) {
8 | if(cm.isQuestStarted(21000)){
9 | cm.sendOk("We can't leave without him!");
10 | cm.dispose();
11 | return;
12 | }
13 | if (mode == 1) {
14 | status++;
15 | } else {
16 | status--;
17 | }
18 |
19 | if (status == 0) {
20 | cm.sendNext("Aran, you're awake! How are you feeling? Hm? You want to know what's been going on?");
21 | } else if (status == 1) {
22 | cm.sendNext("We're almost done preparing for the escape. You don't have to worry. Everyone I could possibly find has boarded the ark, and Shinsoo has agreed to guide the way. We'll head to Victoria Island as soon as we finish the remaining preparations.");
23 | } else if (status == 2) {
24 | cm.sendNext("The other heroes? They've left to fight the Black Mage. They're buying us time to escape. What? You want to fight with them? No! You can't! You're hurt. You must leave with us!");
25 | }else{
26 | cm.dispose();
27 | }
28 | }
--------------------------------------------------------------------------------
/scripts/npc/1209001.js:
--------------------------------------------------------------------------------
1 |
2 | function start() {
3 | cm.dispose();
4 | }
--------------------------------------------------------------------------------
/scripts/npc/1209002.js:
--------------------------------------------------------------------------------
1 |
2 | function start() {
3 | cm.dispose();
4 | }
--------------------------------------------------------------------------------
/scripts/npc/1209003.js:
--------------------------------------------------------------------------------
1 |
2 | function start() {
3 | cm.dispose();
4 | }
--------------------------------------------------------------------------------
/scripts/npc/1209004.js:
--------------------------------------------------------------------------------
1 |
2 | function start() {
3 | cm.dispose();
4 | }
--------------------------------------------------------------------------------
/scripts/npc/1209005.js:
--------------------------------------------------------------------------------
1 |
2 | function start() {
3 | cm.dispose();
4 | }
--------------------------------------------------------------------------------
/scripts/npc/2012001.js:
--------------------------------------------------------------------------------
1 | var required = 4031047;
2 |
3 | function start() {
4 | if(cm.hasItem(required)){
5 | if (is_open())
6 | cm.sendYesNo("Do you want to go to Ellinia?");
7 | else{
8 | cm.sendOk("The boat to Ellinia is already travelling, please be patient for the next one.");
9 | cm.dispose();
10 | }
11 | }else{
12 | cm.sendOk("Make sure you got a Ellinia ticket to travel in this boat. Check your inventory.");
13 | cm.dispose();
14 | }
15 | }
16 |
17 | function action(mode, type, selection) {
18 | if (mode <= 0) {
19 | cm.sendOk("Okay, talk to me if you change your mind!");
20 | cm.dispose();
21 | return;
22 | }
23 | if (is_open()) {
24 | cm.warp(200000112);
25 | cm.giveItem(required, -1);
26 | cm.dispose();
27 | }
28 | else{
29 | cm.sendOk("The boat to Ellinia is ready to take off, please be patient for the next one.");
30 | cm.dispose();
31 | }
32 | }
33 |
34 | function is_open(){
35 | return !cm.getMap().getMetadata("boat_closed", false) && cm.getMap().getMetadata("boat", false);
36 | }
--------------------------------------------------------------------------------
/scripts/npc/2040046.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | function start(){
4 | cm.sendOk("How many friends do you have?");
5 | cm.dispose();
6 | }
--------------------------------------------------------------------------------
/scripts/npc/2042000.js:
--------------------------------------------------------------------------------
1 |
2 | function start(){
3 | cm.sendOk("Are you interested in Monster Carnival?");
4 | cm.dispose();
5 | }
--------------------------------------------------------------------------------
/scripts/npc/9000021.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | function start(){
4 | cm.sendOk("Do you know about the Artifact?");
5 | cm.dispose();
6 | }
--------------------------------------------------------------------------------
/scripts/npc/9010002.js:
--------------------------------------------------------------------------------
1 |
2 | var balloons = 1102215;
3 | var status = -1;
4 |
5 | function start(){
6 | action(1, 0, -1);
7 | }
8 |
9 | function action(mode, type, selection){
10 | if(mode == 1){
11 | status++;
12 | }else{
13 | cm.dispose();
14 | return;
15 | }
16 |
17 | if(status == 0){
18 | if(cm.hasItem(balloons)){
19 | cm.sendOk("Do you like the balloons I gave you?");
20 | cm.dispose();
21 | }else{
22 | cm.sendYesNo("Hey, hows it going? I have some extra balloons, would you like some?");
23 | }
24 | }else{
25 | cm.giveItem(balloons, 1);
26 | cm.dispose();
27 | }
28 |
29 |
30 | }
--------------------------------------------------------------------------------
/scripts/npc/9010009.js:
--------------------------------------------------------------------------------
1 |
2 | function start(){
3 | cm.openDuey();
4 | cm.dispose();
5 | }
--------------------------------------------------------------------------------
/scripts/npc/9030100.js:
--------------------------------------------------------------------------------
1 | load("scripts/npc/storage_npc.js");
--------------------------------------------------------------------------------
/scripts/npc/9100100.js:
--------------------------------------------------------------------------------
1 | var area = "HENESYS";
2 |
3 | load("scripts/npc/gachapon.js");
--------------------------------------------------------------------------------
/scripts/npc/death_npc.js:
--------------------------------------------------------------------------------
1 |
2 | var choice;
3 | var status;
4 |
5 | function start(){
6 | choice = -1;
7 | cm.sendSimple("What would you like to do?\r\n#b#L0#Revive at the closest town#l\r\n#L1#Revive here for 10% of your mesos and exp.#l");
8 |
9 | }
10 |
11 | function action(mode, type, selection){
12 |
13 | if(mode == -1){
14 | start();
15 | return;
16 | }
17 |
18 | if(selection >= 0){
19 | choice = selection;
20 |
21 | if(selection == 0){
22 | cm.getClient().getCharacter().reviveAtClosestTown();
23 | cm.dispose();
24 | }else if(selection == 1){
25 |
26 | meso_cost = parseInt(cm.getClient().getCharacter().getMeso() * 0.1);
27 | exp_cost = parseInt(cm.getClient().getCharacter().getExp() * 0.1);
28 |
29 | cm.sendYesNo("Are you sure you wish to revive here?\r\nIt will cost "+meso_cost+" mesos and "+exp_cost+" exp");
30 | }
31 | }else{
32 | if(choice == 1){
33 | if(mode == 1){
34 | cm.getClient().getCharacter().revive();
35 | cm.dispose();
36 | }else if(mode == 0){
37 | start();
38 | }
39 | }
40 | }
41 |
42 | if(type == 4 && selection == -1 && mode == 0){
43 | start();
44 | }
45 |
46 | }
--------------------------------------------------------------------------------
/scripts/npc/error.js:
--------------------------------------------------------------------------------
1 |
2 | function start(){
3 |
4 | cm.sendOk("Something has gone wrong! Please report this.");
5 |
6 | cm.dispose();
7 |
8 | }
--------------------------------------------------------------------------------
/scripts/npc/exp_npc.js:
--------------------------------------------------------------------------------
1 |
2 | var status = -1;
3 |
4 | function start(){
5 | action(1, 0, -1);
6 | }
7 |
8 | function action(mode, type, selection){
9 | if(mode == 1){
10 | status++;
11 | }else{
12 | cm.dispose();
13 | return;
14 | }
15 | if(status == 0){
16 | cm.sendGetNumber("How much EXP would you like?\r\n", 50, 1, 9999999);
17 | }else if(status == 1){
18 | exp = selection;
19 |
20 | if(exp <= 0){
21 | cm.dispose();
22 | return;
23 | }
24 |
25 | cm.giveExp(exp);
26 | cm.dispose();
27 | }
28 | }
--------------------------------------------------------------------------------
/scripts/npc/fallback.js:
--------------------------------------------------------------------------------
1 | function start(){
2 | cm.sendOk("#b"+cm.getNpcName()+"#k doesn't have a script! My id is #b"+cm.getNpc().getId());
3 | cm.dispose();
4 | }
--------------------------------------------------------------------------------
/scripts/npc/information.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | function start(){
4 | str = "";
5 | str += "Character Name: "+cm.getCharacter().getName()+"\r\n";
6 | str += "Ping: "+cm.getCharacter().getClient().getPing()+"\r\n";
7 | str += "Current Map: "+cm.getCharacter().getMap().getMapId()+"\r\n";
8 | str += "Player ID: "+cm.getCharacter().getId()+"\r\n";
9 |
10 | cm.sendOk(str);
11 | cm.dispose();
12 | }
--------------------------------------------------------------------------------
/scripts/npc/job_switcher.js:
--------------------------------------------------------------------------------
1 |
2 | var MapleJob = Java.type("maplestory.player.MapleJob");
3 |
4 | var status = -1;
5 |
6 | function start(){
7 | action(1, 0, -1);
8 | }
9 |
10 | function action(mode, type, selection){
11 | if(mode == 1){
12 | status++;
13 | }else{
14 | cm.dispose();
15 | return;
16 | }
17 | if(status == 0){
18 | s = "Please select a job: \r\n#b";
19 |
20 | for each(job in cm.getCharacter().getJob().getNext()){
21 | s += "#L"+job.getId()+"#"+job.getName()+"#l\r\n";
22 | }
23 |
24 | cm.sendSimple(s);
25 | }else if(status == 1){
26 | job = MapleJob.getById(selection);
27 |
28 | if(job == null){
29 | cm.sendOk("Something has gone wrong!");
30 | cm.dispose();
31 | }
32 |
33 | cm.changeJob(job);
34 | cm.dispose();
35 | }
36 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1012115.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | var status = cm.getQuestStatus(20706);
3 |
4 | if (status == 0) {
5 | cm.sendNext("It looks like there's nothing suspicious in the area.");
6 | } else if (status == 1) {
7 | cm.forceCompleteQuest(20706);
8 | cm.sendNext("You have spotted the shadow! Better report to #p1103001#.");
9 | } else if (status == 2) {
10 | cm.sendNext("The shadow has already been spotted. Better report to #p1103001#.");
11 | }
12 | cm.dispose();
13 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1012116.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | cm.sendNext("It looks like there's nothing suspecious in the area.");
3 | cm.dispose();
4 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1013104.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | if (cm.isQuestStarted(22007)) {
3 | if (!cm.haveItem(4032451)) {
4 | cm.gainItem(4032451, true);
5 | cm.sendNext("#b(You have obtained an Egg. Deliver it to Utah.)");
6 | } else {
7 | cm.sendNext("#b(You have already obtained an Egg. Take the Egg you have and give it to Utah.)");
8 | }
9 | } else {
10 | cm.sendNext("#b(You don't need to take an egg now.)#k");
11 | }
12 | cm.dispose();
13 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1032007.js:
--------------------------------------------------------------------------------
1 | var status = 0;
2 | var cost = 5000;
3 |
4 | function start() {
5 | cm.sendYesNo("Hello, I'm in charge of selling tickets for the ship ride to Orbis Station of Ossyria. The ride to Orbis takes off every 15 minutes, beginning on the hour, and it'll cost you #b"+cost+" mesos#k. Are you sure you want to purchase #b#t4031045##k?");
6 | }
7 |
8 | function action(mode, type, selection) {
9 | if(mode == -1)
10 | cm.dispose();
11 | else {
12 | if(mode == 0) {
13 | cm.sendNext("You must have some business to take care of here, right?");
14 | cm.dispose();
15 | return;
16 | }
17 | status++;
18 | if(status == 1) {
19 | if (cm.getMeso() >= cost && cm.canHold(4031045)) {
20 | cm.gainItem(4031045,1);
21 | cm.gainMeso(-cost);
22 | cm.dispose();
23 | } else {
24 | cm.sendOk("Are you sure you have #b"+cost+" mesos#k? If so, then I urge you to check your etc. inventory, and see if it's full or not.");
25 | cm.dispose();
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/1032008.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | if(cm.haveItem(4031045)){
3 | var em = cm.getEventManager("Boats");
4 | if (em.getProperty("entry") == "true")
5 | cm.sendYesNo("Do you want to go to Orbis?");
6 | else{
7 | cm.sendOk("The boat to Orbis is already travelling, please be patient for the next one.");
8 | cm.dispose();
9 | }
10 | }else{
11 | cm.sendOk("Make sure you got a Orbis ticket to travel in this boat. Check your inventory.");
12 | cm.dispose();
13 | }
14 | }
15 | function action(mode, type, selection) {
16 | if (mode <= 0) {
17 | cm.sendOk("Okay, talk to me if you change your mind!");
18 | cm.dispose();
19 | return;
20 | }
21 | var em = cm.getEventManager("Boats");
22 | if (em.getProperty("entry") == "true") {
23 | cm.warp(101000301);
24 | cm.gainItem(4031045, -1);
25 | cm.dispose();
26 | }
27 | else{
28 | cm.sendOk("The boat to Orbis is ready to take off, please be patient for the next one.");
29 | cm.dispose();
30 | }
31 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1032109.js:
--------------------------------------------------------------------------------
1 | /*
2 | NPC: Corner of the Magic Library
3 | MAP: Hidden Street - Magic Library (910110000)
4 | QUEST: Maybe it's Grendel! (20718)
5 | */
6 |
7 | var status;
8 | var mobId = 2220100; //Blue Mushroom
9 |
10 | function start(){
11 | status = -1;
12 | action(1, 0, 0);
13 | }
14 |
15 | function action(mode, type, selection){
16 | if(mode == -1 || (mode == 0 && status == 0)){
17 | cm.dispose();
18 | return;
19 | }
20 | else if(mode == 0)
21 | status--;
22 | else
23 | status++;
24 |
25 |
26 | if(status == 0){
27 | cm.sendOk("A mysterious black figure appeared and summoned a lot of angry monsters!");
28 | }
29 | else if(status == 1){
30 | var player = cm.getPlayer();
31 | var map = player.getMap();
32 |
33 | for(var i = 0; i < 10; i++)
34 | map.spawnMonster(mobId, 117, 183);
35 | for(var i = 0; i < 10; i++)
36 | map.spawnMonster(mobId, 4, 183);
37 | for(var i = 0; i < 10; i++)
38 | map.spawnMonster(mobId, -109, 183);
39 |
40 | cm.completeQuest(20718);
41 | cm.gainExp(4000);
42 |
43 | cm.dispose();
44 | return;
45 | }
46 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1032110.js:
--------------------------------------------------------------------------------
1 | /*
2 | NPC: Corner of the Magic Library
3 | MAP: Hidden Street - Magic Library (910110000)
4 | QUEST: Maybe it's Grendel! (20718)
5 | */
6 |
7 | var status;
8 |
9 | function start(){
10 | status = -1;
11 | action(1, 0, 0);
12 | }
13 |
14 | function action(mode, type, selection){
15 | if(mode == -1 || (mode == 0 && status == 0)){
16 | cm.dispose();
17 | return;
18 | }
19 | else if(mode == 0)
20 | status--;
21 | else
22 | status++;
23 |
24 |
25 | if(status == 0){
26 | cm.sendOk("Nothing remarkable here.");
27 | }
28 | else if(status == 1){
29 | cm.dispose();
30 | return;
31 | }
32 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1032111.js:
--------------------------------------------------------------------------------
1 | /*
2 | NPC: Small Tree Stump
3 | MAP: Victoria Road - Top of the Tree That Grew (101010103)
4 | QUEST: Maybe it's Arwen! (20716)
5 | */
6 |
7 | var status;
8 |
9 | function start(){
10 | status = -1;
11 | action(1, 0, 0);
12 | }
13 |
14 | function action(mode, type, selection){
15 | if(mode == -1 || (mode == 0 && status == 0)){
16 | cm.dispose();
17 | return;
18 | }
19 | else if(mode == 0)
20 | status--;
21 | else
22 | status++;
23 |
24 |
25 | if(status == 0){
26 | if(cm.isQuestStarted(20716)){
27 | if(!cm.hasItem(4032142)){
28 | if(cm.canHold(4032142)){
29 | cm.gainItem(4032142, 1);
30 | cm.sendOk("You bottled up some of the clear tree sap. #i4032142#");
31 | }
32 | else
33 | cm.sendOk("Make sure you have a free spot in your ETC inventory.");
34 | }
35 | else
36 | cm.sendOk("A never ending flow of sap is coming from this small tree stump.");
37 | }
38 | else
39 | cm.sendOk("A never ending flow of sap is coming from this small tree stump.");
40 | }
41 | else if(status == 1){
42 | cm.dispose();
43 | return;
44 | }
45 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1052110.js:
--------------------------------------------------------------------------------
1 | /*
2 | Trash Can 2
3 | Kerning Subway
4 | */
5 |
6 | var status;
7 |
8 | function start() {
9 | status = -1;
10 | action(1, 0, 0);
11 | }
12 |
13 | function action(mode, type, selection) {
14 | if (mode == -1) {
15 | cm.dispose();
16 | } else {
17 | if (mode == 0 && type > 0) {
18 | cm.dispose();
19 | return;
20 | }
21 | if (mode == 1)
22 | status++;
23 | else
24 | status--;
25 |
26 | if(status == 0) {
27 | cm.sendOk("Just a trash can sitting there.");
28 | cm.dispose();
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1052111.js:
--------------------------------------------------------------------------------
1 | /*
2 | Trash Can 3
3 | Kerning Subway
4 | */
5 |
6 | var status;
7 |
8 | function start(){
9 | status = -1;
10 | action(1, 0, 0);
11 | }
12 |
13 | function action(mode, type, selection){
14 | if(mode == -1){
15 | cm.dispose();
16 | return;
17 | }
18 | else{
19 | if(mode == 0 && status == 0){
20 | cm.dispose();
21 | return;
22 | }
23 | else if(mode == 0)
24 | status--;
25 | else
26 | status++;
27 |
28 | if(status == 0) {
29 | if(cm.isQuestStarted(20710)) {
30 | if(!cm.hasItem(4032136)) {
31 | if(cm.canHold(4032136)) {
32 | cm.gainItem(4032136, 1);
33 | cm.sendNext("You have found a #b#t4032136##k in the trash can! #i4032136#");
34 | } else {
35 | cm.sendOk("#i4032136# Not enough space in your ETC inventory.");
36 | }
37 | } else {
38 | cm.sendOk("Just a trash can sitting there.");
39 | }
40 | } else {
41 | cm.sendOk("Just a trash can sitting there.");
42 | }
43 | } else if(status == 1){
44 | cm.dispose();
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1052112.js:
--------------------------------------------------------------------------------
1 | /*
2 | Trash Can 4
3 | Kerning Subway
4 | */
5 |
6 | var status;
7 |
8 | function start() {
9 | status = -1;
10 | action(1, 0, 0);
11 | }
12 |
13 | function action(mode, type, selection) {
14 | if (mode == -1) {
15 | cm.dispose();
16 | } else {
17 | if (mode == 0 && type > 0) {
18 | cm.dispose();
19 | return;
20 | }
21 | if (mode == 1)
22 | status++;
23 | else
24 | status--;
25 |
26 | if(status == 0) {
27 | cm.sendOk("Just a trash can sitting there.");
28 | cm.dispose();
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1061010.js:
--------------------------------------------------------------------------------
1 | var status = 0;
2 | var summon;
3 | var nthtext = "bonus";
4 |
5 | function start() {
6 | status = -1;
7 | action(1, 0, 0);
8 | }
9 |
10 | function action(mode, type, selection) {
11 | if (mode == -1)
12 | cm.dispose();//ExitChat
13 | else if (mode == 0)
14 | cm.dispose();//No
15 | else{ //Regular Talk
16 | if (mode == 1)
17 | status++;
18 | else
19 | status--;
20 |
21 | if(status == 0){
22 | cm.sendYesNo("Would you like to leave?");
23 | }else if(status == 1){
24 | if(cm.getMapId() == 108010101)cm.getPlayer().changeMap(105040305);
25 | if(cm.getMapId() == 108010201)cm.getPlayer().changeMap(100040106);
26 | if(cm.getMapId() == 108010301)cm.getPlayer().changeMap(105070001);
27 | if(cm.getMapId() == 108010401)cm.getPlayer().changeMap(107000402);
28 | if(cm.getMapId() == 108010501)cm.getPlayer().changeMap(105040305);
29 | var em = cm.getEventManager("3rdjob");
30 | em.getInstance(cm.getPlayer().getName()).unregisterPlayer(cm.getPlayer());
31 | cm.dispose();
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1061016.js:
--------------------------------------------------------------------------------
1 | var status = -1;
2 | var itemids = Array(2040728, 2040729, 2040730, 2040731, 2040732, 2040733, 2040734, 2040735, 2040736, 2040737, 2040738, 2040739);
3 |
4 | function start() {
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection) {
9 | if (mode != 1) {
10 | cm.dispose();
11 | return;
12 | }
13 | status++;
14 | if (status == 0) {
15 | cm.sendSimple("Hello, #h0#. I can exchange your Balrog Leathers.\r\n\r\n#r#L1#Redeem items#l#k");
16 | } else if (status == 1) {
17 | var selStr = "Well, okay. These are what you can redeem...\r\n\r\n#b";
18 | for (var i = 0; i < itemids.length; i++) {
19 | selStr += "#L" + i + "##i" + itemids[i] + "##z" + itemids[i] + "##l\r\n";
20 | }
21 | cm.sendSimple(selStr);
22 | } else if (status == 2) {
23 | if (!cm.canHold(itemids[selection], 1)) {
24 | cm.sendOk("Please make room");
25 | } else if (!cm.haveItemWithId(4001261)) {
26 | cm.sendOk("You don't have enough leathers.");
27 | } else {
28 | cm.gainItem(4001261, -1);
29 | cm.gainItem(itemids[selection], 1);
30 | cm.sendOk("Thank you for your redemption");
31 | }
32 | cm.dispose();
33 | }
34 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1063016.js:
--------------------------------------------------------------------------------
1 | /* Strange Looking Statue
2 | Puppeteer's Secret Passage (910510100)
3 | Puppeteer JQ.
4 | */
5 |
6 | var status;
7 |
8 | function start() {
9 | status = -1;
10 | action(1, 0, 0);
11 | }
12 |
13 | function action(mode, type, selection) {
14 | if (mode == -1) {
15 | cm.dispose();
16 | } else {
17 | if (mode == 0 && type > 0) {
18 | cm.dispose();
19 | return;
20 | }
21 | if (mode == 1)
22 | status++;
23 | else
24 | status--;
25 |
26 | if(status == 0) {
27 | cm.sendYesNo("Will you exit this trial?");
28 | } else {
29 | cm.warp(105040201, 2);
30 | cm.dispose();
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1072008.js:
--------------------------------------------------------------------------------
1 | /**
2 | Author: xQuasar
3 | NPC: Kyrin - Pirate Job Advancer
4 | Inside Test Room
5 | **/
6 |
7 | var status;
8 |
9 | function start() {
10 | status = -1;
11 | action(1,0,0);
12 | }
13 |
14 | function action(mode,type,selection) {
15 | if (status == -1) {
16 | if (cm.getMapId() == 108000502) {
17 | if (!(cm.haveItem(4031856,15))) {
18 | cm.sendNext("Go, and get me 15 #b#t4031856##k.");
19 | cm.dispose();
20 | } else {
21 | status = 2;
22 | cm.sendNext("Wow, you have brought me 15 #b#t4031856##k! Congratulations. Let me warp you out now.");
23 | }
24 | } else if (cm.getMapId() == 108000501) {
25 | if (!(cm.haveItem(4031857,15))) {
26 | cm.sendNext("Go, and get me 15 #b#t4031857##k.");
27 | cm.dispose();
28 | } else {
29 | status = 2;
30 | cm.sendNext("Wow, you have brought me 15 #b#t4031857##k! Congratulations. Let me warp you out now.");
31 | }
32 | } else {
33 | cm.sendNext("Error. Please report this.");
34 | cm.dispose();
35 | }
36 | } else if (status == 2) {
37 | cm.warp(120000101,0);
38 | cm.dispose();
39 | }
40 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1096001.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | cm.sendOk("Will I ever finish cleaning? This ship is just too big...");
3 | cm.dispose();
4 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1096003.js:
--------------------------------------------------------------------------------
1 | var status = -1;
2 |
3 | function start() {
4 | action(1, 0, 0);
5 | }
6 |
7 | function action(mode, type, selection) {
8 | if (mode == 0 && type == 0) {
9 | status--;
10 | } else if (mode == -1) {
11 | cm.dispose();
12 | return;
13 | } else {
14 | status++;
15 | }
16 | if (status == 0) {
17 | cm.sendDirectionInfo(4, 1096003);//else you will crash sending sendNext
18 | cm.sendDirectionInfo(3, 4);
19 | cm.sendNext("Ook! Ook!");
20 | cm.showIntro("Effect/Direction4.img/cannonshooter/face00");
21 | } else if (status == 1) {
22 | cm.unlockUI();
23 | cm.dispose();
24 | }
25 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1096010.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | if (cm.isQuestStarted(2566)) {
3 | if (!cm.haveItem(4032985)) {
4 | if (cm.canHold(4032985)) {
5 | cm.gainItem(4032985, true);
6 | cm.earnTitle("You found the Ignition Device. Bring it to Cutter.");
7 | }
8 | } else {
9 | cm.earnTitle("You already have the Ignition Device.");
10 | }
11 | }
12 | cm.dispose();
13 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/11000.js:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the HeavenMS (MapleSolaxiaV2) MapleStory Server
3 | Copyleft (L) 2017 RonanLana
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU Affero General Public License as
7 | published by the Free Software Foundation version 3 as published by
8 | the Free Software Foundation. You may not use, modify or distribute
9 | this program under any other version of the GNU Affero General Public
10 | License.
11 |
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU Affero General Public License for more details.
16 |
17 | You should have received a copy of the GNU Affero General Public License
18 | along with this program. If not, see .
19 | */
20 |
21 | function start() {
22 | cm.openShopNpc(11000);
23 | cm.dispose();
24 | }
25 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/1100000.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | cm.getPlayer().getStorage().sendStorage(cm.getClient(), 1100000);
3 | cm.dispose();
4 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1100005.js:
--------------------------------------------------------------------------------
1 | /**
2 | ----------------------------------------------------------------------------------
3 | Skyferry Between Victoria Island, Ereve and Orbis.
4 |
5 | 1100005 Kiriru (On boat between Ereve and Victoria Island)
6 |
7 | -------Credits:-------------------------------------------------------------------
8 | *MapleSanta
9 | ----------------------------------------------------------------------------------
10 | **/
11 |
12 | function start() {
13 | cm.sendOk("The weather is so nice. At this rate, we should arrive in no time....");
14 | cm.dispose();
15 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1100006.js:
--------------------------------------------------------------------------------
1 | /**
2 | ----------------------------------------------------------------------------------
3 | Skyferry Between Victoria Island, Ereve and Orbis.
4 |
5 | 1100006 Kiru (On boat between Ereve and Orbis)
6 |
7 | -------Credits:-------------------------------------------------------------------
8 | *MapleSanta
9 | ----------------------------------------------------------------------------------
10 | **/
11 |
12 | function start() {
13 | cm.sendOk("Ah, such lovely winds. This should be a perfect voyage as long as no stupid customer falls off for attempting some weird skill. Of course, I'm talking about you. Please refain from using your skills.");
14 | cm.dispose();
15 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1101001.js:
--------------------------------------------------------------------------------
1 | /*
2 | NPC Name: Divine Bird
3 | Map(s): Erev
4 | Description: Buff
5 | */
6 |
7 | function start() {
8 | cm.useItem(2022458);
9 | cm.sendOk("Don't stop training. Every ounce of your energy is required to protect the world of Maple....");
10 | cm.dispose();
11 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1104000.js:
--------------------------------------------------------------------------------
1 | var status;
2 |
3 | function start(){
4 | status = -1;
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection){
9 | if(mode == -1 || (mode == 0 && status == 0)){
10 | cm.dispose();
11 | return;
12 | }
13 | else if(mode == 0)
14 | status--;
15 | else
16 | status++;
17 |
18 | if(status == 0){
19 | cm.sendNext("What the... you don't belong here!");
20 | }
21 | else if(status == 1){
22 | var puppet = cm.getEventManager("Puppeteer");
23 | puppet.setProperty("player", cm.getPlayer().getName());
24 | puppet.startInstance(cm.getPlayer());
25 | cm.dispose();
26 | return;
27 | }
28 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1200005.js:
--------------------------------------------------------------------------------
1 | /**
2 | ----------------------------------------------------------------------------------
3 | Whale Between Lith harbor and Rien.
4 |
5 | 1200005 Puro
6 |
7 | -------Credits:-------------------------------------------------------------------
8 | *MapleSanta
9 | ----------------------------------------------------------------------------------
10 | **/
11 |
12 | function start() {
13 | cm.sendOk("Ahhhh, this is so boring... The whale is controlling the ship so i'm left with nothing to do but look up and stare at the clouds.");
14 | cm.dispose()
15 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1200006.js:
--------------------------------------------------------------------------------
1 | /**
2 | ----------------------------------------------------------------------------------
3 | Whale Between Lith harbor and Rien.
4 |
5 | 1200006 Puro
6 |
7 | -------Credits:-------------------------------------------------------------------
8 | *MapleSanta
9 | ----------------------------------------------------------------------------------
10 | **/
11 |
12 | function start() {
13 | cm.sendOk("The current is serene, wich means we may arive in lith harbor earlier than expected.");
14 | cm.dispose();
15 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1202009.js:
--------------------------------------------------------------------------------
1 | var status = 0;
2 |
3 | function start() {
4 | status = -1;
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection) {
9 | if(cm.haveItemWithId(1902016, true)) {
10 | cm.warp(140010210, 0);
11 | } else {
12 | cm.sendOk("What is it? If you you're here to waste my time, get lost!");
13 | }
14 |
15 | cm.dispose();
16 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1202010.js:
--------------------------------------------------------------------------------
1 | var status = 0;
2 |
3 | function start() {
4 | status = -1;
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection) {
9 | cm.sendOk("Behold, the distinguished brave heroes of Rien! Those stout hearts are who have been protecting our people since long ago, our valiant comrades.");
10 | cm.dispose();
11 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1204001.js:
--------------------------------------------------------------------------------
1 | /*
2 | * NPC : Francis (Doll master)
3 | * Map : 910510200
4 | */
5 |
6 | var status = -1;
7 |
8 | function start() {
9 | action(1, 0, 0);
10 | }
11 |
12 | function action(mode, type, selection) {
13 | if(mode == -1 || mode == 0 && type > 0) {
14 | cm.dispose();
15 | return;
16 | }
17 |
18 | if (mode == 1) {
19 | status++;
20 | } else {
21 | status--;
22 | }
23 | if (status == 0) {
24 | cm.sendNext("I'm Francis, the Puppeteer of the Black Wings. How dare you disturb my puppets... It really upsets me, but I'll let it slide this time. If I catch you doing it again though, I swear in the name of the Black Mage, I will make you pay for it.", 9);
25 | } else if (status == 1) {
26 | cm.sendNextPrev("#b(The Black Wings? Huh? Who are they? And how is all this related to the Black Mage? Hm, maybe you should report this info to Tru.)#k", 3);
27 | } else if (status == 2) {
28 | cm.completeQuest(21719);
29 | cm.warp(105040200, 10);//104000004
30 | cm.dispose();
31 | }
32 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1209001.js:
--------------------------------------------------------------------------------
1 | var status = 0;
2 |
3 | function start() {
4 | status = -1;
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection) {
9 | cm.sendOk("The #rBlack Mage#k's forces approaches here in an unstoppable pace... We have no other way than to flee this area now, leaving our home behind. Oh, the tragedy!");
10 | cm.dispose();
11 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1209002.js:
--------------------------------------------------------------------------------
1 | var status = 0;
2 |
3 | function start() {
4 | status = -1;
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection) {
9 | cm.sendOk("Please calm down, uncle. We are embarking to #bVictoria Island#k, we will be safe once we reach there. So, come on!");
10 | cm.dispose();
11 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1209003.js:
--------------------------------------------------------------------------------
1 | var status = 0;
2 |
3 | function start() {
4 | status = -1;
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection) {
9 | cm.sendOk("We are departing to #bVictoria Island#k briefly. I've heard the #rBlack Mage#k himself cannot take that place on his grasp yet, thanks to #bthe seal that has been casted on that area#k. We pray for their safety, but if fortune does not favor the Heroes, at least we will be safe once we reach the continent.");
10 | cm.dispose();
11 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1209004.js:
--------------------------------------------------------------------------------
1 | var status = 0;
2 |
3 | function start() {
4 | status = -1;
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection) {
9 | cm.sendOk("I hope for this travel to be a safe one, and that we get to live on a more peaceful place there... Hey, darling, let's go.");
10 | cm.dispose();
11 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1209005.js:
--------------------------------------------------------------------------------
1 | var status = 0;
2 |
3 | function start() {
4 | status = -1;
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection) {
9 | cm.sendOk("Alright, embarking in...");
10 | cm.dispose();
11 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/1300013.js:
--------------------------------------------------------------------------------
1 | /*
2 | NPC: Blocked Entrance (portal?)
3 | MAP: Mushroom Castle - East Castle Tower (106021400)
4 | */
5 |
6 | var status;
7 |
8 | function start(){
9 | status = -1;
10 | action(1, 0, 0);
11 | }
12 |
13 | function action(mode, type, selection){
14 | if(mode == -1){
15 | cm.dispose();
16 | return;
17 | }
18 | else if(mode == 0 && status == 0){
19 | cm.dispose();
20 | return;
21 | }
22 | else if(mode == 0)
23 | status--;
24 | else
25 | status++;
26 |
27 |
28 | if(status == 0){
29 | cm.sendSimple("#L1#Enter to fight #bKing Pepe#k and #bYeti Brothers#k.#l");
30 | }
31 | else if(status == 1){
32 | if(selection == 1){
33 | var pepe = cm.getEventManager("KingPepeAndYetis");
34 | pepe.setProperty("player", cm.getPlayer().getName());
35 | pepe.startInstance(cm.getPlayer());
36 | cm.dispose();
37 | return;
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2007.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | status = -1;
3 | action(1, 0, 0);
4 | }
5 |
6 | function action(mode, type, selection) {
7 | if (mode == -1) {
8 | cm.sendNext("Enjoy your trip.");
9 | cm.dispose();
10 | } else {
11 | if (status == 0 && mode == 0) {
12 | cm.sendNext("Enjoy your trip.");
13 | cm.dispose();
14 | }
15 | if (mode == 1)
16 | status++;
17 | else
18 | status--;
19 | if (status == 0)
20 | cm.sendYesNo("Would you like to skip the tutorials and head straight to Lith Harbor?");
21 | else if (status == 1) {
22 | cm.warp(104000000, 0);
23 | cm.dispose();
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2012001.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | if(cm.haveItem(4031047)){
3 | var em = cm.getEventManager("Boats");
4 | if (em.getProperty("entry") == "true")
5 | cm.sendYesNo("Do you want to go to Ellinia?");
6 | else{
7 | cm.sendOk("The boat to Ellinia is already travelling, please be patient for the next one.");
8 | cm.dispose();
9 | }
10 | }else{
11 | cm.sendOk("Make sure you got a Ellinia ticket to travel in this boat. Check your inventory.");
12 | cm.dispose();
13 | }
14 | }
15 | function action(mode, type, selection) {
16 | if (mode <= 0) {
17 | cm.sendOk("Okay, talk to me if you change your mind!");
18 | cm.dispose();
19 | return;
20 | }
21 |
22 | var em = cm.getEventManager("Boats");
23 | if (em.getProperty("entry") == "true") {
24 | cm.warp(200000112);
25 | cm.gainItem(4031047, -1);
26 | cm.dispose();
27 | }
28 | else{
29 | cm.sendOk("The boat to Ellinia is ready to take off, please be patient for the next one.");
30 | cm.dispose();
31 | }
32 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2012006.js:
--------------------------------------------------------------------------------
1 | var status = -1;
2 | var sel;
3 |
4 | var destinations = new Array("Ellinia", "Ludibrium", "Leafre", "Mu Lung", "Ariant", "Ereve");
5 | var boatType = new Array("the ship", "the train", "the bird", "Hak", "Genie", "the ship");
6 |
7 | function start() {
8 | var message = "Orbis Station has lots of platforms available to choose from. You need to choose the one that'll take you to the destination of your choice. Which platform will you take?\r\n";
9 | for(var i = 0; i < destinations.length; i++){
10 | message += "\r\n#L" + i + "##bThe platform to " + boatType[i] + " that heads to " + destinations[i] + ".#l";
11 | }
12 | cm.sendSimple(message);
13 | }
14 |
15 | function action(mode, type, selection) {
16 | if (mode < 1) {
17 | cm.dispose();
18 | return;
19 | }
20 | status++;
21 | if (status == 0){
22 | sel = selection;
23 | cm.sendNext("Ok #h #, I will send you to the platform for #b#m" + (200000110 + (sel * 10)) + "##k.");
24 | }else if (status == 1) {
25 | cm.warp(200000110 + (sel * 10), "west00");
26 | cm.dispose();
27 | }
28 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2012013.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | if(cm.haveItem(4031074)){
3 | var em = cm.getEventManager("Trains");
4 | if (em.getProperty("entry") == "true") {
5 | cm.sendYesNo("Do you want to go to Ludibrium?");
6 | } else {
7 | cm.sendOk("The train to Ludibrium is already travelling, please be patient for the next one.");
8 | cm.dispose();
9 | }
10 | } else {
11 | cm.sendOk("Make sure you got a Ludibrium ticket to travel in this train. Check your inventory.");
12 | cm.dispose();
13 | }
14 | }
15 | function action(mode, type, selection) {
16 | if (mode <= 0) {
17 | cm.sendOk("Okay, talk to me if you change your mind!");
18 | cm.dispose();
19 | return;
20 | }
21 | var em = cm.getEventManager("Trains");
22 | if (em.getProperty("entry") == "true") {
23 | cm.warp(200000122);
24 | cm.gainItem(4031074, -1);
25 | cm.dispose();
26 | }
27 | else{
28 | cm.sendOk("The train to Ludibrium is ready to take off, please be patient for the next one.");
29 | cm.dispose();
30 | }
31 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2012021.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | if(cm.haveItem(4031331)){
3 | var em = cm.getEventManager("Cabin");
4 | if (em.getProperty("entry") == "true") {
5 | cm.sendYesNo("Do you wish to board the flight?");
6 | } else {
7 | cm.sendOk("The flight has not arrived yet. Come back soon.");
8 | cm.dispose();
9 | }
10 | } else {
11 | cm.sendOk("Make sure you got a Leafre ticket to travel in this flight. Check your inventory.");
12 | cm.dispose();
13 | }
14 | }
15 | function action(mode, type, selection) {
16 | if (mode <= 0) {
17 | cm.sendOk("Okay, talk to me if you change your mind!");
18 | cm.dispose();
19 | return;
20 | }
21 |
22 | var em = cm.getEventManager("Cabin");
23 | if (em.getProperty("entry") == "true") {
24 | cm.warp(200000132);
25 | cm.gainItem(4031331, -1);
26 | } else {
27 | cm.sendOk("The flight has not arrived yet. Come back soon.");
28 | }
29 | cm.dispose();
30 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2022004.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | cm.sendNext("You did a great job back there, " + cm.getPlayer().getName() + ", well done. Now I will transport you back to El Nath. Have the pendant in your possession and talk to me when you feel ready to receive the new skill.");
3 | }
4 |
5 | function action(mode, type, selection) {
6 | if (mode == -1) {
7 | cm.dispose();
8 | } else {
9 | cm.warp(211000000,"in01");
10 | cm.dispose();
11 | }
12 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2040000.js:
--------------------------------------------------------------------------------
1 | var cost = 6000;
2 | var status = 0;
3 |
4 | function start() {
5 | cm.sendYesNo("Hello, I'm in charge of selling tickets for the ship ride to Orbis Station of Ossyria. The ride to Orbis takes off every 10 minutes, beginning on the hour, and it'll cost you #b"+cost+" mesos#k. Are you sure you want to purchase #b#t4031045##k?");
6 | }
7 |
8 | function action(mode, type, selection) {
9 | if(mode == -1)
10 | cm.dispose();
11 | else {
12 | if(mode == 1)
13 | status++;
14 | if(mode == 0) {
15 | cm.sendNext("You must have some business to take care of here, right?");
16 | cm.dispose();
17 | return;
18 | }
19 | if(status == 1) {
20 | if(cm.getMeso() >= cost && cm.canHold(4031045)) {
21 | cm.gainItem(4031045,1);
22 | cm.gainMeso(-cost);
23 | } else
24 | cm.sendOk("Are you sure you have #b"+cost+" mesos#k? If so, then I urge you to check your etc. inventory, and see if it's full or not.");
25 | cm.dispose();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/2041000.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | if(cm.haveItem(4031045)){
3 | var em = cm.getEventManager("Trains");
4 | if (em.getProperty("entry") == "true")
5 | cm.sendYesNo("Do you want to go to Orbis?");
6 | else{
7 | cm.sendOk("The train to Orbis is already travelling, please be patient for the next one.");
8 | cm.dispose();
9 | }
10 | }else{
11 | cm.sendOk("Make sure you got a Orbis ticket to travel in this train. Check your inventory.");
12 | cm.dispose();
13 | }
14 | }
15 | function action(mode, type, selection) {
16 | if (mode <= 0) {
17 | cm.sendOk("Okay, talk to me if you change your mind!");
18 | cm.dispose();
19 | return;
20 | }
21 |
22 | var em = cm.getEventManager("Trains");
23 | if (em.getProperty("entry") == "true") {
24 | cm.warp(220000111);
25 | cm.gainItem(4031045, -1);
26 | cm.dispose();
27 | }
28 | else {
29 | cm.sendOk("The train to Orbis is ready to take off, please be patient for the next one.");
30 | cm.dispose();
31 | }
32 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2082001.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | if(cm.haveItem(4031045)){
3 | var em = cm.getEventManager("Cabin");
4 | if (em.getProperty("entry") == "true") {
5 | cm.sendYesNo("Do you wish to board the flight?");
6 | } else {
7 | cm.sendOk("The flight has not arrived yet. Come back soon.");
8 | cm.dispose();
9 | }
10 | } else {
11 | cm.sendOk("Make sure you got an Orbis ticket to travel in this flight. Check your inventory.");
12 | cm.dispose();
13 | }
14 | }
15 | function action(mode, type, selection) {
16 | if (mode <= 0) {
17 | cm.sendOk("Okay, talk to me if you change your mind!");
18 | cm.dispose();
19 | return;
20 | }
21 | var em = cm.getEventManager("Cabin");
22 | if (em.getProperty("entry") == "true") {
23 | cm.warp(240000111);
24 | cm.gainItem(4031045, -1);
25 | } else {
26 | cm.sendOk("The flight has not arrived yet. Come back soon.");
27 | }
28 | cm.dispose();
29 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2082003.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | cm.sendSimple("If you had wings, I'm sure you could go there. But, that alone won't be enough. If you want to fly though the wind that's sharper than a blade, you'll need tough scales as well. I'm the only Halfling left that knows the way back... If you want to go there, I can transform you. No matter what you are, for this moment, you will become a #bDragon#k...\r\n #L0##bI want to become a dragon.#k#l");
3 | }
4 |
5 | function action(m, t, s) {
6 | if (m > 0){
7 | cm.useItem(2210016);
8 | cm.warp(200090500, 0);
9 | }
10 | cm.dispose();
11 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2100002.js:
--------------------------------------------------------------------------------
1 | var status = 0;
2 |
3 | function start() {
4 | status = -1;
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection) {
9 | cm.openShopNPC(48);
10 | cm.dispose();
11 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2100003.js:
--------------------------------------------------------------------------------
1 | var status = 0;
2 |
3 | function start() {
4 | status = -1;
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection) {
9 | cm.openShopNPC(52);
10 | cm.dispose();
11 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2101002.js:
--------------------------------------------------------------------------------
1 | /* Eleska
2 | Ariant
3 | */
4 |
5 |
6 | function start() {
7 | cm.sendOk("Stay away from me, if you don't want any danger.");
8 | }
9 |
10 | function action() {
11 | cm.dispose();
12 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2101003.js:
--------------------------------------------------------------------------------
1 | /* Ardin
2 | Ariant
3 | */
4 |
5 |
6 | function start() {
7 | cm.sendNext ("Hey hey, don't try to start trouble with anyone. I want nothing to do with you.");
8 | }
9 |
10 | function action() {
11 | cm.dispose();
12 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2103001.js:
--------------------------------------------------------------------------------
1 | var status = -1;
2 |
3 | function start() {
4 | action(1, 0, 0);
5 | }
6 |
7 | function action(mode, type, selection) {
8 | if(cm.isQuestStarted(3927)) {
9 | cm.sendNext("If I had an iron hammer and a dagger, a bow and an arrow...");
10 | cm.setQuestProgress(3927, 1);
11 | }
12 |
13 | cm.dispose();
14 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2120003.js:
--------------------------------------------------------------------------------
1 | /* @Author SharpAceX
2 | Name: Maid
3 | Map(s): Foyer.
4 | Info: Maid
5 | */
6 |
7 | function start() {
8 | cm.sendOk("Hello and welcome, dear guest. The Master has prepared some wonderful games for you to enjoy tonight.");
9 | cm.dispose();
10 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2131000.js:
--------------------------------------------------------------------------------
1 | /* Author: aaroncsn(MapleSea Like)(Incomplete)
2 | NPC Name: Athena Pierce
3 | Map(s): Altair Camp: Conference Hall(300000010)
4 | Description: Unknown
5 | */
6 |
7 | function start(){
8 | cm.sendOk("It is been a while since we left Ossyria to avoid the Black Magician. If not for the world tree, I do not know where we would have been. I have been trying to establish myself here, but that is not easy. I wonder how things are like back home.");
9 | cm.dispose();
10 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2131002.js:
--------------------------------------------------------------------------------
1 | /* Author: aaroncsn(MapleSea Like)(Incomplete)
2 | NPC Name: Euryth
3 | Map(s): Elin Forest:Altair Camp(300000000)
4 | Description: Unknown
5 | */
6 |
7 | function start(){
8 | cm.sendOk("My name is Euryth... As you can see, I am a fairy. People tell me I do not act fairy-like, but... I like making things out of metal objects. Shhh, don't tell this to anyone, but I also like MMA.");
9 | cm.dispose();
10 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2131004.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | action(1,0,0);
3 | }
4 |
5 | function action(mode, type, selection) {
6 | cm.sendNext("Zzzzz...");
7 | cm.dispose();
8 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2132000.js:
--------------------------------------------------------------------------------
1 | /* Author: aaroncsn(MapleSea Like)(Incomplete)
2 | NPC Name: Kanderun
3 | Map(s): Elin Forest:Entrance to Rocky Mountain(300010400)
4 | Description: Unknown
5 | */
6 |
7 | function start(){
8 | cm.sendOk("Hmmm! For you to make your way here, far away from the Camp, you must be one strong individual. Let's explore new areas and find a place to establish our own town!!");
9 | cm.dispose();
10 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2132001.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | action(1,0,0);
3 | }
4 |
5 | function action(mode, type, selection) {
6 | cm.sendNext("Call me Dark Lord. I will give thieves a place in society... watch in a few years!");
7 | cm.dispose();
8 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2132002.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | action(1,0,0);
3 | }
4 |
5 | function action(mode, type, selection) {
6 | cm.sendNext("The magic of this forest is amazing...");
7 | cm.dispose();
8 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2132003.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | action(1,0,0);
3 | }
4 |
5 | function action(mode, type, selection) {
6 | cm.sendNext("Being young doesn't mean I'm any different from those guys. I'll show them!");
7 | cm.dispose();
8 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2133002.js:
--------------------------------------------------------------------------------
1 | var status = -1;
2 |
3 | function start() {
4 | action(1,0,0);
5 | }
6 |
7 | function action(mode, type, selection) {
8 | if (mode == 1) {
9 | status++;
10 | } else {
11 | if (status == 0) {
12 | cm.dispose();
13 | }
14 | status--;
15 | }
16 | if (status == 0) {
17 | cm.sendYesNo("Would you like to exit this instance? Your party members may have to abandon it as well, so take that in mind.");
18 | } else if (status == 1) {
19 | cm.removeAll(4001163);
20 | cm.removeAll(4001169);
21 | cm.removeAll(2270004);
22 | cm.warp(930000800);
23 | cm.dispose();
24 | }
25 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/2141000.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Time Temple - Kirston
3 | * Twilight of the Gods
4 | */
5 |
6 | function start() {
7 | cm.sendAcceptDecline("If only I had the Mirror of Goodness then I can re-summon the Black Wizard! \r\nWait! something's not right! Why is the Black Wizard not summoned? Wait, what's this force? I feel something... totally different from the Black Wizard Ahhhhh!!!!! \r\n\r\n #b(Places a hand on the shoulder of Kryston.)");
8 | }
9 |
10 | function action(mode, type, selection) {
11 | if (mode == 1) {
12 | cm.removeNpc(270050100, 2141000);
13 | cm.forceStartReactor(270050100, 2709000);
14 | }
15 | cm.dispose();
16 |
17 | // If accepted, = summon PB + Kriston Disappear + 1 hour timer
18 | // If deny = NoTHING HAPPEN
19 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9010001.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | status = -1;
3 | action(1, 0, 0);
4 | }
5 |
6 | function action(mode, type, selection) {
7 | cm.sendNext("Hi, I'm #p9010001#.");
8 | cm.dispose();
9 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9010002.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | status = -1;
3 | action(1, 0, 0);
4 | }
5 |
6 | function action(mode, type, selection) {
7 | cm.sendNext("Hi, I'm #p9010002#.");
8 | cm.dispose();
9 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9010003.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | status = -1;
3 | action(1, 0, 0);
4 | }
5 |
6 | function action(mode, type, selection) {
7 | cm.sendNext("Hi, I'm #p9010003#.");
8 | cm.dispose();
9 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9010004.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | status = -1;
3 | action(1, 0, 0);
4 | }
5 |
6 | function action(mode, type, selection) {
7 | cm.sendNext("Hi, I'm #p9010004#.");
8 | cm.dispose();
9 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9120023.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | cm.sendOk("The quality of the movies they are launching these days are impressive!");
3 | cm.dispose();
4 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201033.js:
--------------------------------------------------------------------------------
1 | /**
2 | Simon - Happyville
3 | **/
4 |
5 | function start() {
6 | cm.sendOk("Hi there!");
7 | cm.dispose();
8 | }
9 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201051.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201051 - John Barricade
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | cm.sendOk("The patrol in New Leaf City is always ready. No creatures are able to break through to the city.");
8 | cm.dispose();
9 | }
10 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201052.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201052 - Professor Foxwit
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | cm.sendOk("The patrol in New Leaf City is always ready. No creatures are able to break through to the city.");
8 | cm.dispose();
9 | }
10 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201054.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201054 - Lita Lawless
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | cm.sendOk("The patrol in New Leaf City is always ready. No creatures are able to break through to the city.");
8 | cm.dispose();
9 | }
10 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201071.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201071 - Sunstone Grave
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | cm.sendOk("(This tombstone keeps emmiting ever oddier light waves the more I stare to it...)");
8 | cm.dispose();
9 | }
10 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201072.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201072 - Moonstone Grave
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | cm.sendOk("(This tombstone keeps emmiting ever oddier light waves the more I stare to it...)");
8 | cm.dispose();
9 | }
10 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201073.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201073 - Tombstone
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | cm.sendOk("(This enigmatic tombstone keeps emmiting strange forces... Better look another way.)");
8 | cm.dispose();
9 | }
10 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201079.js:
--------------------------------------------------------------------------------
1 | /*
2 | This file is part of the OdinMS Maple Story Server
3 | Copyright (C) 2008 Patrick Huy
4 | Matthias Butz
5 | Jan Christian Meyer
6 |
7 | This program is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU Affero General Public License as
9 | published by the Free Software Foundation version 3 as published by
10 | the Free Software Foundation. You may not use, modify or distribute
11 | this program under any other version of the GNU Affero General Public
12 | License.
13 |
14 | This program is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU Affero General Public License for more details.
18 |
19 | You should have received a copy of the GNU Affero General Public License
20 | along with this program. If not, see .
21 | */
22 | function start() {
23 | cm.warp(682000100, 0);
24 | cm.dispose();
25 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201083.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201083 - The Glimmer Man
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | cm.sendOk("The patrol in New Leaf City is always ready. No creatures are able to break through to the city.");
8 | cm.dispose();
9 | }
10 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201093.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201093 - Little Suzy
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | cm.sendOk("Have you heard the fantasic Jack Masque appeared around the city these days? That is sooooo nice!");
8 | cm.dispose();
9 | }
10 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201094.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201094 - Corine
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | cm.sendOk("The patrol in New Leaf City is always ready. No creatures are able to break through to the city.");
8 | cm.dispose();
9 | }
10 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201099.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201098 - Mo
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | if(cm.getQuestStatus(8224) == 2) {
8 | cm.openShopNPC(9201099);
9 | } else {
10 | cm.sendOk("Hm, at who do you think you are looking at?");
11 | }
12 |
13 | cm.dispose();
14 | }
15 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201100.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201100 - Taggrin
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | if(cm.getQuestStatus(8224) == 2) {
8 | cm.sendOk("Well met, fellow clan member. If you need anything we can be of help, try talking to one of our members.");
9 | } else {
10 | cm.sendOk("Hello there, stranger. We are the renowned Raven Claw clan of mercenaries, and I'm their leader.");
11 | }
12 |
13 | cm.dispose();
14 | }
15 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201101.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201083 - T-1337
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | cm.sendOk("The patrol in New Leaf City is always ready. No creatures are able to break through to the city.");
8 | cm.dispose();
9 | }
10 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201102.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201102 - Stirgeman
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | cm.sendOk("The patrol in New Leaf City is always ready. No creatures are able to break through to the city.");
8 | cm.dispose();
9 | }
10 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201103.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201103 - Sage
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | if(cm.getLevel() >= 100) cm.sendOk("Expeditions are frequently being held inside the Crimsonwood Keep by adventurers like you, where many people from many parties cooperate together, solving puzzles therein and taking down strong enemies, being able to get many prizes in the process. To find more info about this, go ahead inside the keep at the top-right room there.");
8 | else cm.sendOk("Inside the Keep, expeditions can be formed to attempt the Crimsonwood Keep PQ, which requires maplers from level 100 or more. It seems you are not suitable for attempting it yet, train some more if you want to attempt it.");
9 | cm.dispose();
10 | }
11 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201105.js:
--------------------------------------------------------------------------------
1 | /**
2 | *9201105 - Sage
3 | *@author Ronan
4 | */
5 |
6 | function start() {
7 | if(cm.getMapId() == 610020005) cm.sendOk("The Crimsonwood Keep lies right ahead, a great feat has been made by you this day, salute to thee. Pass through these woods to enter the gates of the Keep.");
8 | else cm.sendOk("So far your progress is splendid, good job. However, to make it to the Keep, you must face and accomplish this ordeal, carry on.");
9 | cm.dispose();
10 | }
11 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201123.js:
--------------------------------------------------------------------------------
1 | //Warrior Statue by Wodian
2 |
3 | importPackage(Packages.client);
4 |
5 | var status = 0;
6 |
7 | function start() {
8 | status = -1;
9 | action(1, 0, 0);
10 | }
11 |
12 | function action(mode, type, selection) {
13 |
14 | if (mode == -1 || cm.getPlayer().getJobStyle() != MapleJob.BEGINNER) {
15 | cm.dispose();
16 | }
17 | else {
18 | if (status >= 2 && mode == 0) {
19 | cm.sendOk("Goodbye");
20 | cm.dispose();
21 | return;
22 | }
23 |
24 | if (mode == 1) {
25 | status++;
26 | }
27 | else {
28 | status--;
29 | }
30 | if (status == 0) {
31 | cm.sendNext("If you want to go to Perion press next!");
32 | }
33 | else if (status == 1) {
34 | cm.warp(102000000,0);
35 | cm.dispose();
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201124.js:
--------------------------------------------------------------------------------
1 | //Bowman Statue by Wodian
2 |
3 | importPackage(Packages.client);
4 |
5 | var status = 0;
6 |
7 | function start() {
8 | status = -1;
9 | action(1, 0, 0);
10 | }
11 |
12 | function action(mode, type, selection) {
13 |
14 | if (mode == -1 || cm.getPlayer().getJobStyle() != MapleJob.BEGINNER) {
15 | cm.dispose();
16 | }
17 | else {
18 | if (status >= 2 && mode == 0) {
19 | cm.sendOk("Goodbye");
20 | cm.dispose();
21 | return;
22 | }
23 |
24 | if (mode == 1) {
25 | status++;
26 | }
27 | else {
28 | status--;
29 | }
30 | if (status == 0) {
31 | cm.sendNext("If you want to go to Henesys press next!");
32 | }
33 | else if (status == 1) {
34 | cm.warp(100000000,0);
35 | cm.dispose();
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201125.js:
--------------------------------------------------------------------------------
1 | //Magician Statue by Wodian
2 |
3 | importPackage(Packages.client);
4 |
5 | var status = 0;
6 |
7 | function start() {
8 | status = -1;
9 | action(1, 0, 0);
10 | }
11 |
12 | function action(mode, type, selection) {
13 |
14 | if (mode == -1 || cm.getPlayer().getJobStyle() != MapleJob.BEGINNER) {
15 | cm.dispose();
16 | }
17 | else {
18 | if (status >= 2 && mode == 0) {
19 | cm.sendOk("Goodbye");
20 | cm.dispose();
21 | return;
22 | }
23 |
24 | if (mode == 1) {
25 | status++;
26 | }
27 | else {
28 | status--;
29 | }
30 | if (status == 0) {
31 | cm.sendNext("If you want to go to Ellinia press next!");
32 | }
33 | else if (status == 1) {
34 | cm.warp(101000000,0);
35 | cm.dispose();
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201126.js:
--------------------------------------------------------------------------------
1 | //Thief Statue by Wodian
2 |
3 | importPackage(Packages.client);
4 |
5 | var status = 0;
6 |
7 | function start() {
8 | status = -1;
9 | action(1, 0, 0);
10 | }
11 |
12 | function action(mode, type, selection) {
13 |
14 | if (mode == -1 || cm.getPlayer().getJobStyle() != MapleJob.BEGINNER) {
15 | cm.dispose();
16 | }
17 | else {
18 | if (status >= 2 && mode == 0) {
19 | cm.sendOk("Goodbye");
20 | cm.dispose();
21 | return;
22 | }
23 |
24 | if (mode == 1) {
25 | status++;
26 | }
27 | else {
28 | status--;
29 | }
30 | if (status == 0) {
31 | cm.sendNext("If you want to go to Kerning City press next!");
32 | }
33 | else if (status == 1) {
34 | cm.warp(103000000,0);
35 | cm.dispose();
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201127.js:
--------------------------------------------------------------------------------
1 | //Pirate Statue by Wodian
2 |
3 | importPackage(Packages.client);
4 |
5 | var status = 0;
6 |
7 | function start() {
8 | status = -1;
9 | action(1, 0, 0);
10 | }
11 |
12 | function action(mode, type, selection) {
13 |
14 | if (mode == -1 || cm.getPlayer().getJobStyle() != MapleJob.BEGINNER) {
15 | cm.dispose();
16 | }
17 | else {
18 | if (status >= 2 && mode == 0) {
19 | cm.sendOk("Goodbye");
20 | cm.dispose();
21 | return;
22 | }
23 |
24 | if (mode == 1) {
25 | status++;
26 | }
27 | else {
28 | status--;
29 | }
30 | if (status == 0) {
31 | cm.sendNext("If you want to go to Nautilus press next!");
32 | }
33 | else if (status == 1) {
34 | cm.warp(120000100,0);//guess so... lol?
35 | cm.dispose();
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201128.js:
--------------------------------------------------------------------------------
1 | var map = 677000004;
2 | var quest = 28179;
3 | var status = -1;
4 |
5 | function start(mode, type, selection) {
6 | action(1, 0, 0);
7 | }
8 |
9 | function action(mode, type, selection) {
10 | if (mode == 1) {
11 | status++;
12 | } else {
13 | cm.dispose();
14 | return;
15 | }
16 | if (status == 0) {
17 | if (cm.isQuestStarted(quest)) {
18 | cm.sendYesNo("Would you like to move to #b#m" + map + "##k?");
19 | } else {
20 | cm.sendOk("The entrance is blocked by a strange force.");
21 | cm.dispose();
22 | }
23 | } else {
24 | if(cm.haveItem(4001341, 1)) cm.gainItem(4001341, -1);
25 | if(cm.haveItem(4032478, 1)) cm.gainItem(4032478, -1);
26 |
27 | cm.warp(map, 0);
28 | cm.dispose();
29 | }
30 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201129.js:
--------------------------------------------------------------------------------
1 | var map = 677000000;
2 | var quest = 28198;
3 | var status = -1;
4 |
5 | function start(mode, type, selection) {
6 | action(1, 0, 0);
7 | }
8 |
9 | function action(mode, type, selection) {
10 | if (mode == 1) {
11 | status++;
12 | } else {
13 | cm.dispose();
14 | return;
15 | }
16 | if (status == 0) {
17 | if (cm.isQuestStarted(quest)) {
18 | cm.sendYesNo("Would you like to move to #b#m" + map + "##k?");
19 | } else {
20 | cm.sendOk("The entrance is blocked by a strange force.");
21 | cm.dispose();
22 | }
23 | } else {
24 | cm.warp(map, 0);
25 | cm.dispose();
26 | }
27 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201130.js:
--------------------------------------------------------------------------------
1 | var map = 677000008;
2 | var quest = 28219;
3 | var status = -1;
4 |
5 | function start(mode, type, selection) {
6 | action(1, 0, 0);
7 | }
8 |
9 | function action(mode, type, selection) {
10 | if (mode == 1) {
11 | status++;
12 | } else {
13 | cm.dispose();
14 | return;
15 | }
16 | if (status == 0) {
17 | if (cm.isQuestStarted(quest)) {
18 | cm.sendYesNo("Would you like to move to #b#m" + map + "##k?");
19 | } else {
20 | cm.sendOk("The entrance is blocked by a strange force.");
21 | cm.dispose();
22 | }
23 | } else {
24 | if(cm.haveItem(4032485, 1)) cm.gainItem(4032485, -1);
25 | if(cm.haveItem(4001355, 1)) cm.gainItem(4001355, -1);
26 |
27 | cm.warp(map, 0);
28 | cm.dispose();
29 | }
30 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201131.js:
--------------------------------------------------------------------------------
1 | var map = 677000002;
2 | var quest = 28238;
3 | var status = -1;
4 |
5 | function start(mode, type, selection) {
6 | action(1, 0, 0);
7 | }
8 |
9 | function action(mode, type, selection) {
10 | if (mode == 1) {
11 | status++;
12 | } else {
13 | cm.dispose();
14 | return;
15 | }
16 | if (status == 0) {
17 | if (cm.isQuestStarted(quest)) {
18 | cm.sendYesNo("Would you like to move to #b#m" + map + "##k?");
19 | } else {
20 | cm.sendOk("The entrance is blocked by a strange force.");
21 | cm.dispose();
22 | }
23 | } else {
24 | if(cm.haveItem(4032481, 1)) cm.gainItem(4032481, -1);
25 | if(cm.haveItem(4032482, 1)) cm.gainItem(4032482, -1);
26 | if(cm.haveItem(4032483, 1)) cm.gainItem(4032483, -1);
27 |
28 | cm.warp(map, 0);
29 | cm.dispose();
30 | }
31 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201132.js:
--------------------------------------------------------------------------------
1 | var map = 677000006;
2 | var quest = 28256;
3 | var status = -1;
4 |
5 | function start(mode, type, selection) {
6 | action(1, 0, 0);
7 | }
8 |
9 | function action(mode, type, selection) {
10 | if (mode == 1) {
11 | status++;
12 | } else {
13 | cm.dispose();
14 | return;
15 | }
16 | if (status == 0) {
17 | if (cm.isQuestStarted(quest)) {
18 | cm.sendYesNo("Would you like to move to #b#m" + map + "##k?");
19 | } else {
20 | cm.sendOk("The entrance is blocked by a strange force.");
21 | cm.dispose();
22 | }
23 | } else {
24 | if(cm.haveItem(4001362, 1)) cm.gainItem(4001362, -cm.getItemQuantity(4001362));
25 | if(cm.haveItem(4001363, 1)) cm.gainItem(4001363, -cm.getItemQuantity(4001363));
26 | if(cm.haveItem(4032486, 1)) cm.gainItem(4032486, -1);
27 | if(cm.haveItem(4032488, 1)) cm.gainItem(4032488, -1);
28 | if(cm.haveItem(4032489, 1)) cm.gainItem(4032489, -1);
29 | if(cm.haveItem(4220153, 1)) cm.gainItem(4220153, -1);
30 |
31 | cm.warp(map, 0);
32 | cm.dispose();
33 | }
34 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9201143.js:
--------------------------------------------------------------------------------
1 | /* @Author SharpAceX
2 | Name: Steward
3 | Map(s): Foyer
4 | Info: Steward
5 | NPC ID: 9201143.js
6 | */
7 |
8 | function start() {
9 | cm.sendNext("At your service, my friend.");
10 | cm.dispose();
11 | }
12 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/9209100.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | cm.sendOk("You didn't hear it from Rooney? It's a dress-up party, and you can't enter unless you've transformed into something else. I hear that Cliff has something that you may be looking for...");
3 | action(1,0,0);
4 | }
5 |
6 | function action(mode, type, selection) {
7 | cm.dispose();
8 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9250045.js:
--------------------------------------------------------------------------------
1 | //Perion Maple TV
2 |
3 | function start() {
4 | action(1, 0, 0);
5 | }
6 |
7 | function action(mode, type, selection) {
8 | cm.dispose(); //What the fuck
9 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9270054.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | cm.getPlayer().getStorage().sendStorage(cm.getClient(), 9270054);
3 | cm.dispose();
4 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/9310058.js:
--------------------------------------------------------------------------------
1 | /**
2 | Santa - Happyville
3 | **/
4 |
5 | function start() {
6 | cm.sendOk("Welcome to #bHappyville#k, young traveler. Do you have any wishes?");
7 | cm.dispose();
8 | }
9 |
--------------------------------------------------------------------------------
/scripts/npc/legacy/MagatiaPassword.js:
--------------------------------------------------------------------------------
1 | var status;
2 |
3 | function start(){
4 | status = -1;
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection){
9 | if(mode == -1 || (mode == 0 && status == 0)){
10 | cm.dispose();
11 | return;
12 | }
13 | else if(mode == 0)
14 | status--;
15 | else
16 | status++;
17 |
18 | if(status == 0){
19 | cm.sendGetText("The door reacts to the entry pass inserted. #bPassword#k!");
20 | }
21 | else if(status == 1){
22 | if(cm.getText() == cm.getStringQuestProgress(3360, 0)){
23 | cm.setQuestProgress(3360, 1, 1);
24 | cm.warp((cm.getMapId() == 261010000) ? 261020200 : 261010000, "secret00");
25 | }
26 | else {
27 | cm.sendOk("#rWrong!");
28 | }
29 |
30 | cm.dispose();
31 | }
32 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/MaybeItsGrendel_end.js:
--------------------------------------------------------------------------------
1 | var status;
2 |
3 | function start(){
4 | status = -1;
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection){
9 | if(mode == -1 || (mode == 0 && status == 0)){
10 | cm.dispose();
11 | return;
12 | }
13 | else if(mode == 0)
14 | status--;
15 | else
16 | status++;
17 |
18 |
19 | if(status == 0){
20 | cm.sendNext("...a black shadowy figure came out and attacked you? How can this take place at #b#p1032001##k's house? This sounds like one big conspiracy here...");
21 | }
22 | else if(status == 1){
23 | cm.sendNextPrev("I'll have to sort this all out in my mind. Talk to me in a bit.");
24 | }
25 | else if(status == 2){
26 | cm.dispose();
27 | }
28 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/PupeteerPassword.js:
--------------------------------------------------------------------------------
1 | var status;
2 |
3 | function start(){
4 | status = -1;
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection){
9 | if(mode == -1 || (mode == 0 && status == 0)){
10 | cm.dispose();
11 | return;
12 | }
13 | else if(mode == 0)
14 | status--;
15 | else
16 | status++;
17 |
18 |
19 |
20 | if(status == 0){
21 | cm.sendGetText("A suspicious voice pierces through the silence. #bPassword#k!");
22 | }
23 | else if(status == 1){
24 | if(cm.getText() == "Francis is a genius Puppeteer!"){
25 | if(cm.isQuestStarted(20730) && cm.getQuestProgress(20730, 9300285) == 0)
26 | cm.warp(910510001, 1);
27 | else if(cm.isQuestStarted(21731) && cm.getQuestProgress(21731, 9300346) == 0)
28 | cm.warp(910510001, 1);
29 | else
30 | cm.playerMessage(5, "Although you said the right answer, some mysterious forces is blocking the way in.");
31 |
32 | cm.dispose();
33 | }
34 | else{
35 | cm.sendOk("#rWrong!");
36 | }
37 | }
38 | else if(status == 2){
39 | cm.dispose();
40 | }
41 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/ThiefPassword.js:
--------------------------------------------------------------------------------
1 | var status;
2 |
3 | function start(){
4 | status = -1;
5 | action(1, 0, 0);
6 | }
7 |
8 | function action(mode, type, selection){
9 | if(mode == -1 || (mode == 0 && status == 0)){
10 | cm.dispose();
11 | return;
12 | }
13 | else if(mode == 0)
14 | status--;
15 | else
16 | status++;
17 |
18 |
19 |
20 | if(status == 0){
21 | cm.sendGetText("A suspicious voice pierces through the silence. #bPassword#k!");
22 | }
23 | else if(status == 1){
24 | if(cm.getText() == "Open Sesame"){
25 | if(cm.isQuestCompleted(3925))
26 | cm.warp(260010402);
27 | else
28 | cm.playerMessage(5, "Although you said the right answer, the door will not budge.");
29 |
30 | cm.dispose();
31 | }
32 | else{
33 | cm.sendOk("#rWrong!");
34 | }
35 | }
36 | else if(status == 2){
37 | cm.dispose();
38 | }
39 | }
--------------------------------------------------------------------------------
/scripts/npc/legacy/readme.txt:
--------------------------------------------------------------------------------
1 | All npcs here are odin based npcs
2 | They will be loaded if there is no script for them in the main 'npc' folder.
3 | They aren't guaranteed to work 100% but as long as they only use 'cm' methods it should work
4 | All odin scripts will also support java 7, main scripts must use java 8
--------------------------------------------------------------------------------
/scripts/npc/legacy/unidentifiedNpc.js:
--------------------------------------------------------------------------------
1 | function start() {
2 | cm.sendOk("NPC: " + cm.getNpc() + " is not found, please report this.");
3 | }
--------------------------------------------------------------------------------
/scripts/npc/map_search.js:
--------------------------------------------------------------------------------
1 | var status = -1;
2 | var maps;
3 |
4 | var MapFactory = Java.type("maplestory.map.MapleMapFactory");
5 |
6 | function start(){
7 | action(1, 0, 0);
8 | }
9 |
10 | function action(mode, type, selection){
11 |
12 | if(mode == 1){
13 | status++;
14 | }else{
15 | cm.dispose();
16 | return;
17 | }
18 |
19 | if(status == 0){
20 | cm.sendGetText("Enter a map name: ");
21 | }else if(status == 1){
22 | maps = MapFactory.findMap(cm.getInputText());
23 | if(maps.size() == 0){
24 | cm.sendOk("I found zero maps with that search term!");
25 | status = -1;
26 | return;
27 | }
28 | str = "I found "+maps.size()+" maps for search term '"+cm.getInputText()+"'\r\n#b";
29 |
30 | for(i = 0; i < maps.size();i++){
31 | if(i > 50){
32 | break;
33 | }
34 | id = maps.get(i);
35 |
36 | str += "#L"+i+"#"+MapFactory.getMapName(id)+" ("+id+") #l\r\n";
37 | }
38 |
39 | cm.sendSimple(str);
40 | }else if(status == 2){
41 | cm.warp(maps.get(selection));
42 | cm.dispose();
43 | }
44 |
45 | }
--------------------------------------------------------------------------------
/scripts/npc/simple_talk.js:
--------------------------------------------------------------------------------
1 |
2 | function start(){
3 | cm.sendOk(text);
4 | cm.dispose();
5 | }
--------------------------------------------------------------------------------
/scripts/npc/stat_test.js:
--------------------------------------------------------------------------------
1 | var InventoryType = Java.type("maplestory.inventory.InventoryType");
2 | var InfoProvider = Java.type("maplestory.inventory.item.ItemInfoProvider");
3 |
4 |
5 | function start(){
6 | chr = cm.getCharacter();
7 |
8 | str = "Here are your stats: \r\n\r\n";
9 |
10 | str += "#rStrength: "+chr.getBaseStr() +" => "+chr.getStr()+"\r\n";
11 | str += "#dDexterity: "+chr.getBaseDex() +" => "+chr.getDex()+"\r\n";
12 | str += "#kLuck: "+chr.getBaseLuk() +" => "+chr.getLuk()+"\r\n";
13 | str += "#bIntelligence: "+chr.getBaseInt() +" => "+chr.getInt()+"\r\n\r\n";
14 |
15 | str += "#rMax HP: "+chr.getBaseMaxHp() +" => "+chr.getMaxHp()+"\r\n";
16 | str += "#bMax MP: "+chr.getBaseMaxMp() +" => "+chr.getMaxMp()+"\r\n";
17 |
18 | str += "#rWeapon ATK: "+chr.getWeaponAttack()+"\r\n";
19 | str += "#bMagic ATK: "+chr.getMagicAttack()+"\r\n\r\n";
20 |
21 | str += "#bMana: "+chr.getMp()+" / "+chr.getMaxMp()+"\r\n";
22 |
23 | str += "#b Displayed Damage Range: "+chr.getMinDamage()+" - "+chr.getMaxDamage()+"\r\n\r\n";
24 |
25 |
26 | cm.sendOk(str);
27 |
28 | cm.dispose();
29 | }
--------------------------------------------------------------------------------
/scripts/npc/storage_npc.js:
--------------------------------------------------------------------------------
1 | function start(){
2 | cm.openStorage();
3 | cm.dispose();
4 | }
--------------------------------------------------------------------------------
/scripts/npc/tutoNpc.js:
--------------------------------------------------------------------------------
1 |
2 | var status;
3 |
4 | function start(){
5 | status = -1;
6 | action(1, 0, -1);
7 | }
8 |
9 | function action(mode, type, selection){
10 | if(mode == 1){
11 | status++;
12 | }else{
13 | status--;
14 | }
15 |
16 | if(status == 0){
17 | cm.dispose();
18 | }
19 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorAloneX.js:
--------------------------------------------------------------------------------
1 | var MapleQuest = Java.type("maplestory.quest.MapleQuest");
2 | var MapleQuestInstance = Java.type("maplestory.quest.MapleQuestInstance");
3 |
4 | function enter(){
5 |
6 | chr = pm.getCharacter();
7 |
8 | instance = chr.getQuest(21000);
9 |
10 | if(instance.getStatus().getId() == 0){
11 | instance.setStatus(0);
12 | instance.setProgress(0, 1);
13 | chr.updateQuest(instance);
14 | }
15 |
16 | pm.warp(914000100, 1);
17 | pm.playPortalSound();
18 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorArrow0.js:
--------------------------------------------------------------------------------
1 | function enter() {
2 |
3 | if(pm.isQuestStarted(21000) || pm.isQuestCompleted(21000)){
4 | pm.block();
5 | return;
6 | }
7 |
8 | pm.showEffect("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow3");
9 |
10 | pm.block();
11 | return true;
12 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorArrow1.js:
--------------------------------------------------------------------------------
1 | function enter() {
2 |
3 | pm.showEffect("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow1");
4 |
5 | pm.block();
6 | return true;
7 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorArrow2.js:
--------------------------------------------------------------------------------
1 | function enter() {
2 |
3 | pm.showEffect("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow1");
4 |
5 | pm.block();
6 | return true;
7 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorArrow3.js:
--------------------------------------------------------------------------------
1 | function enter() {
2 |
3 | pm.showEffect("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialArrow1");
4 |
5 | pm.block();
6 | return true;
7 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorGuide0.js:
--------------------------------------------------------------------------------
1 |
2 | function enter(){
3 | pm.showEffect("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialGuide1");
4 | pm.sendMessage("PINK_TEXT", "To use a Regular Attack on monsters, press the Ctrl key.");
5 | pm.block();
6 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorGuide1.js:
--------------------------------------------------------------------------------
1 | function enter(){
2 | pm.showEffect("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialGuide2");
3 | pm.sendMessage("PINK_TEXT", "You can use Consecutive Attacks by pressing the Ctrl key multiple times.");
4 | pm.block();
5 | }
6 |
--------------------------------------------------------------------------------
/scripts/portal/aranTutorGuide2.js:
--------------------------------------------------------------------------------
1 | function enter(){
2 | pm.showEffect("Effect/OnUserEff.img/guideEffect/aranTutorial/tutorialGuide3");
3 | pm.sendMessage("PINK_TEXT", "You can use a Command Attack by pressing both the arrow key and the attack key after a Consecutive Attack.");
4 | pm.block();
5 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorLost.js:
--------------------------------------------------------------------------------
1 | function enter(){
2 | pm.showIntro("Effect/Direction1.img/aranTutorial/ClickChild");
3 | pm.block();
4 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorMono0.js:
--------------------------------------------------------------------------------
1 | function enter() {
2 | pm.block();
3 | pm.showEffect("Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon1");
4 | return true;
5 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorMono1.js:
--------------------------------------------------------------------------------
1 | function enter() {
2 | pm.block();
3 | pm.playSound("Aran/balloon");
4 | pm.showEffect("Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon2");
5 | return true;
6 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorMono2.js:
--------------------------------------------------------------------------------
1 | function enter() {
2 | pm.block();
3 | pm.showEffect("Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon3");
4 | return true;
5 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorMono3.js:
--------------------------------------------------------------------------------
1 |
2 | function enter(){
3 | pm.showEffect("Effect/OnUserEff.img/guideEffect/aranTutorial/legendBalloon6");
4 | pm.block();
5 |
6 | return true;
7 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorOut1.js:
--------------------------------------------------------------------------------
1 | function enter() {
2 | if (pm.isQuestStarted(21000)) {
3 |
4 | pm.teachSkill(20000017, 0, -1);
5 | pm.teachSkill(20000018, 0, -1);
6 | pm.teachSkill(20000017, 1, 0);
7 | pm.teachSkill(20000018, 1, 0);
8 |
9 | pm.warp(914000200, 1);
10 | return true;
11 | } else {
12 | pm.sendMessage("PINK_TEXT", "You can only exit after you accept the quest from Athena Pierce, who is to your right.");
13 | return false;
14 | }
15 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorOut2.js:
--------------------------------------------------------------------------------
1 | function enter() {
2 | pm.teachSkill(20000014, 0, -1);
3 | pm.teachSkill(20000015, 0, -1);
4 | pm.teachSkill(20000014, 1, 0);
5 | pm.teachSkill(20000015, 1, 0);
6 |
7 | pm.warp(914000210, 1);
8 | return true;
9 | }
--------------------------------------------------------------------------------
/scripts/portal/aranTutorOut3.js:
--------------------------------------------------------------------------------
1 | function enter() {
2 | pm.teachSkill(20000016, 0, -1);
3 | pm.teachSkill(20000016, 1, 0);
4 |
5 | pm.warp(914000220, 1);
6 | return true;
7 | }
--------------------------------------------------------------------------------
/scripts/portal/enterAchter.js:
--------------------------------------------------------------------------------
1 |
2 | function enter(){
3 | pm.warp(100000201, "out02");
4 | pm.playPortalSound();
5 | }
--------------------------------------------------------------------------------
/scripts/portal/enterDisguise0.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | function enter() {
4 | if(pm.isQuestStarted(20301) || pm.isQuestStarted(20302) || pm.isQuestStarted(20303) || pm.isQuestStarted(20304) || pm.isQuestStarted(20305)) {
5 | if(pm.hasItem(4032179)) {
6 | pm.playPortalSound();
7 | pm.warp(130010000, "east00");
8 | } else {
9 | pm.getPlayer().sendMessage("PINK_TEXT", "Due to the lock down you can not enter without a permit.");
10 | }
11 | } else {
12 | pm.playPortalSound();
13 | pm.warp(130010000, "east00");
14 | }
15 | }
--------------------------------------------------------------------------------
/scripts/portal/enterMagiclibrar.js:
--------------------------------------------------------------------------------
1 |
2 | function enter(pi) {
3 | pm.playPortalSound();
4 | pm.warp(101000003, 8);
5 | }
6 |
--------------------------------------------------------------------------------
/scripts/portal/fallback.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | function enter(){
4 | pm.sendHint("You entered portal #b"+pm.getPortal().getScriptName()+"#k\r\nIt has no script!", 200, 15);
5 | print("Missing portal script "+pm.getPortal().getScriptName());
6 | }
--------------------------------------------------------------------------------
/scripts/portal/glTutoMsg0.js:
--------------------------------------------------------------------------------
1 |
2 | function enter(){
3 | pm.sendHint("Once you leave this place, you can never return!", 250, 15);
4 | pm.block();
5 | }
--------------------------------------------------------------------------------
/scripts/portal/infoAttack.js:
--------------------------------------------------------------------------------
1 |
2 | function enter(){
3 | pm.showInfo("ATTACKING_2");
4 | pm.block();
5 | }
--------------------------------------------------------------------------------
/scripts/portal/infoMinimap.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | function enter(){
4 | pm.showInfo("MINIMAP_ADVENTURER");
5 | pm.block();
6 | }
--------------------------------------------------------------------------------
/scripts/portal/infoPickup.js:
--------------------------------------------------------------------------------
1 | var items = [1302024, 1002516];
2 |
3 | function enter(){
4 | pm.dropItemPresent(pm.getClient().getCharacter().getPosition(), items);
5 | pm.showInfo("ITEM_PICKUP_2");
6 | pm.block();
7 | }
--------------------------------------------------------------------------------
/scripts/portal/infoReactor.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | function enter(){
4 | pm.showInfo("BREAKABLE_CONTAINERS_ADVENTURER");
5 | pm.block();
6 | }
--------------------------------------------------------------------------------
/scripts/portal/infoSkill.js:
--------------------------------------------------------------------------------
1 | function enter(){
2 | pm.showInfo("SKILL_WINDOW");
3 | pm.block();
4 | }
--------------------------------------------------------------------------------
/scripts/portal/infoWorldmap.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | function enter(){
4 | pm.showInfo("WORLD_MAP_MAPLE_ISLAND");
5 | pm.block();
6 | }
--------------------------------------------------------------------------------
/scripts/portal/market01.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | function enter(){
4 | pm.getCharacter().warpToFreeMarket();
5 | }
--------------------------------------------------------------------------------
/scripts/portal/market19.js:
--------------------------------------------------------------------------------
1 | function enter(){
2 | pm.getCharacter().warpToFreeMarket();
3 | }
--------------------------------------------------------------------------------
/scripts/portal/outChild.js:
--------------------------------------------------------------------------------
1 | function enter(){
2 | if (!pm.isQuestStarted(21001)) {
3 | pi.warp(914000220, 2);
4 | return true;
5 | } else {
6 | pm.warp(914000500, 2);
7 | return true;
8 | }
9 | }
--------------------------------------------------------------------------------
/scripts/portal/rankRoom.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | function enter(){
4 |
5 | pm.playPortalSound();
6 |
7 | map = pm.getCharacter().getMapId();
8 |
9 | if(map == 130000000){
10 | pm.warp(130000100, 5);
11 | }else if(map == 130000200){
12 | pm.warp(130000100, 4);
13 | }else if(map == 140010100){
14 | pm.warp(140010110, 0);
15 | }else if(map == 120000101){
16 | pm.warp(120000105, 0);
17 | }else if(map == 103000003){
18 | pm.warp(103000008, 0);
19 | }else if(map == 100000201){
20 | pm.warp(100000204, 0);
21 | }else{
22 | pm.warp(map + 1, 0);
23 | }
24 |
25 |
26 | }
--------------------------------------------------------------------------------
/scripts/portal/rienTutor1.js:
--------------------------------------------------------------------------------
1 |
2 | function enter(){
3 |
4 | if(pm.isQuestCompleted(21010)){
5 | pm.warp(140090200, 1);
6 | }else if(pm.isQuestStarted(21010)){
7 | if(pm.hasItem(2000022, 1)){
8 | pm.guideTalk("Drink the potion Puka gave you!");
9 | }else{
10 | pm.endQuestScript(21010, 1202001);
11 | }
12 | }else{
13 | pm.startQuestScript(21010, 1202001);
14 | }
15 |
16 | }
--------------------------------------------------------------------------------
/scripts/portal/tutoChatNpc.js:
--------------------------------------------------------------------------------
1 |
2 | function enter(){
3 | pm.openNpc(2007, "scripts/npc/tutoNpc.js");
4 | pm.block();
5 | }
--------------------------------------------------------------------------------
/scripts/portal/tutorHelper.js:
--------------------------------------------------------------------------------
1 |
2 | function enter() {
3 |
4 | pm.spawnGuide();
5 | pm.guideTalk("Welcome to Maple World! I'm Mimo. I'm in charge of guiding you until you reach Lv. 10 and become a Knight-In-Training. Double-click for further information!");
6 |
7 | pm.block();
8 |
9 | }
--------------------------------------------------------------------------------
/scripts/portal/tutorMinimap.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | function enter() {
4 |
5 | pm.sendGuideHint(1, 5000);
6 | pm.block();
7 |
8 | }
--------------------------------------------------------------------------------
/scripts/portal/tutorWorldmap.js:
--------------------------------------------------------------------------------
1 |
2 | function enter() {
3 |
4 | pm.sendGuideHint(11, 5000);
5 | pm.block();
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/scripts/portal/tutorialNPC.js:
--------------------------------------------------------------------------------
1 | function enter(){
2 | pm.block();//I dont know what this script is suppposed to do
3 | }
--------------------------------------------------------------------------------
/scripts/portal/tutorquest.js:
--------------------------------------------------------------------------------
1 |
2 | function enter() {
3 | if(pm.getCharacter().getMapId() == 130030001){
4 | if(pm.isQuestStarted(20010)){
5 | pm.warp(130030002);
6 | }else{
7 | pm.guideTalk("Talk to #bKimu#k before leaving!");
8 | }
9 | }else if(pm.getCharacter().getMapId() == 130030002){
10 | if(pm.isQuestCompleted(20011)){
11 | pm.warp(130030003);
12 | }else{
13 | pm.guideTalk("Talk to #bKizan#k before leaving!");
14 | }
15 | }else if(pm.getCharacter().getMapId() == 130030003){
16 | if(pm.isQuestCompleted(20012)){
17 | pm.warp(130030004);
18 | }else{
19 | pm.guideTalk("Talk to #bKinu#k before leaving!");
20 | }
21 | }else if(pm.getCharacter().getMapId() == 130030004){
22 | if(pm.isQuestCompleted(20013)){
23 | pm.warp(130030005);
24 | }else{
25 | pm.guideTalk("Talk to #bKia#k before leaving!");
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/scripts/quest/fallback.js:
--------------------------------------------------------------------------------
1 |
2 | function start(mode, type, selection){
3 |
4 | qm.sendMessage("PINK_TEXT", qm.getQuest().getId()+" has no script!");
5 | qm.dispose();
6 |
7 | }
8 |
9 | function end(mode, type, selection){
10 | qm.sendMessage("PINK_TEXT", qm.getQuest().getId()+" has no script!");
11 | qm.dispose();
12 | }
--------------------------------------------------------------------------------
/scripts/quest/medal_award.js:
--------------------------------------------------------------------------------
1 | /**
2 |
3 | This script will not function on it's own.
4 |
5 | You must first load it into another script after creating a variable like so:
6 |
7 | var medal_id = [medal item id];
8 |
9 | */
10 |
11 | var status = -1;
12 |
13 | function start(mode, type, selection){
14 | qm.forceStartQuest();
15 | qm.sendMessage("YELLOW_POPUP", "You have earned the < #t"+qm.itemName(medal_id)+"# > title. You can receive a Medal from NPC Dalair.");
16 | qm.dispose();
17 | }
18 |
19 | function end(mode, type, selection){
20 | status++;
21 | if(mode != 1){
22 | qm.dispose();
23 | }else if(status == 0){
24 | qm.sendNext("Congratulations on earning your honorable #b<#t"+medal_id+"#>#k title. I wish you the best of luck in your future endeavors! Keep up the good work.\r\n\r\n#fUI/UIWindow.img/QuestIcon/4/0#\r\n #v"+medal_id+":# #t"+medal_id+"# 1");
25 | }else if(status == 1){
26 | if(qm.canHold(medal_id)){
27 | qm.giveItem(medal_id, 1);
28 | qm.forceCompleteQuest();
29 | }else{
30 | qm.sendOk("Please make room in your EQUIP inventory");
31 | }
32 |
33 | qm.dispose();
34 | }
35 | }
--------------------------------------------------------------------------------
/scripts/reactor/boss.js:
--------------------------------------------------------------------------------
1 |
2 | var zakumReactor = 2111001;
3 |
4 | function destroy() {
5 |
6 | reactor = rm.getReactor();
7 | pos = reactor.getPosition();
8 | pos.y -= 50;
9 |
10 | if(reactor.getId() == zakumReactor){
11 |
12 | rm.changeMusic("Bgm06/FinalFight");
13 | rm.spawnUntargetableMonster(8800000, pos);
14 | for(i = 0; i < 8;i++){
15 | rm.spawnMonster(8800003 + i, pos);
16 | }
17 |
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/scripts/reactor/erebItem0.js:
--------------------------------------------------------------------------------
1 |
2 | function destroy(){
3 |
4 | if(rm.isQuestStarted(20013)){
5 |
6 | items = [];
7 | if(rm.itemAmount(4032267) == 0){
8 | items[0] = [4032267, 1];
9 | }
10 | if(rm.itemAmount(4032268) == 0){
11 | items[1] = [4032268, 1];
12 | }
13 |
14 | rm.dropItems(rm.getReactor(), items);
15 |
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/scripts/reactor/mBoxItem0.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | function destroy() {
4 |
5 | point = null;
6 |
7 | if(rm.getReactor().getId() == 2001){
8 | if(rm.isQuestStarted(1008)){
9 | items = [];
10 | if(rm.itemAmount(4031161) == 0){
11 | items[0] = [4031161, 1];
12 | }
13 | if(rm.itemAmount(4031162) == 0){
14 | items[1] = [4031162, 1];
15 | }
16 | point = rm.dropItems(rm.getReactor(), items);
17 | }
18 | }
19 |
20 | if(point != null){
21 | rm.dropMesos(rm.getReactor(), point, 15);
22 | }else{
23 | rm.dropMesos(rm.getReactor(), 15);
24 | }
25 |
26 |
27 |
28 | }
--------------------------------------------------------------------------------
/scripts/reactor/missing_script.js:
--------------------------------------------------------------------------------
1 |
2 | function destroy(){
3 | var data = rm.getReactor().getReactorData();
4 | print("No reactor script for reactor "+data.getAction()+" "+data.getName());
5 | }
--------------------------------------------------------------------------------
/scripts/reactor/moonItem0.js:
--------------------------------------------------------------------------------
1 | load("scripts/constants/HenesysPQ.js");
2 |
3 | function destroy(){
4 | rm.dropItem(rm.getReactor(), seedGreen, 1);
5 | print(rm.getReactor().getId());
6 | }
--------------------------------------------------------------------------------
/scripts/reactor/moonItem1.js:
--------------------------------------------------------------------------------
1 | load("scripts/constants/HenesysPQ.js");
2 |
3 | function destroy(){
4 | rm.dropItem(rm.getReactor(), seedPurple, 1);
5 | }
--------------------------------------------------------------------------------
/scripts/reactor/moonItem2.js:
--------------------------------------------------------------------------------
1 | load("scripts/constants/HenesysPQ.js");
2 |
3 | function destroy(){
4 | rm.dropItem(rm.getReactor(), seedPink, 1);
5 | }
--------------------------------------------------------------------------------
/scripts/reactor/moonItem3.js:
--------------------------------------------------------------------------------
1 | load("scripts/constants/HenesysPQ.js");
2 |
3 | function destroy(){
4 | rm.dropItem(rm.getReactor(), seedBrown, 1);
5 | }
--------------------------------------------------------------------------------
/scripts/reactor/moonItem4.js:
--------------------------------------------------------------------------------
1 | load("scripts/constants/HenesysPQ.js");
2 |
3 | function destroy(){
4 | rm.dropItem(rm.getReactor(), seedYellow, 1);
5 | }
--------------------------------------------------------------------------------
/scripts/reactor/moonItem5.js:
--------------------------------------------------------------------------------
1 | load("scripts/constants/HenesysPQ.js");
2 |
3 | function destroy(){
4 | rm.dropItem(rm.getReactor(), seedBlue, 1);
5 | }
--------------------------------------------------------------------------------
/scripts/todo_legacy_support.txt:
--------------------------------------------------------------------------------
1 | cm.getCharacter().gotPartyQuestItem <--- Not implemented yet
2 |
3 | retest 51 (mar)
4 | balrog pq 95
5 | balrog pq 97
6 | some stature 105
7 | guild emblem 194
8 | guild id 207
--------------------------------------------------------------------------------
/src/constants/GameConstants.java:
--------------------------------------------------------------------------------
1 | package constants;
2 |
3 | import constants.skills.Aran;
4 |
5 | /**
6 | *
7 | * @author kevintjuh93
8 | */
9 | public class GameConstants {
10 |
11 | public static int getHiddenSkill(final int skill) {
12 | switch (skill) {
13 | case Aran.HIDDEN_FULL_DOUBLE:
14 | case Aran.HIDDEN_FULL_TRIPLE:
15 | return Aran.FULL_SWING;
16 | case Aran.HIDDEN_OVER_DOUBLE:
17 | case Aran.HIDDEN_OVER_TRIPLE:
18 | return Aran.OVER_SWING;
19 | }
20 | return skill;
21 | }
22 |
23 | public static boolean isAran(final int job) {
24 | return job == 2000 || (job >= 2100 && job <= 2112);
25 | }
26 |
27 | /*public static boolean hasSPTable(MapleJob job) {
28 | switch (job) {
29 | case EVAN:
30 | case EVAN1:
31 | case EVAN2:
32 | case EVAN3:
33 | case EVAN4:
34 | case EVAN5:
35 | case EVAN6:
36 | case EVAN7:
37 | case EVAN8:
38 | case EVAN9:
39 | case EVAN10:
40 | return true;
41 | default:
42 | return false;
43 | }
44 | }*/
45 | }
46 |
--------------------------------------------------------------------------------
/src/constants/LoginStatus.java:
--------------------------------------------------------------------------------
1 | package constants;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | @AllArgsConstructor
7 | public enum LoginStatus {
8 |
9 | OFFLINE(0),
10 | LOGGED_IN(1),
11 | IN_GAME(2)
12 | ;
13 |
14 | @Getter
15 | private final int id;
16 |
17 | public static LoginStatus byId(int id){
18 | for(LoginStatus status : values()){
19 | if(status.id == id){
20 | return status;
21 | }
22 | }
23 | return null;
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/src/constants/MessageType.java:
--------------------------------------------------------------------------------
1 | package constants;
2 |
3 | import lombok.Getter;
4 |
5 | public enum MessageType {
6 |
7 | NOTICE(0),
8 | POPUP(1),
9 | MEGAPHONE(2),
10 | SUPER_MEGAPHONE(3),
11 | SCROLLING_TEXT(4),
12 | PINK_TEXT(5),
13 | LIGHT_BLUE_TEXT(6),
14 | YELLOW_TEXT(-1),
15 | YELLOW_POPUP(-2)
16 | ;
17 |
18 | @Getter
19 | private final int id;
20 |
21 | MessageType(int id) {
22 | this.id = id;
23 | }
24 |
25 | public static MessageType byId(int id) {
26 | for(MessageType mt : values()) {
27 | if(mt.id == id) {
28 | return mt;
29 | }
30 | }
31 | return null;
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/constants/PopupInfo.java:
--------------------------------------------------------------------------------
1 | package constants;
2 |
3 | public enum PopupInfo {
4 |
5 | UNKNOWN_KOREAN(0),
6 | MINIMAP(1),
7 | QUESTS(2),
8 | INVENTORY(3),
9 | ATTACKING(4),
10 | ITEM_PICKUP(5),
11 | EQUIPING_ITEMS(6),
12 | SKILL_WINDOW(7),
13 | QUICK_SLOTS(8),
14 | BREAKABLE_CONTAINERS(9),
15 | CHAIR_EREVE(10),
16 | WORLD_MAP_EREVE(11),
17 | QUEST_HELPER(12),
18 | STATS_WINDOW(13),
19 | USING_ITEMS(14),
20 | SKILL_WINDOW_2(15),
21 | EQUIPING_ITEMS_2(16),
22 | QUICK_SLOTS_2(17),
23 | BREAKABLE_CONTAINERS_2(18),
24 | CHAIR_ARAN(19),
25 | ATTACKING_2(20),
26 | ITEM_PICKUP_2(21),
27 | BREAKABLE_CONTAINERS_ADVENTURER(22),
28 | MINIMAP_ADVENTURER(25),
29 | WORLD_MAP_MAPLE_ISLAND(26),
30 | CHAIR_ADVENTURER(27),
31 | USING_ITEMS_ADVENTURER(28),
32 | EQUIPING_ITEMS_ADVENTURER(29),
33 | QUEST_HELPER_ADVENTURER(31),
34 | QUEST_WINDOW_ADVENTURER(32);
35 |
36 |
37 | private final int id;
38 |
39 | PopupInfo(int id) {
40 | this.id = id;
41 | }
42 |
43 | public String getPath(){
44 | return "UI/tutorial.img/"+id;
45 | }
46 |
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/src/constants/SmegaType.java:
--------------------------------------------------------------------------------
1 | package constants;
2 |
3 | import lombok.Getter;
4 |
5 | public enum SmegaType {
6 |
7 | REGULAR(5072000),
8 | HEARTS(5073000),
9 | SKULL(5074000),
10 | DIABLO(5390000),
11 | C9(5390001),
12 | LOVE(5072002),
13 | TRIPLE(5077000),
14 | CUTE_TIGER(5390005),
15 | ANGRY_TIGER(5390006)
16 | ;
17 |
18 | @Getter
19 | private final int itemId;
20 |
21 | SmegaType(int id) {
22 | itemId = id;
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/constants/SpecialEffect.java:
--------------------------------------------------------------------------------
1 | package constants;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | @AllArgsConstructor
7 | public enum SpecialEffect {
8 |
9 | LEVEL_UP(0),
10 | PORTAL_SOUND(7),
11 | JOB_CHANGE(8),
12 | QUEST_COMPLETE(9);
13 |
14 | @Getter
15 | private final int packetId;
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/database/BatchedScript.java:
--------------------------------------------------------------------------------
1 | package database;
2 |
3 | import java.util.HashMap;
4 | import java.util.Map;
5 |
6 | public class BatchedScript {
7 |
8 | private final String script;
9 |
10 | private Map batches;
11 | private int index;
12 |
13 | public BatchedScript(String script) {
14 | this.script = script;
15 | batches = new HashMap<>();
16 | index = 0;
17 | }
18 |
19 | public String getScript() {
20 | return script;
21 | }
22 |
23 | public Map getBatches() {
24 | return batches;
25 | }
26 |
27 | public void addBatch(Object... values) {
28 | batches.put(index++, values);
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/database/ConvertToMapleData.java:
--------------------------------------------------------------------------------
1 | package database;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 |
6 | import database.MonsterDropManager.MonsterDrop;
7 | import me.tyler.mdf.MapleFile;
8 | import me.tyler.mdf.MapleFileFactory;
9 | import me.tyler.mdf.Node;
10 | import me.tyler.mdf.ReadWriteMapleFile;
11 |
12 | public class ConvertToMapleData {
13 |
14 | public static void main(String[] args) throws IOException {
15 | MonsterDropManager manager = new MonsterDropManager();
16 |
17 | File file = new File("MonsterDrops.mdf");
18 |
19 | ReadWriteMapleFile mf = MapleFileFactory.getReadWriteMapleFile(file, false);
20 |
21 | Node global = mf.getRootNode().writeNullNode("global");
22 |
23 | for(int i = 0; i < manager.getGlobalDrops().size();i++){
24 | MonsterDrop drop = manager.getGlobalDrops().get(i);
25 | Node node = global.writeNullNode(String.valueOf(i));
26 | node.writeInt("item", drop.getItemId());
27 | node.writeInt("min", drop.min);
28 | node.writeInt("max", drop.max);
29 | node.writeInt("chance", drop.getChance());
30 |
31 | }
32 |
33 | mf.write(file);
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/src/database/ExecuteResult.java:
--------------------------------------------------------------------------------
1 | package database;
2 |
3 | import java.util.List;
4 |
5 | import lombok.AllArgsConstructor;
6 |
7 | @AllArgsConstructor
8 | public class ExecuteResult {
9 |
10 | private final int numRowsChanged;
11 | private final List generatedKeys;
12 |
13 | public int getNumRowsChanged() {
14 | return numRowsChanged;
15 | }
16 |
17 | public List getGeneratedKeys() {
18 | if(generatedKeys == null){
19 | throw new IllegalStateException("No generated keys available");
20 | }
21 | return generatedKeys;
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/database/LocalDatabase.java:
--------------------------------------------------------------------------------
1 | package database;
2 |
3 | public class LocalDatabase extends Database {
4 |
5 | protected LocalDatabase(String jdbc, String username, String password) {
6 | super(jdbc, username, password);
7 | }
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/src/database/MapleDatabase.java:
--------------------------------------------------------------------------------
1 | package database;
2 |
3 | import java.sql.Connection;
4 | import java.sql.SQLException;
5 |
6 | import lombok.Getter;
7 |
8 | public class MapleDatabase extends Database {
9 |
10 | @Getter
11 | private static MapleDatabase instance;
12 |
13 | protected MapleDatabase(String jdbc, String username, String password) {
14 | super(jdbc, username, password);
15 | }
16 |
17 | public static void createInstance(String jdbc, String username, String pw){
18 | instance = new MapleDatabase(jdbc, username, pw);
19 | }
20 |
21 | public static Connection getConnection() throws SQLException{
22 | return instance.getNewConnection();
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/database/PossibleNullValue.java:
--------------------------------------------------------------------------------
1 | package database;
2 |
3 | public class PossibleNullValue {
4 |
5 | private final Object value;
6 |
7 | private final int sqlType;
8 |
9 | public PossibleNullValue(Object val, int sqlType) {
10 | value = val;
11 | this.sqlType = sqlType;
12 | }
13 |
14 | public Object getValue() {
15 | return value;
16 | }
17 |
18 | public int getSqlType() {
19 | return sqlType;
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/src/log4j.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/maplestory/cashshop/CashShopPackage.java:
--------------------------------------------------------------------------------
1 | package maplestory.cashshop;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import lombok.AllArgsConstructor;
7 | import lombok.Getter;
8 | import maplestory.inventory.item.ItemInfoProvider;
9 |
10 | @AllArgsConstructor
11 | public class CashShopPackage {
12 |
13 | @Getter
14 | private final int packageId;
15 |
16 | private final int[] cashShopEntryIds;
17 |
18 | public List getItems(){
19 |
20 | List items = new ArrayList<>(cashShopEntryIds.length);
21 |
22 | for(int i : cashShopEntryIds){
23 |
24 | items.add(ItemInfoProvider.getCashShopItemData(i));
25 |
26 | }
27 |
28 | return items;
29 |
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/maplestory/guild/GuildNotFoundException.java:
--------------------------------------------------------------------------------
1 | package maplestory.guild;
2 |
3 | public class GuildNotFoundException extends Exception {
4 |
5 | /**
6 | *
7 | */
8 | private static final long serialVersionUID = 4027584652467130105L;
9 |
10 | public GuildNotFoundException(int guildId) {
11 | super("Guild with id "+guildId+" was not found");
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/maplestory/guild/GuildOperationType.java:
--------------------------------------------------------------------------------
1 | package maplestory.guild;
2 |
3 | import lombok.Getter;
4 |
5 | public enum GuildOperationType {
6 |
7 | CHANGE_RANK(0x40),
8 | DENY_INVITATION(0x37),
9 | CAPACITY_CHANGE(0x3A),
10 | DISBAND(0x32),
11 | EMBLEM_CHANGE(0x42),
12 | INVITE(0x05),
13 | UPDATE_MEMBER(0x3C),
14 | UPDATE_ONLINE(0x3D),
15 | UPDATE_NOTICE(0x44),
16 | QUEST_WAITING_NOTICE(0x4C),
17 | MEMBER_LEAVE(0x2C),
18 | MEMBER_EXPEL(0x2F),
19 | ADD_MEMBER(0x27),
20 | UPDATE_RANK_NAMES(0x3E),
21 | SHOW_GUILD_INFO(0x1A),
22 | SHOW_GUILD_RANKS(0x49),
23 | SHOW_PLAYER_RANKS(0x49),
24 | UPDATE_GUILD_POINTS(0x48)
25 | ;
26 |
27 | @Getter
28 | private final byte code;
29 |
30 | private GuildOperationType(int code) {
31 | this.code = (byte) code;
32 | }
33 |
34 | public static GuildOperationType getLeaveCode(boolean expelled){
35 | return expelled ? MEMBER_EXPEL : MEMBER_LEAVE;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/maplestory/guild/MapleGuildEmblem.java:
--------------------------------------------------------------------------------
1 | package maplestory.guild;
2 |
3 | import database.QueryResult;
4 | import lombok.AllArgsConstructor;
5 | import lombok.Data;
6 |
7 | @AllArgsConstructor
8 | @Data
9 | public class MapleGuildEmblem {
10 |
11 | private int background = 0;
12 | private int backgroundColor = 0;
13 | private int logo = 0;
14 | private int logoColor = 0;
15 |
16 | protected MapleGuildEmblem(QueryResult query) {
17 | this.background = query.get("emblem_background");
18 | this.backgroundColor = query.get("emblem_background_color");
19 | this.logo = query.get("emblem_logo");
20 | this.logoColor = query.get("emblem_logo_color");
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/src/maplestory/guild/MapleGuildRank.java:
--------------------------------------------------------------------------------
1 | package maplestory.guild;
2 |
3 | import lombok.AccessLevel;
4 | import lombok.AllArgsConstructor;
5 | import lombok.Getter;
6 | import lombok.Setter;
7 |
8 | @AllArgsConstructor
9 | public class MapleGuildRank {
10 |
11 | @Getter @Setter(value=AccessLevel.PROTECTED)
12 | private String name;
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/maplestory/guild/bbs/BulletinEmote.java:
--------------------------------------------------------------------------------
1 | package maplestory.guild.bbs;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | @Getter
7 | @AllArgsConstructor
8 | public enum BulletinEmote {
9 | SMILE(0, false),
10 | SAD(1, false),
11 | HAPPY(2, false),
12 | ANGRY(100, true),
13 | SLY(101, true),
14 | DOCTOR(102, true),
15 | LOL(103, true),
16 | SURPRISE(104, true),
17 | CRY(105, true),
18 | FURIUOUS(106, true)
19 | ;
20 |
21 | private final int id;
22 |
23 | private final boolean premium;
24 |
25 | public static BulletinEmote getById(int icon) {
26 | for(BulletinEmote emote : values()){
27 | if(emote.id == icon){
28 | return emote;
29 | }
30 | }
31 | return BulletinEmote.HAPPY;
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/maplestory/guild/bbs/BulletinPost.java:
--------------------------------------------------------------------------------
1 | package maplestory.guild.bbs;
2 |
3 | import java.util.List;
4 |
5 | import maplestory.player.MapleCharacter;
6 | import maplestory.player.MapleCharacterSnapshot;
7 |
8 | public interface BulletinPost {
9 |
10 | public MapleCharacterSnapshot getAuthor();
11 |
12 | public int getPostId();
13 |
14 | public long getPostTime();
15 |
16 | public String getContent();
17 |
18 | public String getSubject();
19 |
20 | public BulletinEmote getEmote();
21 |
22 | public List getReplies();
23 |
24 | public void addReply(MapleCharacter author, String message);
25 |
26 | public void removeReply(int replyId);
27 |
28 | public BulletinReply findReply(int replyId);
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/maplestory/guild/bbs/BulletinReply.java:
--------------------------------------------------------------------------------
1 | package maplestory.guild.bbs;
2 |
3 | public interface BulletinReply {
4 |
5 | public int getReplyId();
6 |
7 | public int getAuthor();
8 |
9 | public long getPostTime();
10 |
11 | public String getContent();
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/maplestory/guild/bbs/GuildBulletin.java:
--------------------------------------------------------------------------------
1 | package maplestory.guild.bbs;
2 |
3 | import java.util.Collection;
4 | import java.util.List;
5 |
6 | import maplestory.guild.MapleGuild;
7 | import maplestory.player.MapleCharacter;
8 |
9 | public interface GuildBulletin {
10 |
11 | public MapleGuild getOwner();
12 |
13 | public Collection getPosts();
14 |
15 | public BulletinPost getNotice();
16 |
17 | public BulletinPost getPost(int postId);
18 |
19 | public void deletePost(int postId);
20 |
21 | public void addPost(String title, String text, BulletinEmote emote, MapleCharacter poster);
22 |
23 | public void setNotice(String title, String text, BulletinEmote emote, MapleCharacter character);
24 |
25 | public void editPost(int postId, String title, String text, BulletinEmote emote, MapleCharacter character);
26 |
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/maplestory/inventory/CashInventory.java:
--------------------------------------------------------------------------------
1 | package maplestory.inventory;
2 |
3 | public interface CashInventory extends Inventory {
4 |
5 | public int getVisibleProjectile();
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/src/maplestory/inventory/InventoryGroup.java:
--------------------------------------------------------------------------------
1 | package maplestory.inventory;
2 |
3 | import java.lang.ref.WeakReference;
4 | import java.util.Map;
5 |
6 | import maplestory.player.MapleCharacter;
7 | import maplestory.player.MapleCharacterSnapshot;
8 |
9 | public class InventoryGroup {
10 |
11 | private Map inventories;
12 |
13 | private MapleCharacterSnapshot snapshot;
14 |
15 | public InventoryGroup(MapleCharacter chr) {
16 | this.snapshot = chr.createSnapshot();
17 | }
18 |
19 | public void createInventory(InventoryType type){
20 | if(!snapshot.isOnline()){
21 | throw new IllegalStateException("Cannot create inventory if character is not online.");
22 | }
23 | Inventory inv = null;
24 |
25 | /*if(type == InventoryType.EQUIPPED){
26 | inv = new MapleEquippedInventory(snapshot.getLiveCharacter().get());
27 | }else{
28 | inv = new MapleInventory(snapshot.getLiveCharacter(), 0, type);
29 | }
30 | */
31 |
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/maplestory/inventory/MapleCashInventory.java:
--------------------------------------------------------------------------------
1 | package maplestory.inventory;
2 |
3 | import maplestory.inventory.item.Item;
4 | import maplestory.player.MapleCharacter;
5 |
6 | public class MapleCashInventory extends MapleInventory implements CashInventory{
7 |
8 | public MapleCashInventory(MapleCharacter chr, int maxSize) {
9 | super(chr, maxSize, InventoryType.CASH);
10 | }
11 |
12 | @Override
13 | public int getVisibleProjectile(){
14 | for (int i = 1; i <= getSize(); i++) { // impose order...
15 | Item item = getItem((short) i);
16 | if (item != null) {
17 | if (item.getItemId() / 1000 == 5021) {
18 | return item.getItemId();
19 | }
20 | }
21 | }
22 | return -1;
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/maplestory/inventory/item/CashItem.java:
--------------------------------------------------------------------------------
1 | package maplestory.inventory.item;
2 |
3 |
4 | public interface CashItem extends Item {
5 |
6 | public long getExpirationDate();
7 |
8 | public long getUniqueId();
9 |
10 | public int getCashShopEntryId();
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/src/maplestory/inventory/item/DueyParcel.java:
--------------------------------------------------------------------------------
1 | package maplestory.inventory.item;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 | import lombok.ToString;
6 |
7 | @ToString
8 | @AllArgsConstructor
9 | public class DueyParcel {
10 |
11 | @Getter
12 | private int parcelId;
13 |
14 | @Getter
15 | private String sender;
16 |
17 | @Getter
18 | private int mesos;
19 |
20 | @Getter
21 | private Item gift;
22 |
23 | @Getter
24 | private long expirationTime;
25 |
26 | @Getter
27 | private String message;
28 |
29 | public boolean hasMessage(){
30 | return message != null;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/src/maplestory/inventory/item/ItemFlag.java:
--------------------------------------------------------------------------------
1 | package maplestory.inventory.item;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | @AllArgsConstructor
7 | public enum ItemFlag {
8 |
9 | LOCK(0x01),
10 | /**
11 | * If an item has this flag then they won't slip on ice
12 | */
13 | SPIKES(0x02),
14 | COLD(0x04),
15 | UNTRADEABLE(0x08),
16 | KARMA(0x10),
17 | UNKN(0x40),
18 | PET_COME(0x80),
19 | ACCOUNT_SHARING(0x100)
20 | ;
21 |
22 | @Getter
23 | private final int bit;
24 |
25 |
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/src/maplestory/inventory/item/ItemMeta.java:
--------------------------------------------------------------------------------
1 | package maplestory.inventory.item;
2 |
3 | import lombok.Getter;
4 | import lombok.Setter;
5 |
6 | public class ItemMeta {
7 |
8 | @Getter @Setter
9 | private String giftFrom = "";
10 |
11 | @Override
12 | public ItemMeta clone() {
13 | ItemMeta other = new ItemMeta();
14 | other.giftFrom = giftFrom;
15 |
16 | return other;
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/src/maplestory/inventory/item/MapleBoxItem.java:
--------------------------------------------------------------------------------
1 | package maplestory.inventory.item;
2 |
3 | import java.util.List;
4 |
5 | public class MapleBoxItem extends MapleItem implements BoxItem {
6 |
7 | public MapleBoxItem(int itemId, int amount) {
8 | super(itemId, amount);
9 | }
10 |
11 | public MapleBoxItem(int itemId, int amount, String owner) {
12 | super(itemId, amount, owner);
13 | }
14 |
15 | @Override
16 | public List getRewards() {
17 | return ItemInfoProvider.getItemRewards(getItemId());
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/src/maplestory/inventory/item/ScrollItem.java:
--------------------------------------------------------------------------------
1 | package maplestory.inventory.item;
2 |
3 |
4 | public interface ScrollItem extends Item {
5 |
6 | public int getDestroyRate();
7 |
8 | public int getSuccessRate();
9 |
10 | public ItemStatInfo getStatBonuses();
11 |
12 | public boolean isCursed();
13 |
14 | public ScrollResult useScroll(EquipItem item);
15 |
16 | public boolean isUseableOn(int itemId);
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/maplestory/inventory/item/ScrollResult.java:
--------------------------------------------------------------------------------
1 | package maplestory.inventory.item;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 |
6 | @AllArgsConstructor
7 | @Data
8 | public class ScrollResult {
9 |
10 | private final boolean success;
11 | private final boolean destroyed;
12 | private final EquipItem result;
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/maplestory/inventory/item/ScrollStatInfo.java:
--------------------------------------------------------------------------------
1 | package maplestory.inventory.item;
2 |
3 | import java.util.List;
4 |
5 | import lombok.Getter;
6 | import lombok.Setter;
7 |
8 | public class ScrollStatInfo extends ItemStatInfo {
9 |
10 | @Getter @Setter
11 | private int destroyRate, successRate;
12 |
13 | @Getter @Setter
14 | private List itemsUseableOn;
15 |
16 | public ScrollStatInfo(ItemStatInfo info, int dr, int sr) {
17 | super(info);
18 | destroyRate = dr;
19 | successRate = sr;
20 | }
21 |
22 | public boolean isItemUseableOn(int itemId){
23 | if(itemsUseableOn == null){
24 | return true;
25 | }
26 | return itemsUseableOn.contains(itemId);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/maplestory/inventory/item/SkillBook.java:
--------------------------------------------------------------------------------
1 | package maplestory.inventory.item;
2 |
3 | import maplestory.player.MapleJob;
4 |
5 | public interface SkillBook extends Item {
6 |
7 | public int getMasterLevel();
8 |
9 | public int getRequiredSkillLevel();
10 |
11 | public int getSkill(MapleJob job);
12 |
13 | public int getSuccessRate();
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/maplestory/inventory/item/SummoningBag.java:
--------------------------------------------------------------------------------
1 | package maplestory.inventory.item;
2 |
3 | import java.awt.Point;
4 | import java.util.List;
5 |
6 | import lombok.AllArgsConstructor;
7 | import lombok.Data;
8 | import maplestory.map.MapleMap;
9 |
10 | public interface SummoningBag extends Item {
11 |
12 | @AllArgsConstructor
13 | @Data
14 | public static class SummoningEntry {
15 |
16 | private final int monsterId;
17 | private final int spawnChance;
18 |
19 | }
20 |
21 | public List getSummons();
22 |
23 | public void useBag(MapleMap map, Point location);
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/maplestory/life/movement/ChangeEquipMovement.java:
--------------------------------------------------------------------------------
1 | package maplestory.life.movement;
2 |
3 | import tools.data.output.MaplePacketWriter;
4 | import io.netty.buffer.ByteBuf;
5 | import lombok.ToString;
6 | import maplestory.map.AbstractAnimatedMapleMapObject;
7 |
8 | @ToString
9 | public class ChangeEquipMovement implements LifeMovement {
10 |
11 | private byte equipSlot;
12 |
13 | public ChangeEquipMovement(ByteBuf buf) {
14 | equipSlot = buf.readByte();
15 | }
16 |
17 | @Override
18 | public void encode(MaplePacketWriter buf) {
19 | buf.write(10);
20 | buf.write(equipSlot);
21 | }
22 |
23 | @Override
24 | public void translateLife(AbstractAnimatedMapleMapObject life) {
25 |
26 | }
27 |
28 | @Override
29 | public MoveType getType() {
30 | return MoveType.CHANGE_EQUIP;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/src/maplestory/life/movement/EmptyLifeMovement.java:
--------------------------------------------------------------------------------
1 | package maplestory.life.movement;
2 |
3 | import tools.data.output.MaplePacketWriter;
4 | import maplestory.map.AbstractAnimatedMapleMapObject;
5 |
6 | public class EmptyLifeMovement implements LifeMovement {
7 |
8 | private static final EmptyLifeMovement INSTANCE = new EmptyLifeMovement();
9 |
10 | private EmptyLifeMovement() {
11 |
12 | }
13 |
14 | @Override
15 | public void encode(MaplePacketWriter buf) {
16 |
17 | }
18 |
19 | @Override
20 | public void translateLife(AbstractAnimatedMapleMapObject life) {
21 |
22 | }
23 |
24 | public static EmptyLifeMovement create() {
25 | return INSTANCE;
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | return "EMPTY_MOVE";
31 | }
32 |
33 | @Override
34 | public MoveType getType() {
35 | return MoveType.UNKNOWN;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/maplestory/life/movement/LifeMovement.java:
--------------------------------------------------------------------------------
1 | package maplestory.life.movement;
2 |
3 | import tools.data.output.MaplePacketWriter;
4 | import lombok.ToString;
5 | import maplestory.map.AbstractAnimatedMapleMapObject;
6 |
7 | public interface LifeMovement {
8 |
9 | public void encode(MaplePacketWriter buf);
10 |
11 | public void translateLife(AbstractAnimatedMapleMapObject life);
12 |
13 | public MoveType getType();
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/maplestory/life/movement/MoveType.java:
--------------------------------------------------------------------------------
1 | package maplestory.life.movement;
2 |
3 | import java.util.HashMap;
4 | import java.util.Map;
5 |
6 | import lombok.Getter;
7 |
8 | public enum MoveType {
9 |
10 | ABSOLUTE(14, 0, 5, 17),
11 | RELATIVE(8, 1, 2, 6, 12, 13, 16),
12 | TELEPORT(10, 3, 4, 7, 8, 9, 14),
13 | CHANGE_EQUIP(2, 10),
14 | CHAIR(10, 11),
15 | JUMP_DOWN(15, 15),
16 | ARAN(9, 21),
17 | UNKNOWN(0, -1)
18 | ;
19 |
20 | private static final Map mapping = new HashMap<>();
21 |
22 | private final int[] ids;
23 |
24 | @Getter
25 | private final int encodedSize;
26 |
27 | private MoveType(int encodedSize, int... ids) {
28 | this.encodedSize = encodedSize;
29 | this.ids = ids;
30 | }
31 |
32 | private static void initializeMap(){
33 | for(MoveType mt : values()){
34 | for(int id : mt.ids){
35 | mapping.put(id, mt);
36 | }
37 | }
38 | }
39 |
40 | public static MoveType getMoveType(int id){
41 | if(mapping.size() == 0){
42 | initializeMap();
43 | }
44 | return mapping.getOrDefault(id, UNKNOWN);
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/src/maplestory/life/movement/RelativeLifeMovement.java:
--------------------------------------------------------------------------------
1 | package maplestory.life.movement;
2 |
3 | import tools.data.output.MaplePacketWriter;
4 | import io.netty.buffer.ByteBuf;
5 | import lombok.ToString;
6 | import maplestory.map.AbstractAnimatedMapleMapObject;
7 |
8 | @ToString
9 | public class RelativeLifeMovement implements LifeMovement {
10 |
11 | private byte type;
12 | private int x, y;
13 | private byte state;
14 | private short duration;
15 |
16 | public RelativeLifeMovement(byte type, ByteBuf buf) {
17 | this.type = type;
18 | x = buf.readShort();
19 | y = buf.readShort();
20 | state = buf.readByte();
21 | duration = buf.readShort();
22 | }
23 |
24 | @Override
25 | public void encode(MaplePacketWriter buf) {
26 | buf.write(type);
27 | buf.writeShort(x);
28 | buf.writeShort(y);
29 | buf.write(state);
30 | buf.writeShort(duration);
31 | }
32 |
33 | @Override
34 | public void translateLife(AbstractAnimatedMapleMapObject life) {
35 | life.getPosition().translate(x, y);
36 | life.setStance(state);
37 | }
38 |
39 | @Override
40 | public MoveType getType() {
41 | return MoveType.RELATIVE;
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/src/maplestory/map/MapleClock.java:
--------------------------------------------------------------------------------
1 | package maplestory.map;
2 |
3 | import java.util.concurrent.TimeUnit;
4 |
5 | import tools.TimerManager.MapleTask;
6 |
7 | public class MapleClock {
8 |
9 | private long startTime;
10 | private int seconds;
11 | private MapleTask finishTask;
12 |
13 | public MapleClock(int seconds, MapleTask finishTask) {
14 | startTime = System.currentTimeMillis();
15 | this.seconds = seconds;
16 | this.finishTask = finishTask;
17 | }
18 |
19 | public void destroy(){
20 | finishTask.cancel(false);
21 | }
22 |
23 | public long getStartTime() {
24 | return startTime;
25 | }
26 |
27 | public long getEndTime() {
28 | return startTime + seconds * 1000;
29 | }
30 |
31 | public int getSecondsLeft(){
32 | return (int) (seconds - (TimeUnit.SECONDS.convert(System.currentTimeMillis() - startTime, TimeUnit.MILLISECONDS)));
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/maplestory/party/PartyOperationType.java:
--------------------------------------------------------------------------------
1 | package maplestory.party;
2 |
3 | import lombok.Getter;
4 |
5 | public enum PartyOperationType {
6 |
7 | ERROR(1, true),
8 | SILENT_UPDATE(7),
9 | CREATE(8),
10 | INVITE(4),
11 | CANT_CREATE_BEGINNER(10, true),
12 | ERROR_2(11, true),
13 | LEAVE(12, false, true),
14 | DISBAND(12, false, true),
15 | EXPEL(12, false, true),
16 | CHECK_THE_SOURCE(13, true),
17 | ERROR_3(14, true),
18 | JOIN(15),
19 | ALREADY_IN_PARTY(16, true),
20 | FULL(17, true),
21 | NOT_FOUND_IN_CHANNEL(19, true),
22 | DENY_INVITE(23, true),
23 | CHANGE_LEADER(27)
24 | ;
25 |
26 | @Getter
27 | private final byte code;
28 |
29 | @Getter
30 | private final boolean message;
31 |
32 | @Getter
33 | private final boolean isDestroyOperation;
34 |
35 | private PartyOperationType(int code) {
36 | this(code, false);
37 | }
38 |
39 | private PartyOperationType(int code, boolean msg) {
40 | this(code, msg, false);
41 | }
42 |
43 | private PartyOperationType(int code, boolean msg, boolean isDestroy) {
44 | this.code = (byte) code;
45 | message = msg;
46 | isDestroyOperation = isDestroy;
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/src/maplestory/player/monsterbook/MonsterCard.java:
--------------------------------------------------------------------------------
1 | package maplestory.player.monsterbook;
2 |
3 | import lombok.Getter;
4 |
5 | public class MonsterCard {
6 |
7 | @Getter
8 | private final int monsterId, level;
9 |
10 | protected MonsterCard(int monsterId, int level){
11 | this.monsterId = monsterId;
12 | this.level = level;
13 | }
14 |
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/src/maplestory/player/ui/InvitationJoinable.java:
--------------------------------------------------------------------------------
1 | package maplestory.player.ui;
2 |
3 | import maplestory.player.MapleCharacter;
4 |
5 | public interface InvitationJoinable {
6 |
7 | public void invitePlayer(MapleCharacter chr);
8 |
9 | public boolean isInvited(MapleCharacter chr);
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/src/maplestory/player/ui/MatchCardInterface.java:
--------------------------------------------------------------------------------
1 | package maplestory.player.ui;
2 |
3 | import maplestory.player.MapleCharacter;
4 |
5 | public interface MatchCardInterface extends MiniGameInterface {
6 |
7 | public void selectCard(int turn, int slot, MapleCharacter chr);
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/src/maplestory/player/ui/MiniGameInterface.java:
--------------------------------------------------------------------------------
1 | package maplestory.player.ui;
2 |
3 | import maplestory.player.MapleCharacter;
4 |
5 | public interface MiniGameInterface extends UserInterface {
6 |
7 | public void ready(MapleCharacter chr);
8 |
9 | public void unready(MapleCharacter chr);
10 |
11 | public void startGame(MapleCharacter chr);
12 |
13 | public void giveUp(MapleCharacter chr);
14 |
15 | public void requestTie(MapleCharacter chr);
16 |
17 | public void answerTie(MapleCharacter chr);
18 |
19 | public void skipTurn(MapleCharacter chr);
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/maplestory/player/ui/OmokInterface.java:
--------------------------------------------------------------------------------
1 | package maplestory.player.ui;
2 |
3 | import maplestory.player.MapleCharacter;
4 |
5 | public interface OmokInterface extends MiniGameInterface {
6 |
7 | public void moveOmok(int x, int y, int type, MapleCharacter chr);
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/src/maplestory/player/ui/TradeInterface.java:
--------------------------------------------------------------------------------
1 | package maplestory.player.ui;
2 |
3 | import maplestory.player.MapleCharacter;
4 |
5 | import maplestory.inventory.item.Item;
6 |
7 | public interface TradeInterface extends UserInterface {
8 |
9 | public void putItem(Item item, int slot, MapleCharacter chr);
10 |
11 | public void confirmTrade(MapleCharacter chr);
12 |
13 | public void offerMesos(int amount, MapleCharacter chr);
14 |
15 | public int countTradedItem(int itemId, MapleCharacter chr);
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/maplestory/player/ui/UserInterface.java:
--------------------------------------------------------------------------------
1 | package maplestory.player.ui;
2 |
3 | import java.util.Collection;
4 |
5 | import maplestory.player.MapleCharacter;
6 |
7 | public interface UserInterface {
8 |
9 | public void addPlayer(MapleCharacter chr);
10 |
11 | public void chat(String msg, MapleCharacter source);
12 |
13 | public void chat(String msg);
14 |
15 | public void removePlayer(MapleCharacter chr);
16 |
17 | public Collection getPlayers();
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/src/maplestory/quest/MapleQuestActionType.java:
--------------------------------------------------------------------------------
1 | package maplestory.quest;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | @AllArgsConstructor
7 | public enum MapleQuestActionType {
8 |
9 | EXP("exp"),
10 | ITEM("item"),
11 | NEXTQUEST("nextQuest"),
12 | MESO("money"),
13 | QUEST("quest"),
14 | SKILL("skill"),
15 | FAME("pop"),
16 | BUFF("buffItemID"),
17 | PETSKILL("petskill"),
18 | YES("yes"),
19 | NO("no"),
20 | NPC("npc"),
21 | MIN_LEVEL("lvmin");
22 |
23 | @Getter
24 | private final String wzName;
25 |
26 | public static MapleQuestActionType getByWZName(String name){
27 | for(MapleQuestActionType type : values()){
28 | if(type.wzName.equals(name)){
29 | return type;
30 | }
31 | }
32 | return null;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/maplestory/quest/MapleQuestRequirementType.java:
--------------------------------------------------------------------------------
1 | package maplestory.quest;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | @AllArgsConstructor
7 | public enum MapleQuestRequirementType {
8 |
9 | JOB("job"),
10 | ITEM("item"),
11 | QUEST("quest"),
12 | MIN_LEVEL("lvmin"),
13 | MAX_LEVEL("lvmax"),
14 | END_DATE("end"),
15 | MOB("mob"),
16 | NPC("npc"),
17 | FIELD_ENTER("fieldEnter"),
18 | INTERVAL("interval"),
19 | START_SCRIPT("startscript"),
20 | END_SCRIPT("endscript"),
21 | PET("pet"),
22 | MIN_PET_TAMENESS("pettamenessmin"),
23 | MONSTER_BOOK("mbmin"),
24 | NORMAL_AUTO_START("normalAutoStart"),
25 | INFO_NUMBER("infoNumber"),
26 | INFO_EX("infoex"),
27 | COMPLETED_QUEST("questComplete"),
28 | START("start"),
29 | END("end"),
30 | DAY_BY_DAY("daybyday");
31 |
32 | @Getter
33 | private final String wzName;
34 |
35 | public static MapleQuestRequirementType getByWzName(String name){
36 | for(MapleQuestRequirementType type : values()){
37 | if(type.wzName.equals(name)){
38 | return type;
39 | }
40 | }
41 | return null;
42 | }
43 |
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/src/maplestory/script/EventScriptManager.java:
--------------------------------------------------------------------------------
1 | package maplestory.script;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import maplestory.channel.MapleChannel;
7 | import maplestory.channel.MapleEvent;
8 | import tools.TimerManager;
9 | import tools.TimerManager.MapleTask;
10 |
11 | public class EventScriptManager {
12 |
13 | private MapleChannel channel;
14 |
15 | private List tasks;
16 |
17 | private MapleEvent event;
18 |
19 | public EventScriptManager(MapleChannel channel, MapleEvent mapleEvent) {
20 | this.channel = channel;
21 | event = mapleEvent;
22 | tasks = new ArrayList<>();
23 | }
24 |
25 | public void setProperty(String key, Object val) {
26 | event.setProperty(key, val);
27 | }
28 |
29 | public MapleChannel getChannel() {
30 | return channel;
31 | }
32 |
33 | public void cancelAllTasks() {
34 | tasks.forEach(task -> task.cancel(true));
35 | tasks.clear();
36 | }
37 |
38 | public MapleTask scheduleTask(Runnable task, int delay) {
39 | MapleTask t = TimerManager.schedule(task, delay);
40 | tasks.add(t);
41 |
42 | return t;
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/src/maplestory/script/MapScriptManager.java:
--------------------------------------------------------------------------------
1 | package maplestory.script;
2 |
3 | import maplestory.map.MapleMap;
4 | import maplestory.player.MapleCharacter;
5 | import maplestory.server.MapleServer;
6 | import maplestory.server.MapleStory;
7 | import maplestory.server.net.PacketFactory;
8 |
9 | public class MapScriptManager extends AbstractScriptManager {
10 |
11 | private int map;
12 | private int channel;
13 | private int world;
14 |
15 | public MapScriptManager(MapleMap map, MapleCharacter chr) {
16 | super(chr);
17 | this.map = map.getMapId();
18 | }
19 |
20 | public MapleMap getMap(){
21 | return MapleServer.getChannel(world, channel).getMap(map);
22 | }
23 |
24 | public void grantGodlyStats(){
25 | getClient().sendPacket(PacketFactory.aranGodlyStats());
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/maplestory/script/PortalScriptManager.java:
--------------------------------------------------------------------------------
1 | package maplestory.script;
2 |
3 | import lombok.Getter;
4 | import lombok.Setter;
5 | import maplestory.map.MaplePortal;
6 | import maplestory.player.MapleCharacter;
7 | import maplestory.server.net.PacketFactory;
8 |
9 | public class PortalScriptManager extends AbstractScriptManager {
10 |
11 | @Getter
12 | private MaplePortal portal;
13 |
14 | @Setter @Getter
15 | private int cooldown;
16 |
17 | public PortalScriptManager(MapleCharacter chr, MaplePortal portal) {
18 | super(chr);
19 | this.portal = portal;
20 | cooldown = 1000;
21 | }
22 |
23 | public void block(){
24 | portal.blockUsage(getClient().getCharacter());
25 | }
26 |
27 | public void unblock(){
28 | portal.unblockUsage(getClient().getCharacter());
29 | }
30 |
31 | public void playPortalSound(){
32 | getClient().sendPacket(PacketFactory.playPortalSound());
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/maplestory/script/QuestScriptManager.java:
--------------------------------------------------------------------------------
1 | package maplestory.script;
2 |
3 | import maplestory.life.MapleLifeFactory;
4 | import maplestory.player.MapleCharacter;
5 | import maplestory.quest.MapleQuest;
6 |
7 | public class QuestScriptManager extends NpcConversationManager {
8 |
9 | private int quest;
10 |
11 | public QuestScriptManager(MapleCharacter chr, int quest, int npc) {
12 | super(chr, MapleLifeFactory.getNPC(npc));
13 | this.quest = quest;
14 | }
15 |
16 | public MapleQuest getQuest(){
17 | return MapleQuest.getQuest(quest);
18 | }
19 |
20 | public void forceStartQuest(){
21 | getQuest().start(getClient().getCharacter(), getNpc().getId());
22 | }
23 |
24 | public void forceCompleteQuest(){
25 | getQuest().complete(getClient().getCharacter(), getNpc().getId());
26 | }
27 |
28 | public void forceCompleteQuest(int questId){
29 | MapleQuest.getQuest(questId).complete(getClient().getCharacter(), getNpc().getId());
30 | }
31 |
32 | @Override
33 | public String toString() {
34 | return "QuestScriptManager {"+quest+"}";
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/maplestory/script/ReactorScriptManager.java:
--------------------------------------------------------------------------------
1 | package maplestory.script;
2 |
3 | import lombok.Getter;
4 | import maplestory.map.MapleMap;
5 | import maplestory.map.MapleReactor;
6 | import maplestory.player.MapleCharacter;
7 |
8 | public class ReactorScriptManager extends AbstractScriptManager {
9 |
10 | @Getter
11 | private MapleReactor reactor;
12 |
13 | public ReactorScriptManager(MapleCharacter chr, MapleReactor reactor) {
14 | super(chr);
15 | this.reactor = reactor;
16 | }
17 |
18 |
19 | @Override
20 | public MapleMap getMap() {
21 | return reactor.getMap();
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/maplestory/script/legacy/OdinQuestScriptManager.java:
--------------------------------------------------------------------------------
1 | package maplestory.script.legacy;
2 |
3 | import maplestory.player.MapleCharacter;
4 | import maplestory.script.QuestScriptManager;
5 |
6 | public class OdinQuestScriptManager extends QuestScriptManager {
7 |
8 | public OdinQuestScriptManager(MapleCharacter chr, int quest, int npc) {
9 | super(chr, quest, npc);
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/MaplePacket.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import io.netty.buffer.Unpooled;
5 |
6 | import java.nio.ByteOrder;
7 | import maplestory.util.Hex;
8 |
9 | public class MaplePacket {
10 |
11 | private byte[] payload;
12 | private short type;
13 |
14 | public MaplePacket(short type, byte[] payload) {
15 | this.payload = payload;
16 | this.type = type;
17 | }
18 |
19 | @Override
20 | public String toString() {
21 | return getType() + " [ " + Hex.toHex(payload)+ " ]";
22 | }
23 |
24 | public short getType() {
25 | return type;
26 | }
27 |
28 | public ByteBuf getBuffer(){
29 | return Unpooled.wrappedBuffer(payload).order(ByteOrder.LITTLE_ENDIAN);
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/MaplePacketHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net;
2 |
3 | import java.awt.Point;
4 |
5 | import io.netty.buffer.ByteBuf;
6 | import maplestory.client.MapleClient;
7 |
8 | public abstract class MaplePacketHandler {
9 |
10 | public abstract void handle(ByteBuf buf, MapleClient client) throws Exception;
11 |
12 | protected static String readMapleAsciiString(ByteBuf buf){
13 | int length = buf.readUnsignedShort();
14 |
15 | byte[] buffer = new byte[length];
16 |
17 | buf.readBytes(buffer);
18 |
19 | return new String(buffer);
20 | }
21 |
22 | protected static Point readPosition(ByteBuf buf){
23 | int x = buf.readShort();
24 | int y = buf.readShort();
25 |
26 | return new Point(x, y);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/NoOpHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.server.net.MaplePacketHandler;
6 |
7 | public class NoOpHandler extends MaplePacketHandler {
8 |
9 | @Override
10 | public void handle(ByteBuf buf, MapleClient client) {
11 |
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/PongHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.server.net.MaplePacketHandler;
6 |
7 | public class PongHandler extends MaplePacketHandler {
8 |
9 | @Override
10 | public void handle(ByteBuf buf, MapleClient client) {
11 |
12 | client.receivePong();
13 |
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/AranComboHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import constants.GameConstants;
4 | import constants.skills.Aran;
5 | import io.netty.buffer.ByteBuf;
6 | import maplestory.client.MapleClient;
7 | import maplestory.player.MapleCharacter;
8 | import maplestory.server.net.MaplePacketHandler;
9 |
10 | public class AranComboHandler extends MaplePacketHandler {
11 |
12 | private long lastCombo;
13 |
14 | public AranComboHandler() {
15 | lastCombo = -1;
16 | }
17 |
18 | @Override
19 | public void handle(ByteBuf buf, MapleClient client) throws Exception {
20 |
21 | MapleCharacter chr = client.getCharacter();
22 |
23 | int level = chr.getSkillLevel(Aran.COMBO_ABILITY);
24 |
25 | if(GameConstants.isAran(chr.getJob().getId())){
26 |
27 | long currentTime = System.currentTimeMillis();
28 | int combo = chr.getCombo();
29 |
30 | if(currentTime - lastCombo > 3000 && combo > 0){
31 | combo = 0;
32 | }
33 |
34 | combo++;
35 |
36 | chr.setCombo(combo);
37 | lastCombo = currentTime;
38 | }
39 |
40 |
41 |
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/AutoAggroHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.life.MapleMonster;
6 | import maplestory.server.net.MaplePacketHandler;
7 |
8 | public class AutoAggroHandler extends MaplePacketHandler {
9 |
10 | @Override
11 | public void handle(ByteBuf buf, MapleClient client) {
12 | int oid = buf.readInt();
13 |
14 | MapleMonster monster = null;
15 |
16 | if(client.getCharacter().getMap().getObject(oid) instanceof MapleMonster){
17 | monster = (MapleMonster) client.getCharacter().getMap().getObject(oid);
18 |
19 | if(monster.getController() != null){
20 | if(!monster.hasAggro()){
21 | monster.setAggro(true);
22 | monster.getController().uncontrolMonster(monster);
23 | client.getCharacter().controlMonster(monster);
24 | }
25 | }
26 | }
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/AutoAssignAPHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import constants.MapleStat;
4 | import io.netty.buffer.ByteBuf;
5 | import maplestory.client.MapleClient;
6 | import maplestory.player.MapleCharacter;
7 | import maplestory.server.net.MaplePacketHandler;
8 |
9 | public class AutoAssignAPHandler extends MaplePacketHandler {
10 |
11 | @Override
12 | public void handle(ByteBuf buf, MapleClient client) {
13 | MapleCharacter chr = client.getCharacter();
14 |
15 | buf.skipBytes(8);
16 |
17 | if(chr.getRemainingAp() <= 0){
18 | return;
19 | }
20 |
21 | int total = 0;
22 | int extras = 0;
23 | for(int i = 0; i < 2;i++){
24 | int type = buf.readInt();
25 | int amount = buf.readInt();
26 | if(amount < 0 || amount > chr.getRemainingAp()){
27 | return;
28 | }
29 | total += amount;
30 | extras += chr.addStat(MapleStat.getByValue(type), amount);
31 | }
32 |
33 | int remainingAp = chr.getRemainingAp() - total + extras;
34 |
35 | chr.setRemainingAp(remainingAp);
36 | client.sendReallowActions();
37 |
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/CancelItemEffectHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.inventory.item.ItemInfoProvider;
6 | import maplestory.server.net.MaplePacketHandler;
7 |
8 | public class CancelItemEffectHandler extends MaplePacketHandler {
9 |
10 | @Override
11 | public void handle(ByteBuf buf, MapleClient client) {
12 | int itemId = -buf.readInt();
13 |
14 | if(ItemInfoProvider.noCancelMouse(itemId)){
15 | return;
16 | }
17 |
18 | client.getCharacter().cancelEffect(ItemInfoProvider.getItemEffect(itemId), false, -1);
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/ChangeChannelHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.server.net.MaplePacketHandler;
6 |
7 | public class ChangeChannelHandler extends MaplePacketHandler {
8 |
9 | @Override
10 | public void handle(ByteBuf buf, MapleClient client) {
11 | int channel = buf.readByte();
12 |
13 | client.getCharacter().getMap().removePlayer(client.getCharacter());
14 |
15 | client.changeChannel(channel);
16 |
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/ChangeMonsterBookCoverHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import constants.MessageType;
4 | import io.netty.buffer.ByteBuf;
5 | import maplestory.client.MapleClient;
6 | import maplestory.player.MapleCharacter;
7 | import maplestory.server.net.MaplePacketHandler;
8 | import maplestory.server.net.PacketFactory;
9 |
10 | public class ChangeMonsterBookCoverHandler extends MaplePacketHandler {
11 |
12 | @Override
13 | public void handle(ByteBuf buf, MapleClient client) throws Exception {
14 | int id = buf.readInt();
15 |
16 | MapleCharacter chr = client.getCharacter();
17 |
18 | if(chr.getMonsterBook().changeCover(id % 10000)){
19 | client.sendPacket(PacketFactory.monsterBookCover(id));
20 | }else{
21 | chr.sendMessage(MessageType.POPUP, "Failed to change monster book cover to "+id+"\r\nPlease report this incident.");
22 | }
23 |
24 |
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/CharInfoRequestHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.player.MapleCharacter;
6 | import maplestory.server.net.MaplePacketHandler;
7 | import maplestory.server.net.PacketFactory;
8 |
9 | public class CharInfoRequestHandler extends MaplePacketHandler {
10 |
11 | @Override
12 | public void handle(ByteBuf buf, MapleClient client) {
13 | buf.skipBytes(4);
14 |
15 | int cid = buf.readInt();
16 |
17 | MapleCharacter target = null;
18 |
19 | for(MapleCharacter chr : client.getCharacter().getMap().getPlayers()){
20 | if(chr.getId() == cid){
21 | target = chr;
22 | break;
23 | }
24 | }
25 |
26 | if(target != null){
27 | client.sendPacket(PacketFactory.openCharInfo(target));
28 | }
29 |
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/ClickGuideHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.life.MapleLifeFactory;
6 | import maplestory.player.MapleJob;
7 | import maplestory.script.MapleScript;
8 | import maplestory.server.net.MaplePacketHandler;
9 |
10 | public class ClickGuideHandler extends MaplePacketHandler {
11 |
12 | @Override
13 | public void handle(ByteBuf buf, MapleClient client) {
14 | MapleScript guide = new MapleScript("scripts/npc/guide.js", "scripts/npc/fallback.js");
15 |
16 | int npcId = client.getCharacter().getJob() == MapleJob.NOBLESSE ? 1101008 : 1202000;
17 |
18 | client.getCharacter().openNpc(guide, MapleLifeFactory.getNPC(npcId));
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/CloseChalkboardHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.server.net.MaplePacketHandler;
6 |
7 | public class CloseChalkboardHandler extends MaplePacketHandler {
8 |
9 | @Override
10 | public void handle(ByteBuf buf, MapleClient client) throws Exception {
11 | client.getCharacter().closeChalkboard();
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/DamageReactorHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.map.MapleMapObject;
6 | import maplestory.map.MapleReactor;
7 | import maplestory.server.net.MaplePacketHandler;
8 |
9 | public class DamageReactorHandler extends MaplePacketHandler {
10 |
11 | @Override
12 | public void handle(ByteBuf buf, MapleClient client) throws Exception {
13 |
14 | int oid = buf.readInt();
15 | int charPos = buf.readInt();
16 | short stance = buf.readShort();
17 |
18 | int attackType = buf.readInt();
19 |
20 | int skillId = buf.readInt();
21 |
22 | MapleMapObject obj = client.getCharacter().getMap().getObject(oid);
23 |
24 | if(!(obj instanceof MapleReactor)){
25 | return;
26 | }
27 |
28 | MapleReactor reactor = (MapleReactor) obj;
29 |
30 | reactor.hitReactor(client.getCharacter(), stance);
31 |
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/DamageSummonHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.life.MapleSummon;
6 | import maplestory.player.MapleCharacter;
7 | import maplestory.server.net.MaplePacketHandler;
8 | import maplestory.skill.SkillFactory;
9 |
10 | public class DamageSummonHandler extends MaplePacketHandler {
11 |
12 | @Override
13 | public void handle(ByteBuf buf, MapleClient client) {
14 | int skillid = buf.readInt();
15 | int unkByte = buf.readByte();
16 | int damage = buf.readInt();
17 | int monsterIdFrom = buf.readInt();
18 |
19 | if(SkillFactory.getSkill(skillid) != null){
20 |
21 | MapleCharacter chr = client.getCharacter();
22 | MapleSummon summon = chr.getSummon(skillid);
23 |
24 | if(summon != null){
25 | summon.damage(damage, unkByte, monsterIdFrom);
26 | }
27 |
28 | }
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/DenyPartyInviteHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.player.MapleCharacter;
6 | import maplestory.server.net.MaplePacketHandler;
7 | import maplestory.server.net.PacketFactory;
8 |
9 | public class DenyPartyInviteHandler extends MaplePacketHandler {
10 |
11 | @Override
12 | public void handle(ByteBuf buf, MapleClient client) {
13 | buf.skipBytes(1);
14 | MapleCharacter from = client.getWorld().getPlayerStorage().getByName(readMapleAsciiString(buf));
15 |
16 | if(from != null){
17 | from.getClient().sendPacket(PacketFactory.partyDenyInvite(client.getCharacter()));
18 | }
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/EnterCashshopHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.player.MapleCharacter;
6 | import maplestory.server.net.MaplePacketHandler;
7 |
8 | public class EnterCashshopHandler extends MaplePacketHandler {
9 |
10 | @Override
11 | public void handle(ByteBuf buf, MapleClient client) {
12 |
13 | MapleCharacter chr = client.getCharacter();
14 |
15 | chr.openCashshop();
16 |
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/FaceExpressionHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import constants.MapleEmote;
4 | import io.netty.buffer.ByteBuf;
5 | import maplestory.client.MapleClient;
6 | import maplestory.player.MapleCharacter;
7 | import maplestory.server.net.MaplePacketHandler;
8 |
9 | public class FaceExpressionHandler extends MaplePacketHandler {
10 |
11 | @Override
12 | public void handle(ByteBuf buf, MapleClient client) {
13 |
14 | int emoteId = buf.readInt();
15 | MapleEmote emote = MapleEmote.byId(emoteId);
16 |
17 | MapleCharacter chr = client.getCharacter();
18 |
19 | if(emote.isCashShop()){
20 |
21 | int emoteid = 5159992 + emoteId;
22 |
23 | if(chr.getInventory(emoteid).countById(emoteid) == 0){
24 | return;//They are using an emote that they don't own!
25 | }
26 |
27 | }
28 |
29 |
30 | chr.emote(emote);
31 |
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/HealOverTimeHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.player.MapleCharacter;
6 | import maplestory.server.net.MaplePacketHandler;
7 |
8 | public class HealOverTimeHandler extends MaplePacketHandler {
9 |
10 | @Override
11 | public void handle(ByteBuf buf, MapleClient client) {
12 |
13 | MapleCharacter chr = client.getCharacter();
14 |
15 | /*int timestamp = */buf.readInt();
16 | buf.skipBytes(4);
17 | short amountHp = buf.readShort();
18 | short amountMp = buf.readShort();
19 |
20 | if(amountHp != 0){
21 | chr.restoreHp(amountHp);
22 | }
23 |
24 | if(amountMp != 0 && amountMp < 1000){
25 | chr.restoreMp(amountMp);
26 | }
27 |
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/KeymapChangeHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.server.net.MaplePacketHandler;
6 | import maplestory.skill.Skill;
7 | import maplestory.skill.SkillFactory;
8 |
9 | public class KeymapChangeHandler extends MaplePacketHandler {
10 |
11 | @Override
12 | public void handle(ByteBuf buf, MapleClient client) {
13 | if(buf.readableBytes() != 8){
14 |
15 | buf.readInt();
16 |
17 | int numChanges = buf.readInt();
18 |
19 | for(int i = 0; i < numChanges;i++){
20 |
21 | int key = buf.readInt();
22 | int type = buf.readByte();
23 | int action = buf.readInt();
24 |
25 | Skill skill = SkillFactory.getSkill(action);
26 |
27 | if(skill != null && client.getCharacter().getSkillLevel(skill) <= 0){
28 | continue;
29 | }
30 |
31 | client.getCharacter().setKeybinding(key, type, action);
32 | }
33 |
34 | }
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/MesoDropHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.player.MapleCharacter;
6 | import maplestory.server.net.MaplePacketHandler;
7 |
8 | public class MesoDropHandler extends MaplePacketHandler {
9 |
10 | private long lastDrop;
11 |
12 | public MesoDropHandler() {
13 | lastDrop = 0;
14 | }
15 |
16 | @Override
17 | public void handle(ByteBuf buf, MapleClient client) {
18 |
19 | int time = buf.readInt();
20 |
21 | int amount = buf.readInt();
22 |
23 | if(amount < 10 || amount > 50000){
24 | client.sendReallowActions();
25 | return;
26 | }
27 |
28 | if(System.currentTimeMillis() - lastDrop < 200){
29 | return;
30 | }
31 |
32 | MapleCharacter chr = client.getCharacter();
33 |
34 | if(chr.getMeso() >= amount){
35 | chr.giveMesos(-amount);
36 | chr.getMap().dropMesos(amount, chr.getPosition(), chr);
37 | lastDrop = System.currentTimeMillis();
38 | }
39 |
40 | client.sendReallowActions();
41 |
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/MonsterBombHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.life.MapleMonster;
6 | import maplestory.map.MapleMapObject;
7 | import maplestory.server.net.MaplePacketHandler;
8 | import maplestory.server.net.PacketFactory;
9 |
10 | public class MonsterBombHandler extends MaplePacketHandler {
11 |
12 | @Override
13 | public void handle(ByteBuf buf, MapleClient client) throws Exception {
14 | int oid = buf.readInt();
15 | MapleMapObject obj = client.getCharacter().getMap().getObject(oid);
16 |
17 | if(obj instanceof MapleMonster){
18 | MapleMonster monster = (MapleMonster) obj;
19 | if(monster.getId() == 8500003 || monster.getId() == 8500004){
20 | monster.getMap().broadcastPacket(PacketFactory.killMonster(oid, 4));
21 | client.getCharacter().getMap().removeObject(oid);
22 | }
23 | }
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/MonsterDamageMonsterHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.life.MapleMonster;
6 | import maplestory.server.net.MaplePacketHandler;
7 | import maplestory.util.Randomizer;
8 |
9 | public class MonsterDamageMonsterHandler extends MaplePacketHandler {
10 |
11 | @Override
12 | public void handle(ByteBuf buf, MapleClient client) throws Exception {
13 |
14 | int attackerId = buf.readInt();
15 | buf.skipBytes(4);
16 | int damagedId = buf.readInt();
17 |
18 | MapleMonster monster = (MapleMonster) client.getCharacter().getMap().getObject(attackerId);
19 | MapleMonster damaged = (MapleMonster) client.getCharacter().getMap().getObject(damagedId);
20 |
21 | if(monster == null || damaged == null){
22 | return;
23 | }
24 |
25 | int damage = Randomizer.nextInt(((monster.getMaxHp() / 13 + monster.getStats().getPADamage() * 10)) * 2 + 500) / 10; //Beng's formula.
26 |
27 | damaged.damage(monster, damage);
28 |
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/MovePetHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.life.movement.MovementPath;
6 | import maplestory.player.MapleCharacter;
7 | import maplestory.server.net.PacketFactory;
8 | import maplestory.util.Hex;
9 |
10 | public class MovePetHandler extends MovementPacketHandler {
11 |
12 | @Override
13 | public void handle(ByteBuf buf, MapleClient client) throws Exception {
14 |
15 | int uniqueId = buf.readInt();
16 | buf.skipBytes(8);
17 |
18 | MovementPath moves = parseMovement(buf);
19 |
20 | MapleCharacter chr = client.getCharacter();
21 | int slot = chr.getPetSlot(uniqueId);
22 |
23 | if(slot == -1){
24 | return;
25 | }
26 |
27 | chr.getPets()[slot].move(moves);
28 | chr.getMap().broadcastPacket(PacketFactory.movePet(chr, chr.getPets()[slot], slot, moves), chr.getId());
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/MoveSummonHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import java.awt.Point;
4 | import io.netty.buffer.ByteBuf;
5 | import maplestory.client.MapleClient;
6 | import maplestory.life.MapleSummon;
7 | import maplestory.life.movement.MovementPath;
8 | import maplestory.player.MapleCharacter;
9 | import maplestory.server.net.PacketFactory;
10 |
11 | public class MoveSummonHandler extends MovementPacketHandler {
12 |
13 | @Override
14 | public void handle(ByteBuf buf, MapleClient client) {
15 | int oid = buf.readInt();
16 |
17 | Point startPos = readPosition(buf);
18 | MovementPath res = parseMovement(buf);
19 |
20 | MapleCharacter chr = client.getCharacter();
21 |
22 | MapleSummon chosen = chr.getSummonByObjectId(oid);
23 |
24 | if(chosen != null){
25 | res.translateLife(chosen);
26 | chr.getMap().broadcastPacket(PacketFactory.moveSummon(chr.getId(), oid, startPos, res), chr.getId());
27 | }
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/MovementPacketHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.life.movement.LifeMovementFactory;
5 | import maplestory.life.movement.MovementPath;
6 | import maplestory.server.net.MaplePacketHandler;
7 |
8 | public abstract class MovementPacketHandler extends MaplePacketHandler {
9 |
10 | protected MovementPath parseMovement(ByteBuf lea) {
11 | return LifeMovementFactory.decodeMovements(lea);
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/NpcAnimationHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.server.net.MaplePacketHandler;
6 | import maplestory.server.net.PacketFactory;
7 |
8 | public class NpcAnimationHandler extends MaplePacketHandler {
9 |
10 | @Override
11 | public void handle(ByteBuf buf, MapleClient client) {
12 |
13 | if(buf.readableBytes() == 6){//Talking
14 | int id = buf.readInt();
15 | short something = buf.readShort();
16 | client.sendPacket(PacketFactory.getNpcTalkPacket(id, something));
17 | }else if(buf.readableBytes() > 6){//Moving
18 |
19 | byte[] bytes = new byte[buf.readableBytes() - 9];
20 |
21 | buf.readBytes(bytes);
22 |
23 | client.sendPacket(PacketFactory.getNpcActionPacket(bytes));
24 |
25 | }
26 |
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/NpcTalkHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.life.MapleNPC;
6 | import maplestory.map.MapleMapObject;
7 | import maplestory.server.net.MaplePacketHandler;
8 | import maplestory.shop.MapleShop;
9 |
10 | public class NpcTalkHandler extends MaplePacketHandler {
11 |
12 | @Override
13 | public void handle(ByteBuf buf, MapleClient client) {
14 |
15 | if(client.getCharacter().getActiveNpc() != null){
16 | client.sendReallowActions();
17 | return;
18 | }
19 |
20 | int oid = buf.readInt();
21 |
22 | MapleMapObject obj = client.getCharacter().getMap().getObject(oid);
23 |
24 |
25 | if(obj instanceof MapleNPC){
26 |
27 | MapleNPC npc = (MapleNPC) obj;
28 |
29 | if(MapleShop.getShopId(npc.getId()) >= 0){
30 | MapleShop shop = MapleShop.getShop(MapleShop.getShopId(npc.getId()));
31 |
32 | client.getCharacter().openShop(shop, npc.getId());
33 | }else{
34 | client.getCharacter().openNpc(npc);
35 | }
36 |
37 | }
38 |
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/PetCommandHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.player.MapleCharacter;
6 | import maplestory.player.MaplePetInstance;
7 | import maplestory.server.net.MaplePacketHandler;
8 |
9 | public class PetCommandHandler extends MaplePacketHandler {
10 |
11 | @Override
12 | public void handle(ByteBuf buf, MapleClient client) throws Exception {
13 | MapleCharacter chr = client.getCharacter();
14 |
15 | int petId = buf.readInt();
16 | int index = chr.getPetSlot(petId);
17 |
18 | if(index == -1){
19 | return;
20 | }
21 |
22 | MaplePetInstance pet = chr.getPets()[index];
23 |
24 | buf.skipBytes(5);
25 |
26 | byte command = buf.readByte();
27 |
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/SitRequestHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.map.MapleMap;
6 | import maplestory.server.net.MaplePacketHandler;
7 | import maplestory.server.net.PacketFactory;
8 |
9 | public class SitRequestHandler extends MaplePacketHandler {
10 |
11 | @Override
12 | public void handle(ByteBuf buf, MapleClient client) throws Exception {
13 | short chair = buf.readShort();
14 | MapleMap map = client.getCharacter().getMap();
15 | if(chair >= 0){
16 | client.getCharacter().setActiveChair(chair);
17 | client.sendPacket(PacketFactory.chairSitResponse(chair));
18 | client.sendReallowActions();
19 | }else if(client.getCharacter().getActiveChair() > 0){
20 | client.getCharacter().setActiveChair(0);
21 | map.broadcastPacket(PacketFactory.portalChairEffect(client.getCharacter()), client.getCharacter().getId());
22 | client.sendPacket(PacketFactory.chairSitResponse((short) -1));
23 | }
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/SkillEffectHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.server.net.MaplePacketHandler;
6 | import maplestory.server.net.PacketFactory;
7 | import maplestory.skill.Skill;
8 | import maplestory.skill.SkillFactory;
9 |
10 | public class SkillEffectHandler extends MaplePacketHandler {
11 |
12 | @Override
13 | public void handle(ByteBuf buf, MapleClient client) {
14 | int skillId = buf.readInt();
15 | int level = buf.readByte();
16 | byte flags = buf.readByte();
17 | int speed = buf.readByte();
18 | byte direction = buf.readByte();
19 |
20 | Skill skill = SkillFactory.getSkill(skillId);
21 |
22 | if(skill.hasEffect()){
23 | client.getCharacter().getMap().broadcastPacket(PacketFactory.skillEffect(client.getCharacter(), skillId, level, flags, speed, direction), client.getCharacter().getId());
24 | }else{
25 | client.getLogger().warn(client.getCharacter().getName()+" got here using "+skillId+" named "+SkillFactory.getSkillName(skillId));
26 | }
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/TakeDamageHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.server.net.MaplePacketHandler;
6 |
7 | public class TakeDamageHandler extends MaplePacketHandler {
8 |
9 | @Override
10 | public void handle(ByteBuf buf, MapleClient client) {
11 |
12 | buf.readInt();
13 | //byte damageFrom = buf.readByte();
14 | buf.skipBytes(1);//Do this because we commented out the above line
15 | buf.readByte();
16 | int damage = buf.readInt();
17 |
18 | client.getCharacter().damage(damage);
19 |
20 | /*int objectId = 0, monsterId = 0, pgmr = 0, direction = 0;
21 | int pos_x = 0, pos_y = 0, fake = 0;
22 |
23 | if(damageFrom != -3){
24 |
25 | monsterId = buf.readInt();
26 | oid = buf.readInt();
27 |
28 | }else{
29 | //Handle other types I guess?
30 | }*/
31 |
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/UpdateCashShopCurrencyHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.cashshop.CashShopWallet;
5 | import maplestory.client.MapleClient;
6 | import maplestory.server.net.MaplePacketHandler;
7 | import maplestory.server.net.PacketFactory;
8 |
9 | public class UpdateCashShopCurrencyHandler extends MaplePacketHandler {
10 |
11 | @Override
12 | public void handle(ByteBuf buf, MapleClient client) {
13 | if(client.getCharacter().isCashShopOpen()){
14 | client.sendPacket(PacketFactory.updateCashshopCash(CashShopWallet.getWallet(client.getCharacter())));
15 | }
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/UseInnerPortalHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.player.MapleCharacter;
6 | import maplestory.server.net.MaplePacketHandler;
7 |
8 | public class UseInnerPortalHandler extends MaplePacketHandler {
9 |
10 | @Override
11 | public void handle(ByteBuf buf, MapleClient client) throws Exception {
12 | MapleCharacter chr = client.getCharacter();
13 |
14 | buf.skipBytes(1);//Unknown 1 byte (always 01 ? )
15 |
16 | buf.skipBytes(6); //Unknown 6 bytes
17 |
18 | buf.readShort(); // Start X
19 | buf.readShort(); // Start Y
20 |
21 | short fx = buf.readShort();
22 | short fy = buf.readShort();
23 |
24 | chr.getPosition().setLocation(fx, fy);
25 |
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/UseMagicDoorHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.map.MapleMagicDoor;
6 | import maplestory.map.MapleMapObject;
7 | import maplestory.server.net.MaplePacketHandler;
8 |
9 | public class UseMagicDoorHandler extends MaplePacketHandler {
10 |
11 | @Override
12 | public void handle(ByteBuf buf, MapleClient client) {
13 |
14 | int oid = buf.readInt();
15 | boolean toTown = buf.readByte() == 0;
16 |
17 | MapleMagicDoor door = null;
18 |
19 | for(MapleMapObject obj : client.getCharacter().getMap().getObjects()){
20 | if(obj instanceof MapleMagicDoor){
21 | MapleMagicDoor door2 = (MapleMagicDoor) obj;
22 |
23 | if(door2.getOwner().getId() == oid){
24 | door = door2;
25 | break;
26 | }
27 | }
28 | }
29 |
30 | if(door != null){
31 | door.warp(client.getCharacter(), toTown);
32 | }else{
33 | client.sendReallowActions();
34 | }
35 |
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/UsePetFoodHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.server.net.MaplePacketHandler;
6 |
7 | public class UsePetFoodHandler extends MaplePacketHandler {
8 |
9 | @Override
10 | public void handle(ByteBuf buf, MapleClient client) throws Exception {
11 |
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/channel/WhisperHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.channel;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.player.MapleCharacter;
6 | import maplestory.server.net.MaplePacketHandler;
7 | import maplestory.server.net.PacketFactory;
8 |
9 | public class WhisperHandler extends MaplePacketHandler {
10 |
11 | @Override
12 | public void handle(ByteBuf buf, MapleClient client) throws Exception {
13 | byte mode = buf.readByte();
14 |
15 | if(mode == 6){
16 | String recipient = readMapleAsciiString(buf);
17 |
18 | String text = readMapleAsciiString(buf);
19 |
20 | MapleCharacter chr = client.getWorld().getPlayerStorage().getByName(recipient);
21 |
22 | if(chr != null){
23 | chr.getClient().sendPacket(PacketFactory.whisper(client.getCharacter().getName(), client.getChannelId(), text));
24 |
25 | client.sendPacket(PacketFactory.whisperReply(chr.getName(), 1));
26 | }else{
27 | client.sendPacket(PacketFactory.whisperReply(recipient, 0));
28 | }
29 | }
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/login/CharListRequestHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.login;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.server.net.MaplePacketHandler;
6 | import maplestory.server.net.PacketFactory;
7 | import maplestory.util.Hex;
8 |
9 | public class CharListRequestHandler extends MaplePacketHandler {
10 |
11 | @Override
12 | public void handle(ByteBuf buf, MapleClient client) {
13 | buf.readByte();
14 | int world = buf.readByte();
15 |
16 | client.setWorldId(world);
17 | client.setChannelId(buf.readByte());
18 |
19 | client.sendPacket(PacketFactory.getCharList(client, world));
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/login/CharSelectHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.login;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.channel.MapleChannel;
5 | import maplestory.client.MapleClient;
6 | import maplestory.server.MapleStory;
7 | import maplestory.server.net.MaplePacketHandler;
8 |
9 | public class CharSelectHandler extends MaplePacketHandler {
10 |
11 | @Override
12 | public void handle(ByteBuf buf, MapleClient client) throws Exception {
13 |
14 | if(MapleStory.getServerConfig().isPicEnabled()) {
15 | client.closeConnection();
16 | return;
17 | }
18 |
19 | int id = buf.readInt();
20 |
21 | //String macs = readMapleAsciiString(buf);
22 |
23 | MapleChannel channel = client.getChannel();
24 |
25 | channel.initialConnection(client, id);
26 |
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/login/CharSelectWithPicHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.login;
2 |
3 | import java.net.InetAddress;
4 |
5 | import io.netty.buffer.ByteBuf;
6 | import lombok.SneakyThrows;
7 | import maplestory.channel.MapleChannel;
8 | import maplestory.channel.MapleSocketChannel;
9 | import maplestory.client.MapleClient;
10 | import maplestory.server.MapleStory;
11 | import maplestory.server.net.MaplePacketHandler;
12 | import maplestory.server.net.PacketFactory;
13 |
14 | public class CharSelectWithPicHandler extends MaplePacketHandler {
15 |
16 | @SneakyThrows
17 | @Override
18 | public void handle(ByteBuf buf, MapleClient client) {
19 | String pic = readMapleAsciiString(buf);
20 | int charId = buf.readInt();
21 | //String macs = readString(buf); //This works but its commented out because we don't use it atm
22 |
23 | if(client.checkPic(pic)){
24 | MapleChannel channel = client.getChannel();
25 |
26 | channel.initialConnection(client, charId);
27 | }else{
28 | client.sendPacket(PacketFactory.getWrongPic());
29 | }
30 |
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/login/CheckCharNameHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.login;
2 |
3 | import java.sql.SQLException;
4 |
5 | import io.netty.buffer.ByteBuf;
6 | import maplestory.client.MapleClient;
7 | import maplestory.player.MapleCharacter;
8 | import maplestory.server.net.MaplePacketHandler;
9 | import maplestory.server.net.PacketFactory;
10 |
11 | public class CheckCharNameHandler extends MaplePacketHandler {
12 |
13 | @Override
14 | public void handle(ByteBuf buf, MapleClient client) {
15 |
16 | String name = readMapleAsciiString(buf);
17 |
18 | try {
19 | boolean inUse = MapleCharacter.checkNameTaken(name, client.getWorld());
20 | client.sendPacket(PacketFactory.getNameCheckResponse(name, inUse));
21 | } catch (SQLException e) {
22 | e.printStackTrace();
23 | }
24 |
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/login/ClientStartErrorHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.login;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.server.net.MaplePacketHandler;
6 |
7 | public class ClientStartErrorHandler extends MaplePacketHandler {
8 |
9 | @Override
10 | public void handle(ByteBuf buf, MapleClient client) {
11 | String error = readMapleAsciiString(buf);
12 |
13 | client.getLogger().warn("Started with error "+error);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/login/DeleteCharHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.login;
2 |
3 | import java.sql.SQLException;
4 |
5 | import io.netty.buffer.ByteBuf;
6 | import maplestory.client.MapleClient;
7 | import maplestory.server.net.MaplePacketHandler;
8 | import maplestory.server.net.PacketFactory;
9 |
10 | public class DeleteCharHandler extends MaplePacketHandler {
11 |
12 | @Override
13 | public void handle(ByteBuf buf, MapleClient client) {
14 | String pic = readMapleAsciiString(buf);
15 | int cid = buf.readInt();
16 | if (client.checkPic(pic)) {
17 | try {
18 | if(client.deleteCharacter(cid)){
19 | client.sendPacket(PacketFactory.getDeleteCharacterResponse(cid, 0));
20 | }else{
21 | client.sendPacket(PacketFactory.getDeleteCharacterResponse(cid, 0x14));//Failed for some reason... cheating?
22 | }
23 | } catch (SQLException e) {
24 | e.printStackTrace();
25 | client.closeConnection();
26 | }
27 | } else {
28 | client.sendPacket(PacketFactory.getDeleteCharacterResponse(cid, 0x14));
29 | }
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/login/RegisterPicHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.login;
2 |
3 | import java.net.InetAddress;
4 |
5 | import io.netty.buffer.ByteBuf;
6 | import lombok.SneakyThrows;
7 | import maplestory.client.MapleClient;
8 | import maplestory.server.MapleStory;
9 | import maplestory.server.net.MaplePacketHandler;
10 |
11 | public class RegisterPicHandler extends MaplePacketHandler {
12 |
13 | @SneakyThrows
14 | @Override
15 | public void handle(ByteBuf buf, MapleClient client) {
16 | buf.readByte();
17 | int charId = buf.readInt();
18 | String macs = readMapleAsciiString(buf);
19 |
20 | readMapleAsciiString(buf);
21 |
22 | String pic = readMapleAsciiString(buf);
23 |
24 | if(client.isPicCreated()){
25 | client.closeConnection();
26 | }else{
27 | client.registerPic(pic);
28 |
29 | client.getChannel().initialConnection(client, charId);
30 | }
31 |
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/login/ServerListRequestHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.login;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.server.net.MaplePacketHandler;
6 |
7 | public class ServerListRequestHandler extends MaplePacketHandler {
8 |
9 | @Override
10 | public void handle(ByteBuf buf, MapleClient client) {
11 | client.sendWorldList();
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/maplestory/server/net/handlers/login/ServerStatusRequestHandler.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.net.handlers.login;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import maplestory.client.MapleClient;
5 | import maplestory.server.MapleServer;
6 | import maplestory.server.net.MaplePacketHandler;
7 | import maplestory.server.net.PacketFactory;
8 | import maplestory.world.World;
9 |
10 | public class ServerStatusRequestHandler extends MaplePacketHandler {
11 |
12 | @Override
13 | public void handle(ByteBuf buf, MapleClient client) {
14 |
15 | byte worldId = (byte) buf.readShort();
16 |
17 | World world = MapleServer.getWorld(worldId);
18 |
19 | float percent = (float) world.getPlayerCount() / (float) world.getMaxPlayers();
20 |
21 | byte status;
22 |
23 | if(percent < 0.8){
24 | status = 0;
25 | }else if(percent >= 0.8 && percent < 1){
26 | status = 1;
27 | }else{
28 | status = 2;
29 | }
30 |
31 | client.sendPacket(PacketFactory.getServerStatus(status));
32 |
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/src/maplestory/server/security/AccountEncryption.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.security;
2 |
3 | public interface AccountEncryption {
4 |
5 | public String getRandomSalt();
6 |
7 | public String hash(String password, String salt);
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/src/maplestory/server/security/BCryptAccountEncryption.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.security;
2 |
3 | import org.mindrot.BCrypt;
4 |
5 | public class BCryptAccountEncryption implements AccountEncryption {
6 |
7 | @Override
8 | public String getRandomSalt() {
9 | return BCrypt.gensalt();
10 | }
11 |
12 | @Override
13 | public String hash(String password, String salt) {
14 | return BCrypt.hashpw(password, salt);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/maplestory/server/security/Sha256AccountEncryption.java:
--------------------------------------------------------------------------------
1 | package maplestory.server.security;
2 |
3 | import java.security.MessageDigest;
4 | import java.security.SecureRandom;
5 | import java.util.Base64;
6 | import java.util.Base64.Encoder;
7 |
8 | import lombok.SneakyThrows;
9 |
10 | public class Sha256AccountEncryption implements AccountEncryption {
11 |
12 | public String getRandomSalt() {
13 | SecureRandom sr = new SecureRandom();
14 |
15 | byte[] bytes = new byte[64];
16 |
17 | sr.nextBytes(bytes);
18 |
19 | return toBase64(bytes);
20 | }
21 |
22 | @SneakyThrows
23 | public String hash(String password, String salt) {
24 | String combined = salt + password;
25 |
26 | MessageDigest md = MessageDigest.getInstance("SHA-256");
27 |
28 | md.update(combined.getBytes());
29 |
30 | byte[] digest = md.digest();
31 |
32 | return toBase64(digest);
33 | }
34 |
35 | public String toBase64(byte[] bytes){
36 | Encoder b64 = Base64.getEncoder();
37 |
38 | return b64.encodeToString(bytes);
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/maplestory/shop/MapleShopItem.java:
--------------------------------------------------------------------------------
1 | package maplestory.shop;
2 |
3 | import maplestory.inventory.item.ItemInfoProvider;
4 | import maplestory.shop.MapleShop.CurrencyType;
5 |
6 | public class MapleShopItem {
7 |
8 | private int itemId;
9 | private int price;
10 | private byte currency;
11 |
12 | public MapleShopItem(int itemId, int price, CurrencyType type){
13 | this.itemId = itemId;
14 | this.price = price;
15 | currency = type.getId();
16 | }
17 |
18 | public int getQuantity() {
19 | return ItemInfoProvider.getSlotMax(itemId);
20 | }
21 |
22 | public int getItemId() {
23 | return itemId;
24 | }
25 |
26 | public int getMesoPrice(){
27 | if(currency != CurrencyType.MESOS.getId()){
28 | return 0;
29 | }
30 |
31 | return price;
32 | }
33 |
34 | public int getPitchPrice(){
35 | if(currency != CurrencyType.PITCH.getId()){
36 | return 0;
37 | }
38 |
39 | return price;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/src/maplestory/skill/SkillChanges.java:
--------------------------------------------------------------------------------
1 | package maplestory.skill;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | public class SkillChanges {
7 |
8 | private List skills;
9 | private List levels;
10 | private List masteryLevel;
11 |
12 | private int index;
13 |
14 | public SkillChanges() {
15 | skills = new ArrayList<>();
16 | levels = new ArrayList<>();
17 | masteryLevel = new ArrayList<>();
18 | index = -1;
19 | }
20 |
21 | public void addChange(Skill skill, int level, int mastery) {
22 | skills.add(skill);
23 | levels.add(level);
24 | masteryLevel.add(mastery);
25 | }
26 |
27 | public Skill getSkill() {
28 | return skills.get(index);
29 | }
30 |
31 | public int getLevel() {
32 | return levels.get(index);
33 | }
34 |
35 | public int getMasteryLevel() {
36 | return masteryLevel.get(index);
37 | }
38 |
39 | public boolean next() {
40 | return ++index < skills.size();
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/src/maplestory/skill/SkillData.java:
--------------------------------------------------------------------------------
1 | package maplestory.skill;
2 |
3 | import lombok.Data;
4 |
5 | @Data
6 | public class SkillData {
7 |
8 | public static final SkillData EMPTY = new SkillData(0, 0);
9 |
10 | private final int level;
11 | private final int masterLevel;
12 |
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/maplestory/util/Hex.java:
--------------------------------------------------------------------------------
1 | package maplestory.util;
2 |
3 | public class Hex {
4 |
5 | public static String toHex(byte[] bytes){
6 | StringBuilder sb = new StringBuilder();
7 | for (byte b : bytes) {
8 | sb.append(String.format("%02X ", b));
9 | }
10 |
11 | return sb.toString();
12 | }
13 |
14 | public static byte[] toByteArray(String hex) {
15 |
16 | byte[] b = getByteArrayFromHexString(hex);
17 |
18 | return b;
19 | }
20 |
21 | /**
22 | * Credit to http://stackoverflow.com/a/140861/2284885
23 | */
24 | private static byte[] getByteArrayFromHexString(String hex) {
25 | int len = hex.length();
26 | byte[] data = new byte[len / 2];
27 | for (int i = 0; i < len; i += 2) {
28 | data[i / 2] = (byte) ((Character.digit(hex.charAt(i), 16) << 4)
29 | + Character.digit(hex.charAt(i+1), 16));
30 | }
31 | return data;
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/rebel.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/wz/Base.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/Base.mdf
--------------------------------------------------------------------------------
/wz/Character.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/Character.mdf
--------------------------------------------------------------------------------
/wz/Effect.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/Effect.mdf
--------------------------------------------------------------------------------
/wz/Etc.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/Etc.mdf
--------------------------------------------------------------------------------
/wz/Item.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/Item.mdf
--------------------------------------------------------------------------------
/wz/List.mdf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/wz/Map.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/Map.mdf
--------------------------------------------------------------------------------
/wz/Mob.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/Mob.mdf
--------------------------------------------------------------------------------
/wz/MonsterBookData.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/MonsterBookData.mdf
--------------------------------------------------------------------------------
/wz/Morph.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/Morph.mdf
--------------------------------------------------------------------------------
/wz/Npc.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/Npc.mdf
--------------------------------------------------------------------------------
/wz/Quest.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/Quest.mdf
--------------------------------------------------------------------------------
/wz/Reactor.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/Reactor.mdf
--------------------------------------------------------------------------------
/wz/Skill.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/Skill.mdf
--------------------------------------------------------------------------------
/wz/Sound.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/Sound.mdf
--------------------------------------------------------------------------------
/wz/String.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/String.mdf
--------------------------------------------------------------------------------
/wz/TamingMob.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/TamingMob.mdf
--------------------------------------------------------------------------------
/wz/UI.mdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tylerhasman/MapleStory/9bf93307a0b27077ab49973c5ae38bad59c585a2/wz/UI.mdf
--------------------------------------------------------------------------------