Compare commits

...

823 Commits

Author SHA1 Message Date
Ponk
8f2c2dc08f Merge pull request #253 from P0nk/cleanup/rebirth #minor
Remove rebirth system
2024-07-19 17:24:18 +02:00
P0nk
cad10c4d5c Remove rebirth system 2024-07-19 17:16:14 +02:00
Ponk
aa3686ed0b Merge pull request #251 from P0nk/cleanup/banish #minor
Remove custom banish scroll feature
2024-07-17 19:47:15 +02:00
P0nk
3850b63cec Add migration for <v0.14.0 to fix shop dc 2024-07-17 19:24:19 +02:00
P0nk
a7df8a4f49 Remove banish scroll from WZ files 2024-07-17 18:50:44 +02:00
P0nk
7071b13e41 Remove banish scroll from shops 2024-07-17 18:39:50 +02:00
P0nk
2324ae7f9e Refactor BanishInfo - make it a record 2024-07-17 18:11:50 +02:00
P0nk
402163c33d Remove "banishable town scroll" feature 2024-07-17 17:45:38 +02:00
P0nk
3356e42e71 Remove "spikes avoid banish" feature 2024-07-16 20:17:21 +02:00
P0nk
205e263255 Specify required Java version 2024-07-16 20:16:26 +02:00
Ponk
aab9823a06 Merge pull request #227 from HarkuLi/feat/fix-ariant-coliseum #patch
Ariant Coliseum: Fix score counting and trade conversation
2024-06-19 17:58:38 +02:00
HarkuLi
3f800c4a68 Ignore .DS_Store files 2024-06-19 18:43:26 +08:00
HarkuLi
31e901ab6d Ariant Coliseum: Fix score counting and trade conversation 2024-06-19 18:42:31 +08:00
Ponk
238c01baf4 Merge pull request #245 from P0nk/fix/energy-charge-crash #patch
Fix Energy charge crashing certain other players
2024-06-16 19:13:03 +02:00
P0nk
5a4bdd343c Fix Energy charge crashing certain other players
Crabo in #bug-report (2024-06-10):
"(...) this will crash everyone in the map besides the bucc and 1 character, when a bucc (or TB) charges energy and a character with an ID that's a multiple of 102 is in the same map (and the energy reaches that number so if character ID is 204 it will reach that after 2 hits and DC the whole map besides the bucc and that char with id 204).
 Thanks to others for helping me fix it. Thought I'd report it!"
2024-06-16 19:09:21 +02:00
Ponk
d916502f58 Merge pull request #244 from P0nk/fix/cash-shop-surprise-package #patch
Fix able to get package from Cash shop surprise
2024-06-16 16:15:30 +02:00
P0nk
1791365e0f Fix able to get package from Cash shop surprise
Packages aren't real items and crash the client.
2024-06-16 16:06:29 +02:00
Ponk
de2a86c859 Merge pull request #243 from P0nk/fix/last-cash-shop-surprise #patch
Fix using the last Cash shop surprise not removing the item
2024-06-16 15:12:25 +02:00
P0nk
5aeed01e38 Fix not using the selected Cash shop surprise
If you have multiple, it would always use the first one. Now it uses whichever you select (as expected).
2024-06-16 15:08:48 +02:00
P0nk
6ab1af99da Add tests for CashShopSurpriseHandler 2024-06-16 13:56:54 +02:00
P0nk
c7b2d218ef Fix count not being updated after last Cash shop surprise 2024-06-16 12:59:30 +02:00
P0nk
01ae462b72 Refactor CashShop - add constants for cash types 2024-06-16 12:19:16 +02:00
Ponk
eb603e7ee9 Merge pull request #242 from P0nk/fix/cash-shop-surprise-count #patch
Fix cash shop surprise count not properly updated on usage
2024-06-15 08:35:58 +02:00
P0nk
b67b29def5 Fix cash shop surprise count not properly updated on usage
This reverts the hacky solution made in db82cbcfae
2024-06-15 08:31:24 +02:00
Ponk
d22d9b603b Merge pull request #228 from HarkuLi/feat/fix-npc-gain-meso #patch
NPC: Fix type casting error for `gainMeso()` method
2024-06-14 21:44:10 +02:00
Ponk
16b0a36c86 Merge pull request #238 from channarit1994/master #patch
Surprise Box Implementation
2024-06-14 21:33:08 +02:00
Ponk
313f48d4ce Merge pull request #237 from peamy/master #patch
Check if the amount of damage lines doesn't exceed the max (autoban)
2024-06-14 20:11:39 +02:00
Channarit Sittiparat
db82cbcfae Surprise Box Implementation
- Added showCashInventory after a successful gachapon opening in the CashShopSurpriseHandler.
- Added getItemsSize() condition to check the inventory size before proceeding with the cash shop surprise opening
2024-06-13 20:02:40 +07:00
remsus
eed47a9064 Check if the amount of damage lines doesn't exceed the max (autoban) 2024-06-11 18:44:47 +02:00
Ponk
9945d37df8 Merge pull request #233 from P0nk/fix/ide-settings #patch
Add IntelliJ code style settings (no wildcard imports)
2024-05-22 08:51:47 +02:00
P0nk
4e743128e9 Remove all wildcard imports 2024-05-22 08:33:44 +02:00
P0nk
2ed35db216 Add IntelliJ code style settings (no wildcard imports) 2024-05-22 08:06:46 +02:00
Ponk
df0c7f8b46 Merge pull request #232 from P0nk/cleanup/remove-buyback #minor
Remove custom sounds in Sound.wz, add devtest command
2024-05-21 22:54:59 +02:00
P0nk
9fe6ba4483 Add new wz files zip (reduced size by ~400mb)
Removed: Base.wz, Effect.wz, Morph.wz, Sound.wz, TamingMob.wz
2024-05-21 22:47:47 +02:00
P0nk
dee8651e61 Add DevtestCommand to easily test without restarting server 2024-05-21 21:36:54 +02:00
P0nk
948a9de667 Remove Spirit of Rock die sound 2024-05-21 20:23:34 +02:00
P0nk
d55437ddf3 Remove subway whistle 2024-05-21 19:56:09 +02:00
P0nk
98fd8c13d4 Remove brazil anthem 2024-05-21 19:54:30 +02:00
P0nk
04a92fe0c1 Remove buyback custom feature 2024-05-21 19:44:25 +02:00
Ponk
5754b60ca0 Merge pull request #231 from P0nk/feat/project-update #minor
Upgrade Java version and dependencies
2024-05-10 22:29:51 +02:00
P0nk
dc1a712f52 Re-add section about running from jar 2024-05-10 22:26:04 +02:00
P0nk
7a6d3e1b68 Add feature request issue template 2024-05-10 21:29:09 +02:00
P0nk
970fb3155f Complement pom.xml 2024-05-09 22:29:15 +02:00
P0nk
0eb78e2d9e Use root db user by default 2024-05-09 22:08:28 +02:00
P0nk
7d42870abd Fix sql script not being runnable on newer versions of MySQL 2024-05-09 21:26:09 +02:00
P0nk
c7b9e0eee3 Major rewrite of README 2024-05-09 21:11:53 +02:00
P0nk
c5089881b3 Tidy pom
mvn tidy:pom
2024-05-09 14:24:03 +02:00
P0nk
9c1406f75d Update pull request template 2024-05-09 12:33:50 +02:00
P0nk
92226483be Merge branch 'refs/heads/master' into feat/project-update 2024-05-09 12:30:14 +02:00
Ponk
21ecfeef17 Add pull request template 2024-05-09 12:20:08 +02:00
Ponk
d5be9130aa Add bug report issue template 2024-05-09 11:53:54 +02:00
P0nk
f61fee829a Upgrade Java version and dependencies 2024-05-09 11:45:16 +02:00
HarkuLi
0d684c1400 NPC: Fix type casting error for gainMeso() method
Number type values might be passed into the `gainMeso()` method in js
scripts, and thus it expects a `gainMeso(Double gain)` method in the
`NPCConversationManager` class.
2024-03-02 15:38:22 +08:00
Ponk
b5871c7be2 Merge pull request #219 from Silwhoon/mobskill-prop-handling #patch
Mob Skills now have a success rate
2024-02-07 06:49:24 +01:00
Silwhoon
f9b328b432 Mob Skills now have a success rate
This was only used for MAGIC_IMMUNITY and WEAPON_IMMUNITY for some reason? A lot of other MobSkills also have a 'prop' node in the WZ files such as; Darkness and Seduce
2024-02-05 17:58:43 +00:00
Ponk
830df4e5ca Merge pull request #218 from Silwhoon/makecharinfo #minor
Utilize the MakeCharInfo.img data in the WZ files
2024-02-05 18:09:12 +01:00
Silwhoon
6f68f4edfd Addressed nitpicks and removed unused item ID constants 2024-02-05 17:00:18 +00:00
Silwhoon
a7931c3e4d New characters now utilise the MakeCharInfo.img data in the WZ files 2024-02-05 16:03:41 +00:00
Ponk
799cb97564 Merge pull request #217 from P0nk/fix/210-clean-slate-scroll #minor
Fix able to gain infinite slots with clean slate scroll
2024-02-05 08:39:25 +01:00
P0nk
851b57e8ef Fix able to gain infinite slots with clean slate scroll
And remove a GM config option.
Thanks Crabo for the suggested solution.
2024-02-05 08:34:36 +01:00
Ponk
ceb2866aa1 Merge pull request #214 from leevccc/master #patch
fix: item lock cant extend lock time
2024-02-04 14:22:00 +01:00
Ponk
11c1e4655e Merge pull request #213 from yuzumika/ppq-npc-fix #patch
Fix bug in PPQ where non-party leader can get stuck in an NPC dialogue loop
2024-02-04 12:09:33 +01:00
Ponk
aca9cbf91d Merge pull request #212 from yuzumika/fix-selection-underflow #minor
NPCMoreTalkHandler: don't underflow selection
2024-02-04 12:07:46 +01:00
leevccc
08b089d9be fix: seal lock cant extend lock time 2024-01-14 22:13:16 +08:00
leevccc
8b254a294e fix: item lock cant extend lock time 2024-01-14 18:15:48 +08:00
yuzumika
7004de6e71 ppq: fix bug where non-party leader can get stuck in an npc dialogue loop 2024-01-04 14:30:59 -08:00
yuzumika
738e1b24e6 add unit tests for ByteBufInPacketTest.readUnsignedByte 2024-01-04 13:42:20 -08:00
yuzumika
5a4200cc8e implement ByteBufInPacket.readUnsignedByte 2024-01-04 10:55:07 -08:00
yuzumika
cb0320a471 NPCMoreTalkHandler: don't underflow selection 2024-01-03 16:10:23 -08:00
Ponk
058f034c2b Merge pull request #209 from yuzumika/minigame-npc-dispose #patch
Minigame NPC (Casey) tweaks
2024-01-03 20:13:59 +01:00
yuzumika
9c54f3a8ea minigame npc: add more disposes, fix typo 2023-12-27 15:35:45 -08:00
yuzumika
ee8cb545e1 minigame npc: use omokamount constant consistently; tiny text tweak to
make it more GMS-like
2023-12-27 15:18:22 -08:00
yuzumika
64bbff462d minigame npc: dispose after creating a set of match cards 2023-12-27 14:54:10 -08:00
Ponk
f63f7e13d4 Merge pull request #205 from yuzumika/face-hair-dedup #patch
use isFace and isHair in ItemInformationProvider.getStringData
2023-12-10 09:49:55 +01:00
yuzumika
db8666fc71 use isFace and isHair in ItemInformationProvider.getStringData 2023-11-24 01:38:34 -08:00
Ponk
93ea66e6fe Merge pull request #202 from peamy/master #patch
Bugfix: unable to complete scipted quests remotely
2023-11-10 21:11:37 +01:00
Ice Bear
7131e39c96 Merge pull request #1 from P0nk/master
Pull cosmic master into Peamy master
2023-11-10 11:40:55 +01:00
remsus
b80e9a3310 Bugfix: unable to complete scipted quests remotely 2023-11-10 00:20:52 +01:00
Ponk
03802666ef Merge pull request #190 from ormizj/character-exp-log #minor
added logs for character exp gain
2023-11-08 21:16:57 +01:00
Ponk
ecd155f2bb Merge pull request #201 from peamy/master #patch
BugFix: can't give CASH items to player (prepareInventoryItemList)
2023-11-08 20:50:50 +01:00
remsus
d6147d5191 Fix preparation of invList (CASH was skipped) in prepareInventoryItemList (AbstractPlayerInteraction) 2023-11-08 11:26:55 +01:00
Ponk
7ef471f1e2 Merge pull request #197 from wangxiaobao0851/fix-mts #patch
Fix MTS sql syntax error and month error
2023-11-07 17:28:16 +01:00
王小宝
c3404d296a Fix MTS sql syntax error and month error 2023-10-13 21:16:40 +08:00
Ponk
c609bcf2ee Merge pull request #193 from P0nk/fix-192/playernpc #patch
Fix #192 - Unable to create PlayerNPC
2023-09-19 17:15:00 +02:00
P0nk
0aee9d7c3f Fix unable to create playernpc
The initialization of the running world counters depended on worlds already having been initialized, so I made that dependency more explicit.
2023-09-19 12:56:51 +02:00
P0nk
a49c1703ae Remove developer player npc 2023-09-18 23:26:37 +02:00
ormizj
c145a53688 fixed wrong method call 2023-09-15 01:04:22 +03:00
spiderpig60
c744935dd0 changed starting server to vanilla values 2023-09-10 21:48:02 +03:00
spiderpig60
90b44c3a8b added timed thread, added batch, cleaned code
changed starting value to false
2023-09-10 21:36:52 +03:00
spiderpig60
60a44252ea added logs for character exp gain 2023-09-10 01:53:53 +03:00
Ponk
38eecd0db7 Merge pull request #188 from leevccc/master #patch
fix: error flag after use karma
2023-09-09 07:56:33 +02:00
leevccc
e320bafa8b fix: error flag after use karma
setFalg() function is designed to take arguments of type short. Forcing the short type flag to be converted to the byte type causes some errors here.

For example, the equipment merge system will make the UNTRADEABLE flag become 520, combined with the Scissors of Karma 16, and finally become 536, this value is beyond the byte range, and the mandatory variable type will cause the flag error, the specific problem I encountered is that the MERGE_UNTRADEABLE flag is lost after using the Scissors of Karma.
2023-09-08 04:59:56 +08:00
Ponk
754e5e61f2 Merge pull request #185 from Arnuh/fix-client-local-address #patch
Fix masking of ip address when connecting locally
2023-08-20 18:26:59 +02:00
Ponk
afba85827a Merge pull request #186 from sashimi-yzh/fix-cats-eye-dropper #patch
fix the dropper of Cat's Eye
2023-08-20 18:21:20 +02:00
Zihao Yu
8cd5211b8b fix the dropper of Cat's Eye
* it was previously dropped from Scorpion, which is wrong
2023-08-20 22:55:43 +08:00
Arnah
2d7525f2b4 Fix cashshop exiting not using proper ip 2023-08-16 16:19:16 -06:00
Arnah
7adb25888f Stop masking ip address when connecting locally 2023-08-16 00:53:40 -06:00
Ponk
b46912afcb Merge pull request #181 from Silwhoon/fix-incorrect-orange-potion-id #patch
Changes an incorrect Orange Potion ID to the correct one
2023-08-15 19:34:44 +02:00
Ponk
ed3d4823b2 Merge pull request #184 from noamyoyo/master #patch
Expose database container to allow access from MySQL client such as Workbench.
2023-08-15 19:32:09 +02:00
noampfeifel
b8a360917e final fixes 2023-08-15 19:07:34 +03:00
noampfeifel
26dbe36a15 fixed ports to simple setup, added notes about DB_HOST 2023-08-15 19:06:05 +03:00
noampfeifel
396447519d fixing compose port and config string for db 2023-08-13 17:33:25 +03:00
pleb
83e436bbd2 Changes an incorrect Orange Potion ID to the correct one
Thorr in Mushroom Kingdom sold an untradable "Orange Potion for Beginners" instead of a "Orange Potion". This fixes that.
2023-07-27 09:03:39 -05:00
Ponk
d307eff71f Merge pull request #177 from LynxStar/patch/mini-dungeons #patch
Fix mini-dungeon portals for parties
2023-07-10 23:09:51 +02:00
Arthur Charlton
b935725096 Handle the potentially null portal based on the name.
Matches the behavior of warping a character to a named portal.
2023-07-10 17:01:48 -04:00
Ponk
12248acd7b Merge pull request #178 from LynxStar/patch/delivery-system #patch
Delivery System - Invalid Recipient Name Patch
2023-07-10 22:40:57 +02:00
Arthur Charlton
07eb0f5e8e Untangle nested control flow conditions. 2023-07-05 14:16:09 -04:00
Arthur Charlton
cfb5fc25c3 Calling code assumes the pair never null and uses -1 to signify not found. 2023-07-05 14:12:42 -04:00
Arthur Charlton
3816e1c5bd Add the warp party function that the scripts use 2023-07-03 18:25:14 -04:00
Ponk
c9d551cd39 Merge pull request #173 from MatthewHinds/gm-security #minor
GM security changes to prevent item/mesos abuse
2023-05-29 15:50:03 +02:00
Matthew Hinds
95bf0473f3 Adjusted based on feedback 2023-05-29 14:32:01 +12:00
Matthew Hinds
a9d92b78a2 Meso drop restricted by GM level 2023-05-29 12:57:01 +12:00
Ponk
b8ebace039 Merge pull request #174 from Favouris/master #patch
Rename Monster Carnival portal scripts
2023-05-15 12:00:44 +02:00
Favouris
9223957931 Rename MCRevive6.js to MCrevive6.js 2023-05-14 19:17:38 +08:00
Favouris
5cddb7f2b6 Rename MCRevive5.js to MCrevive5.js 2023-05-14 19:17:25 +08:00
Favouris
08e7a3af16 Rename MCRevive4.js to MCrevive4.js 2023-05-14 19:17:15 +08:00
Favouris
1416cd432d Rename MCRevive3.js to MCrevive3.js 2023-05-14 19:17:03 +08:00
Favouris
2d6cf07a65 Rename MCRevive2.js to MCrevive2.js 2023-05-14 19:16:51 +08:00
Favouris
0b73d6112a Rename MCRevive1.js to MCrevive1.js 2023-05-14 19:16:40 +08:00
Ponk
b742ac0591 Merge pull request #172 from MatthewHinds/remove-levelup-messages #minor
Removed level up messages as it is non GMS like and a bit cringey
2023-05-12 08:57:51 +02:00
Matthew Hinds
4546fd44ff To prevent abuse, GMs should be permission restricted (via GM level) to trade with other non GM players, use their storage (prevent transferring to their other characters), send via Duey and to drop items. GM level is configurable. 2023-05-12 18:02:08 +12:00
Matthew Hinds
216fa9341b Removed level up messages as it is non GMS like and a bit cringey 2023-05-12 14:47:18 +12:00
Ponk
1d6d5dcc94 Merge pull request #171 from srcyscrt/docker-eclipse-temurin #patch
Use Eclipse Temurin images in the Dockerfile
2023-04-22 17:33:43 +02:00
srcyscrt
61f451694f Use Eclipse Temurin images in the Dockerfile 2023-04-22 18:43:23 +08:00
Ponk
c681f0bd82 Merge pull request #170 from Shahar6/master #patch
Fix dupe glitch with wedding
2023-04-21 19:49:17 +02:00
Shahar6
cbc0b2707e Fix dupe glitch with wedding
PoC for the glitch:
https://www.youtube.com/watch?v=EoVGQtMkJOA&ab_channel=ThirtyOneFifty
2023-04-21 20:27:59 +03:00
Ponk
36d0f8a2a0 Merge pull request #169 from FoxyYokai/Fix-Duey-Send-Item-Exploit #patch
Fix exploit with Duey Send Items
2023-04-16 08:30:05 +02:00
Sukishyou
301f65ce16 Add null check to duey packet edit check 2023-04-15 14:36:00 -05:00
Sukishyou
f1b95fe45e Fix exploit with Duey Send Items 2023-04-14 19:43:51 -05:00
Ponk
3091d747e6 Merge pull request #165 from P0nk/feat/upgrade-dependencies #patch
Upgrade dependencies
2023-03-02 18:35:59 +01:00
P0nk
f4062e5ebb Upgrade dependencies 2023-03-02 18:31:21 +01:00
Ponk
a8807f1ef0 Merge pull request #164 from P0nk/fix/custom-charset-string #patch
Fix writeString not fully respecting charset
2023-03-02 18:13:52 +01:00
P0nk
10945927c1 Fix writeString not fully respecting charset
The string would be cut short for charsets
with characters more than 1 byte.
2023-03-02 18:11:41 +01:00
Ponk
ab25f698da Merge pull request #160 from P0nk/bug/110/zenumist-portal #patch
Fix top portal in Zenumist Society (261000010) not working for GM
2023-02-17 00:48:33 +01:00
P0nk
b30e03ffb3 Fix portal in Zenumist society not working for GM chr 2023-02-17 00:42:33 +01:00
P0nk
82157c7bd1 Flatten ChangeMapHandler 2023-02-16 23:46:13 +01:00
Ponk
eb10f02ac3 Merge pull request #159 from P0nk/bug/158/id-command #patch
Fix !id command not working for certain types
2023-02-04 20:02:33 +01:00
P0nk
b1ef94ef60 Fix handbook file encoding
All handbook files are now UTF-8
2023-02-04 19:49:54 +01:00
P0nk
f89392b476 Refactor IdCommand 2023-02-04 19:46:09 +01:00
Ponk
32c4f2239d Merge pull request #155 from P0nk/feat/note-dao #minor
Refactor notes - add service and database layer
2022-12-27 16:49:55 +01:00
P0nk
404c00c2bf Merge branch 'master' into feat/note-dao 2022-12-27 15:09:38 +01:00
Ponk
9def444442 Fix version bump not obeying merge commit message (#157) #patch
* Fix version bump not obeying merge commit message

* Test the fix to bump-version

* Fix reference to specific tag of github-tag-action

* Dummy patch commit #patch

* Clean up testing of bump-version
2022-12-27 15:07:12 +01:00
P0nk
771b69d151 Merge branch 'master' into feat/note-dao 2022-12-27 14:21:43 +01:00
Ponk
cae6aa2305 Merge pull request #156 from P0nk/fix/saving-gm-report #patch
Fix saving in-game report
2022-12-27 14:12:47 +01:00
P0nk
14d80dc2f3 Fix saving "Illegal program claim" report
No chatlog is provided in the packet for this type
2022-12-27 14:08:20 +01:00
P0nk
cb38bcd270 Fix wrong timestamp format when saving report 2022-12-27 14:08:20 +01:00
P0nk
37a9a4121f Show confirmation after note is sent 2022-12-27 12:31:47 +01:00
P0nk
4731c0c60d Add tests for NoteService 2022-12-27 12:18:58 +01:00
P0nk
65111ae209 Create packet class for PacketCreator::showNotes 2022-12-27 12:18:36 +01:00
P0nk
2a460de911 Disable logging in tests 2022-12-27 12:05:51 +01:00
P0nk
cee82a08ba Remove ItemInformationProvider field in Character
This field prevented creation of Character mock in tests
2022-12-27 11:59:14 +01:00
P0nk
387437cada Workaround for Guild dependence on NoteDao 2022-12-27 11:05:00 +01:00
P0nk
af14da987e Replace FredrickProcessor dependence on NoteDao 2022-12-27 11:04:11 +01:00
P0nk
389b3ad2a4 Add NoteService to handle note operations
NoteService should be the only class with access to NoteDao;
nowhere else should NoteDao be accessed directly.

Channel dependencies are static in PacketProcessor, for now.
Ideally they would be injected in the constructor,
but since the constructor is private and I don't want to open
up that can of worms, I'll leave it like this.
At the very least, now we have a way of injecting services into
the handlers. This will make further restructuring way easier.
2022-12-27 10:34:55 +01:00
P0nk
5f1f5b7dcd Fix saving note 2022-12-27 10:24:47 +01:00
P0nk
7e3be4c45d Update README - explain hide 2022-12-26 18:09:09 +01:00
P0nk
c82881e6f2 Get rid of Character#sendNote, refactor usages of it 2022-12-26 18:09:09 +01:00
P0nk
6be1fabc55 Send wedding invitation note directly via dao 2022-12-26 18:07:41 +01:00
P0nk
4d480660b5 Rework sending notes to chr, get rid of the first method
Sending notes should not be the handled by Character
2022-12-26 18:07:41 +01:00
P0nk
1f4ce98998 Show notes using NoteDao 2022-12-26 18:07:41 +01:00
P0nk
605f2e212e Add NoteDao, used by NoteActionHandler to delete note when read 2022-12-26 18:07:41 +01:00
P0nk
188eb74a70 Add Note model object 2022-12-26 18:07:41 +01:00
P0nk
2d7d113458 Initial jdbi setup 2022-12-26 18:07:41 +01:00
Ponk
176ce6a3bd Merge pull request #150 from P0nk/bug-147/cwkpq-summons #patch
Fix error summoning master guardians on CWKPQ last stage
2022-10-16 12:32:51 +02:00
P0nk
f267b1fc0b Fix error summoning master guardians on CWKPQ last stage 2022-10-16 12:30:01 +02:00
Ponk
ea0bdb55af Merge pull request #149 from P0nk/tag-merge-commit
Tag the merge commit instead of last commit in the PR #patch
2022-10-16 11:56:24 +02:00
P0nk
4004b36bfa Tag the merge commit instead of last commit in the PR
The merge commit is more suitable since it provides some context
and groups up all the commits.
2022-10-16 11:53:29 +02:00
Ponk
d0a4c416e4 Merge pull request #148 from P0nk/versioning
Define versioning scheme
2022-10-16 10:06:55 +02:00
P0nk
584fccec92 Activate bump-version action 2022-10-16 10:04:35 +02:00
P0nk
41cf8b4485 Update README - add "Working with GitHub", "Versioning" 2022-10-16 10:02:03 +02:00
P0nk
e12d853499 Update build workflow - new name and updated dependencies 2022-10-16 08:48:32 +02:00
P0nk
5c7fcdae06 Add action to automatically tag commits
Using this action: https://github.com/marketplace/actions/github-tag-bump
The idea is that the repo will be versioned in SemVer format, such as "v0.5.3".
When a PR is merged, a new version will automatically be added.
The new version is generated based on the latest tag, and the part that is bumped
is dictated by the merge commit message, either #major, #minor (default) or #patch.

This way I (the repo owner) has control over versioning, and other contributors
don't have to bother with anything.
2022-10-16 08:34:45 +02:00
Ponk
70b82e0b66 Merge pull request #146 from MatthewHinds/feature/toggle_nx_gain_message
Feature/toggle NX gain message
2022-10-15 08:42:25 +02:00
Matthew Hinds
32f6194a75 Adjusting name
Adjusting name and added it to the config
2022-10-13 21:27:57 +13:00
Matthew Hinds
dd260e7b2a Toggle the NX coupon loot notice
Added a toggle to the showHint that announces the NX gain on a NX coupon loot
2022-10-13 21:23:49 +13:00
Ponk
c1fbf2c18c Merge pull request #134 from cpurules/feature/quest-3239-rework
Rework quest 3239: The Missing Mechanical Parts
2022-09-29 20:00:39 +02:00
Ponk
42d03a29e7 Merge pull request #133 from v3921358/master
Fix MiniGame Error
2022-09-29 19:37:20 +02:00
Ponk
675addf25c Merge pull request #137 from Sukishyou/fix-southperry-map-id-in-goto-command
Fix MapId for Southperry from old inaccessible map to correct one
2022-09-29 19:28:01 +02:00
Ponk
f0fd3ce850 Merge pull request #139 from cpurules/bugfix/lowb-reactor-update
Update ritual stone reactor script (see PR 135 discussion)
2022-09-29 19:21:22 +02:00
Charlie Unfricht
991873dcbe Update ritual stone reactor script (see PR 135 discussion) 2022-09-23 17:32:34 -04:00
Windyboy
fd54c764e7 Change the position of the logic handle 2022-09-22 19:58:31 +08:00
Ponk
18fe7b9906 Merge pull request #138 from cpurules/bugfix/pet-quests
Fix reported bugs in pet quests
2022-09-22 07:23:11 +02:00
Ponk
a350d58065 Merge pull request #135 from cpurules/bugfix/lowb-reactor
Add handler for Land of Wild Boar's ritual stones
2022-09-22 07:19:49 +02:00
Charlie Unfricht
f34e271b6d Complete quest after pet evolves (repeatable) 2022-09-21 21:54:57 -04:00
Charlie Unfricht
a9715a694c Complete quest on successful evolution 2022-09-21 21:40:42 -04:00
Charlie Unfricht
c0d6917721 Fix bug in Pet's Re-Evolution quest 2022-09-21 21:37:14 -04:00
Charlie Unfricht
08edd8595f Update closeness --> tameness 2022-09-21 21:36:41 -04:00
Sukishyou
e999840f8e Fix MapId for Southperry from old inaccessible map to correct one 2022-09-21 20:30:51 -05:00
Charlie Unfricht
a03bdbf695 Replace MapleMap var with getMap() 2022-09-21 18:17:24 -04:00
Charlie Unfricht
79f19331f4 Add reactor script for Land of Wild Boar's ritual stones 2022-09-21 17:56:56 -04:00
Charlie Unfricht
04e658710e Add killMonster() methods 2022-09-21 17:53:54 -04:00
Windyboy
769e21115b Fix MiniGame Error
The owner of the room would get stuck if the visitor left the miniroom by closing the game
2022-09-17 00:23:07 +08:00
Ponk
8d3be314d6 Merge pull request #131 from P0nk/fix-water-of-life
Fix water of life script
2022-09-15 19:50:38 +02:00
P0nk
1a28fc98ac Commit to "tameness" name over "closeness" for pets, fix scripts 2022-09-15 17:12:21 +02:00
Ponk
125d0aa03d Merge pull request #130 from v3921358/master
Fix dead people could be revived with a party hp potion
2022-09-15 16:56:57 +02:00
Windyboy
388ee5c805 Fix dead people could be revived with a party hp potion 2022-09-15 01:02:34 +08:00
Ponk
ba558c350f Merge pull request #128 from P0nk/fix-monster-summon-skill
Fix mob summoning mobskill not working
2022-09-14 07:31:04 +02:00
P0nk
650b1ff89b Fix mob summoning mobskill not working 2022-09-14 07:27:48 +02:00
Ponk
6c65b8918a Merge pull request #125 from P0nk/mob-skill-fixes
Fix issues caused by mob skill refactor
2022-09-12 21:23:05 +02:00
P0nk
d31f4806fc Fix mob using attack with no diseaseSkill causing errors 2022-09-12 20:31:38 +02:00
Ponk
0c6548a36d Merge pull request #116 from P0nk/mob-skill-refactoring
Clean up and refactor mob skills
2022-09-07 19:28:53 +02:00
P0nk
df5159e34c MobSkillFactory throws exception instead of returning null 2022-09-07 19:25:30 +02:00
P0nk
319d65a0c3 Add tests for MobSkillFactory 2022-09-07 18:58:26 +02:00
P0nk
fd793d6b04 Fix not reading mpCon from MobSkill 2022-09-07 18:58:02 +02:00
P0nk
15c4188d48 Make MCSkill immutable with record 2022-09-03 14:44:14 +02:00
P0nk
9e0479fe9f Clean up Monster usedSkills 2022-09-03 14:31:43 +02:00
P0nk
a6ec6adbb5 Combine type and skillLevel in MobSkill 2022-09-03 14:07:24 +02:00
P0nk
7cdaabf6f8 Simplify Monster skills with Set instead of List
Doable now with MobSkillId records
2022-09-03 13:31:47 +02:00
P0nk
c47ca4d6a4 Fix MobSkillType always being ATTACK_UP 2022-09-03 13:11:45 +02:00
P0nk
930d365752 Add record MobSkillId for mob skill type + level combination
Pair is nasty to work with when they are passed around all over
2022-09-03 11:01:51 +02:00
P0nk
7a784a7938 Disease and MCSkill hold MobSkillType instead of int 2022-09-03 05:20:54 +02:00
P0nk
fba49e7eec MobSkillFactory takes MobSkillType instead of int as id argument 2022-09-03 04:52:55 +02:00
P0nk
66b04969fd Delete ArrayMap which filled no function 2022-09-03 04:32:09 +02:00
P0nk
aeaad4194a Refactor MobSkill#applyEffect, split into multiple smaller methods 2022-09-03 04:22:06 +02:00
P0nk
455d4b2195 Make MobSkill immutable using builder pattern 2022-09-02 08:45:55 +02:00
P0nk
6e62a6a45d Break off mob skill loading into separate method 2022-09-02 07:58:52 +02:00
P0nk
3c9be7d70b Lessen magic numbers around mob skills with new "type" enum 2022-09-02 07:39:26 +02:00
Ponk
91c58eee04 Merge pull request #114 from P0nk/area-boss-debuffs
Make area bosses killable
2022-08-31 22:07:14 +02:00
P0nk
958286e078 Make Riche text MSEA-like (at least)
MSEA text is likely not the same as GMS text, but it's better than making things up.
2022-08-31 22:04:58 +02:00
P0nk
ea76880b7f Use act() in reactor scripts where possible, provide empty act() otherwise
"function hit()" has triggered on each reactor hit,
while "function act()" is only triggered once it's destroyed or reached an end state
2022-08-31 21:34:49 +02:00
P0nk
298457a007 Clean up old way of damaging area boss with reactor 2022-08-30 08:33:10 +02:00
P0nk
7d28e00e4f Make Riche killable after destroying the reactor 2022-08-29 23:32:59 +02:00
P0nk
0118844c2e Make Scholar Ghost killable after triggering the reactor 2022-08-29 23:05:25 +02:00
P0nk
8c418f197a Make Rurumo killable after triggering the reactor 2022-08-29 22:53:29 +02:00
P0nk
7fa677d766 Fix act for scripts that reset to initial state after some time 2022-08-29 22:46:46 +02:00
P0nk
17ae269cc9 Make Security Camera killable after talking to control device 2022-08-29 22:04:07 +02:00
P0nk
535b6c3e8e Make Deet and Roi killable after talking to magic pentagram 2022-08-29 21:58:58 +02:00
P0nk
f1d0cb6b4d Make Shade killable after talking to lamp post 2022-08-29 21:42:57 +02:00
P0nk
7fffd0bb64 Make Snow Witch killable after reactor activation 2022-08-29 21:20:51 +02:00
P0nk
84890ac308 Support sealing mob skill 2022-08-29 19:40:24 +02:00
Charlie Unfricht
a67666af62 Set Mechanical Parts as event exclusive item for removal on exit 2022-08-26 01:27:12 -04:00
Charlie Unfricht
2ed69407de Add instanced event handling 2022-08-26 01:20:57 -04:00
Charlie Unfricht
6e578a71a1 Add default portal handler script for exit room 2022-08-26 00:38:30 -04:00
Charlie Unfricht
bdc0756655 Dispose base NPC dialogue 2022-08-26 00:36:04 -04:00
Ponk
4baf06e4f9 Merge pull request #106 from cpurules/feature/explorer-titles
Fix implementation of primary explorer title quests
2022-08-20 10:19:26 +02:00
Charlie Unfricht
f4c283890f Condense 2022-08-19 17:58:17 -04:00
Ponk
521aaf7294 Merge pull request #109 from P0nk/script-tests
Fix scripts containing non-ASCII characters, add tests
2022-08-19 21:19:09 +02:00
P0nk
d1da1d67e0 Add test for evaluating all reactor scripts 2022-08-19 20:00:28 +02:00
P0nk
5b0715d5d0 Add test for evaluating all quest scripts 2022-08-19 19:58:17 +02:00
P0nk
cf27c6301f Add test for evaluating all portal scripts 2022-08-19 19:57:15 +02:00
P0nk
3354345cef Add test for evaluating all item scripts 2022-08-19 19:55:27 +02:00
P0nk
6ae2235083 Add test for evaluating all event scripts 2022-08-19 19:53:07 +02:00
P0nk
c5d2e90e5b Add test for evaluating all NPC scripts 2022-08-19 19:45:40 +02:00
Charlie Unfricht
0eed00dd64 Add check for completed explorer quest to not re-trigger 2022-08-19 09:42:32 -04:00
Charlie Unfricht
2d4f3eac49 Add missing Helios Tower Library map for Ludus Lake Explorer 2022-08-19 09:38:30 -04:00
Charlie Unfricht
a55871c059 Update explorer quest infoNumber pointer progress 2022-08-19 09:16:07 -04:00
Ponk
b831173ecf Merge pull request #105 from cpurules/bugfix/missing-skill-constants
Add missing skill constants
2022-08-19 11:33:59 +02:00
Charlie Unfricht
13ffce3ab3 Fixes 2022-08-19 01:29:06 -04:00
Ponk
6d969106c0 Merge pull request #104 from cpurules/bugfix/pet-cash-food
Allow pet cash food to increase closeness even when pet fullness is maxed
2022-08-19 07:09:58 +02:00
Charlie Unfricht
456ab667e9 Add missing skill IDs for Aran 2022-08-17 21:01:31 -04:00
Charlie Unfricht
48ae8c0e93 Add missing skill IDs for Knights of Cygnus 2022-08-17 20:52:52 -04:00
Charlie Unfricht
c96e4a0e67 Add missing skill IDs for warrior tree 2022-08-17 20:36:28 -04:00
Charlie Unfricht
2a1570e03a Add missing skill IDs for thief tree 2022-08-17 20:29:33 -04:00
Charlie Unfricht
435ca37a71 Add missing skill IDs for pirate tree 2022-08-17 20:26:14 -04:00
Charlie Unfricht
e4bba96d1f Add missing skill IDs for mage tree 2022-08-17 20:20:36 -04:00
Charlie Unfricht
a1382dfbd0 Fix mistake in skill IDs 2022-08-17 20:17:30 -04:00
Charlie Unfricht
fe7ea6fcef Add remaining missing archer tree skill constants 2022-08-17 19:39:14 -04:00
Charlie Unfricht
edd38a686b Add missing archer skill constants 2022-08-17 19:33:34 -04:00
Charlie Unfricht
8d4842d2ea Cash pet food sets forceEnjoy=true to always increase closeness 2022-08-17 16:39:41 -04:00
Charlie Unfricht
3a16a724f5 Add forceEnjoy parameter to Pet.gainClosenessFullness to ignore existing fullness value 2022-08-17 16:39:21 -04:00
Ponk
677a956b25 Merge pull request #102 from cpurules/bugfix/magatia-quests
Fix broken Magatia quests
2022-08-17 20:55:25 +02:00
Ponk
92b3666f64 Merge pull request #101 from v3921358/master
Analyze pet packet structure correctly
2022-08-17 20:24:17 +02:00
Charlie Unfricht
4d73416952 Add NPC handling for quest 3322 2022-08-17 03:49:34 -04:00
Charlie Unfricht
871c8a4477 Update NPC handling for quest 3311 2022-08-17 03:31:30 -04:00
Charlie Unfricht
9592b8323f Update Desk NPC to not require double click 2022-08-17 02:38:32 -04:00
Charlie Unfricht
9cdd46c0cd Add Magic Device drop for Homun of Closed Lab for quest 2022-08-17 02:20:27 -04:00
Windyboy
97f358f047 Analyze pet packet structure correctly 2022-08-17 14:07:39 +08:00
Charlie Unfricht
d8e47287b0 Grammar fix 2022-08-17 01:52:26 -04:00
Charlie Unfricht
b9487dd95c .length() -> .length 2022-08-17 01:33:02 -04:00
Ponk
2e55deebc9 Merge pull request #100 from cpurules/bug/phil-town-descriptions
Fix Phil's town descriptions for Ellinia/Henesys
2022-08-16 13:16:36 +02:00
Ponk
b29a08bc93 Merge pull request #99 from cpurules/feature/rebirth-paths
Update rebirth NPC to allow path selection
2022-08-16 12:40:55 +02:00
Charlie Unfricht
098a52b485 Swap Ellinia and Henesys so descriptions are aligned 2022-08-16 02:53:55 -04:00
Charlie Unfricht
cd706c544b Fix bug where non-200 capped classes can't rebirth 2022-08-16 02:17:49 -04:00
Charlie Unfricht
a456b27011 Update rebirth NPC to allow for path selection 2022-08-16 02:12:31 -04:00
Charlie Unfricht
b0b197a7a5 Update executeReborn to take in a job id 2022-08-16 02:11:38 -04:00
Ponk
897679afc4 Merge pull request #95 from P0nk/bug-88-cosmetic-lens
Fix one-time cosmetic lens coupon not working for female characters
2022-08-11 21:17:06 +02:00
P0nk
6ea4e3cfc1 Fix one-time lens coupon for female
Last commit fixed Orbis, this one fixes:
Henesys, Showa, NLC, Mu Lung, Ludibrium, Singapore, Amoria, Ariant
2022-08-11 21:14:26 +02:00
P0nk
ae7b832e00 Fix Orbis one-time lens coupon for female 2022-08-11 20:20:45 +02:00
P0nk
79ab28a52e Break up Orbis lens NPC script into multiple functions 2022-08-11 19:10:57 +02:00
Ponk
78314855eb Merge pull request #94 from P0nk/fix-wz-path
Fix wz path
2022-08-11 19:09:51 +02:00
P0nk
d691dc1e18 Prefer Path.of() over Paths.get() 2022-08-11 19:01:40 +02:00
P0nk
297d5b25f0 Fix default wz location 2022-08-11 18:54:01 +02:00
Ponk
5ebbab6da3 Merge pull request #93 from P0nk/system-cleanup
System cleanup
2022-08-11 15:23:12 +02:00
P0nk
229252cd63 Fix deprecations 2022-08-11 15:18:09 +02:00
P0nk
618f312b84 Remove thread tracker system 2022-08-11 14:57:26 +02:00
P0nk
4fb632ecdb Remove monitored locks (fair), use basic version 2022-08-11 14:45:48 +02:00
P0nk
54878ebe8c Remove monitored locks with default fairness, use basic version 2022-08-11 14:26:23 +02:00
P0nk
8657b765b1 Remove monitored read/write locks, use basic version 2022-08-11 14:16:06 +02:00
P0nk
8ab2058ecc Stop using monitored locks in EventInstanceManager 2022-08-11 13:56:12 +02:00
P0nk
42043c3d6c Stop using monitored locks in MapleMap 2022-08-11 13:38:16 +02:00
P0nk
28e8862254 Stop using monitored locks in World 2022-08-11 13:31:55 +02:00
P0nk
7e848618e8 Stop using monitored locks in Server 2022-08-11 12:07:38 +02:00
P0nk
b6c17e944a Stop using monitored locks in Channel 2022-08-11 11:55:56 +02:00
P0nk
c7af125afc Remove FaceExpressionService
Face expressions are automatically defaulted back after 5 seconds by the client, anyway
2022-08-11 11:48:11 +02:00
Ponk
381851e95e Merge pull request #89 from truongdatnhan/master
Fixing bugs, Clean up code, Upgrade to new Syntax
2022-08-11 11:16:15 +02:00
truongdatnhan
7f7b28874f Remove comments 2022-08-11 16:08:45 +07:00
truongdatnhan
72a87cae43 Merge pull request #8 from truongdatnhan/eclipse
Removing unused comments
2022-08-11 16:05:10 +07:00
Đạt Nhân Trương
53914bbd32 Removing unused comments 2022-08-11 16:02:53 +07:00
truongdatnhan
68663146c8 Merge pull request #7 from truongdatnhan/eclipse
remove comments
2022-08-11 15:58:57 +07:00
Đạt Nhân Trương
8e395b0770 remove comments 2022-08-11 15:58:18 +07:00
Ponk
1c0aebf6aa Merge pull request #92 from P0nk/project-improvements
Project improvements - bump deps, get rid of commons-io
2022-08-11 01:26:31 +02:00
P0nk
65f8a6e335 Bump dependencies (maven plugins + JUnit) 2022-08-11 01:19:36 +02:00
P0nk
58277574b5 Refactor QuestItemFetcher, remove commons-io dependency 2022-08-11 01:15:34 +02:00
P0nk
7aba5f4578 Refactor MapInfoRetriever, stop using FileUtils from commons 2022-08-11 01:01:08 +02:00
P0nk
28bc5ee925 Refactor EventMethodFiller, stop using FileUtils from commons 2022-08-11 00:43:08 +02:00
P0nk
62ce462c0f Make jar multi-release to align with log4j2, get rid of warning 2022-08-11 00:08:19 +02:00
truongdatnhan
d9fa632204 Merge pull request #6 from truongdatnhan/eclipse
Moving checking null for storage to when loading character
2022-08-11 01:35:38 +07:00
Đạt Nhân Trương
85e5356a9c Moving checking storage null to when loading char 2022-08-11 01:33:48 +07:00
truongdatnhan
81e15f205b Merge branch 'P0nk:master' into eclipse 2022-08-07 21:53:57 +07:00
Đạt Nhân Trương
0ef3e69638 Clean up code, replace switch and try-with-resource where possible. 2022-08-07 21:51:10 +07:00
truongdatnhan
93e4f14b7b Merge pull request #5 from truongdatnhan/eclipse
Clean up code & Upgrading syntax
2022-08-07 01:41:11 +07:00
truongdatnhan
5bec5d79e9 Merge branch 'P0nk:master' into master 2022-08-07 01:40:28 +07:00
truongdatnhan
a7ba214af3 Merge branch 'P0nk:master' into eclipse 2022-08-07 01:39:30 +07:00
Đạt Nhân Trương
f983b4dccf Clean up code & Upgrade syntax to new Java 2022-08-07 01:35:02 +07:00
Đạt Nhân Trương
bbdf236a10 Clean code 2022-08-06 18:16:52 +07:00
Đạt Nhân Trương
61c3e75a52 Fully mirgate main source to Java NIO (except some files in tools). 2022-08-06 18:13:47 +07:00
Ponk
76f4b681fe Merge pull request #87 from P0nk/bug-86-helios-elevator-portal
Fix helios tower elevator portal script
2022-08-05 22:51:09 +02:00
P0nk
e2b8236b59 Fix negated comparison 2022-08-05 22:49:42 +02:00
P0nk
bfb2c1cb3d Fix various other scripts with broken comparisons 2022-08-05 22:46:01 +02:00
P0nk
fcdf3d6e1e Fix helios tower elevator portal script 2022-08-05 22:30:35 +02:00
truongdatnhan
838519b350 Merge pull request #4 from truongdatnhan/eclipse
Character storage won't get initialize at first time on server
2022-08-05 19:34:55 +07:00
Đạt Nhân Trương
571d804f50 Character storage won't get initialize at first time on server 2022-08-05 19:33:15 +07:00
Ponk
6901b5133b Merge pull request #81 from P0nk/various-fixes
Various minor fixes
2022-08-03 08:46:07 +02:00
P0nk
67a6273f6f Merge branch 'master' into various-fixes 2022-08-03 08:41:07 +02:00
Ponk
df440b09e9 Merge pull request #83 from P0nk/bug-82-puppeteer-secret-passage-script
Fix NPC script at end of Puppeteer's Secret Passage (910510100)
2022-08-03 08:34:16 +02:00
P0nk
3f1a6ecc8c Fix NPC script at end of Puppeteer's Secret Passage (910510100) 2022-08-03 08:29:57 +02:00
P0nk
2b680c02c8 Mute GraalVM warning spam on startup 2022-08-03 07:57:01 +02:00
P0nk
c2b28b5148 Merge branch 'master' into various-fixes 2022-08-03 07:43:02 +02:00
ronancpl7
905a0260a6 Wrap around hpDec schedules (#75)
* Wrap around hpDec schedules

Merges hpDec schedules at character into a world schedule.

* Patch hpDec timer reset on changing maps

Patch timer reset on changing maps with hpDec.

* Update Character.java

* Update Client.java

* Update World.java

Co-authored-by: Ronan Lana <rcpl2010@gmail.com>
2022-08-03 07:42:15 +02:00
P0nk
8ce3be5efb Merge branch 'master' into various-fixes 2022-08-03 07:04:44 +02:00
Ponk
e5e9b50215 Merge pull request #78 from truongdatnhan/master
Upgrade to to File NIO
2022-08-03 06:59:41 +02:00
P0nk
e57dc96fd1 Update README 2022-08-02 19:27:44 +02:00
truongdatnhan
f097213466 Merge pull request #3 from truongdatnhan/eclipse
Fixing indents !
2022-08-02 23:15:15 +07:00
Đạt Nhân Trương
d9a86d6d75 Fixing indents ! 2022-08-02 23:14:17 +07:00
P0nk
5afb09d798 Refactor various minor things 2022-08-02 17:45:47 +02:00
Ponk
4fd1daada4 Merge pull request #80 from P0nk/bug-79-dojo-scripts
Fix broken dojo scripts due to map constants
2022-08-02 16:43:37 +02:00
P0nk
8d213e4d6e Fix broken dojo scripts since introduction of MapId constants 2022-08-02 16:31:15 +02:00
truongdatnhan
8238134781 Merge pull request #2 from truongdatnhan/eclipse
Clean up formatting & Update NIO in some remaining files
2022-08-01 14:26:57 +07:00
Đạt Nhân Trương
4496e0854f Clean up formatting & Update NIO in some remaining files 2022-08-01 14:25:32 +07:00
truongdatnhan
5ed068eb05 Merge pull request #1 from truongdatnhan/eclipse
Upgrade to to File NIO
2022-07-30 16:18:57 +07:00
Đạt Nhân Trương
a44744c05b Upgrade to Java NIO 2022-07-30 16:10:46 +07:00
Đạt Nhân Trương
d42a57ef79 Update dependencies ! 2022-07-21 15:00:30 +07:00
truongdatnhan
3a30642969 Update .gitignore 2022-07-21 14:48:52 +07:00
Ponk
563d3033b9 Merge pull request #77 from P0nk/fix-shutdown-logging
Fix shutdown logging
2022-06-19 08:01:12 +02:00
P0nk
89ababc5c0 Fix logs being cut off during shutdown 2022-06-19 07:58:17 +02:00
Ponk
45c9e6fc7e Merge pull request #73 from P0nk/view-all-char-fix
Fix 'View all characters' transition
2022-03-26 16:33:02 +01:00
P0nk
570499f6ab Fix mixed up world ids 2022-03-26 16:30:59 +01:00
P0nk
513c9b615d Rework View all characters - fix packet and limit max chrs
Thanks to Lehava#4668 for finding the packet structure
2022-03-26 15:51:16 +01:00
Ponk
406708d0ba Merge pull request #69 from P0nk/version-upgrades
Version upgrades
2022-02-14 21:34:52 +01:00
P0nk
084e7b22fa Consolidate HexTool methods and add more tests 2022-02-14 19:48:21 +01:00
P0nk
1daddbf302 Use HexFormat for converting from bytes to hex string and the other way round 2022-02-14 18:37:30 +01:00
P0nk
0e32f439fb Add unit tests for HexTool 2022-02-14 18:20:02 +01:00
P0nk
e991c5a96f Bump dependency versions
Slf4j: 1.7.32 -> 1.7.36
Netty: 4.1.67.Final -> 4.1.74.Final
JUnit: 5.7.2 -> 5.8.2
HikariCP: 5.0.0 -> 5.0.1
MySQL connector: 8.0.26 -> 8.0.28
2022-02-12 18:02:33 +01:00
P0nk
ef70dac1a0 Bump to Java 17 2022-02-12 17:22:54 +01:00
Ponk
b8e8caeb31 Merge pull request #66 from P0nk/logging-consolidation
Consolidate logging
2022-02-10 22:06:07 +01:00
P0nk
aceb410331 Stop using java.util.logging.Logger, start using slf4j 2022-02-10 21:49:47 +01:00
P0nk
2bbfd46105 Stop logging with System.out.println, start using slf4j 2022-02-10 21:40:54 +01:00
P0nk
c879e36a9c Migrate last set of calls to FilePrinter, delete FilePrinter 2022-02-10 19:53:22 +01:00
P0nk
8b630f7357 Migrate yet another batch of FilePrinter users to Slf4j
One FilePrinter.printError() method removed, one more to go
2022-02-09 21:05:22 +01:00
P0nk
0c60606b4e Migrate another batch of FilePrinter users to slf4j.Logger
Another FilePrinter method removed.
2022-02-08 21:08:59 +01:00
P0nk
53465bba25 Migrate some users of FilePrinter to slf4j.Logger
At least we got rid of one printError method
2022-01-19 18:36:19 +01:00
Ponk
6db3aa3459 Merge pull request #68 from P0nk/saving-monsterbook
Improve monsterbook saving
2022-01-19 18:06:48 +01:00
P0nk
ecca446505 Add helpful comment in the monsterbook script 2022-01-19 18:04:36 +01:00
P0nk
d6192385dd Upsert monsterbook cards instead of delete -> insert
Also use existing connection during character saving for proper rollback.
2022-01-19 17:56:00 +01:00
Ponk
fa29dbf5cb Merge pull request #67 from Neolas67/adding_missing_cape_quest_scripts
Adding missing cape quest scripts
2022-01-19 17:12:41 +01:00
Ulas Kundakci
34aeb589d6 end the files with new lines 2022-01-04 22:02:49 +11:00
Ulas Kundakci
f3d8429327 adding missing magatia cape quest start scripts 2022-01-04 21:58:31 +11:00
P0nk
0b66766e8a Bump log4j to 2.17.1 2022-01-03 19:20:59 +01:00
P0nk
66ac678f1b Fix broken switch 2022-01-03 19:19:52 +01:00
P0nk
78f6ae7e6a Refactor maple leaf logging
Not even sure anyone is using this system. Keeping it around just in case.
2022-01-03 19:12:04 +01:00
P0nk
1e53bc7d1f Refactor gachapon logging 2022-01-03 18:50:50 +01:00
P0nk
6041d56bcd Refactor chat logging 2022-01-03 18:35:15 +01:00
P0nk
7e7c2cb153 Refactor expedition logging 2022-01-03 18:29:47 +01:00
P0nk
189d8096db Refactor trade logging 2022-01-03 18:10:23 +01:00
P0nk
acde0696b1 Move and encapsulate "ignored" collection 2021-12-21 21:43:51 +01:00
P0nk
75a9a9718d Encapsulate "monitored" collection 2021-12-21 21:43:51 +01:00
P0nk
6c1a9465c0 Use log4j for monitored chr logger. Log all monitored to a dedicated file. 2021-12-21 21:43:50 +01:00
Ponk
507ab06721 Merge pull request #65 from P0nk/log4j-2.16.0
Bump Log4j to  2.16.0
2021-12-15 20:00:16 +01:00
P0nk
a511157fa5 Bump log4j to 2.16.0 2021-12-15 19:57:46 +01:00
Ponk
2e827542cf Merge pull request #64 from P0nk/log4j-upgrade
Bump log4j to 2.15.0
2021-12-11 18:03:59 +01:00
P0nk
451d86b5b4 Bump log4j to 2.15.0
2.14.1 and earlier (famously) contains a RCE exploit.
2021-12-11 17:59:41 +01:00
Ponk
b24945eaba Merge pull request #63 from P0nk/fix-family-loading
Fix family loading on server startup
2021-11-18 21:21:35 +01:00
P0nk
4cf3135d48 Fix family loading on server startup
Worlds need to be initialized before families due to an interdependency
2021-11-18 21:17:33 +01:00
Ponk
a26a2e7079 Merge pull request #62 from P0nk/fix-packet-reuse
Fix issue with packet bytes reuse
2021-11-17 22:05:46 +01:00
P0nk
503740542d Fix issue with packet bytes reuse
Big oversight that caused broadcasted (packet sent to multiple clients)
packets to only be correct for the first receiver, for example when
3 players were in the same map.
2021-11-17 22:00:21 +01:00
Ponk
1b359aa674 Merge pull request #61 from P0nk/id-constants
Id constants
2021-11-07 14:37:36 +01:00
P0nk
b15a7e61d4 Turn map id magic numbers into constants 2021-11-07 14:26:34 +01:00
P0nk
c022c3595f Turn npc id magic numbers into constants 2021-11-07 12:36:00 +01:00
P0nk
8d10e3d1b0 Turn mob id magic numbers into constants 2021-11-07 12:15:36 +01:00
P0nk
4efd356cbf Turn item id magic numbers into constants 2021-11-07 11:39:09 +01:00
Ponk
a4c079c2e8 Merge pull request #60 from tastyegg/patch-1
Fix AddMp on 1st Job Change
2021-10-17 17:46:53 +02:00
Kevin Zeng
7cfee6db53 Fix AddMp on 1st Job Change
For mixed jobs (Archer/Thief/Pirate), it should add mp instead of adding hp twice.
2021-10-17 10:48:54 -04:00
Ponk
ce22f52b2b Merge pull request #58 from P0nk/merchant-lists
Merchant visitor list and blacklist
2021-09-28 19:08:35 +02:00
P0nk
2e78742d8c Update development status 2021-09-28 18:43:31 +02:00
P0nk
5cae3fc336 Implement merchant blacklist, blocking any listed characters from entering 2021-09-28 18:26:27 +02:00
P0nk
3a9305d0d9 Store merchant visitor history, and display it in the dialogue 2021-09-28 08:33:25 +02:00
P0nk
cc23d7734a Implement "view visitor" packet 2021-09-27 22:54:05 +02:00
P0nk
edc457d5f5 Implement "view blacklist" packet 2021-09-27 22:11:03 +02:00
Ponk
37899c2508 Merge pull request #57 from P0nk/use-timeunit
Use TimeUnit for time calculations
2021-09-10 19:20:03 +02:00
P0nk
8b60684103 Fix missing static imports of TimeUnit 2021-09-10 19:18:20 +02:00
P0nk
cdc17ef3dd Use TimeUnit for time calculations 2021-09-10 19:08:58 +02:00
Ponk
d52aedac4f Merge pull request #56 from P0nk/reformat
Reformat all code with 4 space indent
2021-09-09 23:43:45 +02:00
P0nk
d9590078f5 Reformat and clean up reactor and base scripts 2021-09-09 23:38:09 +02:00
P0nk
3f43fe82d0 Reformat and clean up quest scripts 2021-09-09 23:36:54 +02:00
P0nk
a78ca88a02 Reformat and clean up portal scripts 2021-09-09 23:35:59 +02:00
P0nk
d893309b4f Reformat and clean up npc scripts 2021-09-09 23:35:02 +02:00
P0nk
0c1545f81d Reformat and clean up map scripts 2021-09-09 23:32:43 +02:00
P0nk
f76b9954a7 Reformat and clean up item scripts 2021-09-09 23:32:17 +02:00
P0nk
a12feaf3e4 Reformat and clean up event scripts 2021-09-09 23:32:05 +02:00
P0nk
7be1d119de Reformat and clean up "tools" package 2021-09-09 23:28:07 +02:00
P0nk
e8ef3a492c Reformat and clean up "server" package 2021-09-09 23:27:38 +02:00
P0nk
d389665bd7 Reformat and clean up "scripting" package 2021-09-09 23:26:45 +02:00
P0nk
9b1dc76854 Reformat and clean up "provider" package 2021-09-09 23:26:19 +02:00
P0nk
6be6ea9927 Reformat and clean up "net" package 2021-09-09 23:26:02 +02:00
P0nk
69f4580637 Reformat and clean up "constants" package 2021-09-09 23:23:32 +02:00
P0nk
250d49e85d Reformat and clean up "config" package 2021-09-09 23:23:01 +02:00
P0nk
9bf1b68924 Reformat and clean up "client" package 2021-09-09 23:22:44 +02:00
Ponk
07f55fa53c Merge pull request #55 from P0nk/maple-cleanup
Remove "Maple" prefix from class names
2021-09-09 23:18:38 +02:00
P0nk
c4318bef7b Rename and clean up MapleQuestRequirement 2021-09-09 23:06:28 +02:00
P0nk
0777e5529f Rename and clean up MapleQuestAction 2021-09-09 23:05:32 +02:00
P0nk
62d2e87d25 Rename MapleMatchCheckingElement 2021-09-09 23:04:36 +02:00
P0nk
8f0bdb3c6d Rename InviteResult and MapleInviteResult 2021-09-09 23:04:02 +02:00
P0nk
8162d0aacd Rename and clean up MapleGachapon and subclasses 2021-09-09 23:02:22 +02:00
P0nk
09caabba73 Rename MapleCoolDownValueHolder 2021-09-09 22:58:30 +02:00
P0nk
820de42257 Rename and clean up MapleCarnivalFactory 2021-09-09 22:56:50 +02:00
P0nk
2afec0bcda Rename MapleBuffStatValueHolder 2021-09-09 22:55:50 +02:00
P0nk
5883626020 Rename and clean up MapleTrade 2021-09-09 22:53:53 +02:00
P0nk
701d735202 Rename and clean up MapleStorageInventory 2021-09-09 22:53:16 +02:00
P0nk
e9c8a82b47 Rename and clean up MapleStorage 2021-09-09 22:51:39 +02:00
P0nk
18e1f6c50b Rename and clean up MapleStatEffect 2021-09-09 22:51:02 +02:00
P0nk
ca4bcd80d1 Rename and clean up MapleSkillbookInformationProvider 2021-09-09 22:49:57 +02:00
P0nk
a4d3f17efb Rename and clean up MapleShopItem 2021-09-09 22:49:02 +02:00
P0nk
43a80f0491 Rename and clean up MapleShopFactory 2021-09-09 22:48:25 +02:00
P0nk
104444e83b Rename and clean up MapleShop 2021-09-09 22:47:39 +02:00
P0nk
e31894caae Rename and clean up MapleMarriage 2021-09-09 22:46:32 +02:00
P0nk
9c8abf6f62 Rename and clean up MapleItemInformationProvider 2021-09-09 22:45:55 +02:00
P0nk
8f54b3e5de Rename and clean up MapleQuestRequirementType 2021-09-09 22:44:34 +02:00
P0nk
473ab19034 Rename and clean up MapleQuestActionType 2021-09-09 22:43:23 +02:00
P0nk
fef273ecc9 Rename and clean up MapleQuest 2021-09-09 22:42:02 +02:00
P0nk
75d631bebb Rename and clean up MapleRockPaperScissor 2021-09-09 22:40:36 +02:00
P0nk
8a95459a17 Rename and clean up MapleSummon 2021-09-09 22:39:43 +02:00
P0nk
03dc665605 Rename and clean up MapleReactorStats 2021-09-09 22:39:05 +02:00
P0nk
036854a8be Rename and clean up MapleReactorFactory 2021-09-09 22:38:37 +02:00
P0nk
dc4d710d12 Rename and clean up MapleReactor 2021-09-09 22:38:03 +02:00
P0nk
d7851ef40e Rename MaplePortalFactory 2021-09-09 22:37:14 +02:00
P0nk
7f4760ba1a Rename MaplePortal 2021-09-09 22:36:45 +02:00
P0nk
667bc69eb1 Rename and clean up MaplePlayerShopItem 2021-09-09 22:35:46 +02:00
P0nk
f1ca5991c6 Rename and clean up MaplePlayerShop 2021-09-09 22:35:14 +02:00
P0nk
4cb15ab99d Rename and clean up MapleMist 2021-09-09 22:34:30 +02:00
P0nk
2a8fd5219a Rename and clean up MapleMiniGame 2021-09-09 22:33:50 +02:00
P0nk
b62ee8c8e2 Rename and clean up MapleMiniDungeonInfo 2021-09-09 22:33:09 +02:00
P0nk
867624f980 Rename and clean up MapleMiniDungeon 2021-09-09 22:32:24 +02:00
P0nk
efb1cb0632 Rename MapleMapPortal 2021-09-09 22:31:36 +02:00
P0nk
fa8222d9a0 Rename and clean up MapleMapObjectType 2021-09-09 22:31:05 +02:00
P0nk
a979577e5d Rename and clean up MapleMapObject 2021-09-09 22:29:01 +02:00
P0nk
e917980a39 Rename and clean up MapleMapManager 2021-09-09 22:27:30 +02:00
P0nk
46842f9890 Rename and clean up MapleMapItem 2021-09-09 22:26:48 +02:00
P0nk
0d13686f07 Rename and clean up MapleMapFactory 2021-09-09 22:25:34 +02:00
P0nk
f8f524bfe7 Clean up MapleMap 2021-09-09 22:24:29 +02:00
P0nk
3fce4eb7ce Rename and clean up MapleMapEffect 2021-09-09 22:23:48 +02:00
P0nk
a61dfab64f Rename and clean up MapleKite 2021-09-09 22:22:58 +02:00
P0nk
d35969dea5 Rename and clean up MapleHiredMerchant 2021-09-09 22:22:34 +02:00
P0nk
897f2a857f Rename and clean up MapleGenericPortal 2021-09-09 22:21:26 +02:00
P0nk
0ddf49c7b6 Rename and clean up MapleFootholdTree 2021-09-09 22:20:42 +02:00
P0nk
032f111b53 Rename and clean up MapleFoothold 2021-09-09 22:20:08 +02:00
P0nk
c0fedc8589 Rename and clean up MapleDragon 2021-09-09 22:19:33 +02:00
P0nk
4032558ef5 Rename and clean up MapleDoorObject 2021-09-09 22:18:52 +02:00
P0nk
584e626ed5 Rename and clean up MapleDoor 2021-09-09 22:18:16 +02:00
P0nk
ca4162cb82 Rename and clean up AnimatedMapleMapObject 2021-09-09 22:17:38 +02:00
P0nk
add1fdf32c Rename and clean up AbstractMapleMapObject 2021-09-09 22:17:10 +02:00
P0nk
8814a18d0c Rename and clean up AbstractAnimatedMapleMapObject 2021-09-09 22:16:30 +02:00
P0nk
af2707120a Rename and clean up MapleLootManager 2021-09-09 22:14:54 +02:00
P0nk
7246647ab6 Rename and clean up MapleLootInventory 2021-09-09 22:14:19 +02:00
P0nk
a20267aee9 Rename and clean up MaplePlayerNPCFactory 2021-09-09 22:13:34 +02:00
P0nk
f8e7a525bd Rename and clean up MaplePlayerNPC 2021-09-09 22:12:29 +02:00
P0nk
2ee4cd79f6 Rename and clean up MapleNPCStats 2021-09-09 22:10:20 +02:00
P0nk
e48c25a200 Rename and clean up MapleNPC 2021-09-09 22:09:31 +02:00
P0nk
3aa455a757 Rename and clean up MapleMonsterStats 2021-09-09 22:08:48 +02:00
P0nk
2acf2ed83d Rename and clean up MapleMonsterInformationProvider 2021-09-09 22:06:55 +02:00
P0nk
02786eab63 Rename and clean up MapleMonster 2021-09-09 22:06:11 +02:00
P0nk
38c700ca48 Rename and clean up MapleLifeFactory 2021-09-09 22:04:57 +02:00
P0nk
1f349d1dae Rename and clean up AbstractLoadedMapleLife 2021-09-09 22:03:38 +02:00
P0nk
0ca463f70a Rename and clean up MaplePlayerNPCPositioner 2021-09-09 22:02:56 +02:00
P0nk
8b6a2e58f8 Rename and clean up MaplePlayerNPCPodium 2021-09-09 22:02:01 +02:00
P0nk
14344568f2 Rename and clean up MapleExpeditionType 2021-09-09 22:00:48 +02:00
P0nk
5a6ed83545 Rename and clean up MapleExpeditionBossLog 2021-09-09 21:59:43 +02:00
P0nk
1e00505671 Rename and clean up MapleExpedition 2021-09-09 21:59:17 +02:00
P0nk
fbffb7ef71 Rename and clean up MapleEvents 2021-09-09 21:58:35 +02:00
P0nk
6a4b1b2a8a Rename and clean up MapleSnowball 2021-09-09 21:57:41 +02:00
P0nk
d2881942d8 Rename and clean up MapleOxQuiz 2021-09-09 21:57:16 +02:00
P0nk
fb6123e4cc Rename and clean up MapleOla 2021-09-09 21:56:45 +02:00
P0nk
324fe48df2 Rename and clean up MapleFitness 2021-09-09 21:56:15 +02:00
P0nk
bfc37a345d Rename and clean up MapleEvent 2021-09-09 21:55:40 +02:00
P0nk
7f9c8d997b Rename and clean up MapleCoconuts 2021-09-09 21:55:03 +02:00
P0nk
219a2cdb3f Rename and clean up MapleCoconut 2021-09-09 21:54:29 +02:00
P0nk
2332458ed9 Rename and clean up MapleDataTool 2021-09-09 21:52:32 +02:00
P0nk
5089f23f79 Rename and clean up MapleDataProviderFactory 2021-09-09 21:51:34 +02:00
P0nk
1592d3efc8 Rename and clean up MapleDataProvider 2021-09-09 21:51:05 +02:00
P0nk
ae59916e98 Rename and clean up MapleDataFileEntry 2021-09-09 21:50:40 +02:00
P0nk
eb935b4143 Rename and clean up MapleDataEntry 2021-09-09 21:50:11 +02:00
P0nk
3f0d0bbffe Rename and clean up MapleDataEntity 2021-09-09 21:49:29 +02:00
P0nk
f3cae06288 Rename and clean up MapleDataDirectoryEntry 2021-09-09 21:49:08 +02:00
P0nk
2281aec440 Rename and clean up MapleData 2021-09-09 21:48:28 +02:00
P0nk
48f2647742 Rename and clean up MapleDataType 2021-09-09 21:47:26 +02:00
P0nk
63a2aeee10 Rename and clean up MaplePartyCharacter 2021-09-09 21:45:27 +02:00
P0nk
714df342d9 Rename and clean up MapleParty 2021-09-09 21:44:09 +02:00
P0nk
5aa0368090 Rename and clean up MapleMessengerCharacter 2021-09-09 21:37:42 +02:00
P0nk
49b5730e5f Rename and clean up MapleMessenger 2021-09-09 21:37:12 +02:00
P0nk
82c2d14430 Rename and clean up MapleGuildSummary 2021-09-09 21:35:58 +02:00
P0nk
f8b5f713f3 Rename and clean up MapleGuildResponse 2021-09-09 21:35:34 +02:00
P0nk
803911c10f Rename and clean up MapleGuildCharacter 2021-09-09 21:35:06 +02:00
P0nk
559d3a42b3 Rename and clean up MapleGuild 2021-09-09 21:34:29 +02:00
P0nk
5e5f7b12ca Rename and clean up MapleAlliance 2021-09-09 21:33:36 +02:00
P0nk
e75139e5e6 Rename and clean up MapleMonsterAggroCoordinator 2021-09-09 21:32:52 +02:00
P0nk
4c803b62a8 Rename and clean up MapleInviteCoordinator 2021-09-09 21:31:58 +02:00
P0nk
aea3a7921d Rename and clean up MapleEventRecallCoordinator 2021-09-09 21:31:22 +02:00
P0nk
fbb0a08663 Rename and clean up MaplePartySearchCoordinator 2021-09-09 21:30:38 +02:00
P0nk
c02efc5ca1 Rename and clean up MapleMatchCheckerCoordinator 2021-09-09 21:29:45 +02:00
P0nk
024cf0cac8 Rename MapleLoginBypassCoordinator 2021-09-09 21:28:27 +02:00
P0nk
d35ead558f Rename and clean up MapleStat 2021-09-09 21:25:35 +02:00
P0nk
8f91d8e7ac Rename and clean up MapleSkinColor 2021-09-09 21:24:36 +02:00
P0nk
448c02033d Rename and clean up MapleRing 2021-09-09 21:23:45 +02:00
P0nk
8af0999510 Rename and clean up MapleQuestStatus 2021-09-09 21:23:06 +02:00
P0nk
f4f5e12a50 Rename and clean up MapleMount 2021-09-09 21:22:04 +02:00
P0nk
3e1b5b93d5 Rename and clean up MapleJob 2021-09-09 21:21:04 +02:00
P0nk
ee503eedce Rename and clean up MapleFamilyEntry 2021-09-09 21:19:39 +02:00
P0nk
0c8bef6842 Rename and clean up MapleFamilyEntitlement 2021-09-09 21:17:31 +02:00
P0nk
3370152d58 Rename and clean up MapleFamily 2021-09-09 21:16:56 +02:00
P0nk
56c9e0f664 Rename and clean up MapleDiseaseValueHolder 2021-09-09 21:16:02 +02:00
P0nk
0c721b85dd Rename and clean up MapleDisease 2021-09-09 21:15:22 +02:00
P0nk
b07e6799dc Rename and clean up MapleClient 2021-09-09 21:13:48 +02:00
P0nk
da8837710a Rename and clean up AbstractMapleCharacterObject 2021-09-09 21:11:53 +02:00
P0nk
7dc3a2159a Rename and clean up MapleCharacter 2021-09-09 21:09:45 +02:00
P0nk
46bd0570d7 Rename and clean up MapleBuffStat 2021-09-09 21:02:22 +02:00
P0nk
6ea9a57e9f Rename and clean up MapleQuickslotBinding 2021-09-09 20:59:45 +02:00
P0nk
280e28163c Rename and clean up MapleKeyBinding 2021-09-09 20:58:28 +02:00
P0nk
065ef632ac Rename and clean up MapleKarmaManipulator 2021-09-09 20:55:47 +02:00
P0nk
b2cbb65c6a Rename and clean up MapleInventoryManipulator 2021-09-09 20:55:07 +02:00
P0nk
7c61df6887 Rename and clean up MapleCashidGenerator 2021-09-09 20:53:51 +02:00
P0nk
a5541c121c Rename and clean up MapleWeaponType 2021-09-09 20:52:49 +02:00
P0nk
6ca5abd896 Rename and clean up MaplePet 2021-09-09 20:51:30 +02:00
P0nk
5ed7cf73d1 Rename and clean up MapleInventoryType 2021-09-09 20:49:05 +02:00
P0nk
ba647db6cf Rename and clean up MapleInventoryProof 2021-09-09 20:48:32 +02:00
Ponk
dd916a96eb Merge pull request #54 from P0nk/cleanup
General cleanup
2021-09-09 20:42:54 +02:00
P0nk
eb2f464826 Remove removal of cryptography restrictions
This is no longer needed as of Java 9
2021-09-09 20:37:53 +02:00
P0nk
9df2758ae6 Allow configurable wz directory path with launch property
Example: "java -Dwz-path=<my-custom-path> -jar Cosmic.jar "
2021-09-09 20:17:57 +02:00
P0nk
0196d69780 Change default timezone to GMT 2021-09-09 08:36:13 +02:00
P0nk
1b945bca10 Rename and clean up MapleInventory 2021-09-09 08:34:01 +02:00
Ponk
8e0ab2f9f9 Merge pull request #53 from P0nk/charset-fixes
Charset fixes
2021-09-09 08:33:25 +02:00
P0nk
05cae9022f Move charset loading to fix issue with static fields 2021-09-09 08:20:45 +02:00
P0nk
52551b2451 Load config.yaml using its own charset
Strings in the config are therefore respected by the configured charset
2021-09-08 20:01:43 +02:00
P0nk
c841e9952b Respect charset when loading scripts 2021-09-08 18:46:16 +02:00
Ponk
1803699086 Merge pull request #51 from P0nk/multi-language
Add multi-language support (take 2)
2021-09-08 08:31:20 +02:00
P0nk
41cb6749c8 Make packet charset configurable
Better support for different language clients such as Thai or Korean
2021-09-08 08:26:34 +02:00
Ponk
abb0a55ac9 Merge pull request #50 from P0nk/java-16-fixes
Java 16 and Actions fixes
2021-09-06 22:15:34 +02:00
P0nk
82f2c84034 Add surefire plugin for unit tests 2021-09-06 22:11:27 +02:00
P0nk
2cfdd1da4f Update dependencies 2021-09-06 21:59:36 +02:00
P0nk
2b52ab90c3 Fix launch file 2021-09-06 21:42:58 +02:00
P0nk
958fa657cd Configure Actions for Java 16 2021-09-06 21:23:57 +02:00
Ponk
18dda5aa06 Merge pull request #49 from P0nk/inpacket
Use InPacket instead of SeekableLittleEndianAccessor
2021-09-06 21:21:38 +02:00
P0nk
1532f66bdf Remove "Maple" prefix from packet handler names 2021-09-06 20:50:35 +02:00
P0nk
b99dc7c27d Remove image parsing 2021-08-25 21:00:13 +02:00
P0nk
faf993cae6 Remove LittleEndianAccessor class hierarchy 2021-08-23 22:11:58 +02:00
P0nk
a907b7717d Clean up unused reading of .wz and .img files
This server only reads from .xml files
2021-08-23 22:10:49 +02:00
P0nk
4fd7adf547 Dump packet with ByteBufInPacket toString 2021-08-23 21:03:35 +02:00
P0nk
da2d8abc56 Handlers read from InPacket instead of SeekableLittleEndianAccessor 2021-08-22 22:10:19 +02:00
Ponk
2232022cf1 Merge pull request #48 from P0nk/outpacket
Use OutPacket instead of MaplePacketLittleEndianWriter
2021-08-22 21:23:52 +02:00
P0nk
ffc0f3bc97 Remove LittleEndianWriter class hierarchy 2021-08-22 21:08:40 +02:00
P0nk
b3d422a6c5 Remove remaining uses of MaplePacketLittleEndianWriter 2021-08-22 21:03:51 +02:00
P0nk
8f6860d7d7 All packet creating methods now create Packet instead of byte[]
This commit got way too big...
- Remove deprecated methods for sending packets
- Favor OutPacket & Packet over MaplePacketLittleEndianWriter, LittleEndianWriter, and byte array
- Split up some packet creating methods into separate classes
2021-08-21 01:36:51 +02:00
P0nk
b5cd6887ae Let PacketCreator create Packet - initial test 2021-08-20 16:12:56 +02:00
P0nk
d8b0929975 Tweak OutPacket 2021-08-20 13:11:46 +02:00
P0nk
e93428f457 Reformat entire PacketCreator 2021-08-19 21:33:56 +02:00
P0nk
e184f25184 Remove "Maple" prefix from MaplePacketCreator name 2021-08-19 21:31:57 +02:00
Ponk
579e3c639f Merge pull request #23 from RubenD96/master
Complete rework of WhisperHandler including proper chase functionality
2021-08-19 11:57:49 +02:00
Ponk
ce726efc4f Merge pull request #46 from P0nk/netty
Replace Apache Mina with Netty
2021-08-18 22:14:46 +02:00
P0nk
8c4d3092a7 Remove "Maple" prefix from MapleSessionCoordinator name 2021-08-18 15:47:01 +02:00
P0nk
a8c6ef8934 Fix remote host not clearing after login
This would cause the client to disconnect whenever exiting the game
or returning to the login screen if the multiclient deterrent was enabled.
2021-08-18 11:58:52 +02:00
RubenD96
b1aeedb815 Fix spelling mistake in WhisperFlag and removed unused function causing problems 2021-07-20 18:51:36 +02:00
P0nk
435cafd381 Refactor MapleClient constructor, fix issue with multiclient check 2021-07-18 16:27:41 +02:00
P0nk
850d44d549 Minor cleanup - pom and encryption package 2021-07-18 16:05:34 +02:00
P0nk
5f149f0a27 Configure logging to be less verbose
Packet logging to the console is especially concise
2021-07-18 15:40:43 +02:00
P0nk
9e3f3cc036 Restructure "net" packages 2021-07-18 14:26:23 +02:00
P0nk
11e83522d6 Log packets in dedicated handlers instead of in encoder/decoder 2021-07-18 14:09:39 +02:00
P0nk
ab03dd3109 Minor cleanup 2021-07-17 11:24:11 +02:00
P0nk
6e6fbf3be7 Consistently use Hwid domain object, fix login bypass
Login bypass (skip pin/pic) was broken due to an
inconsistency in hwid format.
2021-07-15 23:51:01 +02:00
P0nk
12a415e3d5 Add simple hex utils that delegate to Netty
The goal is to use libraries for this sort of common stuff
2021-07-15 23:48:47 +02:00
P0nk
cce85ea663 Use Hwid for login bypass 2021-07-15 22:08:19 +02:00
P0nk
a1ed7ed821 Merge branch 'master' into netty 2021-07-14 22:13:32 +02:00
Ponk
551a23b625 Merge pull request #47 from P0nk/mobskill-targets
Fix mobskill target count. Fixes Horntail mass seduce. Thanks xinyifly.
2021-07-14 22:08:59 +02:00
P0nk
c37278c650 Add missing "count" for mob skills
Fixes mass seduce. Thanks xinyifly.
2021-07-14 21:58:09 +02:00
P0nk
81393392ab Clean up Apache Mina, goodbye! 2021-07-13 22:10:01 +02:00
P0nk
94e1125eca Move some remaining bits and pieces to netty implementation, start cleaning up 2021-07-13 21:54:07 +02:00
P0nk
fc694f1b0f Able to log incoming and outgoing packets 2021-07-13 21:50:19 +02:00
P0nk
3de827553e Fix idle state disconnecting regardless of received pong 2021-07-12 19:52:55 +02:00
P0nk
5a7d8e6b1f Use MapleClient for session management
First working version of the Netty implementation,
but there's a lot remaining to be done.
2021-07-11 18:56:45 +02:00
P0nk
86224f5152 Merge branch 'master' into netty 2021-07-11 15:20:00 +02:00
Ponk
0d887dc5dc Merge pull request #45 from P0nk/fix-tools
Rework tools:
All tools are now part of the main module, thereby avoiding copies of required class files.
This should result in quicker builds and searches, since there are no longer a bunch of redundant files to process.
2021-07-11 15:16:59 +02:00
P0nk
b8781ee209 Merge branch 'master' into fix-tools
# Conflicts:
#	pom.xml
2021-07-11 14:53:11 +02:00
P0nk
849d5c63cb Clean up remaining tools stuff 2021-07-11 14:50:29 +02:00
P0nk
e3b22363d7 Remove undocumented tools written in C
I see no point in keeping them if all they do is cause confusion
2021-07-11 14:47:41 +02:00
P0nk
04c4fac58d Remove DropSpider tool
It was meant to crawl hidden-street.net, but it doesn't work
2021-07-11 14:45:52 +02:00
P0nk
c437a08084 Move MapleSkillMakerReagentIndexer to main module 2021-07-11 14:44:15 +02:00
P0nk
93f067379c Move MapleSkillMakerFetcher to main module 2021-07-11 14:38:43 +02:00
P0nk
91b2901f05 Move MapleSkillbookStackUpdate to main module 2021-07-11 14:29:25 +02:00
P0nk
9563755f26 Move MapleSkillbookChanceFetcher to main module 2021-07-11 14:17:42 +02:00
P0nk
3e1b0dc4e3 Move MapleEquipmentOmnileveler to main module, use existing wz files 2021-07-11 14:05:18 +02:00
P0nk
d09b237157 Move MapleDojoUpdate to main module, use existing wz files 2021-07-11 13:52:33 +02:00
P0nk
798ccecb2f Move MapleQuestMesoFetcher to main module 2021-07-11 12:08:40 +02:00
P0nk
56f3511395 Move MapleQuestItemFetcher to main module 2021-07-11 12:00:05 +02:00
P0nk
f8ef9afdd9 Move MapleMobBookUpdate to main module 2021-07-11 11:46:40 +02:00
P0nk
c6e915448e Move MapleMobBookIndexer to main module 2021-07-11 11:40:59 +02:00
P0nk
cbb0f7f09b Move MapleGachaponItemidRetriever to main module 2021-07-11 11:31:22 +02:00
P0nk
6d49ab45c3 Move MapleWorldMapChecker to main module 2021-07-11 11:15:03 +02:00
P0nk
932ed9f784 Move MapleMapInfoRetriever to main module 2021-07-11 11:08:16 +02:00
P0nk
e2f1981dc4 Move MapleIdRetriever to main module 2021-07-11 10:54:29 +02:00
P0nk
a0215cd3f4 Move MapleMapFieldLimitChecker to main module 2021-07-10 23:42:25 +02:00
P0nk
26e98d012f Move MapleEventMethodFiller to main module 2021-07-10 23:35:43 +02:00
P0nk
1f94a3b545 Move MapleQuestlineFetcher to main module 2021-07-10 23:26:05 +02:00
P0nk
fc7e97a355 Move MapleQuestItemCountFetcher to main module 2021-07-10 23:18:20 +02:00
P0nk
fdef9e37bb Move MapleNoItemNameFetcher to main module 2021-07-10 23:10:22 +02:00
P0nk
a088fd29b7 Move MapleNoItemIdFetcher to main module 2021-07-10 22:57:38 +02:00
P0nk
b5ff5f19fc Move MapleMesoFetcher to main module 2021-07-10 22:51:57 +02:00
P0nk
7af3d6924e Move MapleReactorDropFetcher to main module 2021-07-10 22:43:05 +02:00
P0nk
e6fef246cb Move MapleEmptyItemWzChecker to main module 2021-07-10 22:10:21 +02:00
P0nk
08d2b40cc4 Move MapleCouponInstaller to main module, use wz files directly 2021-07-10 20:34:00 +02:00
P0nk
45f3cfdfa6 Move MapleCodeCouponGenerator to main module 2021-07-10 20:17:47 +02:00
P0nk
e93db8b48f Move MapleCashVegaChecker to main module 2021-07-10 20:02:26 +02:00
P0nk
5b4815f173 Move MapleCashDropFetcher to main module 2021-07-10 19:56:17 +02:00
P0nk
0af167d174 Move MapleCashCosmeticsFetcher to main module 2021-07-10 19:38:00 +02:00
P0nk
da66e7614d Move MapleCashCosmeticsChecker to main module 2021-07-10 19:20:25 +02:00
P0nk
fdd2ef7b3a Move MapleBossHpBarFetcher to main module 2021-07-10 18:28:09 +02:00
P0nk
a7cf7b90ce Clean up the old MapleArrowFetcher 2021-07-10 18:12:53 +02:00
P0nk
bc6593fd81 Move MapleArrowFetcher to the main module 2021-07-10 18:12:36 +02:00
P0nk
14a405adb2 Consistent handling of wz files and their paths 2021-07-10 17:49:04 +02:00
P0nk
fcb43af8e3 Minor refactors 2021-07-10 13:52:19 +02:00
P0nk
0e98abff41 Minor renaming and refactoring 2021-06-29 20:27:32 +02:00
P0nk
828c3c5345 Add Hwid class for "nibble hwid" part of "remote host" 2021-06-29 20:26:14 +02:00
P0nk
d34798649b Add dedicated host hwid cache, further refactor session coordinator 2021-06-29 08:35:21 +02:00
P0nk
671313ab57 Encapsulate hwid validation 2021-06-29 08:29:29 +02:00
P0nk
50e2b909f1 Use Instant instead of long for time measurement 2021-06-28 12:29:19 +02:00
P0nk
5bc2f47883 Move session init management to new class 2021-06-28 12:00:09 +02:00
P0nk
69a4dd8c6d Factor out duplicated code that adds remote host to pool 2021-06-28 11:02:06 +02:00
P0nk
b35c4d3de8 Handle hwid assocation expiry in dedicated class 2021-06-28 10:37:06 +02:00
P0nk
2c18f7a4a8 Move the remaining session database logic 2021-06-27 21:35:43 +02:00
P0nk
8041ccd6bd Move some session database logic to dedicated class
I need to clean up this class before attempting
to migrate away from IoSession for session handling.
2021-06-27 09:44:55 +02:00
P0nk
b19f65f7ee Encapsulate ip address logic in new class 2021-06-26 23:40:59 +02:00
P0nk
f6aca2018e Packet sending during Netty migration 2021-06-25 14:43:05 +02:00
P0nk
80cacd609a Disconnect client if idle
Thanks SharpAceX for Guida,
which I used as a reference.
2021-06-24 22:09:21 +02:00
P0nk
5651bee2b5 Move client transition state and hostAddress to fields 2021-06-23 19:03:54 +02:00
P0nk
9638d5c417 Initial Netty implementation for networking
Split into 1 LoginServer and 1 ChannelServer per channel.

There is still a lot of cleanup and refactoring to be done.
Currently, the reliance on IoSession holding client state
is the most pressing issue to be addressed.
2021-06-23 18:20:08 +02:00
P0nk
0fa6ad0e24 Refactor PacketProcessor, split into more methods 2021-06-23 16:09:43 +02:00
P0nk
5431150362 Set up packet codec and channel initialization 2021-06-22 20:32:51 +02:00
P0nk
171215e653 Clean up old In/OutPacket 2021-06-22 17:15:19 +02:00
P0nk
442684d852 Merge branch 'master' into netty
# Conflicts:
#	pom.xml
2021-06-21 22:15:00 +02:00
Ponk
7ea26bd052 Merge pull request #44 from P0nk/bytebuf-packets
Implement packets on top of Netty's ByteBuf
2021-06-21 22:11:21 +02:00
P0nk
72ff8d563b Refactor packet string charset 2021-06-21 22:03:20 +02:00
P0nk
c4c5700d32 Add basic unit tests for ByteBufOutPacket 2021-06-21 21:45:30 +02:00
P0nk
4fd64884f2 Simplify getBytes and add tests for it 2021-06-21 21:45:06 +02:00
P0nk
6d02a95273 Simplify test setup for written bytes 2021-06-20 23:02:01 +02:00
P0nk
926371c9a7 Add unit tests for ByteBufInPacket 2021-06-20 22:53:20 +02:00
P0nk
aaf4b558f3 Finish InPacket & OutPacket implementations 2021-06-20 21:27:50 +02:00
P0nk
f3faee2e16 Add OutPacket interface and ByteBuf implementation
Replacement for LittleEndianWriter, GenericLittleEndianWriter,
and MaplePacketLittleEndianWriter.
2021-06-20 21:20:39 +02:00
P0nk
00abbb4acd Add InPacket interface and ByteBuf implementation
Replacement for LittleEndianAccessor, SeekableLittleEndianAccessor,
GenericLittleEndianAccessor, and GenericSeekableLittleEndianAccessor.
2021-06-20 21:20:38 +02:00
P0nk
23bad12f8c Netty WIP
Implementing ByteBuf backed In/OutPacket first in a separate branch
2021-06-15 22:12:40 +02:00
P0nk
4dc0935391 Reformat MapleClient
Now uses 4 space indentation
2021-06-08 19:32:06 +02:00
Ponk
eb7ee9dabe Merge pull request #33 from wejrox/Custom-rebirth-npc
Custom rebirth npc ID
2021-05-31 21:13:29 +02:00
James McDowell
136ea68ab3 Updated the rebirth NPC to use GraalJS 2021-05-26 19:45:58 +10:00
James McDowell
ae744aa870 Merge remote-tracking branch 'upstream/master' into Custom-rebirth-npc 2021-05-26 19:44:58 +10:00
James McDowell
e967294eb9 Add back in NPC conversation names
The names of the npc conversations were useful for context. Added them  back in.
2021-05-26 19:41:27 +10:00
Ponk
2193057fce Merge pull request #41 from P0nk/streamline-setup
Streamline setup
2021-05-24 21:04:50 +02:00
P0nk
ef12275f35 Move db stuff to its own directory, update README 2021-05-24 20:29:59 +02:00
P0nk
c514c303c7 Increase db init timeout
60 seconds might not be enough during the initial
Docker db setup, but 90 seconds should be plenty.
2021-05-24 20:26:18 +02:00
P0nk
75078a5fa1 Add sql script for basic admin account 2021-05-24 08:25:41 +02:00
Ponk
0b17725e8e Merge pull request #35 from ronancpl7/fix-change-maps-disorder
Fix mob status crash & dmg from map hazard
2021-05-23 07:44:17 +02:00
Ronan Lana
3d5db5d79c fix: incurred ambiguity import 2021-05-22 14:48:44 -03:00
Ronan Lana
d330376706 fix: missed stream import 2021-05-22 11:56:37 -03:00
Ponk
f01452dd87 Merge pull request #21 from P0nk/java-16-and-graal
Upgrade to Java 16 and GraalJS script engine
2021-05-21 21:23:50 +02:00
P0nk
d9d63a1b44 Refactor event max lobbies - is no longer a range
It's no longer a range because it:
1. Makes no sense for it to be a range
2. Makes for simpler scripts since returning a JS array is a hassle with Graal
2021-05-21 20:54:51 +02:00
P0nk
095008a20f Fix event scripts' getEligibleParty
Cannot return a JavaScript array straight up
(otherwise you'll get a PolyglotMap):
it has to be converted first from inside the script.
2021-05-21 19:09:40 +02:00
P0nk
bcefd42093 Handle reactor scheduling outside of script
No longer need to make all invocations synchronized
2021-05-21 08:15:01 +02:00
P0nk
f9aec05779 Update GraalVM to latest version (21.1.0) 2021-05-20 22:22:26 +02:00
P0nk
406c43b0ec Make all event script invocations thread safe
Simple solution for avoiding concurrent access
of the same evaluated script, but I would be surprised
if performance is not affected for the worse.
The same Invocable is used for all instances of an event,
so more active instances means higher contention of the single Invocable.
Hopefully the number of instances required for it to be noticeably slow
is high enough that this is not an issue.
2021-05-20 22:03:11 +02:00
P0nk
cdfb7074ec Make all reactor script invocations thread safe
Might be a bit overkill to force synchronization
for every single method invocation when the only
scheduling done in reactor scripts are:
- 5511000 (summon Targa)
- 5511001 (summon Scarlion)
2021-05-20 21:30:46 +02:00
P0nk
2ce6041ef8 Add thread safe wrapper for Invocable 2021-05-20 21:00:48 +02:00
Ronan Lana
2aa09f89db fix: Minor code typo 2021-05-20 13:01:42 -03:00
James McDowell
9128329d37 Swapped from list to set to prevent duplicates
Use a set instead, clone instead of adding directly to the list.
2021-05-20 19:16:22 +10:00
P0nk
3cda07db52 Merge branch 'master' into java-16-and-graal
# Conflicts:
#	Dockerfile
2021-05-19 18:03:57 +02:00
Ponk
aa0d98af8b Merge pull request #31 from wejrox/Mounted-config-files-docker-compose
Mounted config files docker compose and sped up image build times
2021-05-19 17:59:31 +02:00
Ronan Lana
f4a4acf742 Encode status patch
Filter out some status crashing players.
2021-05-18 20:21:38 -03:00
Ronan Lana
458de52dbc Broadcast damage from map hazard
Fix taking damage from map hazard not showing to other players.
2021-05-18 18:16:46 -03:00
Ronan Lana
654d461da5 Revise non-related porridge loots
Remove non-related item from mobs.
2021-05-18 14:54:34 -03:00
James McDowell
0345ce844e Removed unnecessary import 2021-05-16 14:51:54 +10:00
James McDowell
cff3d3df56 Added the ability to specify a custom rebirth npc id, which is automatically added to the list of scriptable npcs for overriding. Changed scriptable npcs to use config instead of a constants file, so that users can easily modify them without digging into the code and requiring a rebuild. 2021-05-16 14:46:38 +10:00
James McDowell
f47b38f65d Skip tests and run compile in parallel for speed 2021-05-16 14:32:27 +10:00
James McDowell
45ca7009c8 Updated to allow a generic rebirth npc id to be passed through and used for rebirthing if it's enabled. 2021-05-16 10:32:51 +10:00
James McDowell
8429d78e01 Optimised multi layered builds to speed up deployment, added comments to help new developers, reduced unnecessary objects being sent to the docker build context, mounted in files that may change regularly to remove the requirement for a full rebuild. 2021-05-16 09:59:12 +10:00
James McDowell
d98ab8cf1e Updated dockerignore to prevent the generated database files from being sent to the build context. This was causing an error connected to the docker daemon when issuing docker-compose up --build, possibly due to the size or number of files in that folder causing an overflow of sorts 2021-05-16 09:11:11 +10:00
RubenD96
ed8e6775df WhisperHandler reformatting the case of target == null 2021-04-23 15:11:53 +02:00
RubenD96
ade50bad5e Chase functionality (/c name) to warp to the exact location of the target 2021-04-22 22:03:59 +02:00
RubenD96
f6452b2320 Reformat ChangeMapHandler before editing 2021-04-22 21:55:49 +02:00
RubenD96
215abb3198 Small bugfix for WhisperHandler after testing 2021-04-22 21:55:32 +02:00
RubenD96
24cfbcce40 Untested rework of WhisperHandler 2021-04-20 17:25:52 +02:00
P0nk
5d4a2506e8 Update README with Java 16 2021-04-18 16:01:10 +02:00
P0nk
4b03b3c4ac Update Dockerfile to Java 16 2021-04-18 12:40:11 +02:00
P0nk
cd6415b061 Enforce implementation of PortalScript 2021-04-18 12:31:01 +02:00
P0nk
46c2d92082 refactor: use Invocable instead of ScriptEngine in script managers
- Make fields final
- Inject event script variable earlier
- Remove redundant fields
2021-04-18 11:26:05 +02:00
P0nk
58e69654a2 Let scripts access Java classes
Fix script attempting to schedule with non-long (double) time value
2021-04-17 22:26:18 +02:00
P0nk
fcd879f97c Convert remaining scripts to Graal
Mainly missed scripts that use Nashorn's "Packages"
2021-04-17 21:59:15 +02:00
P0nk
d2c7023e7b Convert NPC scripts to Graal 2021-04-17 21:57:57 +02:00
P0nk
256e5688e0 Convert quest scripts to Graal 2021-04-17 21:57:48 +02:00
P0nk
542a7b7fd2 Convert reactor scripts to Graal 2021-04-17 21:57:37 +02:00
P0nk
984adc7885 Convert portal scripts to Graal 2021-04-17 21:57:27 +02:00
P0nk
938f7c9390 Convert map scripts to Graal 2021-04-17 21:57:16 +02:00
P0nk
3458d1c7b3 Convert event scripts to Graal 2021-04-17 21:57:04 +02:00
P0nk
a18a1cb8ce Replace NashornScriptEngine with implicit GraalJSScriptEngine
GraalJSScriptEngine implements Invocable, which is why casting to it works.
However, this is just a quick and ugly fix to make it compile.
A better solution would be to cast it once, immediately after `eval`,
and from then on only handle it as Invocable.

Scripts still need to be fixed. They are still using Rhino and Nashorn-specific
ways of importing packages.
Usages of "importPackage" and "Packages" need to be replaced with
the Graal specific "Java.type".
2021-04-17 15:12:19 +02:00
P0nk
e42fb27459 Bump to Java 16 and updated dependencies
Scripting is not fixed yet
2021-04-17 14:55:06 +02:00
Ponk
28b6dd577a Merge pull request #20 from P0nk/faster-startup
Improve the startup sequence
2021-04-16 20:45:15 +02:00
P0nk
5a5110d905 Use existing connection for loading new year + family
Move async tasks earlier for lower chance of having to wait
2021-04-16 20:41:17 +02:00
P0nk
8335e77f2e Load developer room async on startup 2021-04-13 22:44:20 +02:00
P0nk
dd7c2a697a Load skillbook source information async on startup 2021-04-13 08:14:11 +02:00
P0nk
055ee01ae9 Load quests async on startup 2021-04-12 22:05:57 +02:00
P0nk
a59b55db57 Load cash items async on startup 2021-04-12 21:44:47 +02:00
P0nk
415376ce08 Load skills async on startup 2021-04-12 21:06:05 +02:00
P0nk
ab56d18bd3 Log startup time 2021-04-11 14:02:25 +02:00
P0nk
68239bc0b5 Make database operations during startup consistent
Use the same Connection. and log things in a similar fashion
2021-04-11 13:52:35 +02:00
P0nk
858fcd2a3a Actually perform name changes & world transfers on startup
No changes were being committed
2021-04-11 13:05:12 +02:00
Ponk
ed100613f3 Merge pull request #17 from ronancpI/any-ipdomain-update
Allow local/LAN/WAN login-phase connections
2021-04-10 18:56:54 +02:00
ronancpl
d4e4150a6e cleanup: adjust syntax 2021-04-10 09:43:05 -03:00
Ponk
306f403f18 Set up Actions PR pipeline (#18)
Create Actions PR pipeline - this will automatically run on opened Pull Requests to make sure they compile and pass all (future) tests.
2021-04-10 11:21:40 +02:00
ronancpl
7a3d5d2b94 Allow local/LAN/WAN login-phase connections
Allow clients connecting from different IP domains (local/LAN/WAN) to get past login phase and clean unnecessary local server check.
2021-04-09 20:54:53 -03:00
Ponk
fa992da2eb Merge pull request #16 from P0nk/inspection-cleanup
Clean up code using IntelliJ code inspection
2021-04-08 18:00:49 +02:00
P0nk
a5b42b8a43 cleanup: use primitive type instead of wrapper type 2021-04-08 17:49:22 +02:00
P0nk
202f2d8bc5 cleanup: use bulk operation instead of iteration 2021-04-08 17:49:21 +02:00
P0nk
3434c7334b cleanup: remove redundant cast 2021-04-08 17:39:55 +02:00
P0nk
ebb3aa7ba3 cleanup: prefer List#sort over Collections#sort 2021-04-08 07:44:02 +02:00
P0nk
5730b3b42d cleanup: use implicit generic type with diamond operator 2021-04-08 07:42:10 +02:00
P0nk
8aa44711e3 cleanup: use Integer#parseInt where applicable 2021-04-08 07:40:42 +02:00
P0nk
7ff8190977 cleanup: remove unnecessary boxing 2021-04-08 07:39:02 +02:00
P0nk
5c6f515d18 cleanup: use for-each loop where applicable 2021-04-08 07:36:38 +02:00
P0nk
0ff8a80ef2 cleanup: remove unnecessary semicolon 2021-04-08 07:34:56 +02:00
P0nk
f37d4063fb cleanup: remove unnecessary interface modifiers 2021-04-08 07:33:52 +02:00
P0nk
dde52653e5 cleanup: remove unnecessary conversion to String 2021-04-08 07:30:12 +02:00
P0nk
5e3b346053 cleanup: use Java-style array declaration 2021-04-08 07:17:03 +02:00
P0nk
ed5a444753 cleanup: remove unnecessary unboxing 2021-04-07 23:52:58 +02:00
P0nk
6253169e35 cleanup: replace anonymous inner class with lambda 2021-04-07 23:45:28 +02:00
Ponk
2d143d0afd Merge pull request #15 from P0nk/update-readme
Clean up README, add section about contributions
2021-04-07 19:30:51 +02:00
P0nk
1b36852c8d Clean up README, add section about contributions 2021-04-07 19:28:52 +02:00
Ponk
739b13a1ce Merge pull request #13 from P0nk/standardized-logging
Set up standandarized logging with Slf4j + Log4j2
2021-04-07 18:49:21 +02:00
P0nk
b3c1259580 Use new logging for all startup messages 2021-04-07 18:40:47 +02:00
P0nk
045bcf6dc5 Set up Slf4j and Log4j2 for logging
All logs are kept in the "logs" directory as before.
The most recent logs (up to 20MB) are kept in cosmic-log.log in the root of "logs".
Previous logs (either from previous server starts or logfiles that exceeded max size of 20MB) are stored away in directories according to their creation date.
2021-04-07 18:40:46 +02:00
Ponk
6977db708f Merge pull request #12 from RubenD96/master
Fix 2 small packet exploits
2021-04-07 18:38:25 +02:00
RubenD96
e8d2256683 Fix exploit for negative itemId's in PetExcludeItemsHandler 2021-04-07 17:26:55 +02:00
RubenD96
28707fa0f3 Fix exploit for invalid skill macro name length 2021-04-07 17:26:49 +02:00
Ponk
32d4208761 Merge pull request #11 from P0nk/fix-ranking-task
Fix ranking task
2021-04-06 22:06:56 +02:00
P0nk
2f34b3ed8b Fix ranking update query using a keyword for field name
"Rank" is a reserved keyword in MySQL 8.
This caused an SQLSyntaxErrorException during the task run.
2021-04-06 21:12:23 +02:00
P0nk
02256e04ed Fix SQL type conversion error during ranking move update
Caused by prior upgrade to MySQL 8 which seems more strict when it comes to type conversions.
2021-04-06 21:11:56 +02:00
Ponk
a964f793d8 Merge pull request #10 from P0nk/command-descriptions
Add descriptions to all in game commands
2021-04-06 20:11:05 +02:00
P0nk
b80d98f36e Add descriptions to all gm 6 commands 2021-04-06 20:08:57 +02:00
P0nk
3b59f95f20 Add descriptions to all gm 5 commands 2021-04-06 20:05:21 +02:00
P0nk
f25539f389 Add descriptions to all gm 4 commands 2021-04-06 20:04:20 +02:00
P0nk
f9fcc79565 Add descriptions to all gm 3 commands 2021-04-06 20:00:43 +02:00
P0nk
a9b23552b0 Add descriptions to all gm 2 commands 2021-04-06 19:51:20 +02:00
P0nk
3cd23a07e2 Add descriptions to all gm 1 commands 2021-04-06 19:42:38 +02:00
P0nk
70d895fef5 Add descriptions to all gm 0 commands 2021-04-06 19:42:38 +02:00
Ponk
5656dcb7ff Merge pull request #9 from P0nk/project-description
Update README with guides and links
2021-04-05 14:19:15 +02:00
P0nk
ca78bce534 Add Discord link 2021-04-05 14:14:32 +02:00
P0nk
4bce7fadb4 Update the README with guides and new tools 2021-04-05 13:42:21 +02:00
Ponk
681b341a51 Merge pull request #7 from P0nk/try-with-resources
Use automatic resource management with try-with-resources where possible.
2021-04-05 00:26:32 +02:00
P0nk
69635f5e6c refactor: use try-with-resources for db operations in various places 2021-04-05 00:19:59 +02:00
P0nk
4ec4600406 refactor: use try-with-resources for Fredrick db operations 2021-04-05 00:13:32 +02:00
P0nk
e13c313839 refactor: use try-with-resources for db operations in various handlers 2021-04-05 00:11:42 +02:00
P0nk
429f82e4fe refactor: use try-with-resources for nx coupon db operations 2021-04-05 00:09:51 +02:00
P0nk
0334391e33 refactor: use try-with-resources for fm shop db operations 2021-04-05 00:07:40 +02:00
P0nk
80e193398c refactor: use try-with-resources for ban db operations 2021-04-04 23:59:24 +02:00
P0nk
8b686b60f1 refactor: use try-with-resources for ranking db operations 2021-04-04 23:56:46 +02:00
P0nk
f1ff0cb55f refactor: use try-with-resources for wedding ring db operations 2021-04-04 23:48:56 +02:00
P0nk
cb518863b0 refactor: use try-with-resources for various world wide db operations 2021-04-04 23:45:40 +02:00
P0nk
6b6558af01 refactor: use try-with-resources for perma npc/mob db operations 2021-04-04 23:34:35 +02:00
P0nk
59014b86bf refactor: use try-with-resources for monster book db operations 2021-04-04 23:26:15 +02:00
P0nk
9d70f4de04 refactor: use try-with-resources for ring db operations 2021-04-04 23:15:52 +02:00
P0nk
8ceba9fbee refactor: use try-with-resources for PlayerNPC db operations 2021-04-04 23:12:39 +02:00
P0nk
5cb69910bd refactor: use try-with-resources for pet db operations 2021-04-04 22:54:25 +02:00
P0nk
0b91b02f80 refactor: use try-with-resources for monster information db operations 2021-04-04 22:50:09 +02:00
P0nk
50b76bf2ec refactor: use try-with-resources for item information db operations 2021-04-04 22:43:06 +02:00
P0nk
de14c5782d refactor: use try-with-resources for item saving & loading db operations 2021-04-04 22:28:52 +02:00
P0nk
fc34d54cdd refactor: use try-with-resources for buddy list db operations 2021-04-04 21:48:52 +02:00
P0nk
8c41f713a6 refactor: use try-with-resources for character saving db operations 2021-04-04 21:29:18 +02:00
P0nk
2b0d918401 refactor: use try-with-resources for new character db operations 2021-04-04 21:29:18 +02:00
P0nk
b56e1d501f refactor: use try-with-resources for character db operations
Covers everything in MapleCharacter except saving a character, and inserting a new character.
This commit got a bit too big...
2021-04-04 21:29:17 +02:00
P0nk
7e206d4589 refactor: use try-with-resources for client db operations 2021-04-04 16:49:01 +02:00
P0nk
0c267f8eee refactor: use try-with-resources for Duey db operations 2021-04-04 16:12:46 +02:00
P0nk
817a518e82 refactor: use try-with-resources for guild db operations 2021-04-04 15:50:53 +02:00
P0nk
e322b05707 refactor: use try-with-resources for various server db operations 2021-04-04 15:35:17 +02:00
P0nk
3ca9311cb0 refactor: use try-with-resources for cash id db operations 2021-04-04 15:21:17 +02:00
P0nk
5899cce9d8 refactor: use try-with-resources for alliance db operations 2021-04-04 15:19:32 +02:00
P0nk
b350fedc66 refactor: use try-with-resources for login db operations 2021-04-04 14:59:19 +02:00
P0nk
8ddfe05dd6 refactor: use try-with-resources for cash shop db operations 2021-04-04 14:54:54 +02:00
P0nk
6639188c5a refactor: use try-with-resources for BBS db operations 2021-04-04 14:40:15 +02:00
Ponk
0ccea05129 Merge pull request #5 from P0nk/bugfix
Bug fixes
2021-04-04 13:40:16 +02:00
P0nk
a36c7c5057 Fix loading pet ignores slowly
Explained by me on Discord, 20 February 2020:

"Found a bug that causes characters to load slower based on the number of items in their inventory.
Every item causes a query to be executed in the db. On my local machine,
the specific section of code is now ~40ms faster when loading 1 character full of items.

Here is what I'm referring to:
"AND petid IS NOT NULL"
should be
"AND petid > 0" or something similar

Basically, the petid field is not a boolean. The check will always pass since -1 is not null,
and the number -1 is used to indicate if the item is a pet or not."
2021-04-03 15:52:07 +02:00
P0nk
86b70728c7 Fix Zombie Mushroom Signal 3 2021-04-03 15:39:04 +02:00
Ponk
d2b3372dd4 Merge pull request #4 from P0nk/db-connection
Upgrade MySQL version, fix connection pool, rework Docker support
2021-04-03 15:26:18 +02:00
P0nk
34e3cd1cbd Clean up unused files 2021-04-03 15:23:10 +02:00
P0nk
90687007f5 Rework Docker support
- Use multi-stage build for the application image
- Utilize connection pool init timeout for waiting on database container startup,
"docker-compose-wait" dependency is no longer required
- Override database host through environment variable - used in docker-compose
- Rename database scripts for explicit ordering (db container loads them alphabetically)
2021-04-03 14:59:37 +02:00
P0nk
8b7e989fed Use native way for connection pool init timeout 2021-04-02 20:16:57 +02:00
P0nk
08a0407417 Explicitly set scrolling mode where ResultSet is used for scrolling 2021-04-02 16:41:44 +02:00
P0nk
754ab67de7 Change default birthday and tempban to fix conversion issue
ResultSet#getLong on a timestamp field is not allowed
2021-04-02 16:12:57 +02:00
P0nk
7169a74e94 Make connection pool init timeout configurable 2021-04-02 15:14:55 +02:00
P0nk
45331d17b0 Set up connection pool and enforce usage of it
Attempt to initialize connection pool on startup until a timeout.
2021-04-02 14:20:45 +02:00
P0nk
05bd668cc2 Upgrade to MySQL 8
Workaround for exception thrown by ResultSet#beforeFirst():
"Operation not allowed for a result set of type ResultSet.TYPE_FORWARD_ONLY"
2021-04-02 14:09:49 +02:00
P0nk
2873d0d031 Update database credentials 2021-04-02 13:52:44 +02:00
Ponk
5d75f4a53a Merge pull request #3 from P0nk/maven
Set up Maven for dependencies and build
2021-04-01 16:40:36 +02:00
P0nk
7b61dc3d58 Update README with download links 2021-04-01 16:27:31 +02:00
P0nk
8a3db29b02 Fix launch.bat
- Use latest Java 8 version
- Target the artifact produced by Maven
2021-04-01 07:36:33 +02:00
P0nk
e8fd11c08c Build jar with maven "package" lifecycle 2021-03-31 22:07:49 +02:00
P0nk
6583337f48 Clean up NetBeans files and dependencies 2021-03-30 22:48:51 +02:00
P0nk
4fae148e35 Move dependencies to pom 2021-03-30 22:14:57 +02:00
P0nk
813643036b Switch to Maven file structure 2021-03-30 21:56:34 +02:00
Ponk
4acc5675d6 Set project name to "Cosmic" (#2)
* Change name to Cosmic

* Update database credentials
2021-03-29 22:22:06 +02:00
Ponk
c2d80578fe First commit of HeavenMS-2! Updated README (#1) 2021-03-21 20:24:52 +01:00
ronancpl
d5d775f184 Unmount project files
Update contents in order to promote IDE wildcarding of the base source.
2019-12-28 08:25:53 -03:00
ronancpl
af5206cbfc Update README.md 2019-12-28 06:47:59 -03:00
4506 changed files with 206317 additions and 397036 deletions

13
.dockerignore Normal file
View File

@@ -0,0 +1,13 @@
# Project administration files
.idea
.git
.github
# Not used by the build.
docs
handbook
sql
tools
# Created by the db when using docker-compose, large and causes rebuild issues if sent to the context.
docker-db-data

23
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,23 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.

View File

@@ -0,0 +1,15 @@
---
name: Feature request
about: Suggest an idea for this project, such as a missing gameplay feature
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.

11
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,11 @@
## Description
<!-- Describe your changes in detail -->
## Checklist before requesting a review
<!-- Mark with "x" inside the square brackets -->
- [ ] I have performed a self-review of my code
- [ ] I have tested my changes
- [ ] I have added unit tests that prove my changes work
## Screenshots
<!-- If applicable, add screenshots to help explain your changes -->

24
.github/workflows/bump-version.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
# This workflow will tag the merge commit when merging a PR into the master branch.
# Add "#patch", "#minor", or "#major" at end of the merge commit subject to dictate the type of bump.
name: Bump version
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.55.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
BRANCH_HISTORY: last

20
.github/workflows/run-build.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
# This workflow will build a Java project with Maven
name: Run build
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'corretto'
- name: Build with Maven (compile -> test -> package)
run: mvn -B package --file pom.xml

155
.gitignore vendored
View File

@@ -1,143 +1,26 @@
/logs/**
.idea/
/logs/**
.idea/*
!.idea/codeStyles/
*.iml
/target
# build files
/build/
/dist/
/nbproject/
/tools/MapleArrowFetcher/build/
/tools/MapleArrowFetcher/dist/
/tools/MapleArrowFetcher/nbproject/
/tools/MapleBossHpBarFetcher/build/
/tools/MapleBossHpBarFetcher/dist/
/tools/MapleBossHpBarFetcher/nbproject/
/tools/MapleCashCosmeticsChecker/build/
/tools/MapleCashCosmeticsChecker/dist/
/tools/MapleCashCosmeticsChecker/nbproject/
/tools/MapleCashCosmeticsFetcher/build/
/tools/MapleCashCosmeticsFetcher/dist/
/tools/MapleCashCosmeticsFetcher/nbproject/
/tools/MapleCashDropFetcher/build/
/tools/MapleCashDropFetcher/dist/
/tools/MapleCashDropFetcher/nbproject/
/tools/MapleCashVegaChecker/build/
/tools/MapleCashVegaChecker/dist/
/tools/MapleCashVegaChecker/nbproject/
/tools/MapleCodeCouponGenerator/build/
/tools/MapleCodeCouponGenerator/dist/
/tools/MapleCodeCouponGenerator/nbproject/
/tools/MapleCouponInstaller/build/
/tools/MapleCouponInstaller/dist/
/tools/MapleCouponInstaller/nbproject/
/tools/MapleDojoUpdater/build/
/tools/MapleDojoUpdater/dist/
/tools/MapleDojoUpdater/nbproject/
/tools/MapleEmptyItemWzChecker/build/
/tools/MapleEmptyItemWzChecker/dist/
/tools/MapleEmptyItemWzChecker/nbproject/
/tools/MapleEquipmentOmnileveler/build/
/tools/MapleEquipmentOmnileveler/dist/
/tools/MapleEquipmentOmnileveler/nbproject/
/tools/MapleEventMethodFiller/build/
/tools/MapleEventMethodFiller/dist/
/tools/MapleEventMethodFiller/nbproject/
/tools/MapleGachaponItemidRetriever/build/
/tools/MapleGachaponItemidRetriever/dist/
/tools/MapleGachaponItemidRetriever/nbproject/
/tools/MapleIdRetriever/build/
/tools/MapleIdRetriever/dist/
/tools/MapleIdRetriever/nbproject/
/tools/MapleInvalidItemIdFetcher/build/
/tools/MapleInvalidItemIdFetcher/dist/
/tools/MapleInvalidItemIdFetcher/nbproject/
/tools/MapleInvalidItemWithNoNameFetcher/build/
/tools/MapleInvalidItemWithNoNameFetcher/dist/
/tools/MapleInvalidItemWithNoNameFetcher/nbproject/
/tools/MapleMapFieldLimitChecker/build/
/tools/MapleMapFieldLimitChecker/dist/
/tools/MapleMapFieldLimitChecker/nbproject/
/tools/MapleMapInfoRetriever/build/
/tools/MapleMapInfoRetriever/dist/
/tools/MapleMapInfoRetriever/nbproject/
/tools/MapleMapLootLimitChecker/build/
/tools/MapleMapLootLimitChecker/dist/
/tools/MapleMapLootLimitChecker/nbproject/
/tools/MapleMesoFetcher/build/
/tools/MapleMesoFetcher/dist/
/tools/MapleMesoFetcher/nbproject/
/tools/MapleMobBookIndexer/build/
/tools/MapleMobBookIndexer/dist/
/tools/MapleMobBookIndexer/nbproject/
/tools/MapleMobBookUpdate/build/
/tools/MapleMobBookUpdate/dist/
/tools/MapleMobBookUpdate/nbproject/
/tools/MapleQuestItemCountFetcher/build/
/tools/MapleQuestItemCountFetcher/dist/
/tools/MapleQuestItemCountFetcher/nbproject/
/tools/MapleQuestItemFetcher/build/
/tools/MapleQuestItemFetcher/dist/
/tools/MapleQuestItemFetcher/nbproject/
/tools/MapleQuestlineFetcher/build/
/tools/MapleQuestlineFetcher/dist/
/tools/MapleQuestlineFetcher/nbproject/
/tools/MapleQuestMesoFetcher/build/
/tools/MapleQuestMesoFetcher/dist/
/tools/MapleQuestMesoFetcher/nbproject/
/tools/MapleReactorDropFetcher/build/
/tools/MapleReactorDropFetcher/dist/
/tools/MapleReactorDropFetcher/nbproject/
/tools/MapleSkillbookChanceFetcher/build/
/tools/MapleSkillbookChanceFetcher/dist/
/tools/MapleSkillbookChanceFetcher/nbproject/
/tools/MapleSkillbookStackUpdate/build/
/tools/MapleSkillbookStackUpdate/dist/
/tools/MapleSkillbookStackUpdate/nbproject/
/tools/MapleSkillMakerFetcher/build/
/tools/MapleSkillMakerFetcher/dist/
/tools/MapleSkillMakerFetcher/nbproject/
/tools/MapleSkillMakerReagentIndexer/build/
/tools/MapleSkillMakerReagentIndexer/dist/
/tools/MapleSkillMakerReagentIndexer/nbproject/
/tools/MapleWorldmapChecker/build/
/tools/MapleWorldmapChecker/dist/
/tools/MapleWorldmapChecker/nbproject/
/tools/SpiderDropFetcher/build/
/tools/SpiderDropFetcher/dist/
/tools/SpiderDropFetcher/nbproject/
/.settings
/out
*.onetoc2
# Eclipse m2e generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath
# Database
database/docker-db-data
database/docker-pg-db-data
# macOS files
.DS_Store

8
.idea/codeStyles/Project.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JavaCodeStyleSettings>
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
</JavaCodeStyleSettings>
</code_scheme>
</component>

5
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View File

@@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

View File

@@ -1,13 +1,48 @@
# Docker support, thanks to xinyifly
# Initial Docker support thanks to xinyifly
# Optimisation performed by wejrox
FROM openjdk:8u171-jdk-alpine
RUN apk -U add tini
WORKDIR /mnt
COPY ./ ./
RUN sh ./posix-compile.sh
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.6.0/wait /wait
RUN chmod +x /wait
#
# Cosmic JAR creation stage
#
FROM maven:3.9.6-amazoncorretto-21 AS jar
# Build in a separated location which won't have permissions issues.
WORKDIR /opt/cosmic
# Any changes to the pom will affect the entire build, so it should be copied first.
COPY pom.xml ./pom.xml
# Grab all the dependencies listed in the pom early, since it prevents changes to source code from requiring a complete re-download.
# Skip compiling tests since we don't want all the dependencies to be downloaded.
# RUN mvn -f ./pom.xml clean dependency:go-offline -Dmaven.test.skip -T 1C
# TODO: The above command stopped working as of Java 21 upgrade due to:
# Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.6.1:go-offline (default-cli) on project Cosmic: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could
# not be resolved: io.netty:netty-tcnative:jar:${os.detected.classifier}:2.0.65.Final (absent): Could not find artifact io.netty:netty-tcnative:jar:${os.detected.classifier}:2.0.65.Final in central (https://repo.maven.apache.org/maven2) -> [Help 1]
# Source code changes may not change dependencies, so it can go last.
# Skip compiling tests since we don't want all the dependecies to be downloaded for plugins.
COPY src ./src
RUN mvn -f ./pom.xml clean package -Dmaven.test.skip -T 1C
#
# Server creation stage
#
FROM amazoncorretto:21
# Host the server in a location that won't have permissions issues.
WORKDIR /opt/server
# Copy the wizet files first since they're so big and won't change often.
COPY wz ./wz
# Copy the JAR we build earlier.
COPY --from=jar /opt/cosmic/target/Cosmic.jar ./Server.jar
# Scripts are sourced on server startup, so you can mount over them for quicker redeploy.
COPY scripts ./scripts/
# Config is read on server startup, so you can mount over it for quicker redeploy.
COPY config.yaml ./
# Default exposure, although not required if using docker compose.
# This exposes the login server, and channels.
# Format for channels: WWCC, where WW is 75 plus the world number and CC is 75 plus the channel number (both zero indexed).
EXPOSE 8484 7575 7576 7577
ENTRYPOINT ["tini", "--"]
CMD /wait && sh ./posix-launch.sh
ENTRYPOINT ["java", "-jar", "./Server.jar"]

374
README.md
View File

@@ -1,299 +1,181 @@
<img src="https://heavenmssurveyhome.files.wordpress.com/2018/12/heavenmslogo.png" width="370" height="auto">
# Cosmic
Cosmic is a server emulator for Global MapleStory (GMS) version 83.
## Head developer: Ronan C. P. Lana
## Introduction
Besides myself for maintaining this repository, credits are to be given to Wizet/Nexon (owners of MapleStory & it's IP contents), the original MapleSolaxia staff and other colaborators, as just some changes/patches on the game were applied by myself, in which some of them diverged from the original v83 patch contents (alright, not just "some patches" by now since a whole lot of major server core changes have been applied on this development).
Cosmic launched on March 2021. It is based on code from a long line of server emulators spanning over a decade - starting with OdinMS (2008) and ending with HeavenMS (2019).
Regarding distributability and usage of the code presented here: like it was before, this MapleStory server is open-source. By that, it is meant that anyone is **free to install, use, modify and redistribute the contents**, as long as there is **no kind of commercial trading involved** and the **credits to the original creators are maintained** within the codes.
This is mainly a Java based project, but there are also a bunch of scripts written in JavaScript.
This is a NetBeans 8.2 Project, that should be built and run on Java 8 in order to run properly. -- Used to be ran in Java 7, thanks kolakcc (Familiar) for the Java 8 support!
Head developer and maintainer: __Ponk__.\
Contributors: a lot of people over the years, and hopefully more to come. Big thanks to everyone who has contributed so far!
Being a NetBeans 8.2 Project, this means that it's easier to install the project via opening the server project folder inside NetBeans' IDE. Once installed, build this project on your machine and run the server using the "launch.bat" application.
Join the Discord server where most of the discussions take place: https://discord.gg/JU5aQapVZK
In this project, many gameplay-wise issues generated from either the original WZ files and the server source have been partially or completely solved. Considering the use of the provided edited WZ's and server-side wz.xml files should be of the greatest importance when dealing with this instance of server source, in order to perceive it at it's full potential. My opinion, though!
### Goals
What we are working towards.
* __Vanilla gameplay__ - stay as close to the original game as possible (within reason).
* __Ease of use__ - getting started should be frictionless and contributing to the project straightforward.
* __Reduce technical debt__ - making changes should be easy without causing unintended side effects.
* __Modern tools & technologies__ - stay appealing by continuously improving the code and the project as a whole.
- In other case, as fallback from the provided ones, consider using **whole clean set**. Selecting part of the provided ones to play pretty much *may eventually* lead to unexpected issues.
### Non-goals
Explicitly excluded from the scope of the project.
* __Custom gameplay features__ - existing custom features will be removed over time and new ones are unlikely to be added.
* __Client development__ - this project is focused on the server. Please go elsewhere for client related questions.
* __Public server__ - there will not be an official Cosmic server open to the public. Feel free to launch your own server __at your own risk__. No support will be provided.
The main objective of this project is to try as best as possible to recreate what once was the original MapleStory v83, while adding up some flavors that spices up the gameplay. In other words, aim to get the best of the MapleStory of that era.
## Project setup
---
### Download items
### Contribute
You may contribute to the project in various ways, mainly through GitHub:
* Providing improvements to the code through a [Pull Request](https://github.com/P0nk/Cosmic/pulls) from your own fork.
* Reporting a bug by creating an [Issue](https://github.com/P0nk/Cosmic/issues).
* Providing information to existing issues or reviewing pull requests that others have made.
* ...and in other ways that I haven't thought of!
Server files: https://github.com/ronancpl/HeavenMS
### Continuous integration
A GitHub Actions pipeline is set up to run the build automatically when a new pull request is opened or commits are pushed to an existing one. This ensures that the code compiles and all the tests pass.
Client files & general tools: https://drive.google.com/drive/folders/0BzDsHSr-0V4MYVJ0TWIxd05hYUk
Once a pull request is merged, a tag with the new version is automatically created.
Java 8 SDK & NetBeans bundle: https://www.oracle.com/technetwork/pt/java/javase/downloads/jdk-netbeans-jsp-3413153-ptb.html
### Discord integration
Most GitHub activity is pushed to a Discord channel for visibility. This works by leveraging a webhook. The activity includes (but is not limited to): merged commits, created PRs, comments, and new tags.
**Important note about localhosts**: these executables are red-flagged by antivirus tools as __potentially malicious softwares__, this happens due to the reverse engineering methods that were applied onto these software artifacts. Those depicted here have been put to use for years already and posed no harm so far, so they are soundly assumed to be safe.
### Versioning
The project follows the [semantic versioning](https://semver.org/) scheme using git tags.
* *Bug fixes* are treated as PATCH: 1.2.__3__ -> 1.2.__4__
* *General changes or improvements* are treated as MINOR: 1.__2__.3 -> 1.__3.0__
* *Major changes* are treated as MAJOR: __1__.2.3 -> __2.0.0__
Latest localhost: https://hostr.co/amuX5SLeeVZx
## Getting started
Follow along as I go through the steps to play the game on your local computer from start to finish. I won't go into extreme detail, so if you don't have prior experience with Java or git, you might struggle.
The following list, in bottom-up chronological order, holds information regarding all changes that were applied from the starting localhost used in this development. Some lines have a link attached, that will lead you to a snapshot of the localhost at that version of the artifact. Naturally, later versions holds all previous changes along with the proposed changes.
We will set up the following:
- Database - the database is used by the server to store game data such as accounts, characters and inventory items.
- Server - the server is the "brain" and routes network traffic between the clients.
- Client - the client is the application used to _play the game_, i.e. MapleStory.exe.
**Change log:**
### 1 - Database
You will start by installing the database server and client, and then run some scripts to prepare it for the server.
* Fixed Monster Magnet crashing the caster when trying to pull fixed mobs, credits to Shavit. https://gofile.io/?c=BW7dVM
#### Steps
* Cleared need for administrator privileges (OS) to play the game, credits to Ubaware.
1. Download and install [MySQL Community Server 8+](https://dev.mysql.com/downloads/mysql/). You will have to set a root password, make sure you don't lose it because you will need it later.
2. Download and install [HeidiSQL](https://www.heidisql.com/download.php).
3. Open HeidiSQL and connect to the database ("New" -> "Session in root folder" -> fill in password -> "Open").
4. Run all four scripts located in database/sql in order. Starting with ``1-db_database.sql`` and ending with ``4-db-admin.sql``. In HeidiSQL: "File" -> "Run SQL File...".
5. The database is ready!
* Set a higher cap for AP assigning with AP Reset, credits to Ubaware.
### 2 - Server
You will start by cloning the repository, then configure the database properties and lastly start the server.
* Fixed Monster Magnet crashing the caster when trying to pull bosses. Drawback: Dojo HPBar becomes unavailable. https://hostr.co/SvnSKrGzXhG0
#### Prerequisites
* Java 21 (I recommend [Amazon Corretto](https://aws.amazon.com/corretto))
* IDE (I recommend [IntelliJ IDEA](https://www.jetbrains.com/idea/))
* Fixed some 'rn' problems with quest icons & removed "tab" from party leader changed message. https://hostr.co/tsYsQzzV6xT0
#### Steps
* Removed block on applying attack-based strengthening gems on non-weapon equipments. https://hostr.co/m2bVtnizCtmD
1. Clone Cosmic into a new project. In IntelliJ, you would create a new project from version control.
2. Open _config.yaml_. Find "DB_PASS" and set it to your database root user password.
3. Start the server. The main method is located in `net.server.Server`.
4. If you see "Cosmic is now online" in the console, it means the server is online and ready to serve traffic. Yay!
* Set a higher cap for SPEED.
Below, I list other ways of running the server which are completely optional.
* Removed the AP assigning block for beginners below level 10. https://hostr.co/AHAHzneCti9B
#### Docker
Support for Docker is also provided out of the box, as an alternative to running straight in the IDE. If you have [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed it's as easy as running `docker compose up`.
* Removed block on party for beginners level 10 or below. https://hostr.co/JZq53mMtToCz
Making changes becomes a bit more tedious though as you have to rebuild the server image via `docker compose up --build`.
* Removed block on MTS entering in some maps, rendering the buyback option available.
On the first launch, the database container will run the scripts which may take so long that the server fails to start. In that case, just wait until the database is done running the scripts and then retry (Ctrl+C and re-run the command).
* Removed "AP excess" popup and limited actions on Admin/MWLB, credits to kevintjuh93.
#### Jar
Another option is to start the server from a terminal by running a jar file. You first need to build the jar file from source which requires [Maven](https://maven.apache.org/).
* Removed "You've gained a level!" popup, credits to PrinceReborn.
Building the jar file is as easy as running ``mvn clean package``. The project is configured to produce a "fat" jar which contains all dependencies (by utilizing the _maven-assembly-plugin_). Note that the WZ XML files are __not__ included in the jar.
* Removed caps for WATK, WDEF, MDEF, ACC, AVOID.
To run the jar, a ``launch.bat`` file is provided for convenience. Simply double-click it and the server will start in a new terminal window.
* 'n' problem fixed.
Alternatively, run the jar file from the terminal. Just remember to provide the `wz-path` system property pointing to your wz directory.
* Fraysa's https://hostr.co/gJbLZITRVHmv
### 3 - Client
You will start by installing the game with the old installer, then overwrite some WZ files with our custom ones, and lastly get the localhost executable in place.
* Eric's MapleSilver starting on window-mode.
#### Steps
---
### Open-source client development - HeavenClient
1. Download _MapleGlobal-v83-setup.exe_ from my [Google Drive](https://drive.google.com/drive/folders/1hgnb92MGL6xqEp9szEMBh0K9pSJcJ6IT). This is the official installer from back then.
2. Install it in a directory of your choice.
3. Delete the following files from the installation directory: _HShield_ (entire directory), _ASPLnchr.exe_, _MapleStory.exe_, and _Patcher.exe_.
4. Download _CosmicWZ-2024-07-17-v0.14.0.zip_ from my [Google Drive](https://drive.google.com/drive/folders/1hgnb92MGL6xqEp9szEMBh0K9pSJcJ6IT).
5. Unzip it and copy all .wz-files into the installation directory. Replace the existing ones.
6. Download _HeavenMS-localhost-WINDOW.exe_ from [hostr.co](https://hostr.co/amuX5SLeeVZx). This is a client modified to connect to your localhost instead of Nexon's server (along with some fixes and custom changes).
- Your antivirus will likely detect the file as a trojan or similar and automatically delete it. To prevent this from happening, add your _Downloads_ directory and the installation directory as exclusions in your antivirus software. On W11, this is under "Virus & threat protection settings" -> "Add or remove exclusions".
7. Move _HeavenMS-localhost-WINDOW.exe_ into the installation directory.
8. Done! Double-click the exe and the game should start.
- The client may be a bit fiddly. Sometimes it won't start, but if you see "Client connected" in the server console it's a good indication. Try spam-clicking it like 10+ times, that usually works for me.
Continuing from where **SYJourney**'s JourneyClient has finished contributions (as of 5 Jul 2016), an open-source development of a software artifact designed to handle both gaming operations and interactions with the server is being conducted.
**Important note about localhost clients**: these executables are red-flagged by antivirus tools as potentially malicious software.
This happens due to the reverse engineering methods that were applied onto these software artifacts.
The one provided here has been in use for years already and posed no harm so far, so it is assumed to be safe.
Newer implementations are being maintained by **頼晏 (ryantpayton)** and aims to offer higher display resolution, bring recent UI contents for the pre-BB gameplay and incremental support on overall gaming perspective.
### 4 - Getting into the game
The client has started, and you're looking at the login screen.
HeavenClient Github: https://github.com/ryantpayton/HeavenClient
#### Logging in
At this point, you can log in to the admin account using the following credentials:
* Username: "admin"
* Password: "admin"
* Pin: "0000"
* Pic: "000000"
---
### Development information
Or create a regular account by typing in your desired username & password and attempting to log in. This "automatic registration" feature lets you create new accounts to play around with. It is enabled by default (see _config.yaml_).
Status: <span style="color:SkyBlue">__Released (4 rounds)__</span>.
#### Entering the game
Create a new character as you normally would, and then select it to enter the game. Hooray, finally we're in!
#### Mission
If you log in to the "Admin" character, you'll notice that the character looks almost invisible. This is hide mode, which is enabled by default when you log in to a GM character. You won't be visible to normal players and no mobs will move if you're alone on the map. Toggle hide mode on or off by typing "@hide" in the in-game chat.
With non-profitting means intended, provide nostalgic pre-BB maplers world-wide a quality local server for freestyle entertainment.
Hide is one of many commands available to players, type "@commands" to see the full list. Higher ranked GMs have access to more powerful commands.
#### Vision
That's it, have fun playing around in game!
By taking the v83 MapleStory as the angular stone, incrementally look forward to improve the gaming experience whilst still retaining the "clean v83" conservative ideal. Also, through reviewing distinguished aspects of the server's behavior that could be classified as a potential server threat, in the long run look for ways to improve or even stabilize some of it's uncertain aspects.
## Advanced concepts
Some slightly more advanced concepts that might be useful once you're up and running.
#### Values
### Host on remote server
You don't have to host the server on your local machine to play. It's possible to host on a remote server such as a VPS or even a dedicated server.
* Autonomy, seek self-improvement for tackling issues head-on;
* Adventurous, take no fear of failures on the path of progress;
* Light-hearted support, general people out there didn't experience what you've already had;
* Humility, no matter how good you are, there's no good in boasting yourself over experiences only a few have had;
I leave it to you to figure out the server hosting part, but once you have that running you'll need to edit the client exe to point to your remote server ip.
#### Announcements
#### Edit client ip
1. Download and install a hex editor: [HxD](https://mh-nexus.de/en/hxd/)
2. Start HxD and open your client exe (I recommend making a copy of it first). At this point you should see a bunch of hex codes and a "Decoded text" column to the right of it.
3. Ctrl+f and search for Text-string "127.0.0.1". You should find three occurrences right above each other.
4. Place your cursor before the first "127" and start typing the desired ip, overwriting what is already there. Do the same on the other two and click on Save.
5. Done! Now the client will attempt to connect to that ip address instead when you launch it.
HeavenMS development as we can see right now achieved an acceptable state-of-the-art. A heartfelt thanks for everyone that contributed in some way for the progress of this server!
### WZ files
WZ files are the asset/data files required by the client and server. Typically, [HaRepacker-resurrected](https://github.com/lastbattle/Harepacker-resurrected) is used to handle (view, edit, export) the .wz files.
A case study has been conducted with the objective of overview results achieved during HeavenMS development. Those can be checked out on: https://heavenms-survey.home.blog/2019/12/24/project-visualizations/
The client can read the .wz files directly, but the server requires them in XML format. The server also does not make use of the sprites, which is the motivation for different kinds of exporting.
HaRepacker allows you to export to "Private server", which is the .img files packaged in the .wz stripped of sprites and converted to XML. This takes much less disk space.
#### Support HeavenMS
This server requires custom .wz files (unfortunately), as you may have noted during installation of the client. The intention is for these to be removed eventually and to solely run on vanilla .wz files.
If you liked this project, please don't forget to __star__ the repo ;) .
#### WZ editing
* Use the HaRepacker-resurrected editor, encryption "GMS (old)".
* Open the desired .wz for editing and use the node hierarchy to make the desired changes (copy/pasting nodes may be unreliable in rare scenarios).
* Save the changed .wz, overwriting the original content at the client folder.
* Finally, re-export (using the "Private Server" exporting option) the changed XMLs into the server's .wz XML files (found in the "wz" directory), overwriting the old contents.
It's never enough to tell this, thanks to everyone that have been contributing something for the continuous improvement of the server! Be it through bug reports, donation, code snippets and/or pull requests.
Make sure to always export from the client .wz files to the server XML, and not the other way around.
Our Discord channel is still available on: https://discord.gg/Q7wKxHX
Editing the client .wz without exporting to the server may lead to strange behavior.
<hr id="donate" />
### Client features
For more information about the client and its features, see [HeavenMS on GitHub](https://github.com/ronancpl/HeavenMS#download-items).
[//]: <> (If you REALLY liked what you have seen on the project, please feel free to donate a little something as a helping hand for my contributions towards Maple development. Also remember to **support Nexon**!)
### Disclaimer
[//]: <> (* HeavenMS development is decisively __ONLY accepting donations__ from the Paypal link aforementioned, in the __ronancpl/HeavenMS__ repository readme (no patreons or other revenue resources).)
* HeavenMS staff has __no current intention__ to publicly open a server with this source, if that ever comes to happen this note will be lifted. __Don't be scammed!__
* This server source is __NOT intended to be stable__ as is. Proper deadlock review and other maintenance contributions are needed in order to make it steps ahead on viability.
---
### Preparing the ambient
The following link teaches on how to install a MapleStory v83 private server, however IT DIFFERS on what is used here: http://forum.ragezone.com/f428/maplestory-private-server-v83-741739/
Use that link ONLY AS AN ORIENTATION on where here things start to become ambiguous.
Firstly, install all the general tools required to run the server:
* WampServer2.0i.exe -> recipient of the MySQL server.
* mysql-query-browser.msi -> MySQL client component, visually shows the DB data and hubs queries.
* hamachi.msi -> used for establishing a tunnelling route for the server/client communication.
Now install the Java 8 SDK & NetBeans bundle:
* jdk-8u111-nb-8_2-windows-x64.exe -> It's a NetBeans project, use other IDE at your own risk.
Now that the tools have been installed, test if they are working.
For WampServer:
* Once you're done installing it, run it and you will see the Wamp icon on the bottom right corner. Left click it and click 'Put Online'.
* In case of ORANGE ICON, change port 80 at "httpd.conf" to another, as it clashes with a Windows default port. Then Left click it again and click 'Start All Services'.
* The Wamp icon must look completely green (if its orange or red, you have a problem).
For Hamachi:
* Try opening it. It's that simple.
Hamachi is optional, though. You don't have to install Hamachi if you want to make the server just for use on your own machine. However, if you want to let other players access your server, consider alternatively using port-forwarding methods.
---
### Installing the SERVER
By downloading through the Github download button, you may have obtained a ZIP file with a single "HeavenMS-master" folder on it. EXTRACT that folder.
For expediency, "HeavenMS-master" folder on this guide will be referred just as "HeavenMS". Rename it for convenience. Then, set "HeavenMS" the folder on a place of your preference. It is recommended to use "C:\Nexon\HeavenMS".
Setting up the SQL: open MySQL Query Browser, then create a new session with the parameters below, then click OK.
* Server Host: localhost
* Port: 3306
* Username: root
Now it must be done CAREFULLY:
1. File -> Open Script... -> Browse for "C:\Nexon\HeavenMS\sql" -> db_database.sql, and execute it.
2. File -> Open Script... -> Browse for "C:\Nexon\HeavenMS\sql" -> db_drops.sql, and execute it.
Now it is OPTIONAL, you don't need to run it if you don't want, as it will simply change some NPC shops to set some new goods, not present in the original MapleStory, to sell:
3. File -> Open Script... -> Browse for "C:\Nexon\HeavenMS\sql" -> db_shopupdate.sql, and execute it.
At the end of the execution of these SQLs, you should have installed a database schema named "heavenms". REGISTER YOUR FIRST ACCOUNT to be used in-game by **creating manually** an entry on the table "accounts" at that database with a login and a password.
Configure the IP you want to use for your MapleStory server in "configuration.ini" file, or set it as "localhost" if you want to run it only on your machine. Alternatively, you can use the IP given by Hamachi to use on a Hamachi network, or you can use a non-Hamachi method of port-forwarding. Neither will be approached here.
#### Open the NetBeans project
Now open NetBeans, and click "Open a project..." . Select then the "HeavenMS" folder, that should already be a project recognizable by NetBeans. If it isn't, you have a problem.
Inside the project, you may encounter some code errors.
If that's the case, you have yet to set the core JARs of the project. From the project hierarchy, right-click the project and select "Resolve Project Problems".
Locate the folder "cores" inside the root directory of this project and manually configure the missing files on NetBeans (mina-core, slf4j-api, ...).
Finally, select "Clean and Build project" to build the JAR file for the MapleStory server. Once done, make sure both WampServer and Hamachi are on and functional, then execute "launch.bat" on the root of the project. If no errors were raised from this action, your MapleStory server is now online.
---
### Installing the CLIENT
#### Setting up client-side ambient
The client's set-up is quite straightforward:
1. From "ManagerMsv83.exe", install MapleStory on your folder of preference (e.g. "C:\Nexon\MapleStory") and follow their instructions.
2. Once done, erase these files: "HShield" (folder), "ASPLnchr.exe", "MapleStory.exe" and "Patcher.exe".
3. Extract into the client folder the "localhost.exe" from the provided link.
4. Overwrite the original WZ files with the ones provided from either one of those folders on the Google Drive:
- "commit397_wz" (last published RELEASE, referring to commit of same number).
- "current_wz" (latest source update).
#### Editing localhost IP target
If you are not using "localhost" as the target IP on the server's config file, you will need to HEX-EDIT "localhost.exe" to fetch your IP. Track down all IP locations by searching for "Type: String" "127.0.0.1", and applying the changes wherever it fits.
To hex-edit, install the Neo Hex Editor from "free-hex-editor-neo.exe" and follow their instructions. Once done, open "localhost.exe" for editing and overwrite the IP values under the 3 addresses. Save the changes and exit the editor.
#### Testing the localhost
Open the "localhost.exe" client. If by any means the program did not open, and checking the server log your ping has been listened by the server and you are using Windows 8 or 10, it probably might be some compatibility issue.
In that case, extract "lolwut.exe" from "lolwut-v0.01.rar" and place it on the MapleStory client folder ("C:\Nexon\MapleStory"). Your "localhost.exe" property settings must follow these:
* Run in compatibility mode: Windows 7;
* Unchecked reduced color mode;
* 640 x 480 resolution;
* Unchecked disable display on high DPI settings;
* Run as an administrator;
* Opening "lolwut.exe", use Fraysa's method.
Important: should the client be refused a connection to the game server, it may be because of firewall issues. Head to the end of this file to proceed in allowing this connection through the computer's firewall. Alternatively, one can deactivate the firewall and try opening the client again.
---
### Creating an account and logging in the game
By default, the server source is set to allow AUTO-REGISTERING. This means that, by simply typing in a "Login ID" and a "Password", you're able to create a new account.
After creating a character, experiment typing in all-chat "@commands". This will display all available commands for the current GM level your character has.
To change a character's GM level, make sure that character is not logged in, then:
* Open MySQL Query Browser;
* Double-click "heavenms" schema;
* Double click "characters" table;
* Execute the selected query;
* Mark "Edit" flag on the MySQL Query Browser UI screen;
* Locate your character's row on the displayed ResultSet;
* Edit your character's GM level;
* Hit APPLY CHANGES.
---
### Some notes about WZ/WZ.XML EDITING
NOTE: Be extremely wary when using server-side's XMLs data being reimported into the client's WZ, as some means of synchronization between the server and client modules, this action COULD generate some kind of bugs afterwards. Client-to-server data reimporting seems to be fine, though.
#### Editing the v83 WZ's:
* Use the HaRepacker 4.2.4 editor, encryption "GMS (old)".
* Open the desired WZ for editing and use the node hierarchy to make the desired changes (copy/pasting nodes may be unreliable in rare scenarios).
* Save the changed WZ, **overwriting the original content** at the client folder.
* Finally, **RE-EXPORT (using the "Private Server..." exporting option) the changed XMLs into the server's WZ.XML files**, overwriting the old contents.
**These steps are IMPORTANT, to maintain synchronization** between the server and client modules.
#### The MobBookUpdate example
As an example of client WZ editing, consider the MapleMobBookUpdate tool project I developed, it updates all reported drop data on the Monster Book with what is currently being hold on the database:
To make it happen:
* Open the MobBookUpdate project on NetBeans, located at "tools\MapleMobBookUpdate", and build it.
* At the subfolder "lib", copy the file "MonsterBook.img.xml". This is from the original WZ v83.
* Paste it on the "dist" subfolder.
* Inside "dist", open the command prompt by alt+right clicking there.
* Execute "java -jar MobBookUpdate.jar". It will generate a "MonsterBook_updated.img.xml" file.
* At last, overwrite the "MonsterBook.img.xml" on "C:\Nexon\HeavenMS\wz\String.wz" with this file, renaming it back to "MonsterBook.img.xml".
At this point, **just the server-side** Monster Book has been updated with the current state of the database's drop data.
To **update the client as well**, open HaRepacker 4.2.2 and load "String.wz" from "C:\Nexon\MapleStory". Drop the "MonsterBook.img" node by removing it from the hierarchy tree, then import the server's "MonsterBook.img.xml".
**Note:** On this case, a server-to-client data transfer has been instanced. This kind of action **could cause** problems on the client-side if done unwary, however the nodes being updated on client-side and server-side provides no conflicts whatsoever, so this is fine. Remember, server-to-client data reimport may be problematic, whereas client-to-server data reimport is fine.
The client's WZ now has the proper item drops described by the DB updated into the MobBook drop list.
**Save the changes and overwrite the older WZ** on the MapleStory client folder.
---
### Portforwarding the SERVER
To use portforward, you will need to have permission to change things on the LAN router. Access your router using the Internet browser. URLs vary accordingly with the manufacturer. To discover it, open the command prompt and type "ipconfig" and search for the "default gateway" field. The IP shown there is the URL needed to access the router. Also, look for the IP given to your machine (aka "IPv4 address" field), which will be the server one.
The default login/password also varies, so use the link http://www.routerpasswords.com/ as reference. Usually, login as "admin" and password as "password" completes the task well.
Now you have logged in the router system, search for anything related to portforwarding. Should the system prompt you between portforwarding and portriggering, pick the first, it is what we will be using.
Now, it is needed to enable the right ports for the Internet. For MapleSolaxia, it is basically needed to open ports 7575 to 7575 + (number of channels) and port 8484. Create a new custom service which enables that range of ports for the server's channel and opt to use TCP/UDP protocols. Finally, create a custom service now for using port 8484.
Optionally, if you want to host a webpage, portforward the port 80 (the HTTP port) as well.
It is not done yet, sometimes the firewalls will block connections between the LAN and the Internet. To overcome this, it is needed to create some rules for the firewall to permit these connections. Search for the advanced options with firewalls on your computer and, with it open, create two rules (one outbound and one inbound).
These rules must target "one application", "enable connections" and must target your MapleStory client (aka localhost).
After all these steps, the portforwarding process should now be complete.
Some notable features:
* Opens in window mode by default
* Uncapped max speed

View File

@@ -1,73 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="HeavenMS" default="default" basedir=".">
<description>Builds, tests, and runs the project HeavenMS.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar: JAR building
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="HeavenMS-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>

View File

@@ -86,18 +86,18 @@ worlds:
why_am_i_recommended: Welcome to Galicia!
channels: 3
#Properties for El Nido 11
#Properties for Kastia 11
- flag: 0
server_message: Welcome to El Nido!
event_message: El Nido!
why_am_i_recommended: Welcome to El Nido!
server_message: Welcome to Kastia!
event_message: Kastia!
why_am_i_recommended: Welcome to Kastia!
channels: 3
#Properties for Zenith 12
#Properties for Judis 12
- flag: 0
server_message: Welcome to Zenith!
event_message: Zenith!
why_am_i_recommended: Welcome to Zenith!
server_message: Welcome to Judis!
event_message: Judis!
why_am_i_recommended: Welcome to Judis!
channels: 3
#Properties for Arcenia 13
@@ -107,48 +107,48 @@ worlds:
why_am_i_recommended: Welcome to Arcenia!
channels: 3
#Properties for Kastia 14
- flag: 0
server_message: Welcome to Kastia!
event_message: Kastia!
why_am_i_recommended: Welcome to Kastia!
channels: 3
#Properties for Judis 15
- flag: 0
server_message: Welcome to Judis!
event_message: Judis!
why_am_i_recommended: Welcome to Judis!
channels: 3
#Properties for Plana 16
#Properties for Plana 14
- flag: 0
server_message: Welcome to Plana!
event_message: Plana!
why_am_i_recommended: Welcome to Plana!
channels: 3
#Properties for Kalluna 17
#Properties for El Nido 15
- flag: 0
server_message: Welcome to El Nido!
event_message: El Nido!
why_am_i_recommended: Welcome to El Nido!
channels: 3
#Properties for Kalluna 16
- flag: 0
server_message: Welcome to Kalluna!
event_message: Kalluna!
why_am_i_recommended: Welcome to Kalluna!
channels: 3
#Properties for Stius 18
#Properties for Stius 17
- flag: 0
server_message: Welcome to Stius!
event_message: Stius!
why_am_i_recommended: Welcome to Stius!
channels: 3
#Properties for Croa 19
#Properties for Croa 18
- flag: 0
server_message: Welcome to Croa!
event_message: Croa!
why_am_i_recommended: Welcome to Croa!
channels: 3
#Properties for Zenith 19
- flag: 0
server_message: Welcome to Zenith!
event_message: Zenith!
why_am_i_recommended: Welcome to Zenith!
channels: 3
#Properties for Medere 20
- flag: 0
server_message: Welcome to Medere!
@@ -158,14 +158,12 @@ worlds:
server:
#Thread Tracker Configuration
USE_THREAD_TRACKER: false #[SEVERE] This deadlock auditing thing will bloat the memory as fast as the time frame one takes to lose track of a raindrop on a tempesting day. Only for debugging purposes.
#Database Configuration
DB_URL: "jdbc:mysql://localhost:3306/heavenms"
DB_URL_FORMAT: "jdbc:mysql://%s:3306/cosmic" # If the docker ENV for DB_HOST is anything but "db", this string format should be changed from 3306 to 3307 (or whichever port it was changed to in docker)
DB_HOST: "localhost"
DB_USER: "root"
DB_PASS: ""
DB_CONNECTION_POOL: true #Installs a connection pool to hub DB connections. Set false to default.
INIT_CONNECTION_POOL_TIMEOUT: 90 # Seconds
#Login Configuration
WORLDS: 1 #Initial number of worlds on the server.
@@ -198,8 +196,9 @@ server:
LOGIN_ATTEMPT_DURATION: 120 #Period in seconds the login attempt remains registered on the system.
#Ip Configuration
HOST: 127.0.0.1
LOCALSERVER: true
HOST: 127.0.0.1 #WAN IPv4 address
LANHOST: 127.0.0.1 #LAN IPv4 address
LOCALHOST: 127.0.0.1 #Loopback IPv4 address
GMSERVER: false
#Other configuration
@@ -221,7 +220,6 @@ server:
USE_MTS: false
USE_CPQ: true #Renders the CPQ available or not.
USE_AUTOHIDE_GM: true #When enabled, GMs are automatically hidden when joining. Thanks to Steven Deblois (steven1152).
USE_BUYBACK_SYSTEM: false #Enables the HeavenMS-builtin buyback system, to be used by dead players when clicking the MTS button.
USE_FIXED_RATIO_HPMP_UPDATE: false #Enables the HeavenMS-builtin HPMP update based on the current pool to max pool ratio.
USE_FAMILY_SYSTEM: true
USE_DUEY: true
@@ -235,6 +233,7 @@ server:
USE_STARTING_AP_4: false #Use early-GMS 4/4/4/4 starting stats. To overcome AP shortage, this gives 4AP/5AP at 1st/2nd job advancements.
USE_AUTOBAN: false #Commands the server to detect infractors automatically.
USE_AUTOBAN_LOG: true #Log autoban related messages. Still logs even with USE_AUTOBAN disabled.
USE_EXP_GAIN_LOG: false #Logs characters exp gains; logs world rate & coupon exp, total gained exp, and current exp, level can be calculated from "ExpTable".
USE_AUTOSAVE: true #Enables server autosaving feature (saves characters to DB each 1 hour).
USE_SERVER_AUTOASSIGNER: false #HeavenMS-builtin autoassigner, uses algorithm based on distributing AP accordingly with required secondary stat on equipments.
USE_REFRESH_RANK_MOVE: true
@@ -258,10 +257,8 @@ server:
USE_BUFF_MOST_SIGNIFICANT: true #When applying buffs, the player will stick with the highest stat boost among the listed, rather than overwriting stats.
USE_BUFF_EVERLASTING: false #Every applied buff on players holds expiration time so high it'd be considered permanent. Suggestion thanks to Vcoc.
USE_MULTIPLE_SAME_EQUIP_DROP: true #Enables multiple drops by mobs of the same equipment, number of possible drops based on the quantities provided at the drop data.
USE_BANISHABLE_TOWN_SCROLL: false #Enables town scrolls to act as if it's a "player banish", rendering the antibanish scroll effect available.
USE_ENABLE_FULL_RESPAWN: false #At respawn task, always respawn missing mobs when they're available. Spawn count doesn't depend on how many players are currently there.
USE_ENABLE_CHAT_LOG: false #Write in-game chat to log
USE_REBIRTH_SYSTEM: false #Flag to enable/disable rebirth system
USE_MAP_OWNERSHIP_SYSTEM: false #Flag to enable/disable map ownership system
USE_FISHING_SYSTEM: false #Flag to enable/disable custom fishing system
USE_NPCS_SCRIPTABLE: true #Flag to enable/disable serverside predefined script NPCs.
@@ -275,6 +272,7 @@ server:
#Announcement Configuration
USE_ANNOUNCE_SHOPITEMSOLD: false #Automatic message sent to owner when an item from the Player Shop or Hired Merchant is sold.
USE_ANNOUNCE_CHANGEJOB: false #Automatic message sent to acquantainces when changing jobs.
USE_ANNOUNCE_NX_COUPON_LOOT: false #Enables or disables the floating text when a player loots a NX card
#Cash Shop Configuration
USE_JOINT_CASHSHOP_INVENTORY: false #Enables usage of a same cash shop inventory for explorers, cygnus and legends. Items from exclusive cash shop inventories won't show up on the shared inventory, though.
@@ -304,7 +302,8 @@ server:
PARTY_BONUS_EXP_RATE: 1.0 #Rate for the party exp bonus reward.
#Miscellaneous Configuration
TIMEZONE: GMT-3
TIMEZONE: GMT
CHARSET: US-ASCII # Is loaded first, so applies to the rest of this config. Defaults to US-ASCII if invalid or not set.
USE_DISPLAY_NUMBERS_WITH_COMMA: true #Enforce comma on displayed strings (use this when USE_UNITPRICE_WITH_COMMA is active and you still want to display comma-separated values).
USE_UNITPRICE_WITH_COMMA: true #Set this accordingly with the layout of the unitPrices on Item.wz XML's, whether it's using commas or dots to represent fractions.
MAX_MONITORED_BUFFSTATS: 5 #Limits accounting for "dormant" buff effects, that should take place when stronger stat buffs expires.
@@ -328,7 +327,8 @@ server:
ITEM_EXPIRE_CHECK: 10000 # (10 * 10000) Interval between item expiring tasks on maps, which checks and makes disappear expired items.
ITEM_LIMIT_ON_MAP: 200 #Max number of items allowed on a map.
MAP_VISITED_SIZE: 5 #Max length for last mapids visited by a player. This is used to recover and update drops on these maps accordingly with player actions.
MAP_DAMAGE_OVERTIME_INTERVAL: 5000 #Interval in milliseconds between map environment damage (e.g. El Nath and Aqua Road surrondings).
MAP_DAMAGE_OVERTIME_INTERVAL: 2500 #Interval in milliseconds between map environment damage (e.g. El Nath and Aqua Road surrondings).
MAP_DAMAGE_OVERTIME_COUNT: 2
#Channel Mob Disease Monitor Configuration
MOB_STATUS_MONITOR_PROC: 200 #Frequency in milliseconds between each proc on the mob disease monitor schedule.
@@ -343,7 +343,6 @@ server:
USE_PERFECT_SCROLLING: false #Scrolls doesn't use slots upon failure.
USE_ENHANCED_CHSCROLL: false #Equips even more powerful with chaos upgrade.
USE_ENHANCED_CRAFTING: false #Apply chaos scroll on every equip crafted.
USE_ENHANCED_CLNSLATE: false #Clean slates can be applied to recover successfully used slots as well.
SCROLL_CHANCE_ROLLS: 1 #Number of rolls for success on a scroll, set 1 for default.
CHSCROLL_STAT_RATE: 1 #Number of rolls of stat upgrade on a successfully applied chaos scroll, set 1 for default.
CHSCROLL_STAT_RANGE: 6 #Stat upgrade range (-N, N) on chaos scrolls.
@@ -393,7 +392,6 @@ server:
USE_EQUIPMNT_LVLUP_SLOTS: false #Equips can upgrade slots at level up.
USE_EQUIPMNT_LVLUP_POWER: false #Enable more powerful stat upgrades at equip level up.
USE_EQUIPMNT_LVLUP_CASH: false #Enable equip leveling up on cash equipments as well.
USE_SPIKES_AVOID_BANISH: false #Shoes equipped with spikes prevents mobs from banishing wearer.
MAX_EQUIPMNT_LVLUP_STAT_UP: 10000 #Max stat upgrade an equipment can have on a levelup.
MAX_EQUIPMNT_STAT: 32767 #Max stat on an equipment by leveling up.
USE_EQUIPMNT_LVLUP: 1 #All equips lvlup at max level of N, set 1 to disable.
@@ -444,17 +442,19 @@ server:
WEDDING_GIFT_LIMIT: 1 #Max number of gifts per person to same wishlist on marriage instances.
WEDDING_BLESSER_SHOWFX: true #Pops bubble sprite effect on players blessing the couple. Setting this false shows the blessing effect on the couple instead.
#Buyback Configuration
USE_BUYBACK_WITH_MESOS: true #Enables usage of either mesos or NX for the buyback fee.
BUYBACK_FEE: 77.70 #Sets the base amount needed to buyback (level 30 or under will use the base value).
BUYBACK_LEVEL_STACK_FEE: 85.47 #Sets the level-stacking portion of the amount needed to buyback (fee will sum up linearly until level 120, when it reaches the peak).
BUYBACK_MESO_MULTIPLIER: 1000 #Sets a multiplier for the fee when using meso as the charge unit.
BUYBACK_RETURN_MINUTES: 1 #Sets the maximum amount of time the player can wait before decide to buyback.
BUYBACK_COOLDOWN_MINUTES: 7 #Sets the time the player must wait before using buyback again.
# Login timeout by shavit
TIMEOUT_DURATION: 3600000 # Kicks clients who don't send any packet to the game server in due time (in millisseconds).
#Event End Timestamp
EVENT_END_TIMESTAMP: 1428897600000
# GM Security Configuration
MINIMUM_GM_LEVEL_TO_TRADE: 4
MINIMUM_GM_LEVEL_TO_USE_STORAGE: 4
MINIMUM_GM_LEVEL_TO_USE_DUEY: 4
MINIMUM_GM_LEVEL_TO_DROP: 4
#Any NPC ids that should search for a js override script (useful if they already have wz entries since otherwise they're ignored).
NPCS_SCRIPTABLE:
#9200000: Talk to Cody # Cody
9001105: Rescue Gaga! # Grandpa moon bunny

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

3
database/docker-db-data/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
*
*/
!.gitignore

21508
database/sql/1-db_database.sql Normal file

File diff suppressed because it is too large Load Diff

24539
database/sql/2-db_drops.sql Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,316 @@
#THIS SQL IS OPTIONAL, TO BE USED AFTER 'db_drops.sql'
#THIS REQUIRES PROVIDED WZ FILES
USE `cosmic`;
# Scroll shop at Asia, chair shop at Kino Konoko, potion shop at T-1337
INSERT INTO `shops` (`shopid`,`npcid`) VALUES
(2082014,2082014),
(9110002,9110002),
(9201101,9201101);
INSERT IGNORE INTO `shopitems` (`shopid`, `itemid`, `price`, `pitch`, `position`) VALUES
(2082014, 2040004, 480000, 0, 1),
(2082014, 2040025, 500000, 0, 2),
(2082014, 2040029, 500000, 0, 3),
(2082014, 2040017, 500000, 0, 4),
(2082014, 2040301, 400000, 0, 5),
(2082014, 2040317, 400000, 0, 6),
(2082014, 2040321, 400000, 0, 7),
(2082014, 2040413, 400000, 0, 8),
(2082014, 2040418, 400000, 0, 9),
(2082014, 2040501, 250000, 0, 10),
(2082014, 2040513, 250000, 0, 11),
(2082014, 2040516, 250000, 0, 12),
(2082014, 2040532, 250000, 0, 13),
(2082014, 2040613, 400000, 0, 14),
(2082014, 2040701, 450000, 0, 15),
(2082014, 2040704, 450000, 0, 16),
(2082014, 2040707, 450000, 0, 17),
(2082014, 2040804, 550000, 0, 18),
(2082014, 2040817, 550000, 0, 19),
(2082014, 2040914, 480000, 0, 20),
(2082014, 2040919, 480000, 0, 21),
(2082014, 2041007, 470000, 0, 22),
(2082014, 2041010, 470000, 0, 23),
(2082014, 2041013, 500000, 0, 24),
(2082014, 2041016, 500000, 0, 25),
(2082014, 2041019, 500000, 0, 26),
(2082014, 2041022, 500000, 0, 27),
(2082014, 2044901, 520000, 0, 28),
(2082014, 2044701, 520000, 0, 29),
(2082014, 2043001, 520000, 0, 30),
(2082014, 2043801, 520000, 0, 31),
(2082014, 2044601, 520000, 0, 32),
(2082014, 2040727, 50000, 0, 33),
(2082014, 2041058, 50000, 0, 34),
(2082014, 2040807, 1000000, 0, 35),
(2082014, 2040005, 22000, 0, 36),
(2082014, 2040026, 23000, 0, 37),
(2082014, 2040031, 23000, 0, 38),
(2082014, 2040016, 23000, 0, 39),
(2082014, 2040302, 25000, 0, 40),
(2082014, 2040318, 25000, 0, 41),
(2082014, 2040323, 25000, 0, 42),
(2082014, 2040412, 20000, 0, 43),
(2082014, 2040419, 20000, 0, 44),
(2082014, 2040502, 25000, 0, 45),
(2082014, 2040514, 25000, 0, 46),
(2082014, 2040517, 25000, 0, 47),
(2082014, 2040534, 25000, 0, 48),
(2082014, 2040612, 20000, 0, 49),
(2082014, 2040702, 20000, 0, 50),
(2082014, 2040705, 25000, 0, 51),
(2082014, 2040708, 20000, 0, 52),
(2082014, 2040805, 100000, 0, 53),
(2082014, 2040816, 100000, 0, 54),
(2082014, 2040915, 55000, 0, 55),
(2082014, 2040920, 55000, 0, 56),
(2082014, 2041008, 38000, 0, 57),
(2082014, 2041011, 38000, 0, 58),
(2082014, 2041014, 40000, 0, 59),
(2082014, 2041017, 40000, 0, 60),
(2082014, 2041020, 40000, 0, 61),
(2082014, 2041023, 40000, 0, 62),
(2082014, 2044902, 50000, 0, 63),
(2082014, 2044702, 50000, 0, 64),
(2082014, 2043002, 50000, 0, 65),
(2082014, 2043802, 50000, 0, 66),
(2082014, 2044602, 50000, 0, 67),
(2082014, 2049200, 170000, 0, 68),
(2082014, 2049201, 220000, 0, 69),
(2082014, 2049202, 170000, 0, 70),
(2082014, 2049203, 220000, 0, 71),
(2082014, 2049204, 170000, 0, 72),
(2082014, 2049205, 220000, 0, 73),
(2082014, 2049206, 170000, 0, 74),
(2082014, 2049207, 220000, 0, 75),
(2082014, 2049208, 140000, 0, 76),
(2082014, 2049209, 170000, 0, 77),
(2082014, 2049210, 140000, 0, 78),
(2082014, 2049211, 170000, 0, 79),
(2082014, 2040101, 540000, 0, 80),
(2082014, 2040100, 700000, 0, 81),
(2082014, 2040106, 540000, 0, 82),
(2082014, 2040105, 700000, 0, 83),
(2082014, 2040201, 540000, 0, 84),
(2082014, 2040200, 700000, 0, 85),
(2082014, 2040206, 540000, 0, 86),
(2082014, 2040205, 700000, 0, 87),
(2082014, 2070016, 120000000, 0, 88),
(2082014, 2070018, 190000000, 0, 89),
(2082014, 2030007, 1800000, 0, 90),
(2082014, 4001017, 60000000, 0, 91);
UPDATE shopitems SET price = 11*price WHERE (`position` >= 33 and `position` <= 79 and `shopid` = 2082014);
INSERT IGNORE INTO `shopitems` (`shopid`, `itemid`, `price`, `pitch`, `position`) VALUES
(1031100, 3010015, 20000, 0, 100),
(9110002, 3010019, 7700000, 0, 92),
(9110002, 3010008, 10000000, 0, 96),
(9110002, 3010007, 10000000, 0, 100),
(9201020, 3010009, 4200000, 0, 96),
(9201020, 3010014, 7000000, 0, 100),
(1081000, 3010013, 4000000, 0, 100),
(9201101, 2022338, 2100000, 0, 100),
(9201101, 2022339, 2800000, 0, 104),
(9201101, 2022340, 4000000, 0, 108),
(9201101, 2022341, 2800000, 0, 112),
(9201101, 2022342, 2000000, 0, 116),
(9201101, 2022343, 4700000, 0, 120),
(9201101, 2022344, 5000000, 0, 124),
(9201101, 2022345, 4000000, 0, 128),
(9201101, 2002028, 5000000, 0, 132),
(9201101, 2022544, 100000, 0, 136),
(9201101, 2022545, 4400000, 0, 140),
(9201101, 2020027, 2100000, 0, 144),
(9201101, 2022113, 1800000, 0, 148),
(9201101, 2022121, 12000000, 0, 152),
(9201101, 2022123, 12000000, 0, 156),
(9201101, 2022277, 5300000, 0, 160),
(9201101, 2012008, 4200000, 0, 164),
(9201101, 2022251, 3800000, 0, 168);
-- Thanks to Vcoc
-- GMShop: Sacks, GmEquip, Cheese & Onyx, Utils,
-- Arrows, Bullets, Throwings and Capsules,
-- Others, Equips, Mounts, Scrolls.
DELETE FROM `shopitems` WHERE `shopid`=1337;
INSERT INTO `shopitems` ( `shopid`, `itemid`, `price`, `position`) VALUES
(1337, 2100036, 1, 1),
(1337, 2100035, 1, 2),
(1337, 2100034, 1, 3),
(1337, 2100033, 1, 4),
(1337, 2100007, 1, 5),
(1337, 2100006, 1, 6),
(1337, 2100005, 1, 7),
(1337, 2100004, 1, 8),
(1337, 2100003, 1, 9),
(1337, 2100002, 1, 10),
(1337, 2100001, 1, 11),
(1337, 1002959, 1, 12),
(1337, 1002140, 1, 13),
(1337, 1042003, 1, 14),
(1337, 1062007, 1, 15),
(1337, 1322013, 1, 16),
(1337, 1072010, 1, 17),
(1337, 2022179, 1, 18),
(1337, 2022273, 1, 19),
(1337, 2041200, 1, 20),
(1337, 4006001, 1, 21),
(1337, 4001017, 1, 22),
(1337, 4031179, 1, 23),
(1337, 2070018, 1, 24),
(1337, 2060004, 1, 25),
(1337, 2061004, 1, 26),
(1337, 2330005, 1, 27),
(1337, 2332000, 1, 28),
(1337, 2331000, 1, 29),
(1337, 5072000, 1, 30),
(1337, 5390000, 1, 31),
(1337, 5390001, 1, 32),
(1337, 5390002, 1, 33),
(1337, 5390005, 1, 34),
(1337, 5390006, 1, 35),
(1337, 1492013, 1, 36),
(1337, 1482013, 1, 37),
(1337, 1452044, 1, 38),
(1337, 1472052, 1, 39),
(1337, 1462039, 1, 40),
(1337, 1332050, 1, 41),
(1337, 1312031, 1, 42),
(1337, 1322052, 1, 43),
(1337, 1302059, 1, 44),
(1337, 1442045, 1, 45),
(1337, 1432038, 1, 46),
(1337, 1382036, 1, 47),
(1337, 1412026, 1, 48),
(1337, 1422028, 1, 49),
(1337, 1402036, 1, 50),
(1337, 1372032, 1, 51),
(1337, 1122000, 1, 52),
(1337, 1082149, 1, 53),
(1337, 1912000, 1, 54),
(1337, 1902000, 1, 55),
(1337, 1902001, 1, 56),
(1337, 1902002, 1, 57),
(1337, 1912005, 1, 58),
(1337, 1902005, 1, 59),
(1337, 1902006, 1, 60),
(1337, 1902007, 1, 61),
(1337, 1912011, 1, 62),
(1337, 1902015, 1, 63),
(1337, 1902016, 1, 64),
(1337, 1902017, 1, 65),
(1337, 1902018, 1, 66),
(1337, 2044908, 1, 67),
(1337, 2044815, 1, 68),
(1337, 2044512, 1, 69),
(1337, 2044712, 1, 70),
(1337, 2044612, 1, 71),
(1337, 2043312, 1, 72),
(1337, 2043117, 1, 73),
(1337, 2043217, 1, 74),
(1337, 2043023, 1, 75),
(1337, 2044417, 1, 76),
(1337, 2044317, 1, 77),
(1337, 2043812, 1, 78),
(1337, 2044117, 1, 79),
(1337, 2044217, 1, 80),
(1337, 2044025, 1, 81),
(1337, 2043712, 1, 82),
(1337, 2340000, 1, 83),
(1337, 2040807, 1, 84),
(1337, 2210032, 1, 85),
(1337, 2050004, 1, 86);
-- Thanks to DietStory v1.02 dev team
INSERT INTO `shopitems` ( `shopid`, `itemid`, `price`, `pitch`, `position`) VALUES
(1200001, 3010001, 1000, 0, 1),
(1200001, 1092003, 2000, 0, 2),
(1200001, 1072063, 10000, 0, 3),
(1200001, 1072062, 10000, 0, 4),
(1200001, 1072017, 10000, 0, 5),
(1200001, 1072049, 5000, 0, 6),
(1200001, 1072048, 5000, 0, 7),
(1200001, 1072008, 5000, 0, 8),
(1200001, 1072005, 50, 0, 9),
(1200001, 1072038, 50, 0, 10),
(1200001, 1072037, 50, 0, 11),
(1200001, 1072001, 50, 0, 12),
(1200001, 1062001, 4800, 0, 13),
(1200001, 1062000, 4800, 0, 14),
(1200001, 1060004, 2800, 0, 15),
(1200001, 1060007, 1000, 0, 16),
(1200001, 1041012, 3000, 0, 17),
(1200001, 1041004, 3000, 0, 18),
(1200001, 1040014, 3000, 0, 19),
(1200001, 1040013, 3000, 0, 20),
(1200001, 1002001, 3000, 0, 21),
(1200001, 1002019, 2000, 0, 22),
(1200001, 1002134, 800, 0, 23),
(1200001, 1002133, 800, 0, 24),
(1200001, 1002132, 800, 0, 25),
(1200001, 1002069, 450, 0, 26),
(1200001, 1002068, 450, 0, 27),
(1200001, 1002067, 450, 0, 28),
(1200001, 1002066, 450, 0, 29),
(1200001, 1002014, 1000, 0, 30),
(1200001, 1002008, 500, 0, 31),
(1200001, 1332007, 1000, 0, 32),
(1200001, 1312000, 3000, 0, 33),
(1200001, 1302007, 3000, 0, 34),
(1200001, 1322005, 50, 0, 35),
(1200001, 1312004, 50, 0, 36),
(1200001, 1302000, 50, 0, 37),
(1200002, 2330000, 600, 0, 104),
(1200002, 2070000, 500, 0, 108),
(1200002, 2061000, 1, 0, 120),
(1200002, 2060000, 1, 0, 124),
(1200002, 2030000, 400, 0, 132),
(1200002, 2020028, 3000, 0, 136),
(1200002, 2010004, 310, 0, 140),
(1200002, 2010003, 100, 0, 144),
(1200002, 2010001, 106, 0, 148),
(1200002, 2010002, 50, 0, 152),
(1200002, 2010000, 30, 0, 156),
(1200002, 2002005, 500, 0, 160),
(1200002, 2002004, 500, 0, 164),
(1200002, 2002002, 500, 0, 168),
(1200002, 2002001, 400, 0, 172),
(1200002, 2002000, 500, 0, 176),
(1200002, 2000006, 620, 0, 180),
(1200002, 2000003, 200, 0, 184),
(1200002, 2000002, 320, 0, 188),
(1200002, 2000001, 160, 0, 192),
(1200002, 2000000, 50, 0, 196),
(1301000, 2330000, 600, 0, 104),
(1301000, 2070000, 500, 0, 108),
(1301000, 2061000, 1, 0, 112),
(1301000, 2060000, 1, 0, 116),
(1301000, 2030000, 400, 0, 124),
(1301000, 2022000, 1650, 0, 128),
(1301000, 2022003, 1100, 0, 132),
(1301000, 2002005, 500, 0, 136),
(1301000, 2002004, 500, 0, 140),
(1301000, 2002002, 500, 0, 144),
(1301000, 2002001, 400, 0, 148),
(1301000, 2002000, 500, 0, 152),
(1301000, 2000006, 620, 0, 156),
(1301000, 2000003, 200, 0, 160),
(1301000, 2000002, 320, 0, 164),
(1301000, 2000001, 160, 0, 168),
(1301000, 2000000, 50, 0, 172);
# adding missing pirate items at Singapore npc's
INSERT INTO `shopitems` ( `shopid`, `itemid`, `price`, `pitch`, `position`) VALUES
(9270019, 1492006, 160000, 0, 80),
(9270019, 1492005, 100000, 0, 84),
(9270019, 1492004, 75000, 0, 88),
(9270019, 1482006, 150000, 0, 92),
(9270019, 1482005, 100000, 0, 96),
(9270019, 1482004, 75000, 0, 100),
(9270020, 1052113, 120000, 0, 92),
(9270020, 1052110, 100000, 0, 96),
(9270020, 1002625, 75000, 0, 100);

View File

@@ -0,0 +1,87 @@
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: cosmic
-- ------------------------------------------------------
-- Server version 8.0.19
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
USE `cosmic`;
--
-- Dumping data for table `accounts`
--
LOCK TABLES `accounts` WRITE;
/*!40000 ALTER TABLE `accounts` DISABLE KEYS */;
INSERT INTO `accounts` VALUES (1,'admin','$2y$12$aFD9BDeUocDMY1X4tDYDyeJw/HhkQwCQWs3KAY7gCaRG0cpqJcaL.','0000','000000',0,'2021-05-24 00:00:01','2021-05-24 00:00:02','2005-05-11',0,NULL,NULL,1000000,1000000,1000000,3,0,'2005-05-11 03:00:00',0,1,NULL,0,NULL,0,NULL,NULL,0,0,'1234-5678',2);
/*!40000 ALTER TABLE `accounts` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Dumping data for table `characters`
--
LOCK TABLES `characters` WRITE;
/*!40000 ALTER TABLE `characters` DISABLE KEYS */;
INSERT INTO `characters` VALUES (1,1,0,'Admin',1,0,0,12,5,4,4,50,5,50,5,0,0,0,0,0,0,0,30030,20000,0,'0,0,0,0,0,0,0,0,0,0',10000,2,6,-1,25,'2021-05-24 00:00:03',1,0,1,0,0,5,0,4,1,0,0,0,0,0,0,0,0,0,0,24,24,24,24,-1,0,5,0,0,0,0,0,0,0,0,0,0,0,'','2021-05-24 00:00:04','2015-01-01 05:00:00',1,0);
/*!40000 ALTER TABLE `characters` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Dumping data for table `inventoryequipment`
--
LOCK TABLES `inventoryequipment` WRITE;
/*!40000 ALTER TABLE `inventoryequipment` DISABLE KEYS */;
INSERT INTO `inventoryequipment` VALUES (17,22,7,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,1,0,-1),(18,23,7,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,0,-1),(19,24,5,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,0,-1),(20,25,7,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0,0,1,0,-1);
/*!40000 ALTER TABLE `inventoryequipment` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Dumping data for table `inventoryitems`
--
LOCK TABLES `inventoryitems` WRITE;
/*!40000 ALTER TABLE `inventoryitems` DISABLE KEYS */;
INSERT INTO `inventoryitems` VALUES (21,1,1,NULL,4161001,4,1,1,'',-1,0,-1,''),(22,1,1,NULL,1040002,-1,-5,1,'',-1,0,-1,''),(23,1,1,NULL,1060002,-1,-6,1,'',-1,0,-1,''),(24,1,1,NULL,1072001,-1,-7,1,'',-1,0,-1,''),(25,1,1,NULL,1302000,-1,-11,1,'',-1,0,-1,'');
/*!40000 ALTER TABLE `inventoryitems` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Dumping data for table `keymap`
--
LOCK TABLES `keymap` WRITE;
/*!40000 ALTER TABLE `keymap` DISABLE KEYS */;
INSERT INTO `keymap` VALUES (161,1,18,4,0),(162,1,65,6,106),(163,1,2,4,10),(164,1,23,4,1),(165,1,3,4,12),(166,1,4,4,13),(167,1,5,4,18),(168,1,6,4,24),(169,1,16,4,8),(170,1,17,4,5),(171,1,19,4,4),(172,1,25,4,19),(173,1,26,4,14),(174,1,27,4,15),(175,1,31,4,2),(176,1,34,4,17),(177,1,35,4,11),(178,1,37,4,3),(179,1,38,4,20),(180,1,40,4,16),(181,1,43,4,9),(182,1,44,5,50),(183,1,45,5,51),(184,1,46,4,6),(185,1,50,4,7),(186,1,56,5,53),(187,1,59,6,100),(188,1,60,6,101),(189,1,61,6,102),(190,1,62,6,103),(191,1,63,6,104),(192,1,64,6,105),(193,1,57,5,54),(194,1,48,4,22),(195,1,29,5,52),(196,1,7,4,21),(197,1,24,4,25),(198,1,33,4,26),(199,1,41,4,23),(200,1,39,4,27);
/*!40000 ALTER TABLE `keymap` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Dumping data for table `storages`
--
LOCK TABLES `storages` WRITE;
/*!40000 ALTER TABLE `storages` DISABLE KEYS */;
INSERT INTO `storages` VALUES (1,1,0,4,0);
/*!40000 ALTER TABLE `storages` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

View File

@@ -0,0 +1,13 @@
# Migrations
The files contained in this directory are intended to be run manually when transitioning from an earlier version of Cosmic to a more recent one.
Not every version comes with an associated migration script. Only those with breaking changes such as removal of custom assets that would otherwise crash the client.
This is a temporary solution until automatic database migrations are in place.
## How to
Each script is only intended to be run __once__.
When a new migration is available, simply run the SQL script in HeidiSQL (or other SQL client of choice).
If there are multiple new migrations that you haven't run, run them in order starting with the lowest version and ending with the highest version.

View File

@@ -0,0 +1,6 @@
/* Manually run this script in MySQL Workbench or some other database client
to migrate your old (pre Jan 19th 2022) monsterbook table to the new version */
ALTER TABLE cosmic.`monsterbook`
CHANGE COLUMN `charid` `charid` INT(11) NOT NULL,
ADD PRIMARY KEY (`charid`, `cardid`),
ADD CONSTRAINT `FK_monsterbook_1` FOREIGN KEY (`charid`) REFERENCES `characters` (`id`) ON UPDATE CASCADE ON DELETE CASCADE;

View File

@@ -0,0 +1,2 @@
DELETE FROM shopitems
WHERE itemid = 2030100; # Return Scroll - Banished Area (a custom item added in HeavenMS)

7
database/sql/readme.txt Normal file
View File

@@ -0,0 +1,7 @@
---- Cosmic MySQL Database ----
These SQL files must be executed IN ORDER to set up the database:
- 1-db_database.sql (Tables and some data)
- 2-db_drops.sql (Remaining data: monster drops, reactor drops)
- 3-db_shopupdate.sql (Custom shops - optional, requires provided WZs)
- 4-db_admin (Basic admin account - optional)

View File

@@ -1,20 +1,33 @@
version: '3'
services:
maplestory:
network_mode: "host"
build: .
depends_on:
- db
ports:
# Login server
- "8484:8484"
# Channels.
# Format: WWCC, where WW is 75 plus the world number and CC is 75 plus the channel number (both zero indexed).
# In this case, world 1 channels 1-3.
- "7575-7577:7575-7577"
volumes:
# Config changes can be reloaded without rebuilding the image.
# Still requires a redeployment as they're sourced on startup.
- ./config.yaml:/opt/server/config.yaml
- ./scripts:/opt/server/scripts
- ./wz:/opt/server/wz
environment:
WAIT_HOSTS: localhost:3306
DB_HOST: "db" ## Remember if this is present it will OVERRIDE the host in the config.yaml, if you put here anything other than db, you'll need to change the config.yaml jdbc string to port 3307, and not port 3306
db:
network_mode: "host"
image: mysql:5.6
image: mysql:8.4.0
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: "heavenms"
MYSQL_USER: "root"
MYSQL_PASSWORD: ""
MYSQL_DATABASE: "cosmic"
MYSQL_ROOT_PASSWORD: ""
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- "3307:3306"
volumes:
- ./sql:/docker-entrypoint-initdb.d
- ./database/docker-db-data:/var/lib/mysql
- ./database/sql:/docker-entrypoint-initdb.d

View File

@@ -302,10 +302,10 @@ Localhost:
* Removed caps for MATK, WDEF, MDEF, ACC and AVOID.
* Removed "AP excess" popup and "Admin/MWLB" action block, original credits to kevintjuh93.
* Removed "You've gained a level!" popup, original credits to PrinceReborn.
* Removed "Cannot enter MTS from this map." popup on maps that blocks transitions (such change channel, CS/MTS), rendering the buyback option now available for all maps.
* Removed "Cannot enter MTS from this map." popup on maps that blocks transitions (such change channel, CS/MTS).
* Removed a check for players wishing to create/join a party being novices under level 10.
* Set a new high cap for SPEED.
* Removed the AP assign block for novices.
* Removed a block that would show up when trying to apply an attack gem on equipments that aren't weapons.
---------------------------
---------------------------

View File

@@ -23,7 +23,7 @@ P.S.:
Yeah, these explanations are pretty simplistic, I know. If one really wants to
compare the original v83 WZ with the ones I provided, I recommend do the following:
- Open HaRepacker and, for each HeavenMS's WZ file, extract all the XMLs
- Open HaRepacker and, for each Cosmic's WZ file, extract all the XMLs
for "Private Server".
- Now, install MapleStory from "ManagerMsv83.exe" on an other folder and do the
same procediment said above.

View File

@@ -264,7 +264,7 @@
5160006 - Sparkling Eyes - On the KeyConfig, configure this expression on a button of your choice. Press the button and watch your character display sparkling eyes.
5160007 - Flaming - On the KeyConfig, configure this expression on a button of your choice. Press the button and watch your character display the look of rage.
5160008 - Ray - On the KeyConfig, configure this expression on a button of your choice. Press the button and watch your character display beaming eyes.
5160009 - Goo Goo - On the KeyConfig, configure this expression on a button of your choice. Press the button and watch your character display the look of awesome!!!
5160009 - Goo Goo - On the KeyConfig, configure this expression on a button of your choice. Press the button and watch your character display the look of <EFBFBD>awesome!!!<EFBFBD>
5160010 - Whoa Whoa - On the KeyConfig, configure this expression on a button of your choice. Press the button and watch your character display the look of being flustered.
5160011 - Constant Sigh - On the KeyConfig, configure this expression on a button of your choice. Press the button and watch your character display the thinking look.
5160012 - Drool - On the KeyConfig, configure this expression on a button of your choice. Press the button and watch your character act like falling asleep.
@@ -479,9 +479,9 @@
5610001 - Vega's Spell(60%) - This winning spell from Vega enables a 90% success rate on a 60% scroll. Please check the scroll description to confirm that Vega's Spell is available for the scroll you choose.
5590000 - High-Five Stamp - Can equip items that are 5 levels above your current level.
5021026 - Gift Box Throwing Stars - A gift box that can be freely thrown around. Using the #cThrowing Star# will create an orbital effect.\n\nThis item cannot be deleted.
5010073 - Miss Popular - Well, lookie here. Someones certainly become popular with the guys. Turn this effect on and off by assigning it to a shortcut key from the keyboard settings menu.
5010073 - Miss Popular - Well, lookie here. Someone<EFBFBD>s certainly become popular with the guys. Turn this effect on and off by assigning it to a shortcut key from the keyboard settings menu.
5010074 - Mr. Popular - Well, lookie here. Someones certainly become popular with the girls. Turn this effect on and off by assigning it to a shortcut key from the keyboard settings menu.
5010074 - Mr. Popular - Well, lookie here. Someone<EFBFBD>s certainly become popular with the girls. Turn this effect on and off by assigning it to a shortcut key from the keyboard settings menu.
5240027 - Golden Drumstick - A drumstick that can be consumed only by #cBaby Tiger#. It recovers hunger and #cincreases Closeness by 100.#
5390005 - Cute Tiger Messenger - Shout to everyone in the world your character is on with this megaphone. Now available with your avatar on the top of everyone's screen! Comes with a tiger background for your avatar.

View File

@@ -1779,8 +1779,8 @@
4032103 - The Lost Treasure - The lost treasure that was stolen by the Master of Disguise who brazenly entered Ereve. Let's take it back to Irena.
4032104 - The Lost Treasure - The lost treasure that was stolen by the Master of Disguise who brazenly entered Ereve. Let's take it back to Eckhart.
4032105 - The Lost Treasure - The lost treasure that was stolen by the Master of Disguise who brazenly entered Ereve. Let's take it back to Hawkeye.
4000209 - Co-ke Slimes Bell - The bell of Co-ke Slime that has been taken off.
4000210 - Co-ke Pigs Ribbon - A piece of Co-ke Pigs ribbon.
4000209 - Co-ke Slime<EFBFBD>s Bell - The bell of Co-ke Slime that has been taken off.
4000210 - Co-ke Pig<EFBFBD>s Ribbon - A piece of Co-ke Pig<EFBFBD>s ribbon.
4000211 - Coca-Cola Cube - A cube with a drawing of a Coca-Cola bottle on it.
4000212 - CokePLAY Cube - A cube with the CokePLAY symbol.
4000213 - Coca-Cola Card - A card with a drawing of Coca-Cola.
@@ -1802,10 +1802,10 @@
4001151 - Happy Valley - Happy Valley
4001152 - Ariant - Ariant
4001153 - Magatia - Magatia
4031832 - Sophelias Portrait - A portrait of Sophelia.
4031832 - Sophelia<EFBFBD>s Portrait - A portrait of Sophelia.
4031833 - Pumpkin Juice - A juice made with pumpkin. It is very fragrant.
4031834 - Perfect Tool - The most perfect tool for making dolls.
4031835 - Lyudmillas Earring - The earrings that Lyudmilla lost. They shine with brilliance.
4031835 - Lyudmilla<EFBFBD>s Earring - The earrings that Lyudmilla lost. They shine with brilliance.
4031836 - Score - The score that Lyudmilla asked for. No one knows what kind of music is in it.
4031837 - Dumped Doll - A doll that Sophelia used to cherish a long time ago. She threw it away when she got a new doll.
4031838 - Piece of Cloth - A small piece of cloth. If you drag and drop it onto the rag doll, the doll will be completed bit by bit.
@@ -1893,26 +1893,26 @@
4032127 - Proof of Ability - The Proof of Ability that is required to learn a new skill. This proof signifies that you are ready to learn a new skill.
4032128 - Proof of Ability - The Proof of Ability that is required to learn a new skill. This proof signifies that you are ready to learn a new skill.
4032129 - Proof of Ability - The Proof of Ability that is required to learn a new skill. This proof signifies that you are ready to learn a new skill.
4032130 - Pig Doll - An adorable doll that resembles a pig. However, something doesn't seem right
4032131 - Pig Doll - An adorable doll that resembles a pig. However, something doesn't seem right
4032130 - Pig Doll - An adorable doll that resembles a pig. However, something doesn't seem right<EFBFBD>
4032131 - Pig Doll - An adorable doll that resembles a pig. However, something doesn't seem right<EFBFBD>
4032132 - Roca's Mission Report - A mission report written by Roca, the Agent for Henesys. This compiles a list of events that have taken place recently.
4032136 - Bubbling Doll - An adorable doll that was designed based on Bubbling, but something doesn't seem right. The way it smiles just seems a bit off, as if it has hidden agenda.
4032137 - Bubbling Doll - An adorable doll that was designed based on Bubbling, but something doesn't seem right. The way it smiles just seems a bit off, as if it has hidden agenda.
4032138 - Bubbling Doll - An adorable doll that was designed based on Bubbling, but something doesn't seem right. It's intears.
4032138 - Bubbling Doll - An adorable doll that was designed based on Bubbling, but something doesn't seem right. It's in<EFBFBD>tears.
4032139 - Old Key - An old, rusty key that Mr. Pickall has been looking for.
4032140 - Bubbling Doll - An adorable doll that was designed based on Bubbling, but something doesn't seem right. It's intears.
4032140 - Bubbling Doll - An adorable doll that was designed based on Bubbling, but something doesn't seem right. It's in<EFBFBD>tears.
4032141 - Mattias' Mission Report - A mission report written by Roca, the Agent for Kerning City. This compiles a list of events that have taken place recently.
4032142 - Clear Tree Sap - A clear tree sap that can only be found at the very top of the skyscraping trees. Accompanied by the freshest green scent.
4032143 - Fruit - A fruit picked from plants near Henesys.
4032144 - Hersha's Mission Report - A mission report written by Hersha, the Agent for Ellinia. This compiles a list of events that have taken place recently.
4032145 - Detector - A detector made to detect any forces of darkness. Take this to the 10 Boogies.
4032146 - Wooden Mask Doll - An adorable doll modeled after the Wooden Mask, but something doesn't seem right
4032147 - Rocky Mask Doll - An adorable doll modeled after the Stone Mask, but something doesn't seem right
4032146 - Wooden Mask Doll - An adorable doll modeled after the Wooden Mask, but something doesn't seem right<EFBFBD>
4032147 - Rocky Mask Doll - An adorable doll modeled after the Stone Mask, but something doesn't seem right<EFBFBD>
4032148 - Detector - A detector created with the sole purpose of detecting the Puppeteer's movements. We put it to good use, so let's return it to Neinheart.
4032149 - 10 Boogies' Mission Report - A mission report written by 10 Boogies, the Agents for Perion. This compiles a list of events that have taken place recently.
4032178 - Hack Attempt - A record that shows that Chief Grays tried to hack into the system.
4032179 - Ereve Investigation Permit - A permitt that allows one to investigate every part of Ereve. When the Red Alert is on, this permit is the only way you can roam freely around Ereve.
4032190 - Orange Mushroom Doll - An adorable doll modeled after the Orange Mushroom, but something doesn't seem right
4032190 - Orange Mushroom Doll - An adorable doll modeled after the Orange Mushroom, but something doesn't seem right<EFBFBD>
4032196 - Concentrated Formula: Step 1 - A formula concentrated with effective and potent ingredients. The first formula used to raise Mimiana and Mimio
4032197 - Concentrated Formula: Step 2 - A formula concentrated with effective and potent ingredients. The second formula used to raise Mimiana and Mimio.
4032198 - Concentrated Formula: Step 3 - A formula concentrated with effective and potent ingredients. The third formula used to raise Mimiana and Mimio.
@@ -2048,16 +2048,16 @@
4032270 - Glistening Sunlight - Glistening sunlight filled with the feeling of spring.
4032271 - Pure Small Sprout - A fragrant new sprout filled with the energies of spring. Used as an ingredient for Pure Perfume.
4032272 - Stationery of Longing - Pink stationary that's rumored to return a favorable response if used to send a letter to a secret crush.
4032273 - Pencil of Courage X 10 - A pencil that's used to write things you dont have the courage to say.
4032273 - Pencil of Courage X 10 - A pencil that's used to write things you don<EFBFBD>t have the courage to say.
4032275 - Pure Normal Sprout - A fragrant new sprout filled with the energies of spring. Used as an ingredient for Pure Perfume.
4032276 - Pure Sprout - A fragrant new sprout filled with the energies of spring. Used as an ingredient for Pure Perfume.
4032277 - Pure Large Sprout - A fragrant new sprout filled with the energies of spring. Used as an ingredient for Pure Perfume.
4032278 - Stationery of Deep Longing - Pink stationary that's rumored to return a favorable response if used to send a letter to a secret crush.
4032279 - Stationary of Hope and Longing - Pink stationary that's rumored to return a favorable response if used to send a letter to a secret crush.
4032280 - Letter of Love and Longing - Pink stationary that's rumored to return a favorable response if used to send a letter to a secret crush.
4032281 - Pencil of Courage X 100 - A pencil that's used to write things you dont have the courage to say.
4032282 - Pencil of Courage X 1000 - AA pencil that's used to write things you dont have the courage to say.
4032283 - Pencil of Courage X 10000 - A pencil that's used to write things you dont have the courage to say.
4032281 - Pencil of Courage X 100 - A pencil that's used to write things you don<EFBFBD>t have the courage to say.
4032282 - Pencil of Courage X 1000 - AA pencil that's used to write things you don<EFBFBD>t have the courage to say.
4032283 - Pencil of Courage X 10000 - A pencil that's used to write things you don<EFBFBD>t have the courage to say.
4032284 - Child's Broken Toy - A toy stolen from a child by a monster. It's broken and cannot be used.
4032285 - Child's Broken Toy - A toy stolen from a child by a monster. It's broken and cannot be used.
4032286 - Child's Broken Toy - A toy stolen from a child by a monster. It's broken and cannot be used.

View File

@@ -1565,9 +1565,9 @@ ossyria
200090057 - Empress' Road - To Ellinia
200090058 - Empress' Road - To Ereve
200090059 - Empress' Road - To Ellinia
200010303 - Hidden Street - Elizas Garden
211040102 - Hidden Street - Snow Souls Resting Place
209000100 - Happy Village - Cliffs Hut
200010303 - Hidden Street - Eliza<EFBFBD>s Garden
211040102 - Hidden Street - Snow Soul<EFBFBD>s Resting Place
209000100 - Happy Village - Cliff<EFBFBD>s Hut
219000000 - Hidden Street - Coke Town
219000001 - Hidden Street - Coke Town Sundry Goods Shop
219000002 - Hidden Street - House of Pouch
@@ -2863,7 +2863,7 @@ etc
980027000 - Goldrich's Maze - Maze of Erosion
980027100 - Goldrich's Maze - Maze of Erosion
980027200 - Goldrich's Maze - Maze of Erosion
980027300 - Goldrich's Maze - Beginning of the Maze
980027300 - Goldrich's Maze - Beginning of the Maze<EFBFBD>
980027400 - Goldrich's Maze - Monster's Maze
980027500 - Goldrich's Maze - Monster's Maze
980027600 - Goldrich's Maze - Monster's Maze
@@ -2944,7 +2944,7 @@ etc
980027001 - Goldrich's Maze - Maze of Erosion
980027101 - Goldrich's Maze - Maze of Erosion
980027201 - Goldrich's Maze - Maze of Erosion
980027301 - Goldrich's Maze - Beginning of the Maze
980027301 - Goldrich's Maze - Beginning of the Maze<EFBFBD>
980027401 - Goldrich's Maze - Monster's Maze
980027501 - Goldrich's Maze - Monster's Maze
980027601 - Goldrich's Maze - Monster's Maze
@@ -3025,7 +3025,7 @@ etc
980027002 - Goldrich's Maze - Maze of Erosion
980027102 - Goldrich's Maze - Maze of Erosion
980027202 - Goldrich's Maze - Maze of Erosion
980027302 - Goldrich's Maze - Beginning of the Maze
980027302 - Goldrich's Maze - Beginning of the Maze<EFBFBD>
980027402 - Goldrich's Maze - Monster's Maze
980027502 - Goldrich's Maze - Monster's Maze
980027602 - Goldrich's Maze - Monster's Maze
@@ -3349,7 +3349,7 @@ etc
913040007 - Opening - Cygnus Knights
913040008 - Opening - Cygnus Knights
913040009 - Opening - Cygnus Knights
920020000 - Hidden Street - Elizas Garden
920020000 - Hidden Street - Eliza<EFBFBD>s Garden
922020300 - Hidden Street - Origin of the Clock Tower
922220000 - Hidden Street - Gloomy Forest
922230000 - Hidden Street - Lunar World

View File

@@ -192,7 +192,7 @@
3010058 - WorldEnd - You will recover 50 HP every 10 seconds. Perhaps, as you recline, you will find the answer to many of life's questions.
3010057 - BloodyRose - You will recover 50 HP every 10 seconds. You will experience the might of a conqueror after recovery.
3010060 - Noblesse Chair - A chair makes you feel like you're sitting in the lap of luxury. Also recovers 50 HP every 10 seconds.
3010061 - Underneath the Maple Tree - A white chair created to celebrate Maple Story's 6th Anniversary. Sit on it to restore 35 HP and 10 MP every 10 seconds.
3010061 - Underneath the Maple Tree<EFBFBD> - A white chair created to celebrate Maple Story's 6th Anniversary. Sit on it to restore 35 HP and 10 MP every 10 seconds.
3010062 - Bamboo Chair - A chair that restores HP every 10 seconds when used. It's very strong since it was made from bamboo grown on Rien.
3010063 - Moon and Star Cushion - A pretty cushion shaped like a moon. Recovers 60 HP every 10 seconds.
3010064 - Male Desert Rabbit Cushion - 60 HP is restored every 10 seconds if you lean back on this cute Male Desert Rabbit Cushion.

View File

@@ -1,4 +1,4 @@
2000000 - Red Potion - A potion made out of red herbs.\nRecovers 50 HP.
2000000 - Red Potion - A potion made out of red herbs.\nRecovers 50 HP.
2000001 - Orange Potion - A concentrated potion made out of red herbs.\nRecovers 150 HP.
2000002 - White Potion - A highly-concentrated potion made out of red herbs.\nRecovers 300 HP.
2000003 - Blue Potion - A potion made out of blue herbs.\nRecovers 100 MP.
@@ -385,7 +385,6 @@
2030016 - Phyllia's Warp Powder - Warp powder made by fairy Phyllia. Teleports you to Magatia when used inside the Nihal desert region.
2030019 - Return Scroll to Nautilus - This scroll enables you to return to the Pirate village, Nautilus. This is a one use item and will disappear after use.
2030020 - Return Scroll to New Leaf City - Use this scroll to venture back to New Leaf City whenever you want!
2030100 - Return Scroll - Banished Area - Returns you to the map where you were last banished. Requires immediate use and have changed neither maps nor channels.
2031000 - Masked Man's Invitation - An invitation from the Masked Man to the Halloween Party at the Haunted Mansion. Double-click to move straight to the mansion.
2031001 - Studio Invitation - An invitation to the studio for the event "For Guild Only".
2040000 - Scroll for Helmet for DEF - Improves the helmet's weapon def.\nSuccess rate:100%, weapon def. +1

View File

@@ -1,6 +1,4 @@
@echo off
@title HeavenMS
set PATH=C:\Program Files\Java\jdk1.8.0_211\bin;%PATH%
set CLASSPATH=.;dist\*
java -Xmx2048m -Dwzpath=wz\ net.server.Server
@title Cosmic
java -Xmx2048m -Dwz-path=wz -jar target\Cosmic.jar
pause

View File

@@ -1,61 +0,0 @@
REM // 'launchtest.bat' Author: Tochi
@echo off
set a=0
title HeavenMS: Offline
color 1b
:clear
cls
echo HeavenMS Server Launcher
echo.
echo Commands:
echo -------------------------------------------------------------
echo start - Start HeavenMS server
echo shutdown - Shut down HeavenMS server and close Launcher File
echo reset - Resets HeavenMS Launcher File
echo clear - Clear this window
echo -------------------------------------------------------------
echo.
:command
set /p s="Enter command: "
if "%s%"=="start" goto :start
if "%s%"=="shutdown" goto :shutdown
if "%s%"=="reset" goto :reset
if "%s%"=="clear" goto :clear
echo Wrong Command.
echo.
goto :command
:start
if "%a%"=="1" (
echo HeavenMS is already active!
echo.
goto :command
)
color 4c
echo This might take a while....
echo.
title HeavenMS: activating
echo Server Launching...
start /b launch.bat
color 2a
title HeavenMS: Online
set a=1
ping localhost -w 10000 >nul
echo.
goto :command
:shutdown
color 4c
title HeavenMS: Shutting Down...
echo The Server Launcher will be close in a few seconds.
ping localhost -w 100000 >nul
taskkill /im cmd.exe
:reset
color 4c
title HeavenMS: Resetting...
echo Please type 'start' in command box after bat file have been resetted.
ping localhost -w 100000 >nul
start launchtest.bat REM // thanks Paxum for noting that 'launchtest.bat' is to be used here
taskkill /im cmd.exe

View File

@@ -1,4 +0,0 @@
#!/bin/bash
# thanks to lkxyyjx
sudo ant -Dplatforms.JDK_1.7.home=/opt/jdk1.7.0_80 compile
sudo ant -Dplatforms.JDK_1.7.home=/opt/jdk1.7.0_80 jar

View File

@@ -1,4 +0,0 @@
#!/bin/sh
# cores in classpath, thanks to lkxyyjx
export CLASSPATH=".:dist/*:cores/*"
java -Xmx2048m -Dwzpath=wz/ net.server.Server

View File

@@ -1,3 +0,0 @@
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +0,0 @@
build.xml.data.CRC32=92efccf9
build.xml.script.CRC32=ff13faf5
build.xml.stylesheet.CRC32=8064a381@1.80.1.48
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=92efccf9
nbproject/build-impl.xml.script.CRC32=8cda444e
nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48

View File

@@ -1,22 +0,0 @@
<#if licenseFirst??>
${licenseFirst}
</#if>
${licensePrefix}This file is part of the HeavenMS Maple Story Server
${licensePrefix?replace(" +$", "", "r")}
${licensePrefix}Copyright (C) ${date?date?string("yyyy")} ${project.organization!user}
${licensePrefix?replace(" +$", "", "r")}
${licensePrefix}This program is free software: you can redistribute it and/or modify
${licensePrefix}it under the terms of the GNU General Public License as published by
${licensePrefix}the Free Software Foundation, either version 3 of the License, or
${licensePrefix}(at your option) any later version.
${licensePrefix?replace(" +$", "", "r")}
${licensePrefix}This program is distributed in the hope that it will be useful,
${licensePrefix}but WITHOUT ANY WARRANTY; without even the implied warranty of
${licensePrefix}MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
${licensePrefix}GNU General Public License for more details.
${licensePrefix?replace(" +$", "", "r")}
${licensePrefix}You should have received a copy of the GNU General Public License
${licensePrefix}along with this program. If not, see <http://www.gnu.org/licenses/>.
<#if licenseLast??>
${licenseLast}
</#if>

View File

@@ -1,6 +0,0 @@
compile.on.save=true
do.depend=false
do.jar=true
javac.debug=true
javadoc.preview=true
user.properties.file=C:\\Users\\RonanLana\\AppData\\Roaming\\NetBeans\\8.2\\build.properties

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="2"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group/>
</open-files>
</project-private>

View File

@@ -1,104 +0,0 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=HeavenMS
application.vendor=Ronan
auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/HeavenMS.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.HikariCP-java7-2.4.13.jar=cores/HikariCP-java7-2.4.13.jar
file.reference.MapleSolaxia-src=src
file.reference.mina-core-2.0.19.jar=cores/mina-core-2.0.19.jar
file.reference.mysql-connector-java-bin.jar=cores/mysql-connector-java-bin.jar
file.reference.slf4j-api-1.7.21.jar=cores/slf4j-api-1.7.21.jar
file.reference.slf4j-jdk14-1.7.5.jar=cores/slf4j-jdk14-1.7.5.jar
file.reference.yamlbeans-1.13.jar=cores/yamlbeans-1.13.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=true
jar.index=${jnlp.enabled}
javac.classpath=\
${file.reference.mina-core-2.0.19.jar}:\
${file.reference.slf4j-api-1.7.21.jar}:\
${file.reference.HikariCP-java7-2.4.13.jar}:\
${file.reference.mysql-connector-java-bin.jar}:\
${file.reference.slf4j-jdk14-1.7.5.jar}:\
${file.reference.yamlbeans-1.13.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.external.vm=false
javac.processorpath=\
${javac.classpath}
javac.source=1.8
javac.target=1.8
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
jnlp.codebase.type=no.codebase
jnlp.descriptor=application
jnlp.enabled=false
jnlp.mixed.code=default
jnlp.offline-allowed=false
jnlp.signed=false
jnlp.signing=
jnlp.signing.alias=
jnlp.signing.keystore=
main.class=net.server.Server
# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed
manifest.custom.codebase=
# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions)
manifest.custom.permissions=
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
project.license=gpl30_msv2
project.licensePath=./nbproject/licenseheader.txt
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=-Xmx2048m -Dwzpath=wz/
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=${file.reference.MapleSolaxia-src}

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>HeavenMS</name>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots/>
</data>
</configuration>
</project>

247
pom.xml Normal file
View File

@@ -0,0 +1,247 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cosmic-maplestory</groupId>
<artifactId>Cosmic</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Cosmic</name>
<description>Server emulator for Global MapleStory version 83</description>
<url>https://github.com/P0nk/Cosmic</url>
<inceptionYear>2021</inceptionYear>
<developers>
<developer>
<name>Ponk</name>
<email>ponkcode@gmail.com</email>
<url>https://github.com/P0nk</url>
<roles>
<role>maintainer</role>
<role>developer</role>
</roles>
<properties>
<discord>ponkcode</discord>
</properties>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/P0nk/Cosmic.git</connection>
<developerConnection>scm:git:https://github.com/P0nk/Cosmic.git</developerConnection>
<url>https://github.com/P0nk/Cosmic</url>
</scm>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/P0nk/Cosmic/issues</url>
</issueManagement>
<ciManagement>
<system>GitHub Actions</system>
<url>https://github.com/P0nk/Cosmic/actions</url>
</ciManagement>
<properties>
<!-- Project -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>21</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<mainClass>net.server.Server</mainClass>
<!-- Maven plugins -->
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version> <!-- For running unit tests -->
<maven-jar-plugin.version>3.4.1</maven-jar-plugin.version> <!-- Disabled. (for building thin jar) -->
<maven-assembly-plugin.version>3.7.1
</maven-assembly-plugin.version> <!-- For packaging the executable fat jar -->
<!-- Dependencies -->
<slf4j-api.version>2.0.13</slf4j-api.version> <!-- Logging facade -->
<log4j.version>2.23.1</log4j.version> <!-- Slf4j implementation -->
<graalvm-js.version>23.0.4</graalvm-js.version>
<graalvm-js-scriptengine.version>24.0.1</graalvm-js-scriptengine.version> <!-- ScriptEngine implementation -->
<netty.version>4.1.109.Final</netty.version> <!-- Networking -->
<yamlbeans.version>1.17</yamlbeans.version> <!-- Config file -->
<jcip-annotations.version>1.0</jcip-annotations.version> <!-- Annotations for concurrency documentation -->
<HikariCP.version>5.1.0</HikariCP.version> <!-- Database connection pool -->
<mysql-connector-j.version>8.4.0</mysql-connector-j.version> <!-- MySQL JDBC driver -->
<jdbi-version>3.45.1</jdbi-version> <!-- Convenience wrapper around JDBC -->
<junit.version>5.10.2</junit.version> <!-- Unit test -->
<mockito.version>5.11.0</mockito.version> <!-- Unit test -->
</properties>
<dependencies>
<dependency>
<groupId>com.esotericsoftware.yamlbeans</groupId>
<artifactId>yamlbeans</artifactId>
<version>${yamlbeans.version}</version>
</dependency>
<dependency>
<groupId>net.jcip</groupId>
<artifactId>jcip-annotations</artifactId>
<version>${jcip-annotations.version}</version>
</dependency>
<!-- Database -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>${HikariCP.version}</version>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>${mysql-connector-j.version}</version>
</dependency>
<dependency>
<groupId>org.jdbi</groupId>
<artifactId>jdbi3-core</artifactId>
<version>${jdbi-version}</version>
</dependency>
<!-- Networking -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
<version>${netty.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
<version>${netty.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
<version>${netty.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>${netty.version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>${log4j.version}</version>
</dependency>
<!-- Scripting -->
<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js</artifactId>
<version>${graalvm-js.version}</version>
</dependency>
<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js-scriptengine</artifactId>
<version>${graalvm-js-scriptengine.version}</version>
</dependency>
<!-- Testing -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Explicitly disable default jar which includes no dependencies -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<executions>
<execution>
<id>default-jar</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
<!-- Enable assembling jar that includes all dependencies -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>${mainClass}</mainClass>
</manifest>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
<finalName>${project.artifactId}</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,11 +0,0 @@
#!/bin/bash
# compilation script for posix-compliant systems
src=src
dist=dist
cores=$(echo cores/*)
cores=${cores// /:}
mkdir -p $dist
javac -d $dist -cp $cores $(find $src -name "*.java")

View File

@@ -1,7 +0,0 @@
#!/bin/bash
# launch script
cores=$(echo cores/*)
cores=${cores// /:}
cp=.:dist:$cores
java -Xmx2048m -Dwzpath=wz -cp $cp net.server.Server

View File

@@ -23,36 +23,37 @@
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.sendOk("Sample text.");
cm.dispose();
}
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendOk("Sample text.");
cm.dispose();
}
}
}
function generateSelectionMenu(array) { // nice tool for generating a string for the sendSimple functionality
var menu = "";
for (var i = 0; i < array.length; i++) {
menu += "#L" + i + "#" + array[i] + "#l\r\n";
}
return menu;
var menu = "";
for (var i = 0; i < array.length; i++) {
menu += "#L" + i + "#" + array[i] + "#l\r\n";
}
return menu;
}

View File

@@ -28,16 +28,17 @@ function start(mode, type, selection) {
if (mode == -1) {
qm.dispose();
} else {
if(mode == 0 && type > 0) {
if (mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 0) {
qm.sendNext("Sample Text.");
} else if (status == 1) {
@@ -51,16 +52,17 @@ function end(mode, type, selection) {
if (mode == -1) {
qm.dispose();
} else {
if(mode == 0 && type > 0) {
if (mode == 0 && type > 0) {
qm.dispose();
return;
}
if (mode == 1)
if (mode == 1) {
status++;
else
} else {
status--;
}
if (status == 0) {
qm.sendNext("Sample Text.");
} else if (status == 1) {

View File

@@ -24,5 +24,5 @@
*/
function act() {
}

3
scripts/devtest.js Normal file
View File

@@ -0,0 +1,3 @@
function run(chr) {
chr.message("devtest.js")
}

View File

@@ -12,14 +12,14 @@ var maxMapId;
var eventTime; // Max time allotted for the event, in minutes.
var lobbyRange = [0, 0]; // Range of concurrent lobbies (min range is 0, max range is 7).
const maxLobbies = 7; // Max amount of concurrent active lobbies.
function init() {
// After loading, ChannelServer
}
function setLobbyRange() {
return lobbyRange;
function getMaxLobbies() {
return maxLobbies;
}
function setEventRequirements() {
@@ -81,7 +81,7 @@ function scheduledTimeout(eim) {
function timeOut(eim) {
if (eim.getPlayerCount() > 0) {
var pIter = eim.getPlayers().iterator();
while (pIter.hasNext()){
while (pIter.hasNext()) {
var player = pIter.next();
player.dropMessage(6, "You have run out of time to complete this event!");
playerExit(eim, player);
@@ -104,7 +104,7 @@ function friendlyKilled(mob, eim) {
}
function allMonstersDead(eim) {
// When invoking unregisterMonster(MapleMonster mob) OR killed
// When invoking unregisterMonster(Monster mob) OR killed
// Happens only when size = 0
}

View File

@@ -20,53 +20,59 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
2x EXP Event Script
-- Author --------------------------------------------------------------------------------------
Twdtwd
**/
-- Odin JavaScript --------------------------------------------------------------------------------
2x EXP Event Script
-- Author --------------------------------------------------------------------------------------
Twdtwd
**/
var timer1;
var timer2;
var timer3;
var timer4;
importPackage(Packages.client);
function init() {
/*
/*
if(em.getChannelServer().getId() == 1) { // Only run on channel 1.
// AEST
timer1 = em.scheduleAtTimestamp("start", 1428220800000);
timer2 = em.scheduleAtTimestamp("stop", 1428228000000);
// EDT
timer1 = em.scheduleAtTimestamp("start", 1428271200000);
timer2 = em.scheduleAtTimestamp("stop", 1428278400000);
}
// AEST
timer1 = em.scheduleAtTimestamp("start", 1428220800000);
timer2 = em.scheduleAtTimestamp("stop", 1428228000000);
// EDT
timer1 = em.scheduleAtTimestamp("start", 1428271200000);
timer2 = em.scheduleAtTimestamp("stop", 1428278400000);
}
*/
}
function cancelSchedule() {
if (timer1 != null)
if (timer1 != null) {
timer1.cancel(true);
if (timer2 != null)
}
if (timer2 != null) {
timer2.cancel(true);
if (timer3 != null)
}
if (timer3 != null) {
timer3.cancel(true);
if (timer4 != null)
}
if (timer4 != null) {
timer4.cancel(true);
}
}
function start() {
var world = Packages.net.server.Server.getInstance().getWorld(em.getChannelServer().getWorld());
world.setExpRate(8);
world.broadcastPacket(Packages.tools.MaplePacketCreator.serverNotice(6, "The Bunny Onslaught Survival Scanner (BOSS) has detected an Easter Bunny onslaught soon! The GM team has activated the Emergency XP Pool (EXP) that doubles experience gained for the next two hours!"));
const Server = Java.type('net.server.Server');
const PacketCreator = Java.type('tools.PacketCreator');
var world = Server.getInstance().getWorld(em.getChannelServer().getWorld());
world.setExpRate(8);
world.broadcastPacket(PacketCreator.serverNotice(6, "The Bunny Onslaught Survival Scanner (BOSS) has detected an Easter Bunny onslaught soon! The GM team has activated the Emergency XP Pool (EXP) that doubles experience gained for the next two hours!"));
}
function stop() {
var world = Packages.net.server.Server.getInstance().getWorld(em.getChannelServer().getWorld());
world.setExpRate(4);
world.broadcastPacket(Packages.tools.MaplePacketCreator.serverNotice(6, "Unfortunately the Emergency XP Pool (EXP) has run out of juice for now and needs to recharge causing the EXP rate to go back to normal."));
const Server = Java.type('net.server.Server');
const PacketCreator = Java.type('tools.PacketCreator');
var world = Server.getInstance().getWorld(em.getChannelServer().getWorld());
world.setExpRate(4);
world.broadcastPacket(PacketCreator.serverNotice(6, "Unfortunately the Emergency XP Pool (EXP) has run out of juice for now and needs to recharge causing the EXP rate to go back to normal."));
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,8 +20,7 @@
/**
* @Author Ronan
* 3rd Job Event - Bowman
**/
importPackage(Packages.tools);
**/
var entryMap = 108010100;
var exitMap = 105040305;
@@ -31,31 +30,32 @@ var maxMapId = 108010101;
var eventTime = 20; //20 minutes
var lobbyRange = [0, 7];
const maxLobbies = 7;
function setLobbyRange() {
return lobbyRange;
function getMaxLobbies() {
return maxLobbies;
}
function init() {
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function setup(level, lobbyid) {
var eim = em.newInstance("3rdJob_bowman_" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("boss", "0");
return eim;
}
function playerEntry(eim, player) {
eim.getInstanceMap(maxMapId).resetPQ(1);
player.changeMap(entryMap, 0);
em.setProperty("noEntry","true");
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
em.setProperty("noEntry", "true");
const PacketCreator = Java.type('tools.PacketCreator');
player.sendPacket(PacketCreator.getClock(eventTime * 60));
eim.startEventTimer(eventTime * 60000);
}
@@ -64,7 +64,7 @@ function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function scheduledTimeout(eim) {
@@ -81,19 +81,21 @@ function clear(eim) {
var player = eim.getPlayers().get(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function changedMap(eim, chr, mapid) {
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
if (mapid < minMapId || mapid > maxMapId) {
playerExit(eim, chr);
}
}
function monsterKilled(mob, eim) {}
function monsterValue(eim, mobId) {
return 1;
return 1;
}
function allMonstersDead(eim) {}

View File

@@ -20,8 +20,7 @@
/**
* @Author Ronan
* 3rd Job Event - Magician
**/
importPackage(Packages.tools);
**/
var entryMap = 108010200;
var exitMap = 100040106;
@@ -31,31 +30,32 @@ var maxMapId = 108010201;
var eventTime = 20; //20 minutes
var lobbyRange = [0, 7];
const maxLobbies = 7;
function setLobbyRange() {
return lobbyRange;
function getMaxLobbies() {
return maxLobbies;
}
function init() {
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function setup(level, lobbyid) {
var eim = em.newInstance("3rdJob_magician_" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("boss", "0");
return eim;
}
function playerEntry(eim, player) {
eim.getInstanceMap(maxMapId).resetPQ(1);
player.changeMap(entryMap, 0);
em.setProperty("noEntry","true");
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
em.setProperty("noEntry", "true");
const PacketCreator = Java.type('tools.PacketCreator');
player.sendPacket(PacketCreator.getClock(eventTime * 60));
eim.startEventTimer(eventTime * 60000);
}
@@ -64,7 +64,7 @@ function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function scheduledTimeout(eim) {
@@ -81,19 +81,21 @@ function clear(eim) {
var player = eim.getPlayers().get(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function changedMap(eim, chr, mapid) {
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
if (mapid < minMapId || mapid > maxMapId) {
playerExit(eim, chr);
}
}
function monsterKilled(mob, eim) {}
function monsterValue(eim, mobId) {
return 1;
return 1;
}
function allMonstersDead(eim) {}

View File

@@ -20,8 +20,7 @@
/**
* @Author Ronan
* 3rd Job Event - Kenta's Mount Quest
**/
importPackage(Packages.tools);
**/
var entryMap = 923010000;
var exitMap = 923010100;
@@ -33,14 +32,14 @@ var eventMaps = [923010000];
var eventTime = 5; //5 minutes
var lobbyRange = [0, 7];
const maxLobbies = 7;
function setLobbyRange() {
return lobbyRange;
function getMaxLobbies() {
return maxLobbies;
}
function init() {
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function checkHogHealth(eim) {
@@ -48,7 +47,7 @@ function checkHogHealth(eim) {
if (watchHog != null) {
var hp = watchHog.getHp();
var oldHp = eim.getIntProperty("whog_hp");
if (oldHp - hp > 1000) { // or 800, if using mobHP / eventTime
eim.dropMessage(6, "Please protect the pig from the aliens!"); // thanks Vcoc
}
@@ -62,7 +61,7 @@ function respawnStages(eim) {
eim.getInstanceMap(eventMaps[i]).instanceMapRespawn();
}
checkHogHealth(eim);
eim.schedule("respawnStages", 10 * 1000);
}
@@ -71,21 +70,22 @@ function setup(level, lobbyid) {
eim.setProperty("level", level);
eim.setProperty("boss", "0");
eim.setProperty("whog_hp", "0");
return eim;
}
function playerEntry(eim, player) {
var mapObj = eim.getInstanceMap(entryMap);
mapObj.resetPQ(1);
mapObj.instanceMapForceRespawn();
respawnStages(eim);
player.changeMap(entryMap, 0);
em.setProperty("noEntry","true");
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
em.setProperty("noEntry", "true");
const PacketCreator = Java.type('tools.PacketCreator');
player.sendPacket(PacketCreator.getClock(eventTime * 60));
eim.startEventTimer(eventTime * 60000);
}
@@ -95,10 +95,10 @@ function playerExit(eim, player) {
var api = player.getAbstractPlayerInteraction();
api.removeAll(4031507);
api.removeAll(4031508);
eim.unregisterPlayer(player);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function scheduledTimeout(eim) {
@@ -112,29 +112,31 @@ function playerDisconnected(eim, player) {
}
function changedMap(eim, chr, mapid) {
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
if (mapid < minMapId || mapid > maxMapId) {
playerExit(eim, chr);
}
}
function clearPQ(eim) {
eim.stopEventTimer();
eim.setEventCleared();
var player = eim.getPlayers().get(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function monsterKilled(mob, eim) {}
function monsterValue(eim, mobId) {
return 1;
return 1;
}
function friendlyKilled(mob, eim) {
if(em.getProperty("noEntry") != "false") {
if (em.getProperty("noEntry") != "false") {
var player = eim.getPlayers().get(0);
playerExit(eim, player);
player.changeMap(exitMap);

View File

@@ -20,8 +20,7 @@
/**
* @Author Ronan
* 3rd Job Event - Pirate
**/
importPackage(Packages.tools);
**/
var entryMap = 108010500;
var exitMap = 105070200;
@@ -31,23 +30,24 @@ var maxMapId = 108010501;
var eventTime = 20; //20 minutes
var lobbyRange = [0, 7];
const maxLobbies = 7;
function setLobbyRange() {
return lobbyRange;
function getMaxLobbies() {
return maxLobbies;
}
function init() {
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function playerEntry(eim, player) {
eim.getInstanceMap(maxMapId).resetPQ(1);
player.changeMap(entryMap, 0);
em.setProperty("noEntry","true");
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
em.setProperty("noEntry", "true");
const PacketCreator = Java.type('tools.PacketCreator');
player.sendPacket(PacketCreator.getClock(eventTime * 60));
eim.startEventTimer(eventTime * 60000);
}
@@ -55,7 +55,7 @@ function setup(level, lobbyid) {
var eim = em.newInstance("3rdJob_pirate_" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("boss", "0");
return eim;
}
@@ -64,7 +64,7 @@ function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function scheduledTimeout(eim) {
@@ -81,19 +81,21 @@ function clear(eim) {
var player = eim.getPlayers().get(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function changedMap(eim, chr, mapid) {
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
if (mapid < minMapId || mapid > maxMapId) {
playerExit(eim, chr);
}
}
function monsterKilled(mob, eim) {}
function monsterValue(eim, mobId) {
return 1;
return 1;
}
function allMonstersDead(eim) {}

View File

@@ -20,8 +20,7 @@
/**
* @Author Ronan
* 3rd Job Event - Thief
**/
importPackage(Packages.tools);
**/
var entryMap = 108010400;
var exitMap = 107000402;
@@ -31,31 +30,32 @@ var maxMapId = 108010401;
var eventTime = 20; //20 minutes
var lobbyRange = [0, 7];
const maxLobbies = 7;
function setLobbyRange() {
return lobbyRange;
function getMaxLobbies() {
return maxLobbies;
}
function init() {
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function setup(level, lobbyid) {
var eim = em.newInstance("3rdJob_thief_" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("boss", "0");
return eim;
}
function playerEntry(eim, player) {
eim.getInstanceMap(maxMapId).resetPQ(1);
player.changeMap(entryMap, 0);
em.setProperty("noEntry","true");
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
em.setProperty("noEntry", "true");
const PacketCreator = Java.type('tools.PacketCreator');
player.sendPacket(PacketCreator.getClock(eventTime * 60));
eim.startEventTimer(eventTime * 60000);
}
@@ -64,7 +64,7 @@ function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function scheduledTimeout(eim) {
@@ -81,19 +81,21 @@ function clear(eim) {
var player = eim.getPlayers().get(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function changedMap(eim, chr, mapid) {
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
if (mapid < minMapId || mapid > maxMapId) {
playerExit(eim, chr);
}
}
function monsterKilled(mob, eim) {}
function monsterValue(eim, mobId) {
return 1;
return 1;
}
function allMonstersDead(eim) {}

View File

@@ -20,8 +20,7 @@
/**
* @Author Ronan
* 3rd Job Event - Warrior
**/
importPackage(Packages.tools);
**/
var entryMap = 108010300;
var exitMap = 105070001;
@@ -31,31 +30,32 @@ var maxMapId = 108010301;
var eventTime = 20; //20 minutes
var lobbyRange = [0, 7];
const maxLobbies = 7;
function setLobbyRange() {
return lobbyRange;
function getMaxLobbies() {
return maxLobbies;
}
function init() {
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function setup(level, lobbyid) {
var eim = em.newInstance("3rdJob_warrior_" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("boss", "0");
return eim;
}
function playerEntry(eim, player) {
eim.getInstanceMap(maxMapId).resetPQ(1);
player.changeMap(entryMap, 0);
em.setProperty("noEntry","true");
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
em.setProperty("noEntry", "true");
const PacketCreator = Java.type('tools.PacketCreator');
player.sendPacket(PacketCreator.getClock(eventTime * 60));
eim.startEventTimer(eventTime * 60000);
}
@@ -64,7 +64,7 @@ function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function scheduledTimeout(eim) {
@@ -81,19 +81,21 @@ function clear(eim) {
var player = eim.getPlayers().get(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function changedMap(eim, chr, mapid) {
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
if (mapid < minMapId || mapid > maxMapId) {
playerExit(eim, chr);
}
}
function monsterKilled(mob, eim) {}
function monsterValue(eim, mobId) {
return 1;
return 1;
}
function allMonstersDead(eim) {}

View File

@@ -20,7 +20,7 @@
/**
* @Author Ronan
* Event - Jonathan's Test Quest
**/
**/
var entryMap = 912020000;
var exitMap = 120000102;
@@ -30,14 +30,14 @@ var maxMapId = 912020000;
var eventTime = 2; //2 minutes
var lobbyRange = [0, 7];
const maxLobbies = 7;
function setLobbyRange() {
return lobbyRange;
function getMaxLobbies() {
return maxLobbies;
}
function init() {
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function setup(level, lobbyid) {
@@ -68,7 +68,7 @@ function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function playerLeft(eim, player) {}
@@ -84,7 +84,9 @@ function playerDisconnected(eim, player) {
}
function changedMap(eim, chr, mapid) {
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
if (mapid < minMapId || mapid > maxMapId) {
playerExit(eim, chr);
}
}
function clearPQ(eim) {

View File

@@ -20,7 +20,7 @@
/**
* @Author Ronan
* Event - Kyrin's Test Quest
**/
**/
var entryMap = 912010000;
var exitMap = 120000101;
@@ -30,14 +30,14 @@ var maxMapId = 912010200;
var eventTime = 4; //4 minutes
var lobbyRange = [0, 7];
const maxLobbies = 7;
function setLobbyRange() {
return lobbyRange;
function getMaxLobbies() {
return maxLobbies;
}
function init() {
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function setup(level, lobbyid) {
@@ -82,7 +82,7 @@ function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function playerLeft(eim, player) {}
@@ -98,19 +98,21 @@ function playerDisconnected(eim, player) {
}
function changedMap(eim, chr, mapid) {
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
if (mapid < minMapId || mapid > maxMapId) {
playerExit(eim, chr);
}
}
function clearPQ(eim) {
eim.stopEventTimer();
eim.setEventCleared();
var player = eim.getPlayers().get(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function monsterKilled(mob, eim) {}
@@ -124,7 +126,7 @@ function monsterValue(eim, mobId) {
}
function friendlyKilled(mob, eim) {
if(em.getProperty("noEntry") != "false") {
if (em.getProperty("noEntry") != "false") {
var player = eim.getPlayers().get(0);
playerExit(eim, player);
player.changeMap(exitMap);

View File

@@ -20,7 +20,7 @@
/**
* @Author Ronan
* Event - Kyrin's Test Quest
**/
**/
var entryMap = 912010100;
var exitMap = 120000101;
@@ -30,14 +30,14 @@ var maxMapId = 912010200;
var eventTime = 4; //4 minutes
var lobbyRange = [0, 7];
const maxLobbies = 7;
function setLobbyRange() {
return lobbyRange;
function getMaxLobbies() {
return maxLobbies;
}
function init() {
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function setup(level, lobbyid) {
@@ -82,7 +82,7 @@ function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function playerLeft(eim, player) {}
@@ -98,7 +98,9 @@ function playerDisconnected(eim, player) {
}
function changedMap(eim, chr, mapid) {
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
if (mapid < minMapId || mapid > maxMapId) {
playerExit(eim, chr);
}
}
function changedLeader(eim, leader) {}
@@ -106,13 +108,13 @@ function changedLeader(eim, leader) {}
function clearPQ(eim) {
eim.stopEventTimer();
eim.setEventCleared();
var player = eim.getPlayers().get(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function monsterKilled(mob, eim) {}
@@ -126,7 +128,7 @@ function monsterValue(eim, mobId) {
}
function friendlyKilled(mob, eim) {
if(em.getProperty("noEntry") != "false") {
if (em.getProperty("noEntry") != "false") {
var player = eim.getPlayers().get(0);
playerExit(eim, player);
player.changeMap(exitMap);

View File

@@ -1,5 +1,3 @@
importPackage(Packages.tools);
var KC_bfd;
var Plane_to_CBD;
var CBD_docked;
@@ -10,13 +8,13 @@ var KC_docked;
//Time Setting is in millisecond
var closeTime = 4 * 60 * 1000; //The time to close the gate
var beginTime = 5 * 60 * 1000; //The time to begin the ride
var rideTime = 1 * 60 * 1000; //The time that require move to destination
var rideTime = 1 * 60 * 1000; //The time that require move to destination
function init() {
closeTime = em.getTransportationTime(closeTime);
beginTime = em.getTransportationTime(beginTime);
rideTime = em.getTransportationTime(rideTime);
KC_bfd = em.getChannelServer().getMapFactory().getMap(540010100);
CBD_bfd = em.getChannelServer().getMapFactory().getMap(540010001);
Plane_to_CBD = em.getChannelServer().getMapFactory().getMap(540010101);
@@ -34,11 +32,11 @@ function scheduleNew() {
}
function stopEntry() {
em.setProperty("entry","false");
em.setProperty("entry", "false");
}
function takeoff() {
em.setProperty("docked","false");
em.setProperty("docked", "false");
KC_bfd.warpEveryone(Plane_to_CBD.getId());
CBD_bfd.warpEveryone(Plane_to_KC.getId());
em.schedule("arrived", rideTime); //The time that require move to destination
@@ -47,7 +45,7 @@ function takeoff() {
function arrived() {
Plane_to_CBD.warpEveryone(CBD_docked.getId(), 0);
Plane_to_KC.warpEveryone(KC_docked.getId(), 7);
scheduleNew();
}

View File

@@ -21,7 +21,7 @@
/**
* @author: Ronan
* @event: Amoria PQ
*/
*/
var isPq = true;
var onlyMarriedPlayers = true;
@@ -37,249 +37,267 @@ var maxMapId = 670010800;
var eventTime = 75; // 75 minutes
var lobbyRange = [0, 0];
const maxLobbies = 1;
function init() {
setEventRequirements();
setEventRequirements();
}
function setLobbyRange() {
return lobbyRange;
function getMaxLobbies() {
return maxLobbies;
}
function setEventRequirements() {
var reqStr = "";
reqStr += "\r\n Number of players: ";
if(maxPlayers - minPlayers >= 1) reqStr += minPlayers + " ~ " + maxPlayers;
else reqStr += minPlayers;
reqStr += "\r\n Level range: ";
if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
else reqStr += minLevel;
reqStr += "\r\n At least 1 of both genders";
if(onlyMarriedPlayers) reqStr += "\r\n All married";
reqStr += "\r\n Time limit: ";
reqStr += eventTime + " minutes";
em.setProperty("party", reqStr);
var reqStr = "";
reqStr += "\r\n Number of players: ";
if (maxPlayers - minPlayers >= 1) {
reqStr += minPlayers + " ~ " + maxPlayers;
} else {
reqStr += minPlayers;
}
reqStr += "\r\n Level range: ";
if (maxLevel - minLevel >= 1) {
reqStr += minLevel + " ~ " + maxLevel;
} else {
reqStr += minLevel;
}
reqStr += "\r\n At least 1 of both genders";
if (onlyMarriedPlayers) {
reqStr += "\r\n All married";
}
reqStr += "\r\n Time limit: ";
reqStr += eventTime + " minutes";
em.setProperty("party", reqStr);
}
function setEventExclusives(eim) {
var itemSet = [4031594, 4031595, 4031596, 4031597];
eim.setExclusiveItems(itemSet);
var itemSet = [4031594, 4031595, 4031596, 4031597];
eim.setExclusiveItems(itemSet);
}
function setEventRewards(eim) {
var itemSet, itemQty, evLevel, expStages;
var itemSet, itemQty, evLevel, expStages;
evLevel = 1; //Rewards at clear PQ
itemSet = [];
itemQty = [];
eim.setEventRewards(evLevel, itemSet, itemQty);
expStages = [2000, 4000, 6000, 8000, 9000, 11000]; //bonus exp given on CLEAR stage signal
eim.setEventClearStageExp(expStages);
evLevel = 1; //Rewards at clear PQ
itemSet = [];
itemQty = [];
eim.setEventRewards(evLevel, itemSet, itemQty);
expStages = [2000, 4000, 6000, 8000, 9000, 11000]; //bonus exp given on CLEAR stage signal
eim.setEventClearStageExp(expStages);
}
function getEligibleParty(party) { //selects, from the given party, the team that is allowed to attempt this event
var eligible = [];
var hasLeader = false, hasNotMarried = false;
var mask = 0;
if(party.size() > 0) {
var partyList = party.toArray();
var eligible = [];
var hasLeader = false, hasNotMarried = false;
var mask = 0;
for(var i = 0; i < party.size(); i++) {
var ch = partyList[i];
if (party.size() > 0) {
var partyList = party.toArray();
if(ch.getMapId() == recruitMap && ch.getLevel() >= minLevel && ch.getLevel() <= maxLevel) {
if(ch.isLeader()) hasLeader = true;
if(!ch.getPlayer().isMarried()) hasNotMarried = true;
eligible.push(ch);
mask |= (1 << ch.getPlayer().getGender());
}
for (var i = 0; i < party.size(); i++) {
var ch = partyList[i];
if (ch.getMapId() == recruitMap && ch.getLevel() >= minLevel && ch.getLevel() <= maxLevel) {
if (ch.isLeader()) {
hasLeader = true;
}
if (!ch.getPlayer().isMarried()) {
hasNotMarried = true;
}
eligible.push(ch);
mask |= (1 << ch.getPlayer().getGender());
}
}
if(!(hasLeader && eligible.length >= minPlayers && eligible.length <= maxPlayers && mask == 3)) eligible = [];
if(onlyMarriedPlayers && hasNotMarried) eligible = [];
return eligible;
}
if (!(hasLeader && eligible.length >= minPlayers && eligible.length <= maxPlayers && mask == 3)) {
eligible = [];
}
if (onlyMarriedPlayers && hasNotMarried) {
eligible = [];
}
return Java.to(eligible, Java.type('net.server.world.PartyCharacter[]'));
}
function setup(level, lobbyid) {
var eim = em.newInstance("Amoria" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("marriedGroup", 0);
eim.setProperty("missCount", 0);
eim.setProperty("statusStg1", -1);
eim.setProperty("statusStg2", -1);
eim.setProperty("statusStg3", -1);
eim.setProperty("statusStg4", -1);
eim.setProperty("statusStg5", -1);
eim.setProperty("statusStg6", -1);
eim.setProperty("statusStgBonus", 0);
eim.getInstanceMap(670010200).resetPQ(level);
eim.getInstanceMap(670010300).resetPQ(level);
eim.getInstanceMap(670010301).resetPQ(level);
eim.getInstanceMap(670010302).resetPQ(level);
eim.getInstanceMap(670010400).resetPQ(level);
eim.getInstanceMap(670010500).resetPQ(level);
eim.getInstanceMap(670010600).resetPQ(level);
eim.getInstanceMap(670010700).resetPQ(level);
eim.getInstanceMap(670010750).resetPQ(level);
eim.getInstanceMap(670010800).resetPQ(level);
eim.getInstanceMap(670010200).toggleDrops();
eim.getInstanceMap(670010300).toggleDrops();
eim.getInstanceMap(670010301).toggleDrops();
eim.getInstanceMap(670010302).toggleDrops();
eim.getInstanceMap(670010200).instanceMapForceRespawn();
eim.getInstanceMap(670010500).instanceMapForceRespawn();
eim.getInstanceMap(670010750).shuffleReactors();
eim.getInstanceMap(670010800).shuffleReactors();
var mapObj = eim.getInstanceMap(670010700);
var mobObj = Packages.server.life.MapleLifeFactory.getMonster(9400536);
mapObj.spawnMonsterOnGroundBelow(mobObj, new Packages.java.awt.Point(942, 478));
respawnStages(eim);
eim.startEventTimer(eventTime * 60000);
setEventRewards(eim);
setEventExclusives(eim);
return eim;
var eim = em.newInstance("Amoria" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("marriedGroup", 0);
eim.setProperty("missCount", 0);
eim.setProperty("statusStg1", -1);
eim.setProperty("statusStg2", -1);
eim.setProperty("statusStg3", -1);
eim.setProperty("statusStg4", -1);
eim.setProperty("statusStg5", -1);
eim.setProperty("statusStg6", -1);
eim.setProperty("statusStgBonus", 0);
eim.getInstanceMap(670010200).resetPQ(level);
eim.getInstanceMap(670010300).resetPQ(level);
eim.getInstanceMap(670010301).resetPQ(level);
eim.getInstanceMap(670010302).resetPQ(level);
eim.getInstanceMap(670010400).resetPQ(level);
eim.getInstanceMap(670010500).resetPQ(level);
eim.getInstanceMap(670010600).resetPQ(level);
eim.getInstanceMap(670010700).resetPQ(level);
eim.getInstanceMap(670010750).resetPQ(level);
eim.getInstanceMap(670010800).resetPQ(level);
eim.getInstanceMap(670010200).toggleDrops();
eim.getInstanceMap(670010300).toggleDrops();
eim.getInstanceMap(670010301).toggleDrops();
eim.getInstanceMap(670010302).toggleDrops();
eim.getInstanceMap(670010200).instanceMapForceRespawn();
eim.getInstanceMap(670010500).instanceMapForceRespawn();
eim.getInstanceMap(670010750).shuffleReactors();
eim.getInstanceMap(670010800).shuffleReactors();
var mapObj = eim.getInstanceMap(670010700);
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
var mobObj = LifeFactory.getMonster(9400536);
mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(942, 478));
respawnStages(eim);
eim.startEventTimer(eventTime * 60000);
setEventRewards(eim);
setEventExclusives(eim);
return eim;
}
function isTeamAllCouple(eim) { // everyone partner of someone on the team
var eventPlayers = eim.getPlayers();
for (var iterator = eventPlayers.iterator(); iterator.hasNext();) {
var chr = iterator.next();
var pid = chr.getPartnerId();
if(pid <= 0 || eim.getPlayerById(pid) == null) {
return false;
}
var eventPlayers = eim.getPlayers();
for (var iterator = eventPlayers.iterator(); iterator.hasNext();) {
var chr = iterator.next();
var pid = chr.getPartnerId();
if (pid <= 0 || eim.getPlayerById(pid) == null) {
return false;
}
return true;
}
return true;
}
function afterSetup(eim) {
if(isTeamAllCouple(eim)) {
eim.setIntProperty("marriedGroup", 1);
}
if (isTeamAllCouple(eim)) {
eim.setIntProperty("marriedGroup", 1);
}
}
function respawnStages(eim) {}
function playerEntry(eim, player) {
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));
}
function scheduledTimeout(eim) {
if(eim.getIntProperty("statusStg6") == 1) {
eim.warpEventTeam(exitMap);
}
else {
end(eim);
}
if (eim.getIntProperty("statusStg6") == 1) {
eim.warpEventTeam(exitMap);
} else {
end(eim);
}
}
function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
}
function playerLeft(eim, player) {
if(!eim.isEventCleared()) {
playerExit(eim, player);
}
if (!eim.isEventCleared()) {
playerExit(eim, player);
}
}
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
} else {
eim.unregisterPlayer(player);
}
}
}
function changedLeader(eim, leader) {
var mapid = leader.getMapId();
if (!eim.isEventCleared() && (mapid < minMapId || mapid > maxMapId)) {
end(eim);
}
var mapid = leader.getMapId();
if (!eim.isEventCleared() && (mapid < minMapId || mapid > maxMapId)) {
end(eim);
}
}
function playerDead(eim, player) {}
function playerRevive(eim, player) { // player presses ok on the death pop up.
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
} else {
eim.unregisterPlayer(player);
}
}
function playerDisconnected(eim, player) {
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
if (eim.isEventTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
} else {
eim.unregisterPlayer(player);
}
}
function leftParty(eim, player) {
if (eim.isEventTeamLackingNow(false, minPlayers, player)) {
end(eim);
}
else
playerLeft(eim, player);
if (eim.isEventTeamLackingNow(false, minPlayers, player)) {
end(eim);
} else {
playerLeft(eim, player);
}
}
function disbandParty(eim) {
if (!eim.isEventCleared()) {
end(eim);
}
if (!eim.isEventCleared()) {
end(eim);
}
}
function monsterValue(eim, mobId) {
return 1;
return 1;
}
function end(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function giveRandomEventReward(eim, player) {
eim.giveEventReward(player);
eim.giveEventReward(player);
}
function clearPQ(eim) {
eim.stopEventTimer();
eim.setEventCleared();
eim.stopEventTimer();
eim.setEventCleared();
}
function monsterKilled(mob, eim) {}

View File

@@ -20,8 +20,7 @@
/**
* @Author Ronan
* Event - Scadur's Mount Quest
**/
importPackage(Packages.tools);
**/
var entryMap = 921110000;
var exitMap = 211050000;
@@ -31,21 +30,21 @@ var maxMapId = 921110000;
var eventTime = 3; //3 minutes
var lobbyRange = [0, 7];
const maxLobbies = 7;
function setLobbyRange() {
return lobbyRange;
function getMaxLobbies() {
return maxLobbies;
}
function init() {
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function setup(level, lobbyid) {
var eim = em.newInstance("Aran_2ndmount_" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("boss", "0");
return eim;
}
@@ -53,15 +52,16 @@ function respawnStages(eim) {}
function playerEntry(eim, player) {
var mapObj = eim.getInstanceMap(entryMap);
mapObj.resetPQ(1);
mapObj.instanceMapForceRespawn();
respawnStages(eim);
player.changeMap(entryMap, 2);
em.setProperty("noEntry","true");
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
em.setProperty("noEntry", "true");
const PacketCreator = Java.type('tools.PacketCreator');
player.sendPacket(PacketCreator.getClock(eventTime * 60));
eim.startEventTimer(eventTime * 60000);
}
@@ -70,7 +70,7 @@ function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function scheduledTimeout(eim) {
@@ -84,29 +84,31 @@ function playerDisconnected(eim, player) {
}
function changedMap(eim, chr, mapid) {
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
if (mapid < minMapId || mapid > maxMapId) {
playerExit(eim, chr);
}
}
function clearPQ(eim) {
eim.stopEventTimer();
eim.setEventCleared();
var player = eim.getPlayers().get(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function monsterKilled(mob, eim) {}
function monsterValue(eim, mobId) {
return 1;
return 1;
}
function friendlyKilled(mob, eim) {
if(em.getProperty("noEntry") != "false") {
if (em.getProperty("noEntry") != "false") {
var player = eim.getPlayers().get(0);
playerExit(eim, player);
player.changeMap(exitMap);

View File

@@ -20,8 +20,7 @@
/**
* @Author Ronan
* Event - Wolves' Mount Quest
**/
importPackage(Packages.tools);
**/
var entryMap = 914030000;
var exitMap = 140010210;
@@ -31,21 +30,21 @@ var maxMapId = 914030000;
var eventTime = 3; //3 minutes
var lobbyRange = [0, 7];
const maxLobbies = 7;
function setLobbyRange() {
return lobbyRange;
function getMaxLobbies() {
return maxLobbies;
}
function init() {
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function setup(level, lobbyid) {
var eim = em.newInstance("Aran_3rdmount_" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("boss", "0");
return eim;
}
@@ -53,16 +52,17 @@ function respawnStages(eim) {}
function playerEntry(eim, player) {
var mapObj = eim.getInstanceMap(entryMap);
mapObj.resetPQ(1);
mapObj.instanceMapForceRespawn();
mapObj.closeMapSpawnPoints();
respawnStages(eim);
player.changeMap(entryMap, 1);
em.setProperty("noEntry","true");
player.getClient().announce(MaplePacketCreator.getClock(eventTime * 60));
em.setProperty("noEntry", "true");
const PacketCreator = Java.type('tools.PacketCreator');
player.sendPacket(PacketCreator.getClock(eventTime * 60));
eim.startEventTimer(eventTime * 60000);
}
@@ -71,7 +71,7 @@ function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function scheduledTimeout(eim) {
@@ -85,33 +85,35 @@ function playerDisconnected(eim, player) {
}
function changedMap(eim, chr, mapid) {
if(mapid < minMapId || mapid > maxMapId) playerExit(eim, chr);
if (mapid < minMapId || mapid > maxMapId) {
playerExit(eim, chr);
}
}
function clearPQ(eim) {
eim.stopEventTimer();
eim.setEventCleared();
var player = eim.getPlayers().get(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
eim.dispose();
em.setProperty("noEntry","false");
em.setProperty("noEntry", "false");
}
function monsterKilled(mob, eim) {
if(eim.getInstanceMap(entryMap).countMonsters() == 0) {
if (eim.getInstanceMap(entryMap).countMonsters() == 0) {
eim.showClearEffect();
}
}
function monsterValue(eim, mobId) {
return 1;
return 1;
}
function friendlyKilled(mob, eim) {
if(em.getProperty("noEntry") != "false") {
if (em.getProperty("noEntry") != "false") {
var player = eim.getPlayers().get(0);
playerExit(eim, player);
player.changeMap(exitMap);

View File

@@ -20,12 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Bamboo Warrior Spawner
-- Edited by --------------------------------------------------------------------------------------
Ronan - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Bamboo Warrior Spawner
-- Edited by --------------------------------------------------------------------------------------
Ronan - based on xQuasar's King Clang spawner
**/
**/
function init() {
scheduleNew();
}
@@ -35,22 +35,26 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
const LifeFactory = Java.type('server.life.LifeFactory');
var mapObj = em.getChannelServer().getMapFactory().getMap(800020120); // original mapid was 251010101
var mobObj = Packages.server.life.MapleLifeFactory.getMonster(6090002);
if(mapObj.getMonsterById(6090002) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
mapObj.spawnMonsterOnGroundBelow(mobObj, new Packages.java.awt.Point(560, 50));
mapObj.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "From amongst the ruins shrouded by the mists, Bamboo Warrior appears."));
em.schedule("start", 3 * 60 *60 * 1000);
var mobObj = LifeFactory.getMonster(6090002);
if (mapObj.getMonsterById(6090002) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
const Point = Java.type('java.awt.Point');
const PacketCreator = Java.type('tools.PacketCreator');
mapObj.spawnMonsterOnGroundBelow(mobObj, new Point(560, 50));
mapObj.broadcastMessage(PacketCreator.serverNotice(6, "From amongst the ruins shrouded by the mists, Bamboo Warrior appears."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,12 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Centipede Spawner
-- Edited by --------------------------------------------------------------------------------------
Ronan - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Centipede Spawner
-- Edited by --------------------------------------------------------------------------------------
Ronan - based on xQuasar's King Clang spawner
**/
**/
function init() {
scheduleNew();
}
@@ -35,22 +35,27 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var herbGarden = em.getChannelServer().getMapFactory().getMap(251010102);
var gcent = Packages.server.life.MapleLifeFactory.getMonster(5220004);
if(herbGarden.getMonsterById(5220004) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
herbGarden.spawnMonsterOnGroundBelow(gcent, new Packages.java.awt.Point(560, 50));
herbGarden.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "From the mists surrounding the herb garden, the gargantuous Giant Centipede appears."));
em.schedule("start", 3 * 60 *60 * 1000);
if (herbGarden.getMonsterById(5220004) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
const PacketCreator = Java.type('tools.PacketCreator');
var gcent = LifeFactory.getMonster(5220004);
herbGarden.spawnMonsterOnGroundBelow(gcent, new Point(560, 50));
herbGarden.broadcastMessage(PacketCreator.serverNotice(6, "From the mists surrounding the herb garden, the gargantuous Giant Centipede appears."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,12 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Deo Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Deo Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
**/
function init() {
scheduleNew();
}
@@ -35,22 +35,27 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var royalCatthusDesert = em.getChannelServer().getMapFactory().getMap(260010201);
var deo = Packages.server.life.MapleLifeFactory.getMonster(3220001);
if(royalCatthusDesert.getMonsterById(3220001) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
royalCatthusDesert.spawnMonsterOnGroundBelow(deo, new Packages.java.awt.Point(645, 275));
royalCatthusDesert.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Deo slowly appeared out of the sand dust."));
em.schedule("start", 3 * 60 *60 * 1000);
if (royalCatthusDesert.getMonsterById(3220001) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
const PacketCreator = Java.type('tools.PacketCreator');
var deo = LifeFactory.getMonster(3220001);
royalCatthusDesert.spawnMonsterOnGroundBelow(deo, new Point(645, 275));
royalCatthusDesert.broadcastMessage(PacketCreator.serverNotice(6, "Deo slowly appeared out of the sand dust."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
function init() {
scheduleNew();
@@ -33,26 +33,31 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var bossMobid = 9400610;
var bossMapid = 677000003;
var bossMsg = "Amdusias has appeared!";
var bossPos = new Packages.java.awt.Point(467, 0);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid);
const Point = Java.type('java.awt.Point');
const PacketCreator = Java.type('tools.PacketCreator');
const LifeFactory = Java.type('server.life.LifeFactory');
var boss = LifeFactory.getMonster(bossMobid);
var bossPos = new Point(467, 0);
map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg));
map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
function init() {
scheduleNew();
@@ -33,26 +33,31 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var bossMobid = 9400609;
var bossMapid = 677000005;
var bossMsg = "Andras has appeared!";
var bossPos = new Packages.java.awt.Point(201, 80);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid);
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
const PacketCreator = Java.type('tools.PacketCreator');
var boss = LifeFactory.getMonster(bossMobid);
var bossPos = new Point(201, 80);
map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg));
map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
function init() {
scheduleNew();
@@ -33,26 +33,31 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var bossMobid = 9400613;
var bossMapid = 677000009;
var bossMsg = "Valefor has appeared!";
var bossPos = new Packages.java.awt.Point(251, -841);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid);
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
const PacketCreator = Java.type('tools.PacketCreator');
var boss = LifeFactory.getMonster(bossMobid);
var bossPos = new Point(251, -841);
map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg));
map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
function init() {
scheduleNew();
@@ -33,26 +33,31 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var bossMobid = 9400633;
var bossMapid = 677000012;
var bossMsg = "Astaroth has appeared!";
var bossPos = new Packages.java.awt.Point(842, 0);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid);
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
const PacketCreator = Java.type('tools.PacketCreator');
var boss = LifeFactory.getMonster(bossMobid);
var bossPos = new Point(842, 0);
map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg));
map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
function init() {
scheduleNew();
@@ -33,26 +33,31 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var bossMobid = 9400612;
var bossMapid = 677000001;
var bossMsg = "Marbas has appeared!";
var bossPos = new Packages.java.awt.Point(461, 61);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid);
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
const PacketCreator = Java.type('tools.PacketCreator');
var boss = LifeFactory.getMonster(bossMobid);
var bossPos = new Point(461, 61);
map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg));
map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
-- Odin JavaScript --------------------------------------------------------------------------------
Door boss Spawner (based on xQuasar's King Clang spawner)
**/
function init() {
scheduleNew();
@@ -33,26 +33,31 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var bossMobid = 9400611;
var bossMapid = 677000007;
var bossMsg = "Crocell has appeared!";
var bossPos = new Packages.java.awt.Point(171, 50);
var map = em.getChannelServer().getMapFactory().getMap(bossMapid);
if (map.getMonsterById(bossMobid) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var boss = Packages.server.life.MapleLifeFactory.getMonster(bossMobid);
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
const PacketCreator = Java.type('tools.PacketCreator');
var boss = LifeFactory.getMonster(bossMobid);
var bossPos = new Point(171, 50);
map.spawnMonsterOnGroundBelow(boss, bossPos);
map.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, bossMsg));
map.broadcastMessage(PacketCreator.serverNotice(6, bossMsg));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -20,14 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Dyle Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Dyle Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.server.life);
importPackage(Packages.tools);
**/
function init() {
scheduleNew();
@@ -38,19 +36,25 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var dangeroudCroko1 = em.getChannelServer().getMapFactory().getMap(107000300);
if(dangeroudCroko1.getMonsterById(6220000) != null) {
setupTask = em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
dangeroudCroko1.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(6220000), new Packages.java.awt.Point(90, 119));
dangeroudCroko1.broadcastMessage(MaplePacketCreator.serverNotice(6, "The huge crocodile Dyle has come out from the swamp."));
setupTask = em.schedule("start", 3 * 60 * 60 * 1000);
if (dangeroudCroko1.getMonsterById(6220000) != null) {
setupTask = em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
const PacketCreator = Java.type('tools.PacketCreator');
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(90, 119);
dangeroudCroko1.spawnMonsterOnGroundBelow(LifeFactory.getMonster(6220000), spawnpoint);
dangeroudCroko1.broadcastMessage(PacketCreator.serverNotice(6, "The huge crocodile Dyle has come out from the swamp."));
setupTask = em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,14 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Eliza1 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Eliza1 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
**/
var setupTask;
@@ -40,22 +38,27 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
const LifeFactory = Java.type('server.life.LifeFactory');
var eliza = LifeFactory.getMonster(8220000);
var stairwayToTheSky2 = em.getChannelServer().getMapFactory().getMap(200010300);
var eliza = Packages.server.life.MapleLifeFactory.getMonster(8220000);
if(stairwayToTheSky2.getMonsterById(8220000) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
stairwayToTheSky2.spawnMonsterOnGroundBelow(eliza, new Packages.java.awt.Point(208, 83));
stairwayToTheSky2.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Eliza has appeared with a black whirlwind."));
em.schedule("start", 3 * 60 *60 * 1000);
if (stairwayToTheSky2.getMonsterById(8220000) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
const PacketCreator = Java.type('tools.PacketCreator');
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(208, 83);
stairwayToTheSky2.spawnMonsterOnGroundBelow(eliza, spawnpoint);
stairwayToTheSky2.broadcastMessage(PacketCreator.serverNotice(6, "Eliza has appeared with a black whirlwind."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,14 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Faust1 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Faust1 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
**/
function init() {
scheduleNew();
@@ -38,22 +36,27 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var theForestOfEvil1 = em.getChannelServer().getMapFactory().getMap(100040105);
var faust1 = Packages.server.life.MapleLifeFactory.getMonster(5220002);
if(theForestOfEvil1.getMonsterById(5220002) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
theForestOfEvil1.spawnMonsterOnGroundBelow(faust1, new Packages.java.awt.Point(456, 278));
theForestOfEvil1.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Faust appeared amidst the blue fog."));
em.schedule("start", 3 * 60 *60 * 1000);
if (theForestOfEvil1.getMonsterById(5220002) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
const PacketCreator = Java.type('tools.PacketCreator');
const Point = Java.type('java.awt.Point');
var faust1 = LifeFactory.getMonster(5220002);
const spawnpoint = new Point(456, 278);
theForestOfEvil1.spawnMonsterOnGroundBelow(faust1, spawnpoint);
theForestOfEvil1.broadcastMessage(PacketCreator.serverNotice(6, "Faust appeared amidst the blue fog."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,14 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Faust2 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Faust2 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
**/
function init() {
scheduleNew();
@@ -38,22 +36,28 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
const LifeFactory = Java.type('server.life.LifeFactory');
var theForestOfEvil2 = em.getChannelServer().getMapFactory().getMap(100040106);
var faust2 = Packages.server.life.MapleLifeFactory.getMonster(5220002);
if(theForestOfEvil2.getMonsterById(5220002) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
theForestOfEvil2.spawnMonsterOnGroundBelow(faust2, new Packages.java.awt.Point(474, 278));
theForestOfEvil2.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Faust appeared amidst the blue fog."));
em.schedule("start", 3 * 60 *60 * 1000);
var faust2 = LifeFactory.getMonster(5220002);
if (theForestOfEvil2.getMonsterById(5220002) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(474, 278);
theForestOfEvil2.spawnMonsterOnGroundBelow(faust2, spawnpoint);
const PacketCreator = Java.type('tools.PacketCreator');
theForestOfEvil2.broadcastMessage(PacketCreator.serverNotice(6, "Faust appeared amidst the blue fog."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,14 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Chimera/Kimera Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Chimera/Kimera Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
**/
function init() {
scheduleNew();
@@ -38,25 +36,31 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
const LifeFactory = Java.type('server.life.LifeFactory');
var labSecretBasementPath = em.getChannelServer().getMapFactory().getMap(261030000);
var chimera = Packages.server.life.MapleLifeFactory.getMonster(8220002);
if(labSecretBasementPath.getMonsterById(8220002) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
var chimera = LifeFactory.getMonster(8220002);
if (labSecretBasementPath.getMonsterById(8220002) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 180;
posX = (Math.floor(Math.random() * 900) - 900);
labSecretBasementPath.spawnMonsterOnGroundBelow(chimera, new Packages.java.awt.Point(posX, posY));
labSecretBasementPath.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Kimera has appeared out of the darkness of the underground with a glitter in her eyes."));
em.schedule("start", 3 * 60 *60 * 1000);
posX = (Math.floor(Math.random() * 900) - 900);
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(posX, posY);
labSecretBasementPath.spawnMonsterOnGroundBelow(chimera, spawnpoint);
const PacketCreator = Java.type('tools.PacketCreator');
labSecretBasementPath.broadcastMessage(PacketCreator.serverNotice(6, "Kimera has appeared out of the darkness of the underground with a glitter in her eyes."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,19 +20,17 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
King Clang Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
King Clang Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
**/
var hotSand;
function init() {
hotSand = em.getChannelServer().getMapFactory().getMap(110040000);
hotSand = em.getChannelServer().getMapFactory().getMap(110040000);
scheduleNew();
}
@@ -41,22 +39,29 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
if(hotSand.getMonsterById(5220001) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
var kingClang = Packages.server.life.MapleLifeFactory.getMonster(5220001);
if (hotSand.getMonsterById(5220001) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
var kingClang = LifeFactory.getMonster(5220001);
var posX;
var posY = 140;
posX = Math.floor((Math.random() * 2400) - 1600);
hotSand.spawnMonsterOnGroundBelow(kingClang, new Packages.java.awt.Point(posX, posY));
hotSand.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "A strange turban shell has appeared on the beach."));
em.schedule("start", 3 * 60 * 60 * 1000);
posX = Math.floor((Math.random() * 2400) - 1600);
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(posX, posY);
hotSand.spawnMonsterOnGroundBelow(kingClang, spawnpoint);
const PacketCreator = Java.type('tools.PacketCreator');
hotSand.broadcastMessage(PacketCreator.serverNotice(6, "A strange turban shell has appeared on the beach."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,14 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
King Sage Cat Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
King Sage Cat Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
**/
function init() {
scheduleNew();
@@ -38,24 +36,30 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var goblinForest2 = em.getChannelServer().getMapFactory().getMap(250010504);
var kingSageCat = Packages.server.life.MapleLifeFactory.getMonster(7220002);
if(goblinForest2.getMonsterById(7220002) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
var kingSageCat = LifeFactory.getMonster(7220002);
if (goblinForest2.getMonsterById(7220002) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 540;
posX = Math.floor((Math.random() * 1300) - 500);
goblinForest2.spawnMonsterOnGroundBelow(kingSageCat, new Packages.java.awt.Point(posX, posY));
goblinForest2.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "The ghostly air around here has become stronger. The unpleasant sound of a cat crying can be heard."));
em.schedule("start", 3 * 60 *60 * 1000);
posX = Math.floor((Math.random() * 1300) - 500);
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(posX, posY);
goblinForest2.spawnMonsterOnGroundBelow(kingSageCat, spawnpoint);
const PacketCreator = Java.type('tools.PacketCreator');
goblinForest2.broadcastMessage(PacketCreator.serverNotice(6, "The ghostly air around here has become stronger. The unpleasant sound of a cat crying can be heard."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,14 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Leviathan Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Leviathan Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
**/
function init() {
scheduleNew();
@@ -38,24 +36,30 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var leviathansCanyon = em.getChannelServer().getMapFactory().getMap(240040401);
var leviathan = Packages.server.life.MapleLifeFactory.getMonster(8220003);
if(leviathansCanyon.getMonsterById(8220003) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
var posX;
const LifeFactory = Java.type('server.life.LifeFactory');
var leviathan = LifeFactory.getMonster(8220003);
if (leviathansCanyon.getMonsterById(8220003) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 1125;
posX = Math.floor((Math.random() * 600) - 300);
leviathansCanyon.spawnMonsterOnGroundBelow(leviathan, new Packages.java.awt.Point(posX, posY));
leviathansCanyon.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Leviathan emerges from the canyon and the cold icy wind blows."));
em.schedule("start", 3 * 60 *60 * 1000);
posX = Math.floor((Math.random() * 600) - 300);
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(posX, posY);
leviathansCanyon.spawnMonsterOnGroundBelow(leviathan, spawnpoint);
const PacketCreator = Java.type('tools.PacketCreator');
leviathansCanyon.broadcastMessage(PacketCreator.serverNotice(6, "Leviathan emerges from the canyon and the cold icy wind blows."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,13 +20,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Mano Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
-- Odin JavaScript --------------------------------------------------------------------------------
Mano Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
function init() {
scheduleNew();
@@ -37,21 +35,27 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var thicketAroundTheBeach3 = em.getChannelServer().getMapFactory().getMap(104000400);
var mano = Packages.server.life.MapleLifeFactory.getMonster(2220000);
if(thicketAroundTheBeach3.getMonsterById(2220000) != null) {
const LifeFactory = Java.type('server.life.LifeFactory');
var mano = LifeFactory.getMonster(2220000);
if (thicketAroundTheBeach3.getMonsterById(2220000) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
thicketAroundTheBeach3.spawnMonsterOnGroundBelow(mano, new Packages.java.awt.Point(279, -496));
thicketAroundTheBeach3.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "A cool breeze was felt when Mano appeared."));
em.schedule("start", 3 * 60 *60 * 1000);
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(279, -496);
thicketAroundTheBeach3.spawnMonsterOnGroundBelow(mano, spawnpoint);
const PacketCreator = Java.type('tools.PacketCreator');
thicketAroundTheBeach3.broadcastMessage(PacketCreator.serverNotice(6, "A cool breeze was felt when Mano appeared."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,14 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Nine Tailed Fox (Old Fox) Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Nine Tailed Fox (Old Fox) Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
**/
function init() {
scheduleNew();
@@ -38,23 +36,29 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var moonRidge = em.getChannelServer().getMapFactory().getMap(222010310);
var nineTailedFox = Packages.server.life.MapleLifeFactory.getMonster(7220001);
if(moonRidge.getMonsterById(7220001) != null) {
em.schedule("start", 3 * 60 *60 * 1000);
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
var nineTailedFox = LifeFactory.getMonster(7220001);
if (moonRidge.getMonsterById(7220001) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 33;
posX = Math.floor((Math.random() * 1300) - 800);
moonRidge.spawnMonsterOnGroundBelow(nineTailedFox, new Packages.java.awt.Point(posX, posY));
moonRidge.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "As the moon light dims, a long fox cry can be heard and the presence of the old fox can be felt"));
em.schedule("start", 3 * 60 *60 * 1000);
posX = Math.floor((Math.random() * 1300) - 800);
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(posX, posY);
moonRidge.spawnMonsterOnGroundBelow(nineTailedFox, spawnpoint);
const PacketCreator = Java.type('tools.PacketCreator');
moonRidge.broadcastMessage(PacketCreator.serverNotice(6, "As the moon light dims, a long fox cry can be heard and the presence of the old fox can be felt"));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -21,14 +21,12 @@
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Seruf Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Seruf Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
**/
function init() {
scheduleNew();
@@ -39,25 +37,31 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var theSeaweedTower = em.getChannelServer().getMapFactory().getMap(230020100);
var seruf = Packages.server.life.MapleLifeFactory.getMonster(4220001);
if(theSeaweedTower.getMonsterById(4220001) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
var seruf = LifeFactory.getMonster(4220001);
if (theSeaweedTower.getMonsterById(4220001) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 520;
posX = Math.floor((Math.random() * 2300) - 1500);
theSeaweedTower.spawnMonsterOnGroundBelow(seruf, new Packages.java.awt.Point(posX, posY));
theSeaweedTower.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "A strange shell has appeared from a grove of seaweed"));
em.schedule("start", 3 * 60 * 60 * 1000);
posX = Math.floor((Math.random() * 2300) - 1500);
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(posX, posY);
theSeaweedTower.spawnMonsterOnGroundBelow(seruf, spawnpoint);
const PacketCreator = Java.type('tools.PacketCreator');
theSeaweedTower.broadcastMessage(PacketCreator.serverNotice(6, "A strange shell has appeared from a grove of seaweed"));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,12 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Snack Bar Spawner
-- Edited by --------------------------------------------------------------------------------------
Ronan - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Snack Bar Spawner
-- Edited by --------------------------------------------------------------------------------------
Ronan - based on xQuasar's King Clang spawner
**/
**/
function init() {
scheduleNew();
}
@@ -35,25 +35,30 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var snackBarMap = em.getChannelServer().getMapFactory().getMap(105090310);
var snackBar = Packages.server.life.MapleLifeFactory.getMonster(8220008);
if(snackBarMap.getMonsterById(8220008) != null || snackBarMap.getMonsterById(8220009) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var setPos = [[-626, -604], [735, -600]];
var rndPos = setPos[Math.floor(Math.random() * setPos.length)];
snackBarMap.spawnMonsterOnGroundBelow(snackBar, new Packages.java.awt.Point(rndPos[0], rndPos[1]));
snackBarMap.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Slowly, a suspicious food stand opens up on a strangely remote place."));
em.schedule("start", 3 * 60 *60 * 1000);
if (snackBarMap.getMonsterById(8220008) != null || snackBarMap.getMonsterById(8220009) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var setPos = [[-626, -604], [735, -600]];
var rndPos = setPos[Math.floor(Math.random() * setPos.length)];
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
const PacketCreator = Java.type('tools.PacketCreator');
var snackBar = LifeFactory.getMonster(8220008);
snackBarMap.spawnMonsterOnGroundBelow(snackBar, new Point(rndPos[0], rndPos[1]));
snackBarMap.broadcastMessage(PacketCreator.serverNotice(6, "Slowly, a suspicious food stand opens up on a strangely remote place."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,14 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Stumpy Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Stumpy Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
**/
function init() {
scheduleNew();
@@ -38,24 +36,30 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var eastRockyMountain5 = em.getChannelServer().getMapFactory().getMap(101030404);
var stumpy = Packages.server.life.MapleLifeFactory.getMonster(3220000);
if(eastRockyMountain5.getMonsterById(3220000) != null) {
const LifeFactory = Java.type('server.life.LifeFactory');
var stumpy = LifeFactory.getMonster(3220000);
if (eastRockyMountain5.getMonsterById(3220000) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 1280;
posX = Math.floor((Math.random() * 800) + 400);
eastRockyMountain5.spawnMonsterOnGroundBelow(stumpy, new Packages.java.awt.Point(posX, posY));
eastRockyMountain5.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Stumpy has appeared with a stumping sound that rings the Stone Mountain."));
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(posX, posY);
eastRockyMountain5.spawnMonsterOnGroundBelow(stumpy, spawnpoint);
const PacketCreator = Java.type('tools.PacketCreator');
eastRockyMountain5.broadcastMessage(PacketCreator.serverNotice(6, "Stumpy has appeared with a stumping sound that rings the Stone Mountain."));
em.schedule("start", 3 * 60 * 60 * 1000);
}

View File

@@ -20,14 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Tae Roon Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Tae Roon Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
**/
function init() {
scheduleNew();
@@ -38,25 +36,31 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var territoryOfWanderingBear = em.getChannelServer().getMapFactory().getMap(250010304);
var taeRoon = Packages.server.life.MapleLifeFactory.getMonster(7220000);
if(territoryOfWanderingBear.getMonsterById(7220000) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
var taeRoon = LifeFactory.getMonster(7220000);
if (territoryOfWanderingBear.getMonsterById(7220000) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 390;
posX = Math.floor((Math.random() * 700) - 800);
territoryOfWanderingBear.spawnMonsterOnGroundBelow(taeRoon, new Packages.java.awt.Point(posX, posY));
territoryOfWanderingBear.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Tae Roon has appeared with a soft whistling sound."));
em.schedule("start", 3 * 60 * 60 * 1000);
posX = Math.floor((Math.random() * 700) - 800);
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(posX, posY);
territoryOfWanderingBear.spawnMonsterOnGroundBelow(taeRoon, spawnpoint);
const PacketCreator = Java.type('tools.PacketCreator');
territoryOfWanderingBear.broadcastMessage(PacketCreator.serverNotice(6, "Tae Roon has appeared with a soft whistling sound."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,13 +20,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Timer1 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
-- Odin JavaScript --------------------------------------------------------------------------------
Timer1 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
function init() {
scheduleNew();
@@ -37,25 +35,31 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var whirlpoolOfTime = em.getChannelServer().getMapFactory().getMap(220050100);
var timer1 = Packages.server.life.MapleLifeFactory.getMonster(5220003);
if(whirlpoolOfTime.getMonsterById(5220003) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
var timer1 = LifeFactory.getMonster(5220003);
if (whirlpoolOfTime.getMonsterById(5220003) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 1030;
posX = Math.floor((Math.random() * 770) - 770);
whirlpoolOfTime.spawnMonsterOnGroundBelow(timer1, new Packages.java.awt.Point(posX, posY));
whirlpoolOfTime.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
em.schedule("start", 3 * 60 * 60 * 1000);
posX = Math.floor((Math.random() * 770) - 770);
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(posX, posY);
whirlpoolOfTime.spawnMonsterOnGroundBelow(timer1, spawnpoint);
const PacketCreator = Java.type('tools.PacketCreator');
whirlpoolOfTime.broadcastMessage(PacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -20,14 +20,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Timer2 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Timer2 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
**/
function init() {
scheduleNew();
@@ -38,25 +36,31 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var lostTime1 = em.getChannelServer().getMapFactory().getMap(220050000);
var timer2 = Packages.server.life.MapleLifeFactory.getMonster(5220003);
if(lostTime1.getMonsterById(5220003) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
var timer2 = LifeFactory.getMonster(5220003);
if (lostTime1.getMonsterById(5220003) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 1030;
posX = Math.floor((Math.random() * 1400) - 1000);
lostTime1.spawnMonsterOnGroundBelow(timer2, new Packages.java.awt.Point(posX, posY));
lostTime1.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
em.schedule("start", 3 * 60 * 60 * 1000);
posX = Math.floor((Math.random() * 1400) - 1000);
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(posX, posY);
lostTime1.spawnMonsterOnGroundBelow(timer2, spawnpoint);
const PacketCreator = Java.type('tools.PacketCreator');
lostTime1.broadcastMessage(PacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -21,14 +21,12 @@
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Timer3 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
-- Odin JavaScript --------------------------------------------------------------------------------
Timer3 Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
importPackage(Packages.client);
**/
function init() {
scheduleNew();
@@ -39,25 +37,31 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var lostTime2 = em.getChannelServer().getMapFactory().getMap(220050200);
var timer3 = Packages.server.life.MapleLifeFactory.getMonster(5220003);
if(lostTime2.getMonsterById(5220003) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
var timer3 = LifeFactory.getMonster(5220003);
if (lostTime2.getMonsterById(5220003) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
var posX;
var posY = 1030;
posX = Math.floor((Math.random() * 1400) - 700);
lostTime2.spawnMonsterOnGroundBelow(timer3, new Packages.java.awt.Point(posX, posY));
lostTime2.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
em.schedule("start", 3 * 60 * 60 * 1000);
posX = Math.floor((Math.random() * 1400) - 700);
const Point = Java.type('java.awt.Point');
const spawnpoint = new Point(posX, posY);
lostTime2.spawnMonsterOnGroundBelow(timer3, spawnpoint);
const PacketCreator = Java.type('tools.PacketCreator');
lostTime2.broadcastMessage(PacketCreator.serverNotice(6, "Tick-Tock Tick-Tock! Timer makes it's presence known."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -21,11 +21,11 @@
*/
/**
-- Odin JavaScript --------------------------------------------------------------------------------
Zeno Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
-- Odin JavaScript --------------------------------------------------------------------------------
Zeno Spawner
-- Edited by --------------------------------------------------------------------------------------
ThreeStep - based on xQuasar's King Clang spawner
**/
function init() {
scheduleNew();
}
@@ -35,22 +35,27 @@ function scheduleNew() {
}
function cancelSchedule() {
if (setupTask != null)
if (setupTask != null) {
setupTask.cancel(true);
}
}
function start() {
var graysPrairie = em.getChannelServer().getMapFactory().getMap(221040301);
var zeno = Packages.server.life.MapleLifeFactory.getMonster(6220001);
if(graysPrairie.getMonsterById(6220001) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
graysPrairie.spawnMonsterOnGroundBelow(zeno, new Packages.java.awt.Point(-4224, 776));
graysPrairie.broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(6, "Zeno has appeared with a heavy sound of machinery."));
em.schedule("start", 3 * 60 * 60 * 1000);
if (graysPrairie.getMonsterById(6220001) != null) {
em.schedule("start", 3 * 60 * 60 * 1000);
return;
}
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
const PacketCreator = Java.type('tools.PacketCreator');
var zeno = LifeFactory.getMonster(6220001);
graysPrairie.spawnMonsterOnGroundBelow(zeno, new Point(-4224, 776));
graysPrairie.broadcastMessage(PacketCreator.serverNotice(6, "Zeno has appeared with a heavy sound of machinery."));
em.schedule("start", 3 * 60 * 60 * 1000);
}
// ---------- FILLER FUNCTIONS ----------

View File

@@ -21,9 +21,7 @@
/**
* @author: Ronan
* @event: Vs Balrog
*/
importPackage(Packages.server.life);
*/
var isPq = true;
var minPlayers = 6, maxPlayers = 30;
@@ -43,140 +41,153 @@ var bossMobId = 8830003;
var eventTime = 60; // 60 minutes
var releaseClawTime = 1;
var lobbyRange = [0, 0];
const maxLobbies = 1;
function init() {
setEventRequirements();
setEventRequirements();
}
function setLobbyRange() {
return lobbyRange;
function getMaxLobbies() {
return maxLobbies;
}
function setEventRequirements() {
var reqStr = "";
reqStr += "\r\n Number of players: ";
if(maxPlayers - minPlayers >= 1) reqStr += minPlayers + " ~ " + maxPlayers;
else reqStr += minPlayers;
reqStr += "\r\n Level range: ";
if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
else reqStr += minLevel;
reqStr += "\r\n Time limit: ";
reqStr += eventTime + " minutes";
em.setProperty("party", reqStr);
var reqStr = "";
reqStr += "\r\n Number of players: ";
if (maxPlayers - minPlayers >= 1) {
reqStr += minPlayers + " ~ " + maxPlayers;
} else {
reqStr += minPlayers;
}
reqStr += "\r\n Level range: ";
if (maxLevel - minLevel >= 1) {
reqStr += minLevel + " ~ " + maxLevel;
} else {
reqStr += minLevel;
}
reqStr += "\r\n Time limit: ";
reqStr += eventTime + " minutes";
em.setProperty("party", reqStr);
}
function setEventExclusives(eim) {
var itemSet = [];
eim.setExclusiveItems(itemSet);
var itemSet = [];
eim.setExclusiveItems(itemSet);
}
function setEventRewards(eim) {
var itemSet, itemQty, evLevel, expStages;
var itemSet, itemQty, evLevel, expStages;
evLevel = 1; //Rewards at clear PQ
itemSet = [];
itemQty = [];
eim.setEventRewards(evLevel, itemSet, itemQty);
expStages = []; //bonus exp given on CLEAR stage signal
eim.setEventClearStageExp(expStages);
evLevel = 1; //Rewards at clear PQ
itemSet = [];
itemQty = [];
eim.setEventRewards(evLevel, itemSet, itemQty);
expStages = []; //bonus exp given on CLEAR stage signal
eim.setEventClearStageExp(expStages);
}
function getEligibleParty(party) { //selects, from the given party, the team that is allowed to attempt this event
var eligible = [];
var hasLeader = false;
if(party.size() > 0) {
var partyList = party.toArray();
var eligible = [];
var hasLeader = false;
for(var i = 0; i < party.size(); i++) {
var ch = partyList[i];
if (party.size() > 0) {
var partyList = party.toArray();
if(ch.getMapId() == recruitMap && ch.getLevel() >= minLevel && ch.getLevel() <= maxLevel) {
if(ch.isLeader()) hasLeader = true;
eligible.push(ch);
}
for (var i = 0; i < party.size(); i++) {
var ch = partyList[i];
if (ch.getMapId() == recruitMap && ch.getLevel() >= minLevel && ch.getLevel() <= maxLevel) {
if (ch.isLeader()) {
hasLeader = true;
}
eligible.push(ch);
}
}
if(!(hasLeader && eligible.length >= minPlayers && eligible.length <= maxPlayers)) eligible = [];
return eligible;
}
if (!(hasLeader && eligible.length >= minPlayers && eligible.length <= maxPlayers)) {
eligible = [];
}
return Java.to(eligible, Java.type('net.server.world.PartyCharacter[]'));
}
function setup(level, lobbyid) {
var eim = em.newInstance("Balrog" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("boss", "0");
eim.getInstanceMap(105100300).resetPQ(level);
eim.getInstanceMap(105100301).resetPQ(level);
eim.schedule("releaseLeftClaw", releaseClawTime * 60000);
respawnStages(eim);
eim.startEventTimer(eventTime * 60000);
setEventRewards(eim);
setEventExclusives(eim);
return eim;
var eim = em.newInstance("Balrog" + lobbyid);
eim.setProperty("level", level);
eim.setProperty("boss", "0");
eim.getInstanceMap(105100300).resetPQ(level);
eim.getInstanceMap(105100301).resetPQ(level);
eim.schedule("releaseLeftClaw", releaseClawTime * 60000);
respawnStages(eim);
eim.startEventTimer(eventTime * 60000);
setEventRewards(eim);
setEventExclusives(eim);
return eim;
}
function afterSetup(eim) {
spawnBalrog(eim);
spawnBalrog(eim);
}
function respawnStages(eim) {}
function releaseLeftClaw(eim) {
eim.getInstanceMap(entryMap).killMonster(8830006);
eim.getInstanceMap(entryMap).killMonster(8830006);
}
function spawnBalrog(eim) {
var mapObj = eim.getInstanceMap(entryMap);
mapObj.spawnFakeMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830000), new Packages.java.awt.Point(412, 258));
mapObj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830002), new Packages.java.awt.Point(412, 258));
mapObj.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8830006), new Packages.java.awt.Point(412, 258));
var mapObj = eim.getInstanceMap(entryMap);
const LifeFactory = Java.type('server.life.LifeFactory');
const Point = Java.type('java.awt.Point');
mapObj.spawnFakeMonsterOnGroundBelow(LifeFactory.getMonster(8830000), new Point(412, 258));
mapObj.spawnMonsterOnGroundBelow(LifeFactory.getMonster(8830002), new Point(412, 258));
mapObj.spawnMonsterOnGroundBelow(LifeFactory.getMonster(8830006), new Point(412, 258));
}
function spawnSealedBalrog(eim) {
eim.getInstanceMap(entryMap).spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(bossMobId), new Packages.java.awt.Point(412, 258));
const Point = Java.type('java.awt.Point');
eim.getInstanceMap(entryMap).spawnMonsterOnGroundBelow(LifeFactory.getMonster(bossMobId), new Point(412, 258));
}
function playerEntry(eim, player) {
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));
}
function scheduledTimeout(eim) {
end(eim);
end(eim);
}
function playerUnregistered(eim, player) {}
function playerExit(eim, player) {
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
eim.unregisterPlayer(player);
player.changeMap(exitMap, 0);
}
function playerLeft(eim, player) {
if(!eim.isEventCleared()) {
playerExit(eim, player);
}
if (!eim.isEventCleared()) {
playerExit(eim, player);
}
}
function changedMap(eim, player, mapid) {
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
if (mapid < minMapId || mapid > maxMapId) {
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
} else {
eim.unregisterPlayer(player);
}
}
}
function changedLeader(eim, leader) {}
@@ -184,21 +195,21 @@ function changedLeader(eim, leader) {}
function playerDead(eim, player) {}
function playerRevive(eim, player) { // player presses ok on the death pop up.
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
} else {
eim.unregisterPlayer(player);
}
}
function playerDisconnected(eim, player) {
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
}
else
eim.unregisterPlayer(player);
if (eim.isExpeditionTeamLackingNow(true, minPlayers, player)) {
eim.unregisterPlayer(player);
end(eim);
} else {
eim.unregisterPlayer(player);
}
}
function leftParty(eim, player) {}
@@ -206,60 +217,60 @@ function leftParty(eim, player) {}
function disbandParty(eim) {}
function monsterValue(eim, mobId) {
return 1;
return 1;
}
function end(eim) {
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
var party = eim.getPlayers();
for (var i = 0; i < party.size(); i++) {
playerExit(eim, party.get(i));
}
eim.dispose();
}
function giveRandomEventReward(eim, player) {
eim.giveEventReward(player);
eim.giveEventReward(player);
}
function clearPQ(eim) {
eim.stopEventTimer();
eim.setEventCleared();
eim.stopEventTimer();
eim.setEventCleared();
}
function isUnsealedBalrog(mob) {
var balrogid = mob.getId() - 8830000;
return balrogid >= 0 && balrogid <= 2;
var balrogid = mob.getId() - 8830000;
return balrogid >= 0 && balrogid <= 2;
}
function isBalrogBody(mob) {
return mob.getId() == minMobId;
return mob.getId() == minMobId;
}
function monsterKilled(mob, eim) {
if(isUnsealedBalrog(mob)) {
var count = eim.getIntProperty("boss");
if(count == 2) {
eim.showClearEffect();
eim.clearPQ();
if (isUnsealedBalrog(mob)) {
var count = eim.getIntProperty("boss");
eim.dispatchRaiseQuestMobCount(bossMobId, entryMap);
eim.dispatchRaiseQuestMobCount(9101003, entryMap); // thanks Atoot for noticing quest not getting updated after boss kill
mob.getMap().broadcastBalrogVictory(eim.getLeader().getName());
} else {
if(count == 1) {
var mapobj = eim.getInstanceMap(entryMap);
mapobj.makeMonsterReal(mapobj.getMonsterById(8830000));
}
eim.setIntProperty("boss", count + 1);
}
if(isBalrogBody(mob)) {
eim.schedule("spawnSealedBalrog", 10 * 1000);
}
if (count == 2) {
eim.showClearEffect();
eim.clearPQ();
eim.dispatchRaiseQuestMobCount(bossMobId, entryMap);
eim.dispatchRaiseQuestMobCount(9101003, entryMap); // thanks Atoot for noticing quest not getting updated after boss kill
mob.getMap().broadcastBalrogVictory(eim.getLeader().getName());
} else {
if (count == 1) {
var mapobj = eim.getInstanceMap(entryMap);
mapobj.makeMonsterReal(mapobj.getMonsterById(8830000));
}
eim.setIntProperty("boss", count + 1);
}
if (isBalrogBody(mob)) {
eim.schedule("spawnSealedBalrog", 10 * 1000);
}
}
}
function allMonstersDead(eim) {}

Some files were not shown because too many files have changed in this diff Show More